1;绑定店铺优化

2;历史数据更新方法优化
This commit is contained in:
wangshuai 2024-08-11 22:00:18 +08:00
parent 462bc22b5b
commit 829beed6e7
2 changed files with 16 additions and 4 deletions

View File

@ -910,7 +910,7 @@ public class MeituanServiceImpl implements IMeituanService {
target.setId(null);
target.setCreateTime(Date.from(date.atZone(ZoneId.systemDefault()).toInstant()));
addList.add(target);
}else{
}else if(list2.size() == 1){
BusStoreDayHistoryInfo target = new BusStoreDayHistoryInfo();
BeanUtils.copyProperties(busStoreDayInfo, target);
target.setCreateTime(Date.from(date.atZone(ZoneId.systemDefault()).toInstant()));
@ -1073,8 +1073,15 @@ public class MeituanServiceImpl implements IMeituanService {
// 解析Cookie
private String valueFromCookie(String key, String text) {
if("".equals(text)){
return "";
}
int index = text.indexOf(key);
if(index == -1){
return "";
}
key = key+"=";
String s = text.substring(text.indexOf(key), text.length());
String s = text.substring(index, text.length());
String value = s.substring(s.indexOf("=") + 1, s.indexOf(";"));
return value;
}

View File

@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BusStoreConfigInfo" id="BusStoreConfigInfoResult">
<result property="id" column="id" />
<result property="storeId" column="store_id" />
<result property="storeCode" column="store_code" />
<result property="storeName" column="store_name" />
<result property="content1" column="content1" />
@ -25,12 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBusStoreConfigInfoVo">
select id, store_code, store_name, content1, content2, content3, content4, min_order_num, max_order_num, start_time, end_time, is_splice_order, self_delivery_duration, quota, quota_status, remark,sale_bind_id from bus_store_config_info
select id, store_id, store_code, store_name, content1, content2, content3, content4, min_order_num, max_order_num, start_time, end_time, is_splice_order, self_delivery_duration, quota, quota_status, remark,sale_bind_id from bus_store_config_info
</sql>
<select id="selectBusStoreConfigInfoList" parameterType="BusStoreConfigInfo" resultMap="BusStoreConfigInfoResult">
<include refid="selectBusStoreConfigInfoVo"/>
<where>
<where>
<if test="storeId != null and storeId != ''"> and store_id = #{storeId}</if>
<if test="storeCode != null and storeCode != ''"> and store_code = #{storeCode}</if>
<if test="storeName != null and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
<if test="content1 != null and content1 != ''"> and content1 = #{content1}</if>
@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into bus_store_config_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="storeId != null">store_id,</if>
<if test="storeCode != null">store_code,</if>
<if test="storeName != null">store_name,</if>
<if test="content1 != null">content1,</if>
@ -84,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="storeId != null">#{storeId},</if>
<if test="storeCode != null">#{storeCode},</if>
<if test="storeName != null">#{storeName},</if>
<if test="content1 != null">#{content1},</if>
@ -106,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateBusStoreConfigInfo" parameterType="BusStoreConfigInfo">
update bus_store_config_info
<trim prefix="SET" suffixOverrides=",">
<if test="storeId != null">store_id = #{storeId},</if>
<if test="storeCode != null">store_code = #{storeCode},</if>
<if test="storeName != null">store_name = #{storeName},</if>
<if test="content1 != null">content1 = #{content1},</if>