jk-GitHub-coder 4 年之前
父節點
當前提交
ec8e95df06
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      YijiaRestful/src/main/java/com/platform/yijia/controller/AppUserInfoController.java

+ 7 - 1
YijiaRestful/src/main/java/com/platform/yijia/controller/AppUserInfoController.java

@@ -207,7 +207,13 @@ public class AppUserInfoController {
                 resultData = ResultData.error(CodeMsg.USER_EXSIST);
             }else {
                 appUserInfoService.AddAppUserInfo(appUserInfo);
-                customerPointsService.insertCustomerPointsInfo(customerPoints);
+                //此处是为初期没使用unionid,以作更新前期用户unionId
+                boolean boo = customerPointsService.isExistCustomerPointsInfo(customerPoints);
+                if(!boo){
+                    customerPointsService.insertCustomerPointsInfo(customerPoints);
+                }else {
+                    appUserInfoService.updateUnionId(appUserInfo);
+                }
                 resultData = ResultData.success(CodeMsg.SUCCESS);
             }
         }catch (Exception e){