Commit 13515684 authored by 王果's avatar 王果

增加根据公司id获取人员接口

parent 91beaed6
......@@ -41,7 +41,7 @@ public interface PrivilegeFeginService {
@RequestMapping(value = "/privilege/v1/agencyuser/list/company/{companyId}", method = RequestMethod.GET)
FeignClientResult<AgencyUserModel> getCompanyUser(@PathVariable(value = "companyId")Long companyId);
FeignClientResult getCompanyUser(@PathVariable(value = "companyId")Long companyId);
......
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -198,9 +199,12 @@ public class CommonController extends BaseController {
*
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getCompanyUser")
@ApiOperation(httpMethod = "POST", value = "根据公司id获取公司下人员", notes = "根据公司id获取公司下人员")
public ResponseModel<Object> getCompanyUser(@RequestParam(value = "companyId") Long companyId) {
@GetMapping(value = "/getCompanyUser")
@ApiOperation(httpMethod = "get", value = "根据公司id获取公司下人员", notes = "根据公司id获取公司下人员")
public ResponseModel<Object> getCompanyUser(@RequestParam(value = "companyId",required = false) Long companyId) {
if(ObjectUtils.isEmpty(companyId)){
return null;
}
Object result = commonService.getCompanyUser(companyId);
return ResponseHelper.buildResponse(result);
}
......
......@@ -1034,9 +1034,6 @@ public class CommonServiceImpl implements ICommonService {
public List<LinkedHashMap> getCompanyUser(Long companyId) {
FeignClientResult result = privilegeFeginService.getCompanyUser(companyId);
List<LinkedHashMap> list = (List<LinkedHashMap>) result.getResult();
for (LinkedHashMap linkedHashMap : list) {
linkedHashMap.put("sequenceNbr", linkedHashMap.get("regionCode"));
}
return list;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment