Bladeren bron

解绑问题2

小么熊🐻 2 jaren geleden
bovenliggende
commit
9e0ab96d86

+ 4 - 9
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsCoachInfoServiceImpl.java

@@ -104,18 +104,13 @@ public class TmsCoachInfoServiceImpl extends ServiceImpl<TmsCoachInfoMapper, Tms
         TmsCoachInfoBindDTO coachInfoBindDTO = new TmsCoachInfoBindDTO();
         BeanUtils.copyProperties(coachInfoDTO,coachInfoBindDTO);
         TmsCoachInfoVo coachInfoVo = mapper.getCoachBylogin(coachInfoDTO);  //查询帐号是否绑定过
-        if(coachInfoVo!=null) {
-            if(!StringUtils.isEmpty(coachInfoVo.getOpenid())) {
-                Response response = new Response(502,"该教练员账号已绑定微信,请解绑后再次绑定。");
-                return response;
-            }
-        } else {
+        if(coachInfoVo==null) {
             Response response = new Response(502,"用户不存在或用户密码错误");
             return response;
+        } else {
+            int result = mapper.updateCoachOpenid(coachInfoBindDTO);
+            return Response.success(result);
         }
-
-        int result = mapper.updateCoachOpenid(coachInfoBindDTO);
-        return Response.success(result);
     }