|
@@ -2,12 +2,15 @@ package com.miaxis.tms.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.miaxis.common.annotation.DataSource;
|
|
|
+import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.enums.DataSourceTypeEnum;
|
|
|
import com.miaxis.tms.domain.CoachInfo;
|
|
|
import com.miaxis.tms.dto.CoachInfoDTO;
|
|
|
import com.miaxis.tms.dto.CoachInfoIdDTO;
|
|
|
+import com.miaxis.tms.dto.CoachInfoPwDTO;
|
|
|
import com.miaxis.tms.mapper.CoachInfoMapper;
|
|
|
import com.miaxis.tms.service.ICoachInfoService;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -38,5 +41,20 @@ public class CoachInfoServiceImpl extends ServiceImpl<CoachInfoMapper, CoachInfo
|
|
|
return mapper.getCoachBylogin(coaDto);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Response updateCoachPassWord(CoachInfoPwDTO coaPwDto) {
|
|
|
+
|
|
|
+ CoachInfoDTO coaDto = new CoachInfoDTO();
|
|
|
+ BeanUtils.copyProperties(coaPwDto,coaDto);
|
|
|
+ CoachInfo coachInfo = this.getCoachBylogin(coaDto);
|
|
|
+ if(coachInfo==null) {
|
|
|
+ Response response = new Response(502,"用户不存在或用户密码错误");
|
|
|
+ return response;
|
|
|
+ } else {
|
|
|
+ int result = mapper.updateCoachPassWord(coaPwDto);
|
|
|
+ return Response.success(result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|