|
@@ -41,9 +41,16 @@ public class WorkClientController {
|
|
|
@ApiOperation(value = "客户信息列表")
|
|
|
@GetMapping(value = "list")
|
|
|
public ResponseEntity<IPage<WorkClientInfo>> list(WorkClientInfo workClientInfo, Page<WorkClientInfo> page) throws Exception {
|
|
|
- String[] dates = workClientInfo.getCreateDates();
|
|
|
QueryWrapper<WorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, WorkClientInfo.class);
|
|
|
- IPage<WorkClientInfo> list = workClientService.list(page,workClientInfoQueryWrapper,dates);
|
|
|
+ if (ObjectUtil.isNotEmpty(workClientInfo)) {
|
|
|
+ if (ObjectUtil.isNotEmpty(workClientInfo.getCreateDates())) {
|
|
|
+ workClientInfoQueryWrapper.between("a.create_date",workClientInfo.getCreateDates()[0], workClientInfo.getCreateDates()[1]);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(workClientInfo.getCreateBy())) {
|
|
|
+ workClientInfoQueryWrapper.eq("a.create_by",workClientInfo.getCreateBy());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ IPage<WorkClientInfo> list = workClientService.list(page,workClientInfoQueryWrapper);
|
|
|
UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
for (WorkClientInfo info: list.getRecords()) {
|
|
|
if(userDTO.getName().equals(info.getCreateBy()) || userDTO.isAdmin()){
|