Commit 356e476a by zhiwj

导购bug

parent 9923f6b1
......@@ -119,7 +119,7 @@ public interface ClerkApiService {
*/
ServiceResponse<List<ClerkDTO>> listClerkByIds(Integer enterpriseId, String clerkIds);
ServiceResponse<List<ClerkDTO>> listClerkByStoreId(Integer enterpriseId, Integer storeId, String search);
ServiceResponse<List<ClerkDTO>> listClerkByStoreInfoId(Integer enterpriseId, Integer storeInfoId, String search);
/**
* 店长
......
......@@ -443,15 +443,11 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
@Override
public ServiceResponse<List<ClerkDTO>> listClerkByStoreId(Integer enterpriseId, Integer storeId, String search) {
ServiceResponse<StoreDTO> response = storeApiService.getStoreById(enterpriseId, storeId);
if (response.isSuccess() && response.getResult() != null) {
List<Integer> storeInfoIds = new ArrayList<>();
storeInfoIds.add(response.getResult().getStoreInfoId());
List<TabClerk> clerkList = this.clerkService.listClerkByStoreInfoId(enterpriseId, storeInfoIds, search);
return ServiceResponse.success(EntityUtil.changeEntityListByJSON(ClerkDTO.class, clerkList));
}
return ServiceResponse.success();
public ServiceResponse<List<ClerkDTO>> listClerkByStoreInfoId(Integer enterpriseId, Integer storeInfoId, String search) {
List<Integer> storeInfoIds = new ArrayList<>();
storeInfoIds.add(storeInfoId);
List<TabClerk> clerkList = this.clerkService.listClerkByStoreInfoId(enterpriseId, storeInfoIds, search);
return ServiceResponse.success(EntityUtil.changeEntityListByJSON(ClerkDTO.class, clerkList));
}
@Override
......
......@@ -291,7 +291,7 @@ public class ClerkController extends DownloadUtils {
@RequestMapping("/list-clerk-in-store")
public RestResponse listClerkInStore(Integer storeId, String search) {
ServiceResponse<List<ClerkDTO>> serviceResponse = clerkApiService.listClerkByStoreId(UserDetailUtils.getUserDetail().getEnterpriseId(), storeId, search);
ServiceResponse<List<ClerkDTO>> serviceResponse = clerkApiService.listClerkByStoreInfoId(UserDetailUtils.getUserDetail().getEnterpriseId(), storeId, search);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
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