成功开店代码改造

This commit is contained in:
shuo.wang
2025-07-02 18:34:04 +08:00
parent 04a29c03cc
commit 285cec6bc7
4 changed files with 7 additions and 4 deletions

View File

@@ -64,11 +64,11 @@ public class StoreDao {
return storeMapper.listByMobile(mobile); 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)) { if(CollectionUtils.isEmpty(regionIdList)&&StringUtils.isBlank(mobile)) {
return new ArrayList<>(); return new ArrayList<>();
} }
return storeMapper.getSubStoreByRegionIdsAndMobile(regionIdList,mobile); return storeMapper.getSubStoreByRegionIdsAndMobile(regionIdList,mobile,storeName);
} }

View File

@@ -32,7 +32,7 @@ public interface StoreMapper {
*/ */
List<StoreDO> listByMobile(@Param("mobile") String mobile); 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 * @return

View File

@@ -94,6 +94,9 @@
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
from store_${enterpriseId} from store_${enterpriseId}
where is_delete = 'effective' where is_delete = 'effective'
<if test="storeName!=null and storeName!=''">
and store_name like concat('%', #{storeName}, '%')
</if>
and ( and (
<if test="regionIdList != null and regionIdList.size >0 "> <if test="regionIdList != null and regionIdList.size >0 ">
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )"> <foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">

View File

@@ -89,7 +89,7 @@ public class StoreServiceImpl implements StoreService {
} }
} }
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);
List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile); List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile,storeName);
return new PageInfo<>(list); return new PageInfo<>(list);
} }