Browse Source

修改bug

master
zhangyuan 3 years ago
parent
commit
a85cbb8986
  1. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
  3. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java
  4. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  5. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

16
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -119,15 +119,15 @@ public class CustomerStaffController {
} }
/** /**
* @param mobile 手机号 * @param account 账户
* @return com.epmet.commons.tools.utils.Result * @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei * @Author zhy
* @Description 根据手机号查询政府端工作人员基本信息校验用户是否存在 * @Description 根据账户查询政府端工作人员基本信息校验用户是否存在
* @Date 2020/4/18 14:07 * @Date 2020/4/18 14:07
**/ **/
@GetMapping(value = "getcustsomerstaffbyaccount/{account}") @GetMapping(value = "getcustsomerstaffbyaccount/{account}")
public Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(@PathVariable("account") String userAccount) { public Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(@PathVariable("account") String account) {
return customerStaffService.getCustsomerStaffByAccount(userAccount); return customerStaffService.getCustsomerStaffByAccount(account);
} }
/** /**
@ -422,6 +422,12 @@ public class CustomerStaffController {
return new Result<List<CustomerStaffDTO>>().ok(customerStaffService.getCustsomerStaffByIdAndPhone(formDTO)); return new Result<List<CustomerStaffDTO>>().ok(customerStaffService.getCustsomerStaffByIdAndPhone(formDTO));
} }
/**
* @param formDTO
* @return
* @Author zhy
* @Description 根据客户ID账户查询政府端工作人员基本信息校验用户是否存在
**/
@GetMapping(value = "getCustsomerStaffByIdAndAccount") @GetMapping(value = "getCustsomerStaffByIdAndAccount")
public Result<List<CustomerStaffDTO>> getCustsomerStaffByIdAndAccount(@RequestBody ThirdCustomerStaffByAccountFormDTO formDTO) { public Result<List<CustomerStaffDTO>> getCustsomerStaffByIdAndAccount(@RequestBody ThirdCustomerStaffByAccountFormDTO formDTO) {
return new Result<List<CustomerStaffDTO>>().ok(customerStaffService.getCustsomerStaffByIdAndAccount(formDTO)); return new Result<List<CustomerStaffDTO>>().ok(customerStaffService.getCustsomerStaffByIdAndAccount(formDTO));

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java

@ -153,7 +153,7 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
* @param formDTO * @param formDTO
* @return * @return
* @Author zhy * @Author zhy
* @Description 根据客户ID手机号查询政府端工作人员基本信息 * @Description 根据客户ID账户查询政府端工作人员基本信息
**/ **/
List<CustomerStaffDTO> selectStaffByAccount(ThirdCustomerStaffByAccountFormDTO formDTO); List<CustomerStaffDTO> selectStaffByAccount(ThirdCustomerStaffByAccountFormDTO formDTO);

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java

@ -106,13 +106,13 @@ public interface CustomerStaffService extends BaseService<CustomerStaffEntity> {
Result<List<CustomerStaffDTO>> getCustsomerStaffByPhone(String mobile); Result<List<CustomerStaffDTO>> getCustsomerStaffByPhone(String mobile);
/** /**
* @param mobile 手机号 * @param account 账户
* @return com.epmet.commons.tools.utils.Result * @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei * @Author zhy
* @Description 根据手机号查询政府端工作人员基本信息校验用户是否存在 * @Description 根据账户查询政府端工作人员基本信息校验用户是否存在
* @Date 2020/4/18 14:07 * @Date 2020/4/18 14:07
**/ **/
Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(String userAccount); Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(String account);
/** /**
* @param formDTO * @param formDTO

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -161,7 +161,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
@Override @Override
public Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(String userAccount) { public Result<List<CustomerStaffDTO>> getCustsomerStaffByAccount(String userAccount) {
//判断用户是否存在 //判断用户是否存在
List<CustomerStaffDTO> customerStaffDTOList = baseDao.selectListCustomerStaffDTO(userAccount); List<CustomerStaffDTO> customerStaffDTOList = baseDao.listCustomerStaffByAccount(userAccount);
if (null == customerStaffDTOList || customerStaffDTOList.size() == 0) { if (null == customerStaffDTOList || customerStaffDTOList.size() == 0) {
logger.warn(String.format("根据账户查询用户异常,账户:[%s],code[%s],msg[%s]", userAccount, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); logger.warn(String.format("根据账户查询用户异常,账户:[%s],code[%s],msg[%s]", userAccount, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg()));
return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode());

4
epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

@ -11,7 +11,7 @@
order by cs.ACTIVE_TIME desc,cs.CREATED_TIME asc order by cs.ACTIVE_TIME desc,cs.CREATED_TIME asc
</select> </select>
<!-- 根据手机号查询工作人员信息 --> <!-- 根据账户查询工作人员信息 -->
<select id="listCustomerStaffByAccount" parameterType="java.lang.String" resultType="com.epmet.dto.CustomerStaffDTO"> <select id="listCustomerStaffByAccount" parameterType="java.lang.String" resultType="com.epmet.dto.CustomerStaffDTO">
select * from customer_staff cs select * from customer_staff cs
where cs.USER_ACCOUNT=#{userAccount} where cs.USER_ACCOUNT=#{userAccount}
@ -229,7 +229,7 @@
ORDER BY active_time DESC, created_time ASC ORDER BY active_time DESC, created_time ASC
</select> </select>
<select id="selectStaffByAccount" resultType="com.epmet.dto.form.ThirdCustomerStaffByAccountFormDTO"> <select id="selectStaffByAccount" resultType="com.epmet.dto.CustomerStaffDTO">
SELECT SELECT
* *
FROM FROM

Loading…
Cancel
Save