Commit f3b16631 by 吕明尚

优惠卷增加优惠卷售卖金额

parent 0f30bc29
...@@ -6,33 +6,29 @@ import java.math.BigDecimal; ...@@ -6,33 +6,29 @@ import java.math.BigDecimal;
public class TableDataInfoVo extends TableDataInfo { public class TableDataInfoVo extends TableDataInfo {
/** /**
* 总金额 * 订单总金额
*/ */
private BigDecimal totalAmount; private BigDecimal totalAmount;
/** /**
* 实付金额 * 实付金额
*/ */
private BigDecimal amount; private BigDecimal amount;
/** /**
* 已使用总金额 * 优惠卷售卖总金额
*/ */
private BigDecimal usedAmount; private BigDecimal couponAmount;
/** /**
* 已使用实付金额 * 申请退款总金额
*/
private BigDecimal usedPayAmount;
/**
* 以退款总金额
*/ */
private BigDecimal refundAmount; private BigDecimal refundAmount;
/** /**
* 以退款实付金额 * 实际退款总金额
*/ */
private BigDecimal refundPayAmount; private BigDecimal realRefundAmount;
public BigDecimal getTotalAmount() { public BigDecimal getTotalAmount() {
return totalAmount; return totalAmount;
...@@ -50,20 +46,12 @@ public class TableDataInfoVo extends TableDataInfo { ...@@ -50,20 +46,12 @@ public class TableDataInfoVo extends TableDataInfo {
this.amount = amount; this.amount = amount;
} }
public BigDecimal getUsedAmount() { public BigDecimal getCouponAmount() {
return usedAmount; return couponAmount;
} }
public void setUsedAmount(BigDecimal usedAmount) { public void setCouponAmount(BigDecimal couponAmount) {
this.usedAmount = usedAmount; this.couponAmount = couponAmount;
}
public BigDecimal getUsedPayAmount() {
return usedPayAmount;
}
public void setUsedPayAmount(BigDecimal usedPayAmount) {
this.usedPayAmount = usedPayAmount;
} }
public BigDecimal getRefundAmount() { public BigDecimal getRefundAmount() {
...@@ -74,12 +62,11 @@ public class TableDataInfoVo extends TableDataInfo { ...@@ -74,12 +62,11 @@ public class TableDataInfoVo extends TableDataInfo {
this.refundAmount = refundAmount; this.refundAmount = refundAmount;
} }
public BigDecimal getRefundPayAmount() { public BigDecimal getRealRefundAmount() {
return refundPayAmount; return realRefundAmount;
} }
public void setRefundPayAmount(BigDecimal refundPayAmount) { public void setRealRefundAmount(BigDecimal realRefundAmount) {
this.refundPayAmount = refundPayAmount; this.realRefundAmount = realRefundAmount;
} }
} }
package share.quartz.task; package share.quartz.task;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dianping.openapi.sdk.api.tuangou.entity.TuangouReceiptGetConsumedReponseEntity;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import share.common.enums.CouponTypeEnum;
import share.common.enums.PlatformTypeEnum;
import share.common.enums.UserStatusEnum; import share.common.enums.UserStatusEnum;
import share.common.enums.YesNoEnum; import share.common.enums.YesNoEnum;
import share.system.domain.SConsumerCoupon; import share.system.domain.SConsumerCoupon;
import share.system.domain.SOrder;
import share.system.domain.SStore;
import share.system.service.ISConsumerCouponService; import share.system.service.ISConsumerCouponService;
import share.system.service.ISOrderService;
import share.system.service.ISStoreService; import share.system.service.ISStoreService;
import share.system.service.QPService; import share.system.service.QPService;
import share.system.service.TiktokService;
import share.system.service.impl.QPServiceImpl; import share.system.service.impl.QPServiceImpl;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -30,7 +38,7 @@ public class CouponRetryTask { ...@@ -30,7 +38,7 @@ public class CouponRetryTask {
@Autowired @Autowired
private QPService qpService; private QPService qpService;
@Autowired @Autowired
private ISOrderService orderService; private TiktokService tiktokService;
private static final Logger logger = LoggerFactory.getLogger(QPServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(QPServiceImpl.class);
public void AuToRetryCoupon() { public void AuToRetryCoupon() {
...@@ -50,36 +58,55 @@ public class CouponRetryTask { ...@@ -50,36 +58,55 @@ public class CouponRetryTask {
} }
} }
// //自动生成优惠卷购买金额 //自动生成优惠卷购买金额
// public void AutoGenerateCoupon() { public void AutoGenerateCoupon() {
// LambdaQueryWrapper<SConsumerCoupon> consumerCouponWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SConsumerCoupon> consumerCouponWrapper = new LambdaQueryWrapper<>();
// List<SStore> list = storeService.list(); List<SStore> list = storeService.list();
// //去除没open_shop_uuid的store //去除没open_shop_uuid的store
// list = list.stream().filter(item -> item.getOpenShopUuid() != null).collect(Collectors.toList()); list = list.stream().filter(item -> item.getOpenShopUuid() != null).collect(Collectors.toList());
// LambdaQueryWrapper<SOrder> orderLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SOrder> orderLambdaQueryWrapper = new LambdaQueryWrapper<>();
// //优惠卷id不等于空 //优惠卷id不等于空
// orderLambdaQueryWrapper.isNotNull(SOrder::getCouponId); orderLambdaQueryWrapper.isNotNull(SOrder::getCouponId);
// List<SOrder> orderList = orderService.list(orderLambdaQueryWrapper); //查询团购劵,未删除的优惠卷
// //查询团购劵,未删除的优惠卷 consumerCouponWrapper.eq(SConsumerCoupon::getIsDelete, YesNoEnum.no.getIndex());
// consumerCouponWrapper.eq(SConsumerCoupon::getIsDelete, YesNoEnum.no.getIndex()); consumerCouponWrapper.eq(SConsumerCoupon::getCouponType, CouponTypeEnum.CASH.getCode());
// consumerCouponWrapper.eq(SConsumerCoupon::getCouponType, CouponTypeEnum.CASH.getCode()); consumerCouponWrapper.ne(SConsumerCoupon::getUseStatus, UserStatusEnum.EXPIRED.getCode());
// List<SConsumerCoupon> sConsumerCoupons = sConsumerCouponService.list(consumerCouponWrapper); //门店id不等于空
// if (!CollectionUtils.isEmpty(sConsumerCoupons)) { consumerCouponWrapper.isNotNull(SConsumerCoupon::getStoreId);
// List<SStore> finalList = list; consumerCouponWrapper.isNull(SConsumerCoupon::getCouponPayPrice);
// sConsumerCoupons.stream().forEach(item -> { List<SConsumerCoupon> sConsumerCoupons = sConsumerCouponService.list(consumerCouponWrapper);
// TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), List<SConsumerCoupon> sConsumerCouponList = new ArrayList<>();
// finalList.stream().filter(store -> store.getId().equals(item.getStoreId())).findFirst().get().getOpenShopUuid()); //大于100条取100条数据
// item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price())); if (sConsumerCoupons.size() > 100) {
// }); sConsumerCoupons = sConsumerCoupons.subList(0, 100);
// orderList.stream().forEach(item -> { }
// sConsumerCoupons.stream().forEach(coupon -> { if (!CollectionUtils.isEmpty(sConsumerCoupons)) {
// if (item.getCouponId().equals(coupon.getId())) { List<SStore> finalList = list;
// coupon.setCouponPayPrice(item.getPayPrice()); sConsumerCoupons.stream().forEach(item -> {
// } if (item.getPlatformType().equals(PlatformTypeEnum.MEITUAN.getCode())) {
// }); String openShopUuid = finalList.stream().filter(store -> store.getId().equals(item.getStoreId())).findFirst().get().getOpenShopUuid();
// }); TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), openShopUuid);
// orderService.updateBatchById(orderList); System.out.println(getconsumed);
// sConsumerCouponService.updateBatchById(sConsumerCoupons); if (!ObjectUtils.isEmpty(getconsumed)) {
// } item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price()));
// } sConsumerCouponList.add(item);
logger.info("美团优惠卷购买金额为:" + item.getCouponPayPrice());
} else {
item.setUseStatus(UserStatusEnum.EXPIRED.getCode());
}
}
if (item.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
JSONObject data = tiktokService.certificateGet(item.getEncryptedCode());
JSONObject certificate = data.getJSONObject("certificate");
JSONObject amount = certificate.getJSONObject("amount");
sConsumerCouponList.add(item);
item.setCouponPayPrice(BigDecimal.valueOf(amount.getDouble("pay_amount") / 100));
logger.info("抖音优惠卷购买金额为:" + item.getCouponPayPrice());
}
});
if (!CollectionUtils.isEmpty(sConsumerCouponList))
sConsumerCouponService.updateBatchById(sConsumerCouponList);
}
}
} }
...@@ -129,8 +129,7 @@ public class RedisTask { ...@@ -129,8 +129,7 @@ public class RedisTask {
} }
} }
} }
//逻辑删除所有异常优惠券 if (!CollectionUtils.isEmpty(expiredCoupons)) isConsumerCouponService.removeByIdList(expiredCoupons);
isConsumerCouponService.removeByIdList(expiredCoupons);
} }
} }
......
...@@ -116,6 +116,12 @@ public class SConsumerCoupon extends BaseEntity ...@@ -116,6 +116,12 @@ public class SConsumerCoupon extends BaseEntity
@Excel(name = "减去金额(满减券单位:元,折扣为系数)") @Excel(name = "减去金额(满减券单位:元,折扣为系数)")
private BigDecimal subPrice; private BigDecimal subPrice;
/**
* 优惠卷购买金额
*/
@Excel(name = "优惠卷购买金额(单位:元)")
private BigDecimal couponPayPrice;
/** 优惠券来源(1:领取,2:赠送,3:验券) */ /** 优惠券来源(1:领取,2:赠送,3:验券) */
@Excel(name = "优惠券来源(1:领取,2:赠送,3:验券)") @Excel(name = "优惠券来源(1:领取,2:赠送,3:验券)")
private String sourceType; private String sourceType;
......
...@@ -82,6 +82,12 @@ public class SCoupon extends BaseEntity ...@@ -82,6 +82,12 @@ public class SCoupon extends BaseEntity
private BigDecimal subPrice; private BigDecimal subPrice;
/** /**
* 优惠卷购买金额
*/
@Excel(name = "优惠卷购买金额(单位:元)")
private BigDecimal couponPayPrice;
/**
* 订单类型(0:订房订单,1:续房订单,2:充值订单) * 订单类型(0:订房订单,1:续房订单,2:充值订单)
*/ */
@Excel(name = "订单类型(1:订房订单,2:续房订单,3:充值订单)") @Excel(name = "订单类型(1:订房订单,2:续房订单,3:充值订单)")
......
...@@ -129,6 +129,7 @@ public class QPServiceImpl implements QPService { ...@@ -129,6 +129,7 @@ public class QPServiceImpl implements QPService {
sConsumerCoupon.setCreateBy(String.valueOf(user.getId())); sConsumerCoupon.setCreateBy(String.valueOf(user.getId()));
sConsumerCoupon.setCreateTime(new Date()); sConsumerCoupon.setCreateTime(new Date());
sConsumerCoupon.setSubPrice(BigDecimal.valueOf(prepare.getDeal_marketprice())); sConsumerCoupon.setSubPrice(BigDecimal.valueOf(prepare.getDeal_marketprice()));
sConsumerCoupon.setCouponPayPrice(BigDecimal.valueOf(prepare.getDeal_price()));
//查询美团团购信息 //查询美团团购信息
List<TuangouDealQueryShopDealResponseEntity> groupActivities = queryshopdeal(sStore.getOpenShopUuid()); List<TuangouDealQueryShopDealResponseEntity> groupActivities = queryshopdeal(sStore.getOpenShopUuid());
groupActivities.forEach(o -> { groupActivities.forEach(o -> {
......
...@@ -210,6 +210,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl ...@@ -210,6 +210,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
sCoupon.setName(item.getTitle()); sCoupon.setName(item.getTitle());
//套餐原价 //套餐原价
sCoupon.setSubPrice(BigDecimal.valueOf(item.getMarketprice())); sCoupon.setSubPrice(BigDecimal.valueOf(item.getMarketprice()));
sCoupon.setCouponPayPrice(BigDecimal.valueOf(item.getPrice()));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
try { try {
Date receiptEndDate = sdf.parse(item.getReceipt_end_date()); Date receiptEndDate = sdf.parse(item.getReceipt_end_date());
...@@ -323,6 +324,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl ...@@ -323,6 +324,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
sCoupon.setMinDuration(DEFAULT_DURATION); sCoupon.setMinDuration(DEFAULT_DURATION);
sCoupon.setMaxDuration(DEFAULT_MAX_DURATION); sCoupon.setMaxDuration(DEFAULT_MAX_DURATION);
sCoupon.setMinPrice(new BigDecimal("0.00")); sCoupon.setMinPrice(new BigDecimal("0.00"));
sCoupon.setCouponPayPrice(sku.getBigDecimal("actual_amount").divide(new BigDecimal("100")));
sCoupon.setCouponType(CouponTypeEnum.CASH.getCode()); sCoupon.setCouponType(CouponTypeEnum.CASH.getCode());
if (finalSStores.size() == 0) { if (finalSStores.size() == 0) {
sCouponList.add(sCoupon); sCouponList.add(sCoupon);
......
...@@ -313,27 +313,25 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -313,27 +313,25 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List<SOrderVo> sOrderVos = convertDosToVos(sOrders); List<SOrderVo> sOrderVos = convertDosToVos(sOrders);
BigDecimal totalAmount = new BigDecimal("0.00"); BigDecimal totalAmount = new BigDecimal("0.00");
BigDecimal amount = new BigDecimal("0.00"); BigDecimal amount = new BigDecimal("0.00");
//已使用总金额 //优惠卷售卖总金额
BigDecimal usedAmount = new BigDecimal("0.00"); BigDecimal couponAmount = new BigDecimal("0.00");
//已使用实付金额 //申请退款总金额
BigDecimal usedPayAmount = new BigDecimal("0.00");
//以退款总金额
BigDecimal refundAmount = new BigDecimal("0.00"); BigDecimal refundAmount = new BigDecimal("0.00");
//以退款实付金额 //实际退款总金额
BigDecimal refundPayAmount = new BigDecimal("0.00"); BigDecimal realRefundAmount = new BigDecimal("0.00");
List<SConsumerCoupon> sConsumerCoupons = consumerCouponService.queryList();
if (CollectionUtils.isNotEmpty(sOrderVos)) { if (CollectionUtils.isNotEmpty(sOrderVos)) {
for (SOrderVo item : sOrderVos) { for (SOrderVo item : sOrderVos) {
totalAmount = totalAmount.add(item.getTotalPrice()); totalAmount = totalAmount.add(item.getTotalPrice());
amount = amount.add(item.getPayPrice()); amount = amount.add(item.getPayPrice());
if (item.getPayStatus().equals(YesNoEnum.yes.getIndex()) && item.getStatus().equals(OrderStatusEnum.USED.getCode())) { sConsumerCoupons.stream().filter(sConsumerCoupon -> sConsumerCoupon.getId().equals(item.getCouponId())).findFirst().ifPresent(sConsumerCoupon -> {
usedAmount = usedAmount.add(item.getTotalPrice()); couponAmount.add(ObjectUtil.isEmpty(sConsumerCoupon.getCouponPayPrice()) ? new BigDecimal("0.00") : sConsumerCoupon.getCouponPayPrice());
usedPayAmount = usedPayAmount.add(item.getPayPrice()); });
} if (item.getPayStatus().equals(YesNoEnum.yes.getIndex()) && item.getRefundStatus().equals(RefundStatusEnum.REFUNDED.getCode())) {
if (item.getRefundStatus().equals(RefundStatusEnum.REFUNDED.getCode())) { refundAmount.add(ObjectUtil.isEmpty(item.getPayPrice()) ? new BigDecimal("0.00") : item.getPayPrice());
refundAmount = refundAmount.add(item.getTotalPrice()); realRefundAmount.add(ObjectUtil.isEmpty(item.getRefundPrice()) ? new BigDecimal("0.00") : item.getRefundPrice());
refundPayAmount = refundPayAmount.add(item.getPayPrice());
} }
} }
} }
sOrderVos.sort(Comparator.comparing(SOrderVo::getCreateTime).reversed()); sOrderVos.sort(Comparator.comparing(SOrderVo::getCreateTime).reversed());
...@@ -350,10 +348,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -350,10 +348,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
tableDataInfo.setMsg("查询成功"); tableDataInfo.setMsg("查询成功");
tableDataInfo.setTotalAmount(totalAmount); tableDataInfo.setTotalAmount(totalAmount);
tableDataInfo.setAmount(amount); tableDataInfo.setAmount(amount);
tableDataInfo.setUsedAmount(usedAmount); tableDataInfo.setCouponAmount(couponAmount);
tableDataInfo.setUsedPayAmount(usedPayAmount);
tableDataInfo.setRefundAmount(refundAmount); tableDataInfo.setRefundAmount(refundAmount);
tableDataInfo.setRefundPayAmount(refundPayAmount); tableDataInfo.setRealRefundAmount(realRefundAmount);
return tableDataInfo; return tableDataInfo;
} }
......
...@@ -394,6 +394,7 @@ public class TiktokServiceImpl implements TiktokService { ...@@ -394,6 +394,7 @@ public class TiktokServiceImpl implements TiktokService {
sConsumerCoupon.setCreateTime(new Date()); sConsumerCoupon.setCreateTime(new Date());
Integer originalAmount = amount.getInt("list_market_amount"); Integer originalAmount = amount.getInt("list_market_amount");
sConsumerCoupon.setSubPrice(BigDecimal.valueOf(originalAmount / 100)); sConsumerCoupon.setSubPrice(BigDecimal.valueOf(originalAmount / 100));
sConsumerCoupon.setCouponPayPrice(BigDecimal.valueOf(amount.getInt("coupon_pay_amount") / 100));
//时间戳转年月日时分秒 //时间戳转年月日时分秒
sConsumerCoupon.setEndDate(new Date(entries.getInt("expire_time") * 1000L)); sConsumerCoupon.setEndDate(new Date(entries.getInt("expire_time") * 1000L));
//获取本日的00:00:00 //获取本日的00:00:00
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result property="duration" column="duration" /> <result property="duration" column="duration" />
<result property="minPrice" column="min_price" /> <result property="minPrice" column="min_price" />
<result property="subPrice" column="sub_price" /> <result property="subPrice" column="sub_price" />
<result property="couponPayPrice" column="coupon_pay_price"/>
<result property="sourceType" column="source_type" /> <result property="sourceType" column="source_type" />
<result property="roomType" column="room_type" /> <result property="roomType" column="room_type" />
<result property="storeType" column="store_type" /> <result property="storeType" column="store_type" />
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
duration, duration,
min_price, min_price,
sub_price, sub_price,
coupon_pay_price,
source_type, source_type,
platform_type, platform_type,
start_date, start_date,
...@@ -119,6 +121,7 @@ ...@@ -119,6 +121,7 @@
<if test="deleteBy != null and deleteBy != ''"> and delete_by = #{deleteBy}</if> <if test="deleteBy != null and deleteBy != ''"> and delete_by = #{deleteBy}</if>
<if test="deleteTime != null "> and delete_time = #{deleteTime}</if> <if test="deleteTime != null "> and delete_time = #{deleteTime}</if>
<if test="tiktokSkuId != null ">and tiktok_sku_id = #{tiktokSkuId}</if> <if test="tiktokSkuId != null ">and tiktok_sku_id = #{tiktokSkuId}</if>
<if test="couponPayPrice != null ">and coupon_pay_price = #{couponPayPrice}</if>
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </select>
...@@ -198,6 +201,7 @@ ...@@ -198,6 +201,7 @@
<if test="dealgroupId != null">dealgroup_id,</if> <if test="dealgroupId != null">dealgroup_id,</if>
<if test="tiktokSkuId != null">tiktok_sku_id,</if> <if test="tiktokSkuId != null">tiktok_sku_id,</if>
<if test="storeIds != null">store_ids,</if> <if test="storeIds != null">store_ids,</if>
<if test="couponPayPrice != null">coupon_pay_price,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="consumerId != null">#{consumerId},</if> <if test="consumerId != null">#{consumerId},</if>
...@@ -237,6 +241,7 @@ ...@@ -237,6 +241,7 @@
<if test="dealgroupId != null">#{dealgroupId},</if> <if test="dealgroupId != null">#{dealgroupId},</if>
<if test="tiktokSkuId != null">#{tiktokSkuId},</if> <if test="tiktokSkuId != null">#{tiktokSkuId},</if>
<if test="storeIds != null">#{storeIds},</if> <if test="storeIds != null">#{storeIds},</if>
<if test="couponPayPrice != null">#{couponPayPrice},</if>
</trim> </trim>
</insert> </insert>
...@@ -280,6 +285,7 @@ ...@@ -280,6 +285,7 @@
<if test="dealgroupId != null">dealgroup_id = #{dealgroupId},</if> <if test="dealgroupId != null">dealgroup_id = #{dealgroupId},</if>
<if test="tiktokSkuId != null">tiktok_sku_id = #{tiktokSkuId},</if> <if test="tiktokSkuId != null">tiktok_sku_id = #{tiktokSkuId},</if>
<if test="storeIds != null">store_ids = #{storeIds},</if> <if test="storeIds != null">store_ids = #{storeIds},</if>
<if test="couponPayPrice != null">coupon_pay_price = #{couponPayPrice},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="maxDuration" column="max_duration" /> <result property="maxDuration" column="max_duration" />
<result property="minPrice" column="min_price" /> <result property="minPrice" column="min_price" />
<result property="subPrice" column="sub_price" /> <result property="subPrice" column="sub_price" />
<result property="couponPayPrice" column="coupon_pay_price"/>
<result property="isOverlay" column="is_overlay" /> <result property="isOverlay" column="is_overlay" />
<result property="weeks" column="weeks"/> <result property="weeks" column="weeks"/>
<result property="platformType" column="platform_type" /> <result property="platformType" column="platform_type" />
...@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tiktok_sku_id, tiktok_sku_id,
weeks, weeks,
store_ids, store_ids,
coupon_pay_price,
duration,min_duration,max_duration, duration,min_duration,max_duration,
min_price,sub_price,is_overlay, min_price,sub_price,is_overlay,
platform_type,number,create_by, platform_type,number,create_by,
...@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maxDuration != null and maxDuration != ''"> and max_duration = #{maxDuration}</if> <if test="maxDuration != null and maxDuration != ''"> and max_duration = #{maxDuration}</if>
<if test="minPrice != null and minPrice != ''"> and min_price = #{minPrice}</if> <if test="minPrice != null and minPrice != ''"> and min_price = #{minPrice}</if>
<if test="subPrice != null and subPrice != ''"> and sub_price = #{subPrice}</if> <if test="subPrice != null and subPrice != ''"> and sub_price = #{subPrice}</if>
<if test="couponPayPrice != null and couponPayPrice != ''">and coupon_pay_price = #{couponPayPrice}</if>
<if test="isOverlay != null"> and is_overlay = #{isOverlay}</if> <if test="isOverlay != null"> and is_overlay = #{isOverlay}</if>
<if test="platformType != null"> and platform_type = #{platformType}</if> <if test="platformType != null"> and platform_type = #{platformType}</if>
<if test="weeks != null">and weeks = #{weeks}</if> <if test="weeks != null">and weeks = #{weeks}</if>
...@@ -148,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -148,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealgroupId != null">dealgroup_id,</if> <if test="dealgroupId != null">dealgroup_id,</if>
<if test="tiktokSkuId != null">tiktok_sku_id,</if> <if test="tiktokSkuId != null">tiktok_sku_id,</if>
<if test="storeIds != null">store_ids,</if> <if test="storeIds != null">store_ids,</if>
<if test="couponPayPrice != null">coupon_pay_price,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if> <if test="name != null and name != ''">#{name},</if>
...@@ -175,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -175,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealgroupId != null">#{dealgroupId},</if> <if test="dealgroupId != null">#{dealgroupId},</if>
<if test="tiktokSkuId != null">#{tiktokSkuId},</if> <if test="tiktokSkuId != null">#{tiktokSkuId},</if>
<if test="storeIds != null">#{storeIds},</if> <if test="storeIds != null">#{storeIds},</if>
<if test="couponPayPrice != null">#{couponPayPrice},</if>
</trim> </trim>
</insert> </insert>
...@@ -208,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -208,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="couponPayPrice != null">coupon_pay_price = #{couponPayPrice},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment