成功开店代码改造
This commit is contained in:
@@ -64,11 +64,11 @@ public class StoreDao {
|
||||
return storeMapper.listByMobile(mobile);
|
||||
}
|
||||
|
||||
public List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(List<String> regionIdList, String mobile) {
|
||||
public List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(List<String> regionIdList, String mobile,String storeName) {
|
||||
if(CollectionUtils.isEmpty(regionIdList)&&StringUtils.isBlank(mobile)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return storeMapper.getSubStoreByRegionIdsAndMobile(regionIdList,mobile);
|
||||
return storeMapper.getSubStoreByRegionIdsAndMobile(regionIdList,mobile,storeName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface StoreMapper {
|
||||
*/
|
||||
List<StoreDO> listByMobile(@Param("mobile") String mobile);
|
||||
|
||||
List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(@Param("regionIdList") List<String> regionIdList, @Param("mobile") String mobile);
|
||||
List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(@Param("regionIdList") List<String> regionIdList, @Param("mobile") String mobile,@Param("storeName") String storeName);
|
||||
/**
|
||||
* 分页查询门店数据
|
||||
* @return
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
|
||||
from store_${enterpriseId}
|
||||
where is_delete = 'effective'
|
||||
<if test="storeName!=null and storeName!=''">
|
||||
and store_name like concat('%', #{storeName}, '%')
|
||||
</if>
|
||||
and (
|
||||
<if test="regionIdList != null and regionIdList.size >0 ">
|
||||
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">
|
||||
|
||||
@@ -89,7 +89,7 @@ public class StoreServiceImpl implements StoreService {
|
||||
}
|
||||
}
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile);
|
||||
List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile,storeName);
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user