|
|
@ -2,11 +2,10 @@ package com.epmet.controller; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import com.epmet.commons.mybatis.entity.DataScope; |
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
|
import com.epmet.dto.GovStaffRoleDTO; |
|
|
|
import com.epmet.dto.StaffRoleDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
@ -14,6 +13,7 @@ import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.GovStaffRoleEntity; |
|
|
|
import com.epmet.service.GovStaffRoleService; |
|
|
|
import com.epmet.service.StaffRoleService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
@ -208,9 +208,13 @@ public class StaffRoleController { |
|
|
|
* @date 2022/1/17 2:26 下午 |
|
|
|
*/ |
|
|
|
@PostMapping("getGridStaffList") |
|
|
|
Result<PageData<CustomerGridStaffResultDTO>> getGridStaffList(@LoginUser TokenDto tokenDto, @RequestBody GridStaffFormDTO formDTO){ |
|
|
|
Result<PageData<CustomerGridStaffResultDTO>> getGridStaffList(@RequestHeader("customerId") String customerId, @RequestBody GridStaffFormDTO formDTO){ |
|
|
|
//tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc");
|
|
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
if (StringUtils.isBlank(formDTO.getCustomerId())){ |
|
|
|
formDTO.setCustomerId(customerId); |
|
|
|
} |
|
|
|
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); |
|
|
|
|
|
|
|
return new Result<PageData<CustomerGridStaffResultDTO>>().ok(staffRoleService.getGridStaffList(formDTO)); |
|
|
|
} |
|
|
|
} |
|
|
|