From 7073e91a34b34a57b53fcb7f8ce3b283aa77c1db Mon Sep 17 00:00:00 2001 From: wangh <9483> Date: Wed, 29 Nov 2023 14:03:47 +0800 Subject: [PATCH] 1 --- .../service/impl/MemberServiceImpl.java | 26 ++++++++++++++----- .../controller/ClientSignController.java | 10 +++++++ .../pagesHome/PointsMall/PointsMall.vue | 8 +++--- gasStation-uni/utils/request.js | 3 ++- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java index 4f29456ac..71c8a1658 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java @@ -780,7 +780,7 @@ public class MemberServiceImpl extends ServiceImpl impleme mtUser.setPoint(0); mtUser.setDescription("微信登录自动注册"); mtUser.setIdcard(""); - mtUser.setStatus(StatusEnum.ENABLED.getKey()); + mtUser.setStatus("qy"); mtUser.setAddress(country + province + city); // 微信用户 1:男;2:女 0:未知 if (gender.equals(GenderEnum.FEMALE.getKey().toString())) { @@ -835,13 +835,9 @@ public class MemberServiceImpl extends ServiceImpl impleme mtInvitation.setStoreId(Integer.parseInt(storeId)); mtInvitation.setStaffid(Integer.parseInt(staffId)); mtInvitation.setInviterid(Integer.parseInt(inviterId)); + mtInvitationMapper.insert(mtInvitation); } - // 新增关联表信息 - - - // 查询是否有 } - } else { // 已被禁用 if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) { @@ -852,6 +848,20 @@ public class MemberServiceImpl extends ServiceImpl impleme user.setMobile(mobile); 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())) { // user.setUserNo(CommonUtil.createUserNo()); @@ -864,6 +874,10 @@ public class MemberServiceImpl extends ServiceImpl impleme + + + + /** * 根据等级ID获取会员等级信息 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java index da7a7d5ce..8263afeb6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java @@ -3,6 +3,7 @@ package com.fuint.module.clientApi.controller; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; import com.fuint.business.store.service.StoreService; +import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.TokenDto; import com.fuint.common.dto.UserInfo; 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.service.*; import com.fuint.common.util.CommonUtil; +import com.fuint.common.util.Constants; import com.fuint.common.util.TokenUtil; import com.fuint.framework.exception.BusinessCheckException; import com.fuint.framework.web.BaseController; 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.business.store.entity.MtStore; import com.fuint.repository.model.MtUser; import com.fuint.repository.model.MtVerifyCode; +import com.fuint.repository.model.TAccount; import com.fuint.utils.StringUtil; import io.lettuce.core.ScriptOutputType; import io.swagger.annotations.Api; 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.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -145,6 +154,7 @@ public class ClientSignController extends BaseController { return getSuccessResult("登录成功", result); } + /** * 微信授权登录(公众号) * */ diff --git a/gasStation-uni/pagesHome/PointsMall/PointsMall.vue b/gasStation-uni/pagesHome/PointsMall/PointsMall.vue index 69ccff173..eb6fd690d 100644 --- a/gasStation-uni/pagesHome/PointsMall/PointsMall.vue +++ b/gasStation-uni/pagesHome/PointsMall/PointsMall.vue @@ -106,8 +106,8 @@ }, onLoad() { - // this.getCategoryList(); - // this.getIntegralGiftList(); + this.getCategoryList(); + this.getIntegralGiftList(); }, methods: { transferIndex(index) { @@ -116,7 +116,7 @@ // 获取积分商城分类 getCategoryList() { request({ - url: 'dev-api/business/integral/integralGiftCategory/queryByPage', + url: '/business/integral/integralGiftCategory/queryByPage', method: 'get', // params:{} }).then((res)=>{ @@ -131,7 +131,7 @@ request({ url: '/business/integral/integralGift/queryByPage', method: 'get', - params:data + // params:data }).then((res)=>{ if(res.code == 200){ console.log("hello world",res) diff --git a/gasStation-uni/utils/request.js b/gasStation-uni/utils/request.js index e2010c82e..9f49a62d3 100644 --- a/gasStation-uni/utils/request.js +++ b/gasStation-uni/utils/request.js @@ -12,7 +12,8 @@ const request = config => { const isToken = (config.headers || {}).isToken === false config.header = config.header || {} if (getToken() && !isToken) { - config.header['Authorization'] = 'Bearer ' + getToken() + // config.header['Authorization'] = getToken() + config.header['Access-Token'] = getToken() } // get请求映射params参数 if (config.params) {