Kaynağa Gözat

参数异常提示

chao 4 yıl önce
ebeveyn
işleme
e0bdfc448e

+ 0 - 228
src/main/java/com/caimei365/user/controller/AllApi.txt

@@ -1,89 +1,3 @@
-package com.caimei365.user.controller;
-
-import org.apache.commons.lang.StringUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-
-public class AllApi {
-
-//注册
-
-    /**
-     * 供应商注册
-     * @param source                注册来源: 0网站 1小程序
-     * @param bindMobile            企业绑定手机号
-     * @param email                 邮箱
-     * @param mobileCode            手机验证码
-     * @param password              密码
-     * @param passWordConfirm       用户确认密码
-     * @param name                  组织名称
-     * @param linkMan               联系人
-     * @param shortName                 供应商公司简称
-     * @param provinceID            省
-     * @param cityID                市
-     * @param townID                所在县区Id
-     * @param address               地址
-     * @param socialCreditCode      统一社会信用代码
-     * @param businessLicenseImage  营业执照
-     * @param firstShopType         医疗=1和非医疗=2
-     * @param secondShopType        医疗的二级分类 一类器械=1、二类器械 =2、三类器械=3、其他=4 /// 1和非医疗没有二级分类
-     * @param mainpro               主打项目
-     * @param isAgreed              是否同意勾选同意协议,1是,其他否
-     */
-    @PostMapping("/supplier/register")
-    public JsonModel register(UserVo user, ShopVo shop, String isAgreed) {
-        return null;
-    }
-
-    /**
-     * 小程序分步供应商注册
-     */
-    @PostMapping("/appletsRegistered")
-    public JsonModel appletsShopRegistered(UserVo user, ShopVo shop, String isAgreed, Integer whichStep) {
-        JsonModel model = JsonModel.newInstance();
-        if (whichStep == 1) {
-            if (StringUtils.isBlank(user.getBindMobile()) || StringUtils.isBlank(user.getPassword()) || StringUtils.isBlank(shop.getMobileCode())) {
-                return model.error("参数异常");
-            }
-            if (!user.getPassword().equals(user.getPassWordConfirm())) {
-                return model.error("两次输入的密码不一致");
-            }
-        } else if (whichStep == 2) {
-            if (StringUtils.isBlank(shop.getName()) || StringUtils.isBlank(shop.getLinkMan())) {
-                return model.error("参数异常");
-            }
-        } else {
-            if (!"1".equals(isAgreed)) {
-                return model.error("请勾选同意协议");
-            }
-        }
-        return supplierService.appletsShopRegistered(user, shop, whichStep);
-    }
-
-//club
-
-
-    /**
-     * 邀请码授权登录
-     * @param invitationCode    邀请码
-     * @param nickName          微信昵称
-     * @param headimgurl        微信头像
-     */
-    @PostMapping("/club/invitationCode")
-    public JsonModel invitationCode(OperationVo operation, HttpServletRequest request) {
-        return null;
-    }
-
-    /**
-     * 绑定微信
-     * @param userID            机构ID:隶属于哪个会所的运营人员[用户类型为机构时有效数据]
-     * @param mobile            手机号码
-     * @param verificationCode  手机验证码
-     */
-    @PostMapping("/club/bindingWx")
-    public JsonModel bindingWx(OperationVo operationVo, HttpServletRequest request) {
-        return null;
-    }
 
     /**
      * 修改手机号,发送验证码
@@ -154,36 +68,6 @@ public class AllApi {
         return null;
     }
 
-//login
-    /**
-     * 返回修改申请信息的数据
-     */
-    @GetMapping("/user/club/applicationData")
-    public JsonModel applicationData(Integer userID) {
-        return null;
-    }
-
-
-    /**
-     * 【可能废弃了】修改申请信息
-     */
-    @PostMapping("/user/club/updateCompanyInfo")
-    public JsonModel updateCompanyInfo(ClubVo clubVo) {
-        return null;
-    }
-
-    /**
-     * 登录(用户名,密码)
-     *
-     * @param mobileOrEmail
-     * @param password
-     * @return token
-     */
-    @PostMapping("/user/login")
-    public JsonModel login(String mobileOrEmail, String password, String source) {
-        return null;
-    }
-
     /**
      * 发送邮箱验证码
      *
@@ -202,75 +86,6 @@ public class AllApi {
         return null;
     }
 
-    /**
-     * 提供参数,去微信登录页面
-     */
-    @GetMapping("/user/toWechatLogin")
-    public JsonModel toWechatLogin() {
-        return null;
-    }
-
-    /**
-     * 微信扫码登录
-     */
-    @GetMapping("/user/wechatLogin")
-    public void wechatLogin(String code, String state, HttpServletRequest request) {
-    }
-
-    /**
-     * 轮询获取微信信息
-     */
-    @GetMapping("/user/polling")
-    public JsonModel polling(String uuid, HttpServletRequest request) {
-        return null;
-    }
-
-    /**
-     * 绑定机构账号
-     * @param mobileOrEmail     手机号或邮箱
-     * @param password          密码
-     * @param mobile            手机号
-     * @param verificationCode  手机验证码
-     */
-    @PostMapping("/user/bindOrganization")
-    public JsonModel bindOrganization(OperationVo operationUser, HttpServletRequest request) {
-        return null;
-
-    }
-
-    /**
-     * 绑定机构账号,发送短信验证
-     */
-    @GetMapping("/user/note")
-    public JsonModel note(String mobile, String mobileOrEmail, String imgCode, String token, Integer platformType) {
-        return null;
-
-    }
-
-    /**
-     * 获取图形验证码
-     *
-     * @param platformType 0 www 、1 crm ,2 小程序
-     */
-    @GetMapping("/user/getImgVerifyCode")
-    public JsonModel getImgVerifyCode(Integer platformType) {
-        return null;
-    }
-
-
-    /**
-     * 手机号发送验证码
-     *
-     * @param mobile
-     * @param activateCodeType 1:找回密码,2:手机号注册机构,3:供应商注册
-     * @param imgCode
-     * @param token
-     * @return
-     */
-    @GetMapping("/user/activateCodeByReg")
-    public JsonModel activateCodeByReg(String mobile, String activateCodeType, String imgCode, String token, Integer platformType) {
-        return null;
-    }
 
     /**
      * 忘记密码,找回密码
@@ -287,21 +102,6 @@ public class AllApi {
         return null;
     }
 
-    /**
-     * 微信公众号授权链接
-     */
-    @GetMapping("/user/authorizationLink")
-    public JsonModel authorizationLink(String redirectUri, Integer mode) {
-        return null;
-    }
-
-    /**
-     * 微信公众号授权登录
-     */
-    @GetMapping("/user/authorizationLogin")
-    public JsonModel authorizationLogin(String code, String state, Integer mode, HttpServletRequest request) {
-        return null;
-    }
 
 //message
     /**
@@ -383,34 +183,6 @@ public class AllApi {
         return operationService.unbindOperation(operation);
     }
 
-    /**
-     * 修改机构资料
-     * @param userID                        用户ID
-     * @param clubID                        机构ID
-     * @param name                          机构名称
-     * @param linkMan1                      联系人
-     * @param shortName                         机构简称
-     * @param contractEmail1                邮箱
-     * @param provinceID                    省
-     * @param cityID                        市
-     * @param townID                        区
-     * @param address                       地址
-     * @param socialCreditCode              统一社会信用代码
-     * @param businessLicenseImag           营业执照
-     * @param headpic                       门头照
-     * @param firstClubType                 一级分类为医美=1和生美=2
-     * @param secondClubType                医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类
-     * @param department                    若为医美分类下的门诊和医院则需要填写科室。
-     * @param medicalPracticeLicenseImg     医美分类必须上传医疗执业许可证
-     * @param mainpro                       主打项目
-     * @param fax                           传真
-     * @param contractPhone                 电话
-     * @param info                          公司简介
-     */
-    @PostMapping("/operation/modifiedData")
-    public JsonModel modifiedData(ClubVo club) {
-        return operationService.modifiedData(club);
-    }
 
 //pcCenter
     /**

+ 10 - 4
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -40,7 +40,7 @@ public class ClubServiceImpl implements ClubService {
     @Override
     public ResponseJson<Map<String, Object>> getClubUserInfo(Integer userId) {
         if (null == userId) {
-            return ResponseJson.error("参数异常", null);
+            return ResponseJson.error("参数异常:用户Id不能为空!", null);
         }
         // 用户信息
         UserVo user = baseMapper.getUserByUserId(userId);
@@ -111,8 +111,14 @@ public class ClubServiceImpl implements ClubService {
     @Override
     public ResponseJson<ClubUpdateDto> updateClubUserInfo(ClubUpdateDto club) {
         // 参数校验
-        if (club.getClubId() == null || club.getUserId() == null || StringUtils.isBlank(club.getLinkMan())) {
-            return ResponseJson.error("参数异常", null);
+        if (club.getUserId() == null) {
+            return ResponseJson.error("参数异常:用户Id不能为空!", null);
+        }
+        if (club.getClubId() == null) {
+            return ResponseJson.error("参数异常:机构Id不能为空!", null);
+        }
+        if (club.getLinkMan() == null) {
+            return ResponseJson.error("参数异常:联系人不能为空!", null);
         }
         if (StringUtils.isNotBlank(club.getContractEmail())) {
             Integer userIdByEmail = baseMapper.getUserIdByEmail(club.getContractEmail());
@@ -150,7 +156,7 @@ public class ClubServiceImpl implements ClubService {
     @Override
     public ResponseJson<Map<String, Object>> getClubHomeData(Integer userId) {
         if (null == userId) {
-            return ResponseJson.error("参数异常", null);
+            return ResponseJson.error("参数异常:用户Id不能为空!", null);
         }
         // 用户信息
         UserVo user = baseMapper.getUserByUserId(userId);

+ 27 - 6
src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

@@ -178,7 +178,7 @@ public class LoginServiceImpl implements LoginService {
     @Override
     public ResponseJson<UserLoginVo> websiteAuthorization(String code, String state, Integer mode, HttpHeaders headers) {
         if (StringUtils.isBlank(code) || StringUtils.isBlank(state)) {
-            return ResponseJson.error("参数异常", null);
+            return ResponseJson.error("参数异常:微信code和state不能为空!", null);
         }
         String wxState = (String) redisService.get(state);
         log.info("微信code>>>" + code + "state>>>" + wxState + "----" + state + "mode>>>" + mode);
@@ -338,7 +338,7 @@ public class LoginServiceImpl implements LoginService {
     @Override
     public ResponseJson<UserLoginVo> qrCodeAuthScanResult(String state) {
         if (StringUtils.isBlank(state)) {
-            return ResponseJson.error("参数异常", null);
+            return ResponseJson.error("参数异常:state不能为空!", null);
         }
         String errorMsg = (String) redisService.get("error:" + state);
         if (StringUtils.isNotEmpty(errorMsg) && !"null".equals(errorMsg)) {
@@ -382,8 +382,20 @@ public class LoginServiceImpl implements LoginService {
         String linkName = scanBindDto.getLinkName();
         String unionId = scanBindDto.getUnionId();
         // 参数校验
-        if (StringUtils.isBlank(mobileOrEmail) || StringUtils.isBlank(password) || StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode) || StringUtils.isBlank(unionId)) {
-            return ResponseJson.error("参数异常", null);
+        if (StringUtils.isBlank(mobileOrEmail)) {
+            return ResponseJson.error("参数异常:手机号或邮箱不能为空!", null);
+        }
+        if (StringUtils.isBlank(password)) {
+            return ResponseJson.error("参数异常:密码不能为空!", null);
+        }
+        if (StringUtils.isBlank(mobile)) {
+            return ResponseJson.error("参数异常:手机号不能为空!", null);
+        }
+        if (StringUtils.isBlank(smsCode)) {
+            return ResponseJson.error("参数异常:短信验证码不能为空!", null);
+        }
+        if (StringUtils.isBlank(unionId)) {
+            return ResponseJson.error("参数异常:unionId不能为空!", null);
         }
         //处理比对密码
         UserLoginVo user = loginMapper.getLoginUserByMobileOrEmail(mobileOrEmail);
@@ -542,8 +554,17 @@ public class LoginServiceImpl implements LoginService {
         String nickName = authBindDto.getNickName();
         String avatarUrl = authBindDto.getAvatarUrl();
         // 参数校验
-        if (null == userId || StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode) || StringUtils.isBlank(unionId)) {
-            return ResponseJson.error("参数异常", null);
+        if (null == userId) {
+            return ResponseJson.error("参数异常:用户Id不能为空!", null);
+        }
+        if (StringUtils.isBlank(mobile)) {
+            return ResponseJson.error("参数异常:手机号不能为空!", null);
+        }
+        if (StringUtils.isBlank(smsCode)) {
+            return ResponseJson.error("参数异常:短信验证码不能为空!", null);
+        }
+        if (StringUtils.isBlank(unionId)) {
+            return ResponseJson.error("参数异常:unionId短信验证码不能为空!", null);
         }
         // 查询使用该手机号的运营人员或用户
         String checkRust = operationBindCheck(mobile, smsCode);

+ 74 - 27
src/main/java/com/caimei365/user/service/impl/RegisterServiceImpl.java

@@ -90,16 +90,26 @@ public class RegisterServiceImpl implements RegisterService{
         String ip = headers.getFirst("X-CLIENT-IP");
         log.info("机构注册 X-CLIENT-IP : " + ip);
         // 参数校验
-        if (null == clubRegisterDto.getIsAgreed() || StringUtils.isBlank(clubRegisterDto.getUserName()) || StringUtils.isBlank(clubRegisterDto.getBindMobile())
-            || StringUtils.isBlank(clubRegisterDto.getPassword()) || StringUtils.isBlank(clubRegisterDto.getPassWordConfirm()) ||
-            StringUtils.isBlank(clubRegisterDto.getSmsCode())) {
-            return ResponseJson.error("参数异常");
+        if (StringUtils.isBlank(clubRegisterDto.getUserName())) {
+            return ResponseJson.error("参数异常:用户名不能为空!");
         }
-        if (1 != clubRegisterDto.getIsAgreed()) {
+        if (StringUtils.isBlank(clubRegisterDto.getBindMobile())) {
+            return ResponseJson.error("参数异常:企业绑定手机号不能为空!");
+        }
+        if (StringUtils.isBlank(clubRegisterDto.getPassword())) {
+            return ResponseJson.error("参数异常:密码不能为空!");
+        }
+        if (StringUtils.isBlank(clubRegisterDto.getPassWordConfirm())) {
+            return ResponseJson.error("参数异常:确认密码不能为空!");
+        }
+        if (StringUtils.isBlank(clubRegisterDto.getSmsCode())) {
+            return ResponseJson.error("参数异常:短信验证码不能为空!");
+        }
+        if (null == clubRegisterDto.getIsAgreed() || 1 != clubRegisterDto.getIsAgreed()) {
             return ResponseJson.error("请勾选同意协议");
         }
         if (!clubRegisterDto.getPassword().equals(clubRegisterDto.getPassWordConfirm())) {
-            return ResponseJson.error("输入的密码不一致");
+            return ResponseJson.error("两次输入的密码不一致");
         }
         // 手机号与验证码校验
         String result = commonService.mobileAndCodeValidate(clubRegisterDto.getBindMobile(), clubRegisterDto.getSmsCode());
@@ -278,9 +288,26 @@ public class RegisterServiceImpl implements RegisterService{
         String ip = headers.getFirst("X-CLIENT-IP");
         log.info("机构升级 X-CLIENT-IP : " + ip);
         // 参数校验
-        if (upgradeDto.getUserId() == null || upgradeDto.getClubId() == null || StringUtils.isBlank(upgradeDto.getContractEmail()) || StringUtils.isBlank(upgradeDto.getName())
-                || StringUtils.isBlank(upgradeDto.getBusinessLicense()) || upgradeDto.getTownId() == null || upgradeDto.getFirstClubType() == null) {
-            return ResponseJson.error("参数异常");
+        if (null == upgradeDto.getUserId()) {
+            return ResponseJson.error("参数异常:用户Id不能为空!");
+        }
+        if (null == upgradeDto.getClubId()) {
+            return ResponseJson.error("参数异常:机构Id不能为空!");
+        }
+        if (StringUtils.isBlank(upgradeDto.getContractEmail())) {
+            return ResponseJson.error("参数异常:联系邮箱不能为空!");
+        }
+        if (StringUtils.isBlank(upgradeDto.getName())) {
+            return ResponseJson.error("参数异常:机构名称不能为空!");
+        }
+        if (StringUtils.isBlank(upgradeDto.getBusinessLicense())) {
+            return ResponseJson.error("参数异常:营业执照不能为空!");
+        }
+        if (null == upgradeDto.getTownId()) {
+            return ResponseJson.error("参数异常:请选择地址!");
+        }
+        if (null == upgradeDto.getFirstClubType()) {
+            return ResponseJson.error("参数异常:一级分类不能为空!");
         }
         if (upgradeDto.getFirstClubType() == 1){
             if (upgradeDto.getSecondClubType() == null || StringUtils.isBlank(upgradeDto.getMedicalPracticeLicense())) {
@@ -403,16 +430,22 @@ public class RegisterServiceImpl implements RegisterService{
         // 手机号
         String mobile = onlineDto.getBindMobile();
         // 参数校验
-        if (onlineDto.getUserId() == null ||  StringUtils.isBlank(onlineDto.getLinkMan()) || StringUtils.isBlank(mobile)
-                || isAgreed == null) {
-            return ResponseJson.error("参数异常");
+        if (null == onlineDto.getUserId()) {
+            return ResponseJson.error("参数异常:用户Id不能为空!");
         }
-        if (1 != isAgreed) {
+        if (StringUtils.isBlank(mobile)) {
+            return ResponseJson.error("参数异常:企业绑定手机号不能为空!");
+        }
+        if (StringUtils.isBlank(onlineDto.getLinkMan())) {
+            return ResponseJson.error("参数异常:联系人不能为空!");
+        }
+        if (null == isAgreed || 1 != isAgreed) {
             return ResponseJson.error("请勾选同意协议");
         }
         // 是否填写升级资料
+        String businessLicense = onlineDto.getBusinessLicense();
         String email = onlineDto.getContractEmail();
-        if (StringUtils.isNotBlank(email)) {
+        if (StringUtils.isNotBlank(businessLicense)) {
             // 邮箱验证
             String emailCheck = commonService.emailValidate(email);
             if (emailCheck != null) {return ResponseJson.error(emailCheck);}
@@ -476,7 +509,7 @@ public class RegisterServiceImpl implements RegisterService{
         // 协销状态
         user.setServiceProviderStatus(serviceProvider.getStatus());
         // 会员机构,填写升级资料
-        if (StringUtils.isNotBlank(email)) {
+        if (StringUtils.isNotBlank(businessLicense)) {
             // 状态:待审查资料
             user.setClubStatus(1);
             // 组织名称
@@ -513,7 +546,7 @@ public class RegisterServiceImpl implements RegisterService{
         // 注册时间
         club.setAddTime(current);
         // 会员机构,填写升级资料
-        if (StringUtils.isNotBlank(email)) {
+        if (StringUtils.isNotBlank(businessLicense)) {
             // 机构名称
             club.setName(onlineDto.getName());
             // 机构简称
@@ -530,7 +563,7 @@ public class RegisterServiceImpl implements RegisterService{
             // 门头照
             club.setShopPhoto(onlineDto.getShopPhoto());
             // 营业执照
-            club.setBusinessLicense(onlineDto.getBusinessLicense());
+            club.setBusinessLicense(businessLicense);
             // 统一社会信用代码
             club.setSocialCreditCode(onlineDto.getSocialCreditCode());
             // 分类: 1医美, 2生美
@@ -630,11 +663,19 @@ public class RegisterServiceImpl implements RegisterService{
         String ip = headers.getFirst("X-CLIENT-IP");
         log.info("供应商注册 X-CLIENT-IP : " + ip);
         // 参数校验
-        if (StringUtils.isBlank(shopRegisterDto.getBindMobile()) || StringUtils.isBlank(smsCode)
-                || StringUtils.isBlank(shopRegisterDto.getPassword()) || StringUtils.isBlank(passWordConfirm)) {
-            return ResponseJson.error("参数异常");
+        if (StringUtils.isBlank(shopRegisterDto.getBindMobile())) {
+            return ResponseJson.error("参数异常:企业绑定手机号不能为空!");
         }
-        if (!shopRegisterDto.getPassword() .equals(passWordConfirm)) {
+        if (StringUtils.isBlank(shopRegisterDto.getPassword())) {
+            return ResponseJson.error("参数异常:密码不能为空!");
+        }
+        if (StringUtils.isBlank(passWordConfirm)) {
+            return ResponseJson.error("参数异常:确认密码不能为空!");
+        }
+        if (StringUtils.isBlank(smsCode)) {
+            return ResponseJson.error("参数异常:短信验证码不能为空!");
+        }
+        if (!shopRegisterDto.getPassword().equals(passWordConfirm)) {
             return ResponseJson.error("两次输入的密码不一致");
         }
         // 手机号与验证码校验
@@ -644,8 +685,11 @@ public class RegisterServiceImpl implements RegisterService{
         if (1 == whichStep) {
             return ResponseJson.success(null);
         }
-        if (StringUtils.isBlank(shopRegisterDto.getName()) || StringUtils.isBlank(shopRegisterDto.getLinkMan())) {
-            return ResponseJson.error("参数异常");
+        if (StringUtils.isBlank(shopRegisterDto.getName())) {
+            return ResponseJson.error("参数异常:公司名称不能为空!");
+        }
+        if (StringUtils.isBlank(shopRegisterDto.getLinkMan())) {
+            return ResponseJson.error("参数异常:联系人不能为空!");
         }
         if (StringUtils.isNotEmpty(shopRegisterDto.getEmail())) {
             // 查找用户表是否存在相同邮箱
@@ -658,7 +702,7 @@ public class RegisterServiceImpl implements RegisterService{
         if (2 == whichStep) {
             return ResponseJson.success(null);
         }
-        if (null != isAgreed && 1 != isAgreed) {
+        if (null == isAgreed || 1 != isAgreed) {
             return ResponseJson.error("请勾选同意协议");
         }
         /*
@@ -757,10 +801,13 @@ public class RegisterServiceImpl implements RegisterService{
      */
     @Override
     public ResponseJson updateShopApply(ShopApplyDto shop, HttpHeaders headers) {
-        if (null == shop || null == shop.getUserId() || null == shop.getShopId() || null ==shop.getIsAgreed()) {
-            return ResponseJson.error("参数异常");
+        if (null == shop || null == shop.getUserId()) {
+            return ResponseJson.error("参数异常:用户Id不能为空!");
+        }
+        if (null == shop.getShopId()) {
+            return ResponseJson.error("参数异常:供应商Id不能为空!");
         }
-        if (1 != shop.getIsAgreed()) {
+        if (null == shop.getIsAgreed() || 1 != shop.getIsAgreed()) {
             return ResponseJson.error("请勾选同意协议");
         }
         if (StringUtils.isNotBlank(shop.getEmail())) {

+ 6 - 3
src/main/java/com/caimei365/user/service/impl/ShopServiceImpl.java

@@ -47,7 +47,7 @@ public class ShopServiceImpl implements ShopService {
     @Override
     public ResponseJson<Map<String, Object>> getShopUserInfo(Integer userId) {
         if (null == userId) {
-            return ResponseJson.error("参数异常", null);
+            return ResponseJson.error("参数异常:用户Id不能为空!", null);
         }
         // 用户信息
         UserVo user = baseMapper.getUserByUserId(userId);
@@ -150,8 +150,11 @@ public class ShopServiceImpl implements ShopService {
     @Override
     public ResponseJson updateShopUserInfo(ShopUpdateDto shopUpdateDto, String operationLicence, String hygienicLicense, String taxLicense, String honorCertification, String productCertification) {
         // 参数校验
-        if (null == shopUpdateDto.getUserId() || null == shopUpdateDto.getShopId()) {
-            return ResponseJson.error("参数异常");
+        if (null == shopUpdateDto.getUserId()) {
+            return ResponseJson.error("参数异常:用户Id不能为空!");
+        }
+        if (null == shopUpdateDto.getShopId()) {
+            return ResponseJson.error("参数异常:供应商Id不能为空!");
         }
         if (StringUtils.isNotBlank(shopUpdateDto.getEmail())) {
             Integer userIdByEmail = baseMapper.getUserIdByEmail(shopUpdateDto.getEmail());

+ 8 - 1
src/main/resources/mapper/ClubMapper.xml

@@ -3,7 +3,14 @@
 <mapper namespace="com.caimei365.user.mapper.ClubMapper">
 
     <update id="updateClubUserByUpdateInfo">
-        update user set email = #{email},userName = #{userName},name = #{name}
+        update user set
+        <if test="name != null">
+            name = #{name},
+        </if>
+        <if test="name != null">
+            email = #{email},
+        </if>
+        userName = #{userName}
         where userID = #{userId}
     </update>
     <update id="updateClubByUpdateInfo">