Browse Source

[A端][需求]:删除couponchannel表和couponsend表中的merchant_id

release_toaliyun_real
hupeng 7 years ago
parent
commit
a20307a902
9 changed files with 12 additions and 52 deletions
  1. +0
    -9
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java
  2. +0
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  3. +0
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java
  4. +6
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  5. +0
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java
  6. +1
    -12
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml
  7. +3
    -4
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  8. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  9. +1
    -7
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 0
- 9
mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java View File

@@ -54,9 +54,6 @@ public class WxCouponChannel implements Serializable {
/*租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
/*商户id**/
@io.swagger.annotations.ApiModelProperty(value="商户id",name="merchantId")
private Long merchantId;
/*卡券id**/
@io.swagger.annotations.ApiModelProperty(value="卡券id",name="couponId")
private Long couponId;
@@ -99,12 +96,6 @@ public class WxCouponChannel implements Serializable {
public void setTenantId(String _tenantId) {
tenantId = _tenantId;
}
public Long getMerchantId() {
return merchantId;
}
public void setMerchantId(Long _merchantId) {
merchantId = _merchantId;
}
public Long getCouponId() {
return couponId;
}


+ 0
- 10
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java View File

@@ -44,9 +44,6 @@ public class WxCouponSend implements Serializable {
/*租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
/*商户id**/
@io.swagger.annotations.ApiModelProperty(value="商户id",name="merchantId")
private Long merchantId;
/*卡券id**/
@io.swagger.annotations.ApiModelProperty(value="卡券id",name="couponId")
private Long couponId;
@@ -86,12 +83,6 @@ public class WxCouponSend implements Serializable {
public void setTenantId(String _tenantId) {
tenantId = _tenantId;
}
public Long getMerchantId() {
return merchantId;
}
public void setMerchantId(Long _merchantId) {
merchantId = _merchantId;
}
public Long getCouponId() {
return couponId;
}
@@ -159,7 +150,6 @@ public class WxCouponSend implements Serializable {
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC")
,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC")
,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC")
,Type_ASC("`type` ASC"),Type_DESC("`type` DESC")
,Title_ASC("`title` ASC"),Title_DESC("`title` DESC")


+ 0
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java View File

@@ -149,7 +149,6 @@ public class WxCampaignServiceImpl implements WxCampaignService {
wxCouponChannel.setEndTime(record.getValidEndDate());
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setCouponId(couponId);
wxCouponChannel.setMerchantId(wxCoupon.getMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode());
wxCouponChannel.setTenantId(wxCoupon.getTenantId());


+ 6
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java View File

@@ -173,9 +173,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
wxCouponChannel.setEndTime(endTime);
wxCouponChannel.setStatus(0);
wxCouponChannel.setBeginTime(beginTime);

wxCouponChannel.setCouponId(couponid);
wxCouponChannel.setMerchantId(wxCoupon.getMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(channelId);
wxCouponChannel.setTenantId(tanantId);
@@ -211,11 +209,12 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
for (WxCouponChannelVo wxcouponVo:wxCouponChannelVoList) {
if(couponNamesMap.get(wxcouponVo.getCouponId())!=null){
wxcouponVo.setWxCoupon(couponNamesMap.get(wxcouponVo.getCouponId()));
WxMerchant wxMerchant = new WxMerchant();
wxMerchant.setId(wxcouponVo.getMerchantId());
wxMerchant = wxMerchantMapper.selectByPrimaryKey(wxMerchant);
if (wxMerchant != null)
wxcouponVo.setWxMerchant(wxMerchant);
//WxMerchant wxMerchant = new WxMerchant();
//wxMerchant.setId(wxcouponVo.getMerchantId());
//wxMerchant = wxMerchantMapper.selectByPrimaryKey(wxMerchant);
//if (wxMerchant != null)
// wxcouponVo.setWxMerchant(wxMerchant);
//PENG TODO
}
}
return new PageInfo<>(wxCouponChannelVoList);


+ 0
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java View File

@@ -213,7 +213,6 @@ public class WxGameServiceImpl implements WxGameService {
wxCouponChannel.setEndTime(record.getValidEndDate());
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setCouponId(couponId);
wxCouponChannel.setMerchantId(wxCoupon.getMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_GAME.getCode());
wxCouponChannel.setTenantId(wxCoupon.getTenantId());


+ 1
- 12
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml View File

@@ -4,7 +4,6 @@
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCouponChannel">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
@@ -19,7 +18,7 @@
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`merchant_id`,`coupon_id`,`coupon_status`,`type`,`title`,`target_ad`,`business`,`begin_time`,`end_time`,`status`,`create_date`,`update_date`,`sub_target_id`
`id`,`tenant_id`,`coupon_id`,`coupon_status`,`type`,`title`,`target_ad`,`business`,`begin_time`,`end_time`,`status`,`create_date`,`update_date`,`sub_target_id`
</sql>

<sql id="dynamicWhereConditions">
@@ -33,10 +32,6 @@
and `tenant_id` = #{tenantId}
</if>

<if test=" null != merchantId ">
and `merchant_id` = #{merchantId}
</if>

<if test=" null != couponId ">
and `coupon_id` = #{couponId}
</if>
@@ -111,7 +106,6 @@
<resultMap id="CouponChannelVoMap" type="com.iformall.domain.vo.WxCouponChannelVo">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
@@ -128,7 +122,6 @@
<include refid="dynamicWhereConditions" />
</select>


<select id="findVoListForCouponChannel2" parameterType="com.iformall.domain.po.WxCouponChannel" resultMap="CouponChannelVoMap">
select <include refid="allColumns" /> from wx_coupon_channel
where 1 = 1
@@ -141,10 +134,6 @@
and `tenant_id` = #{tenantId}
</if>

<if test=" null != merchantId ">
and `merchant_id` = #{merchantId}
</if>

<if test=" null != couponId ">
and `coupon_id` = #{couponId}
</if>


+ 3
- 4
mallinkService/src/main/resources/mapper/WxCouponMapper.xml View File

@@ -211,14 +211,13 @@
<select id="selectDetailForCUser" parameterType="com.iformall.domain.po.WxCouponChannel" resultMap="CUserResultMap">
select
<include refid="allCUserColumns"/>
from wx_coupon_channel cc,
wx_coupon c,wx_merchant m
from wx_coupon_channel cc, wx_coupon c
left join wx_merchant m on c.merchant_id = m.id
left join wx_merchant_shop ms on ms.merchant_id = m.id and ms.is_del = 0
left join wx_shop s on ms.shop_id = s.id
left join wx_mall_building mb on s.building = mb.id
left join wx_mall_floor mf on s.floor = mf.id
where c.merchant_id = m.id
and cc.coupon_id = c.id
where cc.coupon_id = c.id
<if test=" null != id ">
and cc.id = #{id}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml View File

@@ -191,7 +191,7 @@
inner JOIN wx_order o on o.id = co.order_id
inner JOIN wx_coupon c on co.coupon_id = c.id
inner JOIN wx_c_user cu on cu.id = co.c_user_id
inner JOIN wx_merchant m on o.merchant_id = m.id
left JOIN wx_merchant m on o.merchant_id = m.id
left join wx_merchant_b_user bu on co.b_user_id = bu.id
where 1 = 1
<if test=" null != id ">


+ 1
- 7
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml View File

@@ -4,7 +4,6 @@
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCouponSend">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
@@ -17,7 +16,7 @@
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`merchant_id`,`coupon_id`,`type`,`title`,`send_type`,`status`,`send_start_time`,`send_end_time`,`create_date`,`update_date`
`id`,`tenant_id`,`coupon_id`,`type`,`title`,`send_type`,`status`,`send_start_time`,`send_end_time`,`create_date`,`update_date`
</sql>

<sql id="dynamicWhereConditions">
@@ -33,11 +32,6 @@

</if>

<if test=" null != merchantId ">
and `merchant_id` = #{merchantId}

</if>

<if test=" null != couponId ">
and `coupon_id` = #{couponId}



Loading…
Cancel
Save