|
@@ -103,6 +103,17 @@ public class TmsCoachInfoServiceImpl extends ServiceImpl<TmsCoachInfoMapper, Tms
|
|
|
|
|
|
TmsCoachInfoBindDTO coachInfoBindDTO = new TmsCoachInfoBindDTO();
|
|
TmsCoachInfoBindDTO coachInfoBindDTO = new TmsCoachInfoBindDTO();
|
|
BeanUtils.copyProperties(coachInfoDTO,coachInfoBindDTO);
|
|
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 {
|
|
|
|
+ Response response = new Response(502,"用户不存在或用户密码错误");
|
|
|
|
+ return response;
|
|
|
|
+ }
|
|
|
|
+
|
|
int result = mapper.updateCoachOpenid(coachInfoBindDTO);
|
|
int result = mapper.updateCoachOpenid(coachInfoBindDTO);
|
|
return Response.success(result);
|
|
return Response.success(result);
|
|
}
|
|
}
|