Merge #119 into master from cc_20260508_open_store_req
门店新开店需求7&主数据需求2
* cc_20260508_open_store_req: (4 commits squashed)
- fix:未开业门店试营业日期
- fix:开业日期报备不同步门店状态
- fix:修改门店开业日期判断条件修改
- Merge branch 'master' into cc_20260508_open_store_req
# Conflicts:
#	coolstore-partner-web/src/main/java/com/cool/store/job/XxlJobHandler.java
Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/119
This commit is contained in:
@@ -2,6 +2,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.StoreExtendSoftOpenDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.enums.StoreStatusEnum;
|
||||
@@ -120,6 +121,13 @@ public class StoreDao {
|
||||
return storeMapper.getAllStoreIdAndNum(storeStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询拥有门店编码的门店id及编码
|
||||
*/
|
||||
public List<StoreDO> getExistStoreNumStore(List<String> storeStatus) {
|
||||
return storeMapper.getExistStoreNumStore(storeStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门店积分
|
||||
* @param storeId 门店id
|
||||
@@ -176,6 +184,14 @@ public class StoreDao {
|
||||
if (Objects.isNull(storeId)||Objects.isNull(storeStatus)||Objects.isNull(actualOpenDate))
|
||||
storeMapper.updateStoreStatus(storeId,storeStatus,actualOpenDate);
|
||||
}
|
||||
/**
|
||||
* 修改门店开业日期
|
||||
* @param storeId 门店id
|
||||
* @param actualOpenDate 开业日期
|
||||
*/
|
||||
public void updateStoreOpenDate(String storeId, Date actualOpenDate) {
|
||||
storeMapper.updateStoreOpenDate(storeId, actualOpenDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停营业
|
||||
@@ -275,4 +291,21 @@ public class StoreDao {
|
||||
public String getPrivateSphereQrCode(String storeId){
|
||||
return storeMapper.getPrivateSphereQrCode(storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增或编辑开始试营业日期
|
||||
*/
|
||||
public void insertOrUpdateSoftOpenDate(List<StoreExtendSoftOpenDTO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
storeMapper.insertOrUpdateSoftOpenDate(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改门店状态
|
||||
*/
|
||||
public void updateStatusBatch(List<String> storeIds, String storeStatus) {
|
||||
storeMapper.updateStatusBatch(storeIds, storeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ 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.StoreExtendSoftOpenDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
@@ -69,6 +70,11 @@ public interface StoreMapper {
|
||||
*/
|
||||
List<StoreDO> getAllStoreIdAndNum(@Param("storeStatus") List<String> storeStatus);
|
||||
|
||||
/**
|
||||
* 查询拥有门店编码的门店id及编码
|
||||
*/
|
||||
List<StoreDO> getExistStoreNumStore(@Param("storeStatus") List<String> storeStatus);
|
||||
|
||||
/**
|
||||
* 查询门店积分
|
||||
* @param storeId 门店id
|
||||
@@ -97,6 +103,13 @@ public interface StoreMapper {
|
||||
void updateStoreStatus(@Param("storeId") String storeId,
|
||||
@Param("storeStatus") String storeStatus,
|
||||
@Param("actualOpenDate") Date actualOpenDate);
|
||||
/**
|
||||
* 修改门店开业日期
|
||||
* @param storeId 门店id
|
||||
* @param actualOpenDate 开业日期
|
||||
*/
|
||||
void updateStoreOpenDate(@Param("storeId") String storeId,
|
||||
@Param("actualOpenDate") Date actualOpenDate);
|
||||
|
||||
int updateStatus(@Param("storeId") String storeId,
|
||||
@Param("storeStatus") String storeStatus);
|
||||
@@ -160,4 +173,14 @@ public interface StoreMapper {
|
||||
int batchUpdateAddress(@Param("list") List<StoreDO> storeList);
|
||||
|
||||
String getPrivateSphereQrCode(@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 批量新增或编辑开始试营业日期
|
||||
*/
|
||||
void insertOrUpdateSoftOpenDate(@Param("list") List<StoreExtendSoftOpenDTO> list);
|
||||
|
||||
/**
|
||||
* 批量修改门店状态
|
||||
*/
|
||||
void updateStatusBatch(@Param("storeIds") List<String> storeIds, @Param("storeStatus") String storeStatus);
|
||||
}
|
||||
|
||||
@@ -276,6 +276,18 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getExistStoreNumStore" resultType="com.cool.store.entity.StoreDO">
|
||||
SELECT store_id, store_num
|
||||
FROM store_${enterpriseId}
|
||||
WHERE is_delete = 'effective' AND store_num IS NOT NULL AND store_num != ''
|
||||
<if test="storeStatus != null and !storeStatus.isEmpty()">
|
||||
AND store_status IN
|
||||
<foreach item="item" collection="storeStatus" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStoreScore" resultType="java.math.BigDecimal">
|
||||
SELECT score FROM store_extend_info_${enterpriseId}
|
||||
WHERE store_id = #{storeId}
|
||||
@@ -298,7 +310,13 @@
|
||||
<update id="updateStoreStatus">
|
||||
UPDATE store_${enterpriseId}
|
||||
SET store_status = #{storeStatus},
|
||||
actual_open_date = #{actualOpenDate}
|
||||
open_date = #{actualOpenDate}
|
||||
WHERE store_id = #{storeId} AND is_delete = 'effective'
|
||||
</update>
|
||||
|
||||
<update id="updateStoreOpenDate">
|
||||
UPDATE store_${enterpriseId}
|
||||
SET open_date = #{actualOpenDate}
|
||||
WHERE store_id = #{storeId} AND is_delete = 'effective'
|
||||
</update>
|
||||
|
||||
@@ -438,4 +456,23 @@
|
||||
SELECT private_sphere_qr FROM store_extend_info_${enterpriseId}
|
||||
WHERE store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrUpdateSoftOpenDate">
|
||||
INSERT INTO store_extend_info_${enterpriseId}(store_id, soft_open_date)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.storeId}, #{item.softOpenDate})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
soft_open_date = VALUES(soft_open_date)
|
||||
</insert>
|
||||
|
||||
<update id="updateStatusBatch">
|
||||
UPDATE store_${enterpriseId}
|
||||
SET store_status = #{storeStatus}
|
||||
WHERE store_id IN
|
||||
<foreach item="item" collection="storeIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user