Quellcode durchsuchen

[券订单][修改][添加手机号查询条件及核销商户等字段]

release_toaliyun_real
gongbiao vor 6 Jahren
Ursprung
Commit
464699dd4f
2 geänderte Dateien mit 23 neuen und 11 gelöschten Zeilen
  1. +7
    -1
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java
  2. +16
    -10
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml

+ 7
- 1
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java Datei anzeigen

@@ -69,7 +69,7 @@ public class WxCouponOrderBVo extends WxCouponOrder{
@Excel(name = "交易价格(元)", width = 20, orderNum = "5") @Excel(name = "交易价格(元)", width = 20, orderNum = "5")
private String salePriceStr; private String salePriceStr;


@Excel(name = "状态", width = 20, replace = {"可以退款_0", "已经使用_1", "已经过期_2", "已经退款_3"}, orderNum = "14")
@Excel(name = "状态", width = 20, replace = {"待使用_0", "已核销_1", "已过期_2", "已退款_3"}, orderNum = "14")
@io.swagger.annotations.ApiModelProperty(value = "状态:0,待使用 1,已核销 2,已过期 3,已作废 ", name = "couponOrderStatus") @io.swagger.annotations.ApiModelProperty(value = "状态:0,待使用 1,已核销 2,已过期 3,已作废 ", name = "couponOrderStatus")
private Integer couponOrderStatus; private Integer couponOrderStatus;


@@ -141,9 +141,15 @@ public class WxCouponOrderBVo extends WxCouponOrder{


@Transient @Transient
private Long couponId; private Long couponId;

@Excel(name = "券类型", width = 50, orderNum = "15", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "积分券_50", "家积分停车券_51", "消费卡_100"})
@Transient @Transient
private Integer couponType; private Integer couponType;


@Excel(name = "核销商户", width = 50, orderNum = "16")
@Transient
private String verifyMerchantName;

@Transient @Transient
private Integer floor; private Integer floor;
@Transient @Transient


+ 16
- 10
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml Datei anzeigen

@@ -378,6 +378,8 @@
<result column="phone" jdbcType="VARCHAR" property="cUserPhone" /> <result column="phone" jdbcType="VARCHAR" property="cUserPhone" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" /> <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/>
<collection column="{productId=coupon_id}" property="merchantVoList" <collection column="{productId=coupon_id}" property="merchantVoList"
ofType="com.iformall.domain.vo.WxMerchantVo" ofType="com.iformall.domain.vo.WxMerchantVo"
javaType="java.util.List" javaType="java.util.List"
@@ -393,7 +395,7 @@
where m.id = cm.merchant_id and cm.product_id=co.coupon_id and cm.status = 0) else '[多商户通用]' end) as merchant_name, where m.id = cm.merchant_id and cm.product_id=co.coupon_id and cm.status = 0) else '[多商户通用]' end) as merchant_name,
(case when com.mc = 1 then (select m.id from wx_merchant m, (case when com.mc = 1 then (select m.id from wx_merchant m,
wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id = co.coupon_id wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id = co.coupon_id
and cm.status = 0) else 0 end) as merchant_id,(select phone from wx_c_user where id=co.c_user_id) phone
and cm.status = 0) else 0 end) as merchant_id,cu.phone,bu.verify_merchant_name
</sql> </sql>


<sql id="allAdminCouponOrderDetailColumns"> <sql id="allAdminCouponOrderDetailColumns">
@@ -407,14 +409,19 @@
<select id="findListOfAdmin" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BVoResultMap"> <select id="findListOfAdmin" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BVoResultMap">
select <include refid="allAdminCouponOrderListColumns" /> select <include refid="allAdminCouponOrderListColumns" />
from from
wx_coupon_order co,
wx_coupon c,
(select tco.id as tcoid,
(select count(*) from wx_coupon_merchant tcm
where tcm.product_id = tco.coupon_id
and tcm.status = 0) as mc
from wx_coupon_order tco) com
where com.tcoid = co.id
wx_coupon_order co inner join wx_coupon c on c.id = co.coupon_id
inner join (select tco.id as tcoid,
(select count(*) from wx_coupon_merchant tcm
where tcm.product_id = tco.coupon_id
and tcm.status = 0) as mc
from wx_coupon_order tco) com on com.tcoid = co.id
inner join wx_c_user cu on cu.id=co.c_user_id
left join (
select bu.id as bu_id,m.name as verify_merchant_name
from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id
where bu.tenant_id = #{tenantId}
) bu on bu.bu_id = co.b_user_id
where 1=1
<choose> <choose>
<when test=" null != couponType"> <when test=" null != couponType">
and co.coupon_type = #{couponType} and co.coupon_type = #{couponType}
@@ -423,7 +430,6 @@
and co.coupon_type &lt; 100 and co.coupon_type &lt; 100
</otherwise> </otherwise>
</choose> </choose>
and c.id = co.coupon_id
<if test=" null != tenantId "> <if test=" null != tenantId ">
and co.tenant_id = #{tenantId} and co.tenant_id = #{tenantId}
</if> </if>


Laden…
Abbrechen
Speichern