Просмотр исходного кода

//..coupon_

release_toaliyun_real
xhxu 2 лет назад
Родитель
Сommit
e0745c00e4
3 измененных файлов: 47 добавлений и 18 удалений
  1. +15
    -0
      mallinkAdmin/src/main/resources/db/migration/V2023071200003_coupon_poi.sql
  2. +31
    -16
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  3. +1
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 15
- 0
mallinkAdmin/src/main/resources/db/migration/V2023071200003_coupon_poi.sql Просмотреть файл

@@ -0,0 +1,15 @@
update tt_coupon_channel_poi set status = last_status,status_desc = last_status_desc where status is null;

update tt_coupon_channel_poi set status = 2 where status = 4;



INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (679, '抖音POI投放', 606, 'Y', NULL, 1, NULL, NULL, 'poiputon', NULL, 0, 679);


UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 424, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 61202, 61501, 61502]' WHERE `id` = 11;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 223, 224, 225, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 424, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 679, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 12;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 226, 227, 251, 261, 409, 410, 411, 416, 424, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 676, 679, 680, 711, 716, 901, 902, 904, 907, 5502, 60201, 61202, 61501, 61502]' WHERE `id` = 13;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 211, 212, 221, 222, 223, 224, 251, 409, 410, 411, 416, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 615, 622, 648, 649, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 61501, 61502]' WHERE `id` = 101;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 424, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 650, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 41001, 60202, 61202, 61501, 61502, 71101]' WHERE `id` = 102;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 225, 223, 224, 251, 261, 299, 300, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 424, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 679, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 103500103610;

+ 31
- 16
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java Просмотреть файл

@@ -338,20 +338,6 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {

}else if(wxCouponChannels.size() >= 1){
wxCouponChannel = wxCouponChannels.get(0);
wxCouponChannel.setShowBeginTime(showBeginTime);
wxCouponChannel.setBeginTime(beginTime);
wxCouponChannel.setEndTime(endTime);
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_BEFORE.getCode());
wxCouponChannel.setCouponId(coupon.getId());
wxCouponChannel.setMakeMerchantId(coupon.getMakeMerchantId());
wxCouponChannel.setType(coupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN.getCode());
wxCouponChannel.setBusiness(coupon.getBusiness());
wxCouponChannel.setSubBusiness(coupon.getSubBusiness());
wxCouponChannel.setTitle(coupon.getTitle());
wxCouponChannel.setUpdateDate(now);
wxCouponChannelMapper.updateById(wxCouponChannel);

}else{
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"此券状态异常,请重新创建");
}
@@ -368,8 +354,8 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
prostruct.setBizLine(5);//默认小程序
prostruct.setAccountName(mall.getName());

prostruct.setSoldStartTime((long) DateUtils.getSecondTimestamp(wxCouponChannel.getBeginTime()));
prostruct.setSoldEndTime((long) DateUtils.getSecondTimestamp(wxCouponChannel.getEndTime()));
prostruct.setSoldStartTime((long) DateUtils.getSecondTimestamp(beginTime));
prostruct.setSoldEndTime((long) DateUtils.getSecondTimestamp(endTime));

prostruct.setOutUrl(getGoodsEntrySchema(coupon,wxCouponChannel.getId()));
if (isSaas) {
@@ -564,6 +550,35 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
ttDraftCouponChannelPoi.setUpdateDate(new Date());
ttCouponChannelPoiMapper.updateById(ttDraftCouponChannelPoi);

Date now = new Date();
Date showBeginTime = now;
Date beginTime = null;
Date endTime = null;
if(wxCoupon.getSoldStartTime() != null && wxCoupon.getSoldEndTime() != null){
beginTime = wxCoupon.getSoldStartTime();
endTime = wxCoupon.getSoldEndTime();
}else{
beginTime = showBeginTime;
endTime = wxCoupon.getValidEndDate();
}

WxCouponChannel couponChannel = new WxCouponChannel();
couponChannel.setId(ttCouponChannelPoi.getCouponChannelId());
couponChannel.updateTenantInfo(ttCouponChannelPoi);
couponChannel.setShowBeginTime(showBeginTime);
couponChannel.setBeginTime(beginTime);
couponChannel.setEndTime(endTime);
// couponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
couponChannel.setCouponId(wxCoupon.getId());
couponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
couponChannel.setType(wxCoupon.getType());
couponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN.getCode());
couponChannel.setBusiness(wxCoupon.getBusiness());
couponChannel.setSubBusiness(wxCoupon.getSubBusiness());
couponChannel.setTitle(wxCoupon.getTitle());
couponChannel.setUpdateDate(now);
wxCouponChannelMapper.updateById(couponChannel);

}

}


+ 1
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Просмотреть файл

@@ -670,8 +670,7 @@ public class WxCouponServiceImpl implements WxCouponService {
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(record.getTenantId(),record.getId());
if(ttCouponChannelPoi != null &&
(EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getStatus())
|| EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getStatus())
|| EnumSpuSyncStatus.sync_audit_disable.getCode().equals(ttCouponChannelPoi.getStatus()))){
|| EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getStatus()))){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"该券状态不允许修改");
}
}


Загрузка…
Отмена
Сохранить