Browse Source

update gift

release_toaliyun_real
xhxu 4 years ago
parent
commit
a3ed8459b7
6 changed files with 39 additions and 7 deletions
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java
  3. +3
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidySource.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/helper/WxCUserTagsServiceHelper.java
  5. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java
  6. +26
    -2
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java View File

@@ -116,7 +116,7 @@ public class WxOrder extends TenantEntity {
@TableField(exist = false)
private String title;

@Excel(name = "商品属性", width = 20, orderNum = "4", replace = {"消费卡_1", "优惠券_2", "砍价_3", "拼团_4","可配送商品_5", " _-1"})
@Excel(name = "商品属性", width = 20, orderNum = "4", replace = {"消费卡_1", "优惠券_2", "砍价_3", "拼团_4","可配送商品_6","券礼包_7", " _-1"})
@TableField(exist = false)
private Integer attribute;



+ 2
- 2
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java View File

@@ -93,7 +93,7 @@ public class WxCouponOrderBVo extends WxCouponOrder {
@io.swagger.annotations.ApiModelProperty(value="面额",name="price")
private Integer price;

@Excel(name = "所属业态", width = 50, orderNum = "11", replace = {"餐饮_1", "娱乐_2", "服饰_3", "亲子_4", "超市_5", "其它_6", "美妆_7", "珠宝_8", "服务_9", "家居_10"})
@Excel(name = "所属业态", width = 50, orderNum = "11", replace = {"餐饮_1", "娱乐_2", "服饰_3", "亲子_4", "超市_5", "其它_6", "美妆_7", "珠宝_8", "服务_9", "家居_10", "其它_"})
@io.swagger.annotations.ApiModelProperty(value = "业态", name = "business")
private Integer business;

@@ -189,7 +189,7 @@ public class WxCouponOrderBVo extends WxCouponOrder {
@TableField(exist = false)
private Long couponId;

@Excel(name = "券类型", width = 50, orderNum = "15", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "预购商品_10", "可配送商品_11", "积分券_50", "积分停车券_51", "消费卡_100"})
@Excel(name = "券类型", width = 50, orderNum = "15", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "预购商品_10", "可配送商品_11", "券礼包_12", "积分券_50", "积分停车券_51", "消费卡_100"})
@TableField(exist = false)
private Integer couponType;



+ 3
- 1
mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidySource.java View File

@@ -10,7 +10,9 @@ public enum EnumMerchantSubsidySource {
COUPON(2, "券核销"),
PRESS(3, "砍价核销"),
GROUP(4, "拼团核销"),
CASHIER(5, "收银台"),;
CASHIER(5, "收银台"),
DISTRIBUTION_GOODS(6, "可配送商品"),
GIFT_BAG(7, "券订单"),;

public static EnumMerchantSubsidySource getEnum(Integer code) {
for (EnumMerchantSubsidySource value : values()) {


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/helper/WxCUserTagsServiceHelper.java View File

@@ -368,7 +368,7 @@ public class WxCUserTagsServiceHelper{
int count = 0;
if(cardSpendCountList.size() > 0) {
for (Map<String, Object> cardSpendCount : cardSpendCountList) {
if (cardSpendCount.get("businessId").equals(b.getId().toString())) {
if (cardSpendCount.get("business_id").equals(b.getId().toString())) {
count += (Integer) cardSpendCount.get("buCount");
}
}


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java View File

@@ -767,6 +767,12 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
&& couponOrder.getCouponPrice().equals(wxCoupon.getSalePrice())) {
//拼团
merchantSubsidy.setSource(EnumMerchantSubsidySource.GROUP.getCode());
} else if(couponOrder.getCouponType().equals(EnumCouponType.COUPON_DISTRIBUTION.getCode())){
//可配送商品
merchantSubsidy.setSource(EnumMerchantSubsidySource.DISTRIBUTION_GOODS.getCode());
} else if(couponOrder.getCouponType().equals(EnumCouponType.COUPON_GIFT.getCode())){
//券礼包
merchantSubsidy.setSource(EnumMerchantSubsidySource.GIFT_BAG.getCode());
} else {
//券
merchantSubsidy.setSource(EnumMerchantSubsidySource.COUPON.getCode());


+ 26
- 2
mallinkService/src/main/resources/mapper/WxOrderMapper.xml View File

@@ -884,14 +884,38 @@
c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,2 attribute from wx_order o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id
where c.type!=100 and o.order_status in(0,1,2,3,4,5)
where c.type in (1,2,3,4,5,6,10,50,51) and o.order_status in(0,1,2,3,4,5)
<if test=" null != tenantId and '' != tenantId">
and o.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and o.`parent_tenant_id` = #{parentTenantId}
</if>
<!-- and ifnull(press_current_num,0)=0 and ifnull(order_group_id,0)=0 -->
union all
select o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.product_id,o.payment,o.order_status,
c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,6 attribute from wx_order o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id
where c.type = 11 and o.order_status in(0,1,2,3,4,5)
<if test=" null != tenantId and '' != tenantId">
and o.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and o.`parent_tenant_id` = #{parentTenantId}
</if>
union all
select o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.product_id,o.payment,o.order_status,
c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,7 attribute from wx_order o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id
where c.type = 12 and o.order_status in(0,1,2,3,4,5)
<if test=" null != tenantId and '' != tenantId">
and o.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and o.`parent_tenant_id` = #{parentTenantId}
</if>
and ifnull(press_current_num,0)=0 and ifnull(order_group_id,0)=0
union all
select o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.product_id,o.payment,
case o.order_status when 6 then 0 when 7 then 0


Loading…
Cancel
Save