Merge #76 into master from cc_20260329_fix
feat:门店经纬度更新 * cc_20260329_fix: (1 commits squashed) - feat:门店经纬度更新 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/76
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.dto.store.StoreAddressDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
@@ -235,4 +236,12 @@ public class StoreDao {
|
||||
public List<StoreDO> getStoreByRegionIds(List<String> regionIds, String keyword) {
|
||||
return storeMapper.getStoreByRegionIds(regionIds, keyword);
|
||||
}
|
||||
|
||||
public List<StoreAddressDTO> getStoreAddress(Integer flag,String storeCode){
|
||||
return storeMapper.getStoreAddress(flag,storeCode);
|
||||
}
|
||||
|
||||
public Integer batchUpdateAddress(List<StoreDO> storeList){
|
||||
return storeMapper.batchUpdateAddress(storeList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.store.StoreAddressDTO;
|
||||
import com.cool.store.dto.store.StoreAreaDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
@@ -148,4 +149,8 @@ public interface StoreMapper {
|
||||
* @return 门店列表
|
||||
*/
|
||||
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
|
||||
|
||||
List<StoreAddressDTO> getStoreAddress(@Param("flag") Integer flag, @Param("storeCode") String storeCode);
|
||||
|
||||
int batchUpdateAddress(@Param("list") List<StoreDO> storeList);
|
||||
}
|
||||
|
||||
@@ -381,4 +381,44 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getStoreAddress" resultType="com.cool.store.dto.store.StoreAddressDTO">
|
||||
SELECT * FROM store_${enterpriseId}
|
||||
<where>
|
||||
is_delete = 'effective'
|
||||
<if test="storeCode!=null and storeCode!=null">
|
||||
and store_num = #{storeCode}
|
||||
</if>
|
||||
<if test="flag==null">
|
||||
and `city` is not null and county is null
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchUpdateAddress" parameterType="list">
|
||||
UPDATE store_${enterpriseId}
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<trim prefix="province = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item" index="index">
|
||||
WHEN store_id = #{item.storeId} THEN #{item.province}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="city = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item" index="index">
|
||||
WHEN store_id = #{item.storeId} THEN #{item.city}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="county = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item" index="index">
|
||||
WHEN store_id = #{item.storeId} THEN #{item.county}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
WHERE store_id IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.storeId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user