Преглед изворни кода

[砍价营销数据][修改]:优化数据处理

release_toaliyun_real
Stormeye Wu пре 7 година
родитељ
комит
b2ba647711
3 измењених фајлова са 8 додато и 9 уклоњено
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  3. +5
    -8
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java Прегледај датотеку

@@ -10,8 +10,8 @@ import com.iformall.domain.po.WxCoupon;


public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> {
List<WxCouponStatisVo> findPressData(WxCoupon wxCoupon); List<WxCouponStatisVo> findPressData(WxCoupon wxCoupon);
void delPressData(WxCoupon wxCoupon);
void insertPressData(WxCoupon wxCoupon); void insertPressData(WxCoupon wxCoupon);
void updatePressData0(WxCoupon wxCoupon);
void updatePressData1(WxCoupon wxCoupon); void updatePressData1(WxCoupon wxCoupon);
void updatePressData2(WxCoupon wxCoupon); void updatePressData2(WxCoupon wxCoupon);
void updatePressData3(WxCoupon wxCoupon); void updatePressData3(WxCoupon wxCoupon);


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Прегледај датотеку

@@ -443,6 +443,8 @@ public class WxCouponServiceImpl implements WxCouponService {
@Override @Override
public PageInfo<WxCouponStatisVo> findPressData(WxCoupon record, Integer pageNum, Integer pageSize) { public PageInfo<WxCouponStatisVo> findPressData(WxCoupon record, Integer pageNum, Integer pageSize) {
if(pageNum == 0) { if(pageNum == 0) {
wxCouponMapper.delPressData(record);
wxCouponMapper.insertPressData(record);
wxCouponMapper.updatePressData1(record); wxCouponMapper.updatePressData1(record);
wxCouponMapper.updatePressData2(record); wxCouponMapper.updatePressData2(record);
wxCouponMapper.updatePressData3(record); wxCouponMapper.updatePressData3(record);


+ 5
- 8
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Прегледај датотеку

@@ -641,20 +641,17 @@
<if test=" null == sortColumns"> order by c.status asc,c.create_date desc </if> <if test=" null == sortColumns"> order by c.status asc,c.create_date desc </if>
</select> </select>


<insert id="delPressData" parameterType="com.iformall.domain.po.WxCoupon" >
delete from `wx_coupon_press_data` where type = 8 and tenant_id = #{tenantId}
</insert>

<insert id="insertPressData" parameterType="com.iformall.domain.po.WxCoupon" > <insert id="insertPressData" parameterType="com.iformall.domain.po.WxCoupon" >
insert into `wx_coupon_press_data` insert into `wx_coupon_press_data`
(`id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`) (`id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`)
select `id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price` select `id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`
from wx_coupon where type = 8 and tenant_id = #{tenantId} and id = #{id}
from wx_coupon where type = 8 and tenant_id = #{tenantId}
</insert> </insert>


<update id="updatePressData0" parameterType="com.iformall.domain.po.WxCoupon" >
update wx_coupon_press_data cpd, wx_coupon c
set cpd.id=c.id, cpd.`cover_img`=c.`cover_img`,
cpd.`title`=c.`title`,cpd.c.`sale_price`=,cpd.`price`=c.`price`
where cpd.tenant_id = #{tenantId} and cpd.`id` = c.`id` and c.type = 8 and c.id = #{id}
</update>

<update id="updatePressData1" parameterType="com.iformall.domain.po.WxCoupon" > <update id="updatePressData1" parameterType="com.iformall.domain.po.WxCoupon" >
update wx_coupon_press_data cpd set change_rate = update wx_coupon_press_data cpd set change_rate =
IFNULL(round((select count(o.id) from wx_order o IFNULL(round((select count(o.id) from wx_order o


Loading…
Откажи
Сачувај