|
|
|
@ -18,6 +18,7 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
@ -348,8 +349,12 @@ public class CustomerAgencyController { |
|
|
|
*/ |
|
|
|
@PostMapping("agencylist") |
|
|
|
public Result<AgencyTreeResultDTO> getAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) { |
|
|
|
if (StringUtils.isBlank(formDTO.getCustomerId())){ |
|
|
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
|
|
|
if(AppClientConstant.APP_OPER.equals(tokenDTO.getApp())){ |
|
|
|
ValidatorUtils.validateEntity(formDTO.getCustomerId(),GetAgencyListFormDTO.OperAddUserShowGroup.class); |
|
|
|
}else{ |
|
|
|
if (StringUtils.isBlank(formDTO.getCustomerId())){ |
|
|
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getAgencyList(formDTO)); |
|
|
|
} |
|
|
|
|