Browse Source

Merge commit 'b8c753c0839fa6c0689a42daeed66deb8b17448e' into release

# Conflicts:
#	mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
release_toaliyun_real
luozukai 6 years ago
parent
commit
10ba727eab
7 changed files with 30 additions and 21 deletions
  1. +4
    -6
      mallinkService/src/main/java/com/iformall/mapper/WxCardInfoMapper.java
  2. +5
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  3. +8
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  4. +6
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  5. +3
    -0
      mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml
  6. +2
    -2
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  7. +2
    -5
      mallinkService/src/main/resources/mapper/WxMsgValidationcodeModelMapper.xml

+ 4
- 6
mallinkService/src/main/java/com/iformall/mapper/WxCardInfoMapper.java View File

@@ -1,17 +1,15 @@
package com.iformall.mapper;

import java.util.*;
import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxCardInfo;
import com.iformall.domain.vo.WxCardVo;

import java.util.List;

public interface WxCardInfoMapper extends CommonMapper<WxCardInfo, Long> {

List<WxCardVo> findVoList(WxCardVo wxCardVo);

void updateTransferStatusByCouponId(Long couponId);

}

+ 5
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java View File

@@ -13,6 +13,7 @@ import com.iformall.domain.vo.WxCouponChannelAddVo;
import com.iformall.domain.vo.WxCouponChannelVo;
import com.iformall.domain.vo.WxMerchantVo;
import com.iformall.enums.*;
import com.iformall.mapper.WxCardInfoMapper;
import com.iformall.mapper.WxCouponChannelMapper;
import com.iformall.mapper.WxCouponMerchantMapper;
import com.iformall.mapper.WxMerchantMapper;
@@ -43,6 +44,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
WxOrderService wxOrderService;
@Autowired
QrCodeService qrCodeService;
@Autowired
WxCardInfoMapper wxCardInfoMapper;

/**
* B端业务端
@@ -107,6 +110,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
wxCoupon.setSupportTransfer(EnumCouponTransfer.NO.getCode());
wxCoupon.setUpdateDate(new Date());
wxCouponService.update(wxCoupon);
//修改卡状态
wxCardInfoMapper.updateTransferStatusByCouponId(orignal.getCouponId());
}
}
}


+ 8
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java View File

@@ -63,6 +63,9 @@ public class WxCouponServiceImpl implements WxCouponService {
@Autowired
WxCouponChannelMapper wxCouponChannelMapper;

@Autowired
WxCardInfoMapper wxCardInfoMapper;

@Override
public ResultData list(WxCoupon wxCoupon, Integer pageNum, Integer pageSize) {
if (null == wxCoupon) wxCoupon = new WxCoupon();
@@ -394,10 +397,15 @@ public class WxCouponServiceImpl implements WxCouponService {
wxScreenAdService.updateStatusByCouponId(record.getId(), record.getTenantId(), EnumScreenAdStatus.INVALID.getCode());
//下架拼团券
wxOrderService.updateOrderGroupStatusByCouponId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode());
//卡-转赠状态
record.setSupportTransfer(EnumCouponTransfer.NO.getCode());
//修改卡状态
wxCardInfoMapper.updateTransferStatusByCouponId(record.getId());

}
record.setUpdateDate(new Date());
wxCouponMapper.updateByPrimaryKeySelective(record);

}
return new ResultData(record.getId());
}


+ 6
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -2018,9 +2018,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Double total = new Double(0);
int[] diff;

if(sd.format(start).equals("2019-07-01")){
System.out.println();
}
System.out.println(sd.format(start));
System.out.println(sd.format(end));
//同一天
if(sd.format(start).equals(sd.format(end))){
int dayCount = DateUtils.getMonthDayCount(start);
@@ -2029,8 +2029,6 @@ public class WxRentContractServiceImpl implements WxRentContractService {

//同月
if(sdM.format(start).equals(sdM.format(end))){
System.out.println(sd.format(start));
System.out.println(sd.format(end));

diff = DateUtils.getDiff(start,end);
int dayCount = DateUtils.getMonthDayCount(start);
@@ -2043,8 +2041,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
int endInt = Integer.parseInt(sdD.format(DateUtils.getDaySet(end,Calendar.DATE,1)));

if(startInt == endInt){
int months = getMonths(sdM.format(start)+"-01",sdM.format(end)+"-01");
return (months+1) * price;
int months = getMonths(sdM.format(start)+"-01",sdM.format(DateUtils.getDaySet(end,Calendar.DATE,1))+"-01");
return (months) * price;
}

//第一个月
@@ -2237,4 +2235,4 @@ public class WxRentContractServiceImpl implements WxRentContractService {
public WxRentContract getByBill(WxBillRent billRent) {
return wxRentContractMapper.getByBill(billRent);
}
}
}

+ 3
- 0
mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml View File

@@ -206,5 +206,8 @@
<include refid="dynamicVoWhereConditions" />
</select>
<update id="updateTransferStatusByCouponId" parameterType="Long">
update wx_card_info set support_transfer=0,update_date=now() where support_transfer=1 and coupon_id=#{couponId}
</update>
</mapper>

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

@@ -950,13 +950,13 @@
<sql id="allCUserCardListColumns">
co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,
c.cover_img,c.title,c.sub_title,c.detail,c.unit,c.remark,
a.amount,a.remaining_amount,case when c.status=1 then 0 else a.support_transfer end support_transfer
a.amount,a.remaining_amount,case when c.status=1 then 0 else c.support_transfer end support_transfer
</sql>

<sql id="allCUserCardDetailColumns">
co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,
c.cover_img,c.title,c.sub_title,c.sale_price,c.price,c.unit,c.detail,c.remark,
a.amount,a.remaining_amount,case when c.status=1 then 0 else a.support_transfer end support_transfer
a.amount,a.remaining_amount,case when c.status=1 then 0 else c.support_transfer end support_transfer
</sql>




+ 2
- 5
mallinkService/src/main/resources/mapper/WxMsgValidationcodeModelMapper.xml View File

@@ -36,11 +36,8 @@
<if test=" null != type "> and `type` = #{type} </if>
<if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if>
<if test=" null != open "> and `open` = #{open} </if>
<if test="1 == msgType">
and id not in(
select id from wx_msg_validationcode_model where content like '&lt;%' and `tenant_id` = #{tenantId}
)
</if>
<if test=" null != msgType "> and `msg_type` = #{msgType} </if>
<if test=" null != roleType "> and `role_type` = #{roleType} </if>

<if test=" null != ids ">
and id in


Loading…
Cancel
Save