Browse Source

Merge branch 'release_toaliyun_real_202112' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_202112

release_toaliyun_real
xiaohanzi 4 years ago
parent
commit
4c5391f256
14 changed files with 88 additions and 35 deletions
  1. +12
    -10
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +1
    -1
      mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql
  3. +12
    -1
      mallinkAdmin/src/main/resources/db/migration/V2021120900001__add_type.sql
  4. +1
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxCouponChannelController.java
  5. +0
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java
  6. +23
    -11
      mallinkCApi/src/main/java/com/iformall/controller/WxMiniappThemeController.java
  7. +5
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxTopicController.java
  8. +2
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxTopic.java
  9. +13
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java
  10. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  11. +12
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMiniappThemeServiceImpl.java
  12. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  13. +2
    -0
      mallinkService/src/main/java/com/iformall/utils/Constant.java
  14. +2
    -2
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 12
- 10
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java View File

@@ -83,16 +83,18 @@ public class WxCouponController extends BaseController {
wxCoupon.setSortColumns(coryColumn);
wxCoupon.setSortColumn(null);
}
if(wxCoupon.getTargetAd() != null && wxCoupon.getTargetAd() == EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()){
Integer[] typeArray = {
EnumCouponType.COUPON_MANJIAN.getCode(),
EnumCouponType.COUPON_DAIJIN.getCode(),
EnumCouponType.COUPON_LIPIN.getCode(),
EnumCouponType.COUPON_TINGCHE.getCode(),
EnumCouponType.COUPON_MULTIMCH.getCode()};

wxCoupon.setTypes(Arrays.asList(typeArray));

if(wxCoupon.getTargetAd() != null ){
if(wxCoupon.getTargetAd() == EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()
|| wxCoupon.getTargetAd() == EnumCouponChannelType.COUPON_CHANNEL_ID_GAME.getCode()){
Integer[] typeArray = {
EnumCouponType.COUPON_MANJIAN.getCode(),
EnumCouponType.COUPON_DAIJIN.getCode(),
EnumCouponType.COUPON_LIPIN.getCode(),
EnumCouponType.COUPON_TINGCHE.getCode(),
EnumCouponType.COUPON_MULTIMCH.getCode()};

wxCoupon.setTypes(Arrays.asList(typeArray));
}
}

if(!(isList == null?false:isList) && wxCoupon.getSendType() == null){


+ 1
- 1
mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql View File

@@ -10,7 +10,7 @@ INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`,


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, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 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, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 420, 421, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 951, 961, 60701, 60702]' WHERE `id` = 2;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 420, 421, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 951, 961, 60701, 60702]' WHERE `id` = 2;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 60701, 60702]' WHERE `id` = 3;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 591, 601, 602, 604, 605, 606, 607, 608, 610, 611, 612, 613, 614, 622, 623, 624, 625, 626, 641, 642, 643, 644, 661, 662, 663, 664, 671, 672, 674, 675, 681, 682, 684, 685, 686, 691, 692, 693, 694, 695, 711, 901, 902, 904, 905, 906, 907, 910, 931, 932, 60701, 60702]' WHERE `id` = 4;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 202, 211, 212, 221, 222, 409, 411, 416, 500, 502, 504, 505, 506, 511, 512, 591, 595, 602, 606, 610, 641, 680, 711, 901, 902, 904, 907]' WHERE `id` = 11;


+ 12
- 1
mallinkAdmin/src/main/resources/db/migration/V2021120900001__add_type.sql View File

@@ -27,16 +27,27 @@ ADD COLUMN `mould_type` smallint(2) NOT NULL DEFAULT 0 COMMENT '风格模板类

INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (908, '主题风格管理', 910, 'Y', NULL, 1, NULL, NULL, 'miniappModelType', NULL, 0, 904);



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, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 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, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 420, 421, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 961, 60701, 60702]' WHERE `id` = 2;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 420, 421, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 961, 60701, 60702]' WHERE `id` = 2;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 60701, 60702]' WHERE `id` = 3;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 591, 601, 602, 604, 605, 606, 607, 608, 610, 611, 612, 613, 614, 622, 623, 624, 625, 626, 641, 642, 643, 644, 661, 662, 663, 664, 671, 672, 674, 675, 681, 682, 684, 685, 686, 691, 692, 693, 694, 695, 711, 901, 902, 904, 905, 906, 907, 908, 910, 931, 932, 60701, 60702]' WHERE `id` = 4;
UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 202, 211, 212, 221, 222, 409, 411, 416, 500, 502, 504, 505, 506, 511, 512, 591, 595, 602, 606, 610, 641, 680, 711, 901, 902, 904, 907]' 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, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 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, 501, 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, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1035001036;



INSERT INTO `mallink`.`wx_miniapp_theme`(`id`, `tenant_id`, `name`, `remarks`, `preview_url`, `type`, `mould_type`, `create_date`, `update_date`, `del_status`) VALUES (5, '1', '新版默认主题', NULL, 'https://formall.oss-accelerate.aliyuncs.com/cimg/newstyle/style-3.png', 2, 1, '2020-12-18 15:53:09', '2020-12-18 15:53:09', 0);

UPDATE `mallink`.`wx_miniapp_theme` SET `preview_url` = 'https://formall.oss-accelerate.aliyuncs.com/789/malinkadmin/2021-12-18/397bcd8728be45858c5f9fd68f44d598.png', `update_date` = '2021-12-18 15:58:02' WHERE `id` = 1;
UPDATE `mallink`.`wx_miniapp_theme` SET `preview_url` = 'https://formall.oss-accelerate.aliyuncs.com/789/malinkadmin/2021-12-18/fda1cb10ece04c73b6d3b47d72b7eee0.png', `update_date` = '2021-12-18 16:01:51' WHERE `id` = 2;
UPDATE `mallink`.`wx_miniapp_theme` SET `preview_url` = 'https://formall.oss-accelerate.aliyuncs.com/789/malinkadmin/2021-12-18/010c0f701e4449cdb3dde859f9c6fda3.png', `update_date` = '2021-12-18 16:04:05' WHERE `id` = 3;
UPDATE `mallink`.`wx_miniapp_theme` SET `preview_url` = 'https://formall.oss-accelerate.aliyuncs.com/789/malinkadmin/2021-12-18/56978dc004df4b18a378dba8f5ea72c8.png', `update_date` = '2021-12-18 16:06:24' WHERE `id` = 4;
UPDATE `mallink`.`wx_miniapp_theme` SET `preview_url` = 'https://formall.oss-accelerate.aliyuncs.com/789/malinkadmin/2021-12-18/d015133a0dd247b68ec312d4108f2da8.png', `update_date` = '2021-12-18 16:34:01' WHERE `id` = 5;



delete from wx_miniapp_theme_deploy where id in (4444,4455,4466,4477,4488,4499,5500,5511);
delete from wx_miniapp_theme_value where miniapp_deploy_id in (4444,4455,4466,4477,4488,4499,5500,5511);



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

@@ -43,7 +43,7 @@ public class WxCouponChannelController extends BaseController {
@Autowired
private WxMerchantService wxMerchantService;

// @RedisCache(expireTime = 100)
@RedisCache
@ApiOperation("分页列表接口")
@GetMapping("list")
@ApiImplicitParams({


+ 0
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java View File

@@ -86,7 +86,6 @@ public class WxMallController extends BaseController {
@ApiOperation("商场信息")
@GetMapping("/mallInfo")
public ResultData getMallInfo() {
//TODO 缓存优化
WxMall mall = wxMallService.getByTenantInfo(getTenantInfo());
if (mall == null) {
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND);


+ 23
- 11
mallinkCApi/src/main/java/com/iformall/controller/WxMiniappThemeController.java View File

@@ -9,11 +9,15 @@ import com.iformall.domain.po.WxThemeMall;
import com.iformall.enums.EnumAppModelType;
import com.iformall.enums.EnumThemeType;
import com.iformall.service.WxMiniappThemeService;
import com.iformall.utils.Constant;
import com.iformall.utils.RedisCacheUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
@@ -30,6 +34,10 @@ public class WxMiniappThemeController extends BaseController {
@Autowired
WxMiniappThemeService wxMiniappThemeService;

@Autowired
@Qualifier("objectCommonRedisTemplate")
RedisTemplate<String, Object> objectCommonRedisTemplate;

@RedisCache
@ApiOperation("查询MiniappTheme列表")
@GetMapping(value = "/getOne")
@@ -40,17 +48,21 @@ public class WxMiniappThemeController extends BaseController {
mouldType = EnumAppModelType.CLASSICS.getCode();
}
try {
WxThemeMall wxThemeMall = new WxThemeMall();
wxThemeMall.setTenantId(getTenantInfo().getTenantId());
wxThemeMall.setThemeType(EnumThemeType.C.getCode());
wxThemeMall.setMouldType(mouldType);
WxThemeMall themeMall = wxMiniappThemeService.findThemeMall(wxThemeMall);
List<WxMiniappThemeValue> valueList = null;
if(themeMall != null){
valueList = wxMiniappThemeService.findTheme(themeMall);
}
if(valueList == null || valueList.size() == 0){
valueList = wxMiniappThemeService.findDefaultList(EnumThemeType.C.getCode(),mouldType);
String key = Constant.theme + getTenantInfo().getTenantId() + ":" + EnumThemeType.C + mouldType;
List<WxMiniappThemeValue> valueList = RedisCacheUtils.getCacheListObject(objectCommonRedisTemplate, key, WxMiniappThemeValue.class);
if(null == valueList){
WxThemeMall wxThemeMall = new WxThemeMall();
wxThemeMall.setTenantId(getTenantInfo().getTenantId());
wxThemeMall.setThemeType(EnumThemeType.C.getCode());
wxThemeMall.setMouldType(mouldType);
WxThemeMall themeMall = wxMiniappThemeService.findThemeMall(wxThemeMall);
if(themeMall != null){
valueList = wxMiniappThemeService.findTheme(themeMall);
}
if(valueList == null || valueList.size() == 0){
valueList = wxMiniappThemeService.findDefaultList(EnumThemeType.C.getCode(),mouldType);
}
RedisCacheUtils.cache(objectCommonRedisTemplate,key,valueList,3600*24*3);
}

Map<String,WxMiniappThemeValue> map = new HashMap<String,WxMiniappThemeValue>();


+ 5
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxTopicController.java View File

@@ -1,5 +1,6 @@
package com.iformall.controller;

import com.iformall.annotation.RedisCache;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxTopic;
import com.iformall.enums.EnumWxTopicType;
@@ -21,6 +22,7 @@ public class WxTopicController extends BaseController {
@Autowired
private WxTopicService wxTopicService;

@RedisCache
@GetMapping("show")
public ResultData show(Integer topicType) {
logger.debug("[" + getIpAddr() + "] WxTopicController::show");
@@ -33,14 +35,17 @@ public class WxTopicController extends BaseController {
return new ResultData(wxTopicService.show(wxTopic));
}

@RedisCache
@GetMapping("showList")
public ResultData showList() {
logger.debug("[" + getIpAddr() + "] WxTopicController::showList");
WxTopic wxTopic = new WxTopic();
wxTopic.updateTenantInfo(getTenantInfo());
wxTopic.setTopicType(EnumWxTopicType.SPECIAL_TOPIC.getCode());
return new ResultData(wxTopicService.showList(wxTopic));
}

@RedisCache
@GetMapping("findById")
public ResultData findById(WxTopic wxTopic) {
logger.debug("[" + getIpAddr() + "] WxTopicController::findById");


+ 2
- 2
mallinkService/src/main/java/com/iformall/domain/po/WxTopic.java View File

@@ -90,9 +90,9 @@ public class WxTopic extends TenantEntity {
if(EnumWxTopicType.FLASH_SALE.getCode().equals(topicType))
return Constant.mainPageUrl + "?type=rb";
if(EnumWxTopicType.PRESS.getCode().equals(topicType))
return Constant.mainPageUrl + "?type=mb";
return Constant.mainPageUrl + "?type=bl";
if(EnumWxTopicType.GROUP.getCode().equals(topicType))
return Constant.mainPageUrl + "?type=ms";
return Constant.mainPageUrl + "?type=sl";
if(EnumWxTopicType.CARD_MULTIMCH.getCode().equals(topicType))
return Constant.mainPageUrl + "?type=dc";
if(EnumWxTopicType.CREDIT.getCode().equals(topicType))


+ 13
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java View File

@@ -287,12 +287,21 @@ public class WxCampaignServiceImpl implements WxCampaignService {
return;
}

Date beginTime = null;
Date endTime = null;
if(wxCoupon.getType().equals(EnumCouponType.COUPON_PREORDER.getCode())){
beginTime = wxCoupon.getValidStartDate();
}else{
beginTime = new Date();
}
endTime = wxCoupon.getValidEndDate();

// 已有的couponChannel, 更新
WxCouponChannel wxCouponChannel = wxCouponChannelsMap.get(couponId);
if (wxCouponChannel != null) {
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setBeginTime(record.getValidStartDate());
wxCouponChannel.setEndTime(record.getValidEndDate());
wxCouponChannel.setBeginTime(beginTime);
wxCouponChannel.setEndTime(endTime);
wxCouponChannel.setUpdateDate(new Date());
wxCouponChannelMapper.updateById(wxCouponChannel);
wxCouponChannelsMap.remove(couponId);
@@ -308,8 +317,8 @@ public class WxCampaignServiceImpl implements WxCampaignService {
if(voList != null && voList.size() > 0){
wxCouponChannel.setShowBeginTime(voList.get(0).getShowBeginTime());
}
wxCouponChannel.setBeginTime(record.getValidStartDate());
wxCouponChannel.setEndTime(record.getValidEndDate());
wxCouponChannel.setBeginTime(beginTime);
wxCouponChannel.setEndTime(endTime);
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setCouponId(couponId);
wxCouponChannel.setType(wxCoupon.getType());


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

@@ -393,7 +393,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
}else{
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.findVoList(record));
//插入缓存
operations.set(key, pageInfo, 50, TimeUnit.SECONDS);
operations.set(key, pageInfo, 60, TimeUnit.SECONDS);
}
return pageInfo;
}


+ 12
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMiniappThemeServiceImpl.java View File

@@ -6,12 +6,17 @@ import com.iformall.common.IdWorker;
import com.iformall.domain.po.WxMiniappTheme;
import com.iformall.domain.po.WxMiniappThemeValue;
import com.iformall.domain.po.WxThemeMall;
import com.iformall.enums.EnumThemeType;
import com.iformall.mapper.WxMiniappThemeMapper;
import com.iformall.mapper.WxThemeMallMapper;
import com.iformall.service.WxMiniappThemeService;
import com.iformall.utils.Constant;
import com.iformall.utils.RedisCacheUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.Date;
@@ -28,6 +33,10 @@ public class WxMiniappThemeServiceImpl implements WxMiniappThemeService {
@Autowired
WxThemeMallMapper wxThemeMallMapper;

@Autowired
@Qualifier("objectCommonRedisTemplate")
RedisTemplate<String, Object> objectCommonRedisTemplate;

@Override
public List<WxMiniappTheme> findList(WxMiniappTheme record) {
return wxMiniappThemeMapper.findList(record);
@@ -64,6 +73,9 @@ public class WxMiniappThemeServiceImpl implements WxMiniappThemeService {
}else{
wxThemeMallMapper.updateType(record);
}
//修改主题 清除缓存
String key = Constant.theme + record.getTenantId() + ":" + EnumThemeType.getEnum(record.getThemeType()) + record.getMouldType();
RedisCacheUtils.removeCache(objectCommonRedisTemplate,key);
}

@Override


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -1005,7 +1005,8 @@ public class WxOrderServiceImpl implements WxOrderService {
logger.error("获取payAccount error: " + order.getTenantId());
}
WxPayOrder payOrder = null;
if (coupon.getSalePrice() > 0) {
// if (coupon.getSalePrice() > 0) {
if(order.getPayment() > 0) {
// 有价券获取payOrder,以备后续使用
try {
WxPayOrder payOrderQ = new WxPayOrder();


+ 2
- 0
mallinkService/src/main/java/com/iformall/utils/Constant.java View File

@@ -45,6 +45,8 @@ public class Constant {

public static final String cuserQr = "weapp:cuser-qr:";

public static final String theme = "weapp:theme:";

public static final String publicApi = "publicApi:";
public static final String publicApiNonce = publicApi + "nonce:";



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

@@ -212,11 +212,11 @@
<result column="source_type" jdbcType="INTEGER" property="sourceType"/>


<collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList"
<!--<collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList"
ofType="com.iformall.domain.vo.WxMerchantVo"
javaType="java.util.List"
select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantNameList" >
</collection>
</collection>-->

</resultMap>



Loading…
Cancel
Save