FengChaoYu пре 6 дана
родитељ
комит
e144ae88b5

+ 3 - 2
src/main/java/com/gree/mall/contest/controller/mini/user/MiniUserController.java

@@ -69,13 +69,14 @@ public class MiniUserController {
     @PostMapping("/auth")
     @PostMapping("/auth")
     @Operation(summary = "微信授权")
     @Operation(summary = "微信授权")
     public ResponseHelper<UserWxBean> auth(
     public ResponseHelper<UserWxBean> auth(
-            @Parameter(description = "业务员用户id", required = false) @RequestParam(required = false) String serviceId,
+            @Parameter(description = "业务员用户id") @RequestParam(required = false) String serviceId,
             @Parameter(description = "code", required = true) @RequestParam String code,
             @Parameter(description = "code", required = true) @RequestParam String code,
+            @Parameter(description = "公众号openid") @RequestParam(required = false) String mpOpenId,
             HttpServletRequest request
             HttpServletRequest request
     ) throws Exception {
     ) throws Exception {
         UserWxBean userWxBean;
         UserWxBean userWxBean;
         log.info("微信授权 code:{} serviceId:{} ", code, serviceId);
         log.info("微信授权 code:{} serviceId:{} ", code, serviceId);
-        userWxBean = userLogic.addUser(code, serviceId, request);
+        userWxBean = userLogic.addUser(code, serviceId, mpOpenId, request);
         userLogic.addVisit(request, userWxBean.getUserId());
         userLogic.addVisit(request, userWxBean.getUserId());
         log.info(userWxBean.toString());
         log.info(userWxBean.toString());
         return ResponseHelper.success(userWxBean);
         return ResponseHelper.success(userWxBean);

+ 3 - 3
src/main/java/com/gree/mall/contest/logic/order/OrderLogic.java

@@ -1996,9 +1996,9 @@ public class OrderLogic {
                     orderInfo.setWebsitName(workUser.getWebsitName());
                     orderInfo.setWebsitName(workUser.getWebsitName());
                     orderInfo.setWebsitNumber(Objects.nonNull(adminWebsit) ? adminWebsit.getWebsitNumber() : null);
                     orderInfo.setWebsitNumber(Objects.nonNull(adminWebsit) ? adminWebsit.getWebsitNumber() : null);
 
 
-                    if (workUser.getCustomerServiceFlag() != null && workUser.getCustomerServiceFlag()) {
-                        orderInfo.setSource("svip邀请");
-                    }
+//                    if (workUser.getCustomerServiceFlag() != null && workUser.getCustomerServiceFlag()) {
+//                        orderInfo.setSource("svip邀请");
+//                    }
                 }
                 }
             }
             }
         }
         }

+ 2 - 1
src/main/java/com/gree/mall/contest/logic/user/UserLogic.java

@@ -761,12 +761,13 @@ public class UserLogic {
      *
      *
      * @param code
      * @param code
      * @param serviceId
      * @param serviceId
+     * @param mpOpenId
      * @return
      * @return
      * @throws RemoteServiceException
      * @throws RemoteServiceException
      * @throws InterruptedException
      * @throws InterruptedException
      */
      */
     @Transactional
     @Transactional
-    public UserWxBean addUser(String code, String serviceId, HttpServletRequest request) throws RemoteServiceException, InterruptedException {
+    public UserWxBean addUser(String code, String serviceId, String mpOpenId, HttpServletRequest request) throws RemoteServiceException, InterruptedException {
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
         final WechatOpenBean wechatOpenBean = wechatLogic.authToken(code, currentCompanyWechat.getSubAppId());
         final WechatOpenBean wechatOpenBean = wechatLogic.authToken(code, currentCompanyWechat.getSubAppId());