Ver a proveniência

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

release_toaliyun_real
Stormeye Wu há 7 anos
ascendente
cometimento
b2ba647711
3 ficheiros alterados com 8 adições e 9 eliminações
  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 Ver ficheiro

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

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


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Ver ficheiro

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


+ 5
- 8
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Ver ficheiro

@@ -641,20 +641,17 @@
<if test=" null == sortColumns"> order by c.status asc,c.create_date desc </if>
</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 into `wx_coupon_press_data`
(`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>

<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 wx_coupon_press_data cpd set change_rate =
IFNULL(round((select count(o.id) from wx_order o


Carregando…
Cancelar
Guardar