Commit d7f4b9cb by zhiwj

门店选择

parent e0130892
......@@ -26,6 +26,7 @@ public class ClerkSearchDTO implements Serializable {
private Integer excelExtension;
private List<String> fieldCodeList;
private Integer dataType;
private int status;
public String getSearch() {
......@@ -139,4 +140,12 @@ public class ClerkSearchDTO implements Serializable {
public void setStoreSearch(String storeSearch) {
this.storeSearch = storeSearch;
}
public void setStatus(int status) {
this.status = status;
}
public int getStatus() {
return status;
}
}
......@@ -62,7 +62,7 @@ public interface TabClerkMapper {
List<TabClerk> listClerkByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("storeClerkIds") List<Integer> storeClerkIds, @Param("storeInfoIds") String storeInfoIds, @Param("search") String search, @Param("clerkType") Integer clerkType, @Param("status") Integer status);
Integer getTotalClerk(@Param("enterpriseId") Integer enterpriseId, @Param("storeClerkIds") List<Integer> storeClerkIds, @Param("search") String search);
Integer getTotalClerk(@Param("enterpriseId") Integer enterpriseId, @Param("storeClerkIds") List<Integer> storeClerkIds, @Param("search") String search, @Param("status") int status);
List<Integer> getStoreInfoIdsBySearch(@Param("enterpriseId") Integer enterpriseId, @Param("search") String search);
......
package com.gic.store.service;
import com.gic.store.dto.ClerkDTO;
import com.gic.store.dto.ClerkSearchDTO;
import com.gic.store.entity.TabClerk;
import java.util.List;
......@@ -88,7 +89,7 @@ public interface ClerkService {
List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIds, String search, Integer clerkType);
Integer getTotalClerk(Integer enterpriseId, List<Integer> storeInfoIds, String search);
Integer getTotalClerk(Integer enterpriseId, List<Integer> storeInfoIds, ClerkSearchDTO search);
/**
* @Title: getStoreInfoIdsBySearch
* @Description: 查询符合条件的门店id
......
......@@ -4,6 +4,7 @@ import com.gic.commons.util.GlobalInfo;
import com.gic.store.constant.StoreEnableOrDisAbleEnum;
import com.gic.store.dao.mapper.TabClerkMapper;
import com.gic.store.dto.ClerkDTO;
import com.gic.store.dto.ClerkSearchDTO;
import com.gic.store.entity.TabClerk;
import com.gic.store.service.ClerkService;
import org.apache.commons.lang3.StringUtils;
......@@ -109,8 +110,8 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public Integer getTotalClerk(Integer enterpriseId, List<Integer> storeInfoIds, String search) {
return tabClerkMapper.getTotalClerk(enterpriseId, storeInfoIds, search);
public Integer getTotalClerk(Integer enterpriseId, List<Integer> storeInfoIds, ClerkSearchDTO search) {
return tabClerkMapper.getTotalClerk(enterpriseId, storeInfoIds, search.getSearch(), search.getStatus());
}
@Override
......
......@@ -383,7 +383,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
List<Integer> storeInfoIds = page.getResult().stream().map(StoreDTO::getStoreInfoId)
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(storeInfoIds)) {
Integer totalClerk = clerkService.getTotalClerk(enterpriseId, storeInfoIds, clerkSearchDTO.getSearch());
Integer totalClerk = clerkService.getTotalClerk(enterpriseId, storeInfoIds, clerkSearchDTO);
return ServiceResponse.success(totalClerk);
} else {
return ServiceResponse.success(0);
......
......@@ -259,6 +259,9 @@
count(*)
from tab_clerk
where enterprise_id = #{enterpriseId}
<if test="status != null ">
and status = #{status}
</if>
<if test="null != storeClerkIds and storeClerkIds.size() &gt; 0">
and store_info_id in
<foreach close=")" collection="storeClerkIds" index="index" item="item" open="(" separator=",">
......
......@@ -256,6 +256,7 @@ public class ClerkController extends DownloadUtils {
public RestResponse countClerk(@RequestBody ClerkSearchDTO clerkSearchDTO) {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
clerkSearchDTO.setEnterpriseId(enterpriseId);
clerkSearchDTO.setStatus(1);
ServiceResponse serviceResponse = clerkApiService.getTotalClerk(enterpriseId, clerkSearchDTO);
if (serviceResponse.isSuccess()) {
return RestResponse.success(serviceResponse.getResult());
......
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