Browse Source

add 微信直播渠道投放

release_toaliyun_real
winter 4 years ago
parent
commit
995dbb2020
5 changed files with 14 additions and 7 deletions
  1. +2
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java
  2. +1
    -1
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java
  3. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java
  5. +7
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 2
- 1
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java View File

@@ -106,7 +106,8 @@ public class WxCouponChannelController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch");
String[] ids = wxCouponChannelDto.getCouponIds().split(",");
String[] channelId = wxCouponChannelDto.getChannelId().split(",");
ResultData resultData = wxCouponChannelService.addBatch(wxCouponChannelDto.getType(),ids, channelId, getTenantInfo(),wxCouponChannelDto.getShowBeginTime(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime());
ResultData resultData = wxCouponChannelService.addBatch(wxCouponChannelDto.getType(),ids, channelId, getTenantInfo(),
wxCouponChannelDto.getShowBeginTime(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime(),wxCouponChannelDto.getChannelPrice(),wxCouponChannelDto.getChannelStock());
return resultData;
}



+ 1
- 1
mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java View File

@@ -87,7 +87,7 @@ public class WxCouponChannelController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch");
String[] ids = wxCouponChannelDto.getCouponIds().split(",");
String[] channelId = wxCouponChannelDto.getChannelId().split(",");
ResultData resultData = wxCouponChannelService.addBatch(wxCouponChannelDto.getType(),ids, channelId, getTenantInfo(),wxCouponChannelDto.getShowBeginTime(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime());
ResultData resultData = wxCouponChannelService.addBatch(wxCouponChannelDto.getType(),ids, channelId, getTenantInfo(),wxCouponChannelDto.getShowBeginTime(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime(),null,null);
return resultData;
}



+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java View File

@@ -20,6 +20,9 @@ public class WxCouponChannelDto implements Serializable {
private Date showBeginTime;
private String type;
private Integer channelPrice;
private Integer channelStock;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams")


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

@@ -50,7 +50,7 @@ public interface WxCouponChannelService {
*/
void updateQrCode(TenantEntity tenantEntity, Long couponChannelId, Integer couponType);

ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime);
ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime,Integer channelPrice,Integer channelStock);

void updateStatusByCouponId(Long couponId,TenantEntity tenantEntity,int status);



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

@@ -226,7 +226,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
}

@Override
public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) {
public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime,Integer channelPrice,Integer channelStock) {
//如果当前版本是推广版,则线上只能有一个拼团,一个砍价
WxMall mall = wxMallService.getByTenantId(tenantEntity.getTenantId());
if (EnumSaleType.WX_ENJOY_TRY.getCode().equals(mall.getSaleType())) {
@@ -271,7 +271,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
Integer targetId = Integer.parseInt(targetIdstr);
for (String couponidstr:ids) {
Long couponid = Long.parseLong(couponidstr);
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,showBeginTime,beginTime,endTime);
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,showBeginTime,beginTime,endTime,channelPrice,channelStock);
if(!vo.isSuc()){
errorList.add(vo);
}
@@ -489,7 +489,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
return false;
}

public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date showBeginTime,Date beginTime,Date endTime){
public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date showBeginTime,Date beginTime,Date endTime,Integer channelPrice,Integer channelStock){

WxCouponChannelAddVo vo = new WxCouponChannelAddVo();

@@ -534,7 +534,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CARD.getCode()) || // 卡频道
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_PRESS.getCode()) || // 砍价
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_ORDER_GROUP.getCode()) || // 拼团
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CREDIT.getCode()) // 积分商城
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CREDIT.getCode()) || // 积分商城
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_WXLIVE_LIST.getCode()) //微信直播列表
){
// 默认投放结束时间为有效时间之后
if(wxCoupon.getType().equals(EnumCouponType.COUPON_PREORDER.getCode())){
@@ -570,6 +571,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
wxCouponChannel.setBusiness(wxCoupon.getBusiness());
wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness());
wxCouponChannel.setTitle(wxCoupon.getTitle());
wxCouponChannel.setChannelPrice(channelPrice);
wxCouponChannel.setChannelStock(channelStock);;
ResultData resultData = saveOrUpdate(wxCouponChannel);
WxCouponChannel channel = (WxCouponChannel)resultData.data;
vo.setId(channel.getId());


Loading…
Cancel
Save