Commit aa0e452f by 林永健

fix(merchant-staff): 修正北森员工状态转换逻辑

1 parent a54cff26
...@@ -32,7 +32,8 @@ public class BeiSenEmployeeListRequestDTO implements Serializable { ...@@ -32,7 +32,8 @@ public class BeiSenEmployeeListRequestDTO implements Serializable {
private List<String> mobilePhoneList; private List<String> mobilePhoneList;
/** /**
* 在职状态 0否 1是 * (废弃)在职状态 0否 1是
* 在职状态 1否 0是
*/ */
private Integer status; private Integer status;
......
...@@ -1512,6 +1512,8 @@ public class MerchantStaffService { ...@@ -1512,6 +1512,8 @@ public class MerchantStaffService {
condition.setSortOrder(sortOrder); condition.setSortOrder(sortOrder);
condition.setSortField(toSnake(condition.getSortField())); condition.setSortField(toSnake(condition.getSortField()));
} }
convertEmployeeStatus(condition);
log.info("查询北森员工列表, condition:{}", condition);
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<BeiSenEmployeeListResonseDTO> responseList = beisenEmployeeInfoMapper.selectByConditions(condition); List<BeiSenEmployeeListResonseDTO> responseList = beisenEmployeeInfoMapper.selectByConditions(condition);
if (CollectionUtils.isEmpty(responseList)) { if (CollectionUtils.isEmpty(responseList)) {
...@@ -1519,6 +1521,24 @@ public class MerchantStaffService { ...@@ -1519,6 +1521,24 @@ public class MerchantStaffService {
} }
return RpcPagination.copyPage(responseList); return RpcPagination.copyPage(responseList);
} }
/**
* 传参状态和数据库状态取值转换
*/
private void convertEmployeeStatus(BeiSenEmployeeListRequestDTO condition) {
if (condition.getStatus() == null) {
return;
}
if (condition.getStatus() == 0) {
condition.setStatus(1);
return;
}
if (condition.getStatus() == 1) {
condition.setStatus(0);
return;
}
}
/** /**
* 排序字段驼峰转下划线 * 排序字段驼峰转下划线
* 先走白名单避免缩略词误拆分,再使用 Hutool 转换。 * 先走白名单避免缩略词误拆分,再使用 Hutool 转换。
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!