This commit is contained in:
wangh 2023-11-29 14:03:47 +08:00
parent 36dce77987
commit 7073e91a34
4 changed files with 36 additions and 11 deletions

View File

@ -780,7 +780,7 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
mtUser.setPoint(0); mtUser.setPoint(0);
mtUser.setDescription("微信登录自动注册"); mtUser.setDescription("微信登录自动注册");
mtUser.setIdcard(""); mtUser.setIdcard("");
mtUser.setStatus(StatusEnum.ENABLED.getKey()); mtUser.setStatus("qy");
mtUser.setAddress(country + province + city); mtUser.setAddress(country + province + city);
// 微信用户 12 0未知 // 微信用户 12 0未知
if (gender.equals(GenderEnum.FEMALE.getKey().toString())) { if (gender.equals(GenderEnum.FEMALE.getKey().toString())) {
@ -835,13 +835,9 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
mtInvitation.setStoreId(Integer.parseInt(storeId)); mtInvitation.setStoreId(Integer.parseInt(storeId));
mtInvitation.setStaffid(Integer.parseInt(staffId)); mtInvitation.setStaffid(Integer.parseInt(staffId));
mtInvitation.setInviterid(Integer.parseInt(inviterId)); mtInvitation.setInviterid(Integer.parseInt(inviterId));
mtInvitationMapper.insert(mtInvitation);
} }
// 新增关联表信息
// 查询是否有
} }
} else { } else {
// 已被禁用 // 已被禁用
if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) { if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) {
@ -852,6 +848,20 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
user.setMobile(mobile); user.setMobile(mobile);
updateById(user); updateById(user);
} }
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserid(user.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
mtInvitation.setStaffid(Integer.parseInt(staffId));
mtInvitation.setInviterid(Integer.parseInt(inviterId));
mtInvitationMapper.insert(mtInvitation);
}
}
// 补充信息
// 补充会员号 // 补充会员号
// if (StringUtil.isEmpty(user.getUserNo())) { // if (StringUtil.isEmpty(user.getUserNo())) {
// user.setUserNo(CommonUtil.createUserNo()); // user.setUserNo(CommonUtil.createUserNo());
@ -864,6 +874,10 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
/** /**
* 根据等级ID获取会员等级信息 * 根据等级ID获取会员等级信息
* *

View File

@ -3,6 +3,7 @@ package com.fuint.module.clientApi.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.dto.TokenDto; import com.fuint.common.dto.TokenDto;
import com.fuint.common.dto.UserInfo; import com.fuint.common.dto.UserInfo;
import com.fuint.common.enums.GenderEnum; import com.fuint.common.enums.GenderEnum;
@ -10,24 +11,32 @@ import com.fuint.common.enums.MemberSourceEnum;
import com.fuint.common.enums.StatusEnum; import com.fuint.common.enums.StatusEnum;
import com.fuint.common.service.*; import com.fuint.common.service.*;
import com.fuint.common.util.CommonUtil; import com.fuint.common.util.CommonUtil;
import com.fuint.common.util.Constants;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.framework.exception.BusinessCheckException; import com.fuint.framework.exception.BusinessCheckException;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import com.fuint.module.backendApi.request.LoginRequest;
import com.fuint.module.backendApi.response.LoginResponse;
import com.fuint.repository.model.MtMerchant; import com.fuint.repository.model.MtMerchant;
import com.fuint.business.store.entity.MtStore; import com.fuint.business.store.entity.MtStore;
import com.fuint.repository.model.MtUser; import com.fuint.repository.model.MtUser;
import com.fuint.repository.model.MtVerifyCode; import com.fuint.repository.model.MtVerifyCode;
import com.fuint.repository.model.TAccount;
import com.fuint.utils.StringUtil; import com.fuint.utils.StringUtil;
import io.lettuce.core.ScriptOutputType; import io.lettuce.core.ScriptOutputType;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -145,6 +154,7 @@ public class ClientSignController extends BaseController {
return getSuccessResult("登录成功", result); return getSuccessResult("登录成功", result);
} }
/** /**
* 微信授权登录公众号 * 微信授权登录公众号
* */ * */

View File

@ -106,8 +106,8 @@
}, },
onLoad() { onLoad() {
// this.getCategoryList(); this.getCategoryList();
// this.getIntegralGiftList(); this.getIntegralGiftList();
}, },
methods: { methods: {
transferIndex(index) { transferIndex(index) {
@ -116,7 +116,7 @@
// //
getCategoryList() { getCategoryList() {
request({ request({
url: 'dev-api/business/integral/integralGiftCategory/queryByPage', url: '/business/integral/integralGiftCategory/queryByPage',
method: 'get', method: 'get',
// params:{} // params:{}
}).then((res)=>{ }).then((res)=>{
@ -131,7 +131,7 @@
request({ request({
url: '/business/integral/integralGift/queryByPage', url: '/business/integral/integralGift/queryByPage',
method: 'get', method: 'get',
params:data // params:data
}).then((res)=>{ }).then((res)=>{
if(res.code == 200){ if(res.code == 200){
console.log("hello world",res) console.log("hello world",res)

View File

@ -12,7 +12,8 @@ const request = config => {
const isToken = (config.headers || {}).isToken === false const isToken = (config.headers || {}).isToken === false
config.header = config.header || {} config.header = config.header || {}
if (getToken() && !isToken) { if (getToken() && !isToken) {
config.header['Authorization'] = 'Bearer ' + getToken() // config.header['Authorization'] = getToken()
config.header['Access-Token'] = getToken()
} }
// get请求映射params参数 // get请求映射params参数
if (config.params) { if (config.params) {