处理敏感信息泄露
This commit is contained in:
parent
ec0e74a8eb
commit
b128f219f7
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.engine.salary.entity.extemp.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.hrmelog.annotation.ElogTransform;
|
||||||
|
import com.engine.salary.annotation.TableTitle;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部人员
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
//hrsa_external_employee
|
||||||
|
@ElogTransform( name = "非系统人员")
|
||||||
|
public class ExtEmpDTO {
|
||||||
|
|
||||||
|
@ElogTransform(name = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "分部", dataIndex = "subcompanyName", key = "subcompanyName")
|
||||||
|
private String subcompanyName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职日期
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "入职日期", dataIndex = "companystartdate", key = "companystartdate")
|
||||||
|
private String companystartdate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
|
||||||
|
private String workcode;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.service;
|
package com.engine.salary.service;
|
||||||
|
|
||||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||||
|
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||||
|
|
@ -17,7 +18,7 @@ public interface ExtEmpService {
|
||||||
|
|
||||||
List<ExtEmpPO> list(ExtEmpQueryParam param);
|
List<ExtEmpPO> list(ExtEmpQueryParam param);
|
||||||
|
|
||||||
PageInfo<ExtEmpPO> listPage (ExtEmpQueryParam param);
|
PageInfo<ExtEmpDTO> listPage (ExtEmpQueryParam param);
|
||||||
|
|
||||||
void save(ExtEmpSaveParam po);
|
void save(ExtEmpSaveParam po);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.engine.core.impl.Service;
|
||||||
import com.engine.salary.config.SalaryElogConfig;
|
import com.engine.salary.config.SalaryElogConfig;
|
||||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||||
|
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||||
|
|
@ -78,9 +79,21 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<ExtEmpPO> listPage(ExtEmpQueryParam param) {
|
public PageInfo<ExtEmpDTO> listPage(ExtEmpQueryParam param) {
|
||||||
List<ExtEmpPO> extEmpPOS = list(param);
|
List<ExtEmpPO> extEmpPOS = list(param);
|
||||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), extEmpPOS, ExtEmpPO.class);
|
|
||||||
|
List<ExtEmpDTO> list = extEmpPOS.stream().map(po -> {
|
||||||
|
return ExtEmpDTO.builder()
|
||||||
|
.id(po.getId())
|
||||||
|
.username(po.getUsername())
|
||||||
|
.departmentName(po.getDepartmentName())
|
||||||
|
.subcompanyName(po.getSubcompanyName())
|
||||||
|
.companystartdate(po.getCompanystartdate())
|
||||||
|
.workcode(po.getWorkcode())
|
||||||
|
.build();
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, ExtEmpDTO.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.web;
|
package com.engine.salary.web;
|
||||||
|
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||||
|
|
@ -48,7 +49,7 @@ public class ExtEmpController {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpQueryParam param) {
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpQueryParam param) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
return new ResponseResult<ExtEmpQueryParam, PageInfo<ExtEmpPO>>(user).run(getExtEmpWrapper(user)::listPage, param);
|
return new ResponseResult<ExtEmpQueryParam, PageInfo<ExtEmpDTO>>(user).run(getExtEmpWrapper(user)::listPage, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.wrapper;
|
||||||
|
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||||
|
|
@ -30,7 +31,7 @@ public class ExtEmpWrapper extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public PageInfo<ExtEmpPO> listPage(ExtEmpQueryParam param) {
|
public PageInfo<ExtEmpDTO> listPage(ExtEmpQueryParam param) {
|
||||||
return getExtEmpService(user).listPage(param);
|
return getExtEmpService(user).listPage(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue