xiaohanzi 4 лет назад
Родитель
Сommit
253c5bc2bc
19 измененных файлов: 505 добавлений и 345 удалений
  1. +52
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/sys/SysConfigController.java
  2. +2
    -1
      mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  3. +21
    -302
      mallinkAdmin/src/main/resources/db/migration/V2021112900001__dynamicId.sql
  4. +6
    -2
      mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  5. +10
    -25
      mallinkCApi/src/main/java/com/iformall/controller/WxCouponOrderController.java
  6. +2
    -0
      mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  7. +53
    -0
      mallinkCallback/src/main/java/com/iformall/controller/callback/JinMaoController.java
  8. +2
    -0
      mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  9. +7
    -0
      mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java
  10. +35
    -0
      mallinkService/src/main/java/com/iformall/domain/po/SysConfig.java
  11. +38
    -0
      mallinkService/src/main/java/com/iformall/domain/po/SysConfigValue.java
  12. +0
    -6
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  13. +14
    -0
      mallinkService/src/main/java/com/iformall/mapper/SysConfigMapper.java
  14. +10
    -0
      mallinkService/src/main/java/com/iformall/mapper/SysConfigValueMapper.java
  15. +37
    -0
      mallinkService/src/main/java/com/iformall/service/SysConfigService.java
  16. +112
    -0
      mallinkService/src/main/java/com/iformall/service/impl/SysConfigServiceImpl.java
  17. +49
    -0
      mallinkService/src/main/resources/mapper/SysConfigMapper.xml
  18. +54
    -0
      mallinkService/src/main/resources/mapper/SysConfigValueMapper.xml
  19. +1
    -9
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 52
- 0
mallinkAdmin/src/main/java/com/iformall/controller/sys/SysConfigController.java Просмотреть файл

@@ -0,0 +1,52 @@
package com.iformall.controller.sys;

import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.SysConfig;
import com.iformall.domain.po.SysConfigValue;
import com.iformall.service.SysConfigService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
* @author gongbiao
*/
@RestController
@RequestMapping("sysConfig")
public class SysConfigController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired
private SysConfigService sysConfigService;

@ApiOperation("列表接口")
@GetMapping("list")
public ResultData list() {
SysConfig config = new SysConfig();
config.setStatus(0);
List<SysConfig> list = sysConfigService.getList(config, getTenantInfo());
return new ResultData(list);
}
@ApiOperation("详情接口")
@GetMapping("detail")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", dataType = "long", paramType = "query", required = true)})
public ResultData detail(Long id) {
SysConfig config = sysConfigService.getById(id, getTenantInfo());
return new ResultData(config);
}
@ApiOperation("更新值接口")
@PostMapping("saveValue")
public ResultData saveValue(@RequestBody SysConfigValue configValue) {
sysConfigService.saveConfigValue(configValue.getConfigItemId(), getTenantInfo(), configValue.getConfigItemValue());
return new ResultData();
}
}

+ 2
- 1
mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -55,6 +55,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};
private static String[] filterSubTables = new String[] {
@@ -93,7 +94,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};
@Override


+ 21
- 302
mallinkAdmin/src/main/resources/db/migration/V2021112900001__dynamicId.sql Просмотреть файл

@@ -1,303 +1,22 @@
ALTER TABLE wx_coupon_0 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_1 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_2 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_3 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_4 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_5 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_6 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_7 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_8 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_9 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_10 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_11 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_12 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_13 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_14 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_15 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_16 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_17 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_18 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_19 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_20 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_21 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_22 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_23 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_24 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_25 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_26 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_27 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_28 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_29 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_30 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_31 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_32 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_33 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_34 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_35 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_36 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_37 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_38 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_39 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_40 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_41 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_42 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_43 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_44 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_45 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_46 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_47 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_48 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_49 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_50 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_51 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_52 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_53 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_54 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_55 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_56 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_57 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_58 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_59 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_60 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_61 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_62 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_63 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_64 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_65 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_66 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_67 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_68 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_69 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_70 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_71 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_72 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_73 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_74 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_75 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_76 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_77 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_78 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_79 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_80 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_81 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_82 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_83 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_84 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_85 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_86 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_87 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_88 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_89 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_90 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_91 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_92 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_93 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_94 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_95 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_96 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_97 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_98 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
ALTER TABLE wx_coupon_99 ADD COLUMN `handle_vierfy_secodes` int(6) COMMENT '手动核销过期时间,秒' ;
CREATE TABLE `sys_config` (
`id` bigint(20) unsigned NOT NULL,
`config_item_key` varchar(30) NOT NULL COMMENT '配置项key',
`config_item_remark` varchar(1000) DEFAULT NULL COMMENT '配置项说明',
`create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` int(1) NOT NULL DEFAULT '0' COMMENT '0-有效 1-无效',
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQUE_ITEM` (`config_item_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


ALTER TABLE wx_coupon_0 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_1 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_2 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_3 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_4 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_5 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_6 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_7 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_8 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_9 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_10 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_11 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_12 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_13 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_14 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_15 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_16 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_17 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_18 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_19 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_20 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_21 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_22 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_23 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_24 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_25 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_26 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_27 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_28 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_29 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_30 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_31 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_32 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_33 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_34 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_35 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_36 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_37 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_38 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_39 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_40 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_41 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_42 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_43 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_44 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_45 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_46 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_47 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_48 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_49 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_50 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_51 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_52 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_53 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_54 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_55 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_56 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_57 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_58 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_59 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_60 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_61 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_62 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_63 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_64 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_65 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_66 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_67 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_68 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_69 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_70 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_71 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_72 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_73 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_74 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_75 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_76 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_77 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_78 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_79 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_80 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_81 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_82 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_83 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_84 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_85 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_86 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_87 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_88 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_89 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_90 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_91 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_92 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_93 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_94 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_95 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_96 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_97 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_98 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;
ALTER TABLE wx_coupon_99 ADD COLUMN `equipment_vierfy_secodes` int(6) COMMENT '设备核销过期时间,秒' ;

update wx_coupon_0 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_1 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_2 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_3 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_4 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_5 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_6 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_7 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_8 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_9 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_10 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_11 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_12 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_13 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_14 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_15 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_16 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_17 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_18 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_19 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_20 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_21 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_22 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_23 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_24 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_25 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_26 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_27 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_28 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_29 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_30 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_31 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_32 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_33 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_34 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_35 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_36 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_37 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_38 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_39 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_40 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_41 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_42 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_43 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_44 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_45 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_46 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_47 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_48 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_49 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_50 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_51 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_52 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_53 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_54 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_55 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_56 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_57 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_58 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_59 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_60 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_61 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_62 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_63 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_64 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_65 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_66 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_67 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_68 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_69 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_70 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_71 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_72 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_73 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_74 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_75 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_76 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_77 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_78 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_79 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_80 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_81 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_82 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_83 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_84 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_85 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_86 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_87 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_88 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_89 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_90 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_91 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_92 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_93 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_94 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_95 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_96 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_97 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_98 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
update wx_coupon_99 set handle_vierfy_secodes=60,equipment_vierfy_secodes=30;
CREATE TABLE `sys_config_value` (
`id` bigint(20) unsigned NOT NULL,
`config_item_id` bigint(1) NOT NULL COMMENT '配置项id',
`config_item_value` varchar(100) DEFAULT NULL COMMENT '配置项value',
`tenant_id` varchar(5) NOT NULL,
`parent_tenant_id` varchar(5) DEFAULT NULL,
`create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQUE_CONFIG_TENANT` (`config_item_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;

+ 6
- 2
mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -43,7 +43,9 @@ public class TenantInfoImpl implements TenantInfo {
"wx_c_user_tags",
"wx_weapp_ext_set",
"wx_msg_validationcode_model",
"wx_component_verify_ticket"};
"wx_component_verify_ticket",
"sys_config"
};
private static String[] filterSubTables = new String[] {
"wx_mall",
@@ -71,7 +73,9 @@ public class TenantInfoImpl implements TenantInfo {
"wx_weapp_code_status",
"wx_weapp_release_status",
"mem_coupon_from_dsp",
"wx_component_verify_ticket"};
"wx_component_verify_ticket",
"sys_config"
};
@Override
public String getTenantId() {


+ 10
- 25
mallinkCApi/src/main/java/com/iformall/controller/WxCouponOrderController.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.iformall.annotation.RedisCache;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.common.SysConfigConstant;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
@@ -14,6 +15,7 @@ import com.iformall.domain.vo.WxCouponOrderCVo;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
import com.iformall.service.MemCouponFromDspService;
import com.iformall.service.SysConfigService;
import com.iformall.service.WxCouponOrderService;
import com.iformall.service.WxCouponService;
import com.iformall.utils.Constant;
@@ -55,6 +57,9 @@ public class WxCouponOrderController extends BaseController {

@Autowired
StringRedisTemplate stringRedisTemplate;
@Autowired
SysConfigService sysConfigService;

//@RedisCache(expireTime = 100)
@ApiOperation("券包分页列表接口")
@@ -208,34 +213,14 @@ public class WxCouponOrderController extends BaseController {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.simpleDetailCUserVo(couponOrderId,getTenantInfo());
if (wxCouponOrderCVo == null) {
return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL);
}
WxCouponCVo wxCouponCVo = null;
String key = "cd:" + wxCouponOrderCVo.getCouponId();
ValueOperations<String, WxCouponCVo> operations = cdRedisTemplate.opsForValue();
// 缓存
boolean hasKey = cdRedisTemplate.hasKey(key);
if (hasKey) {
// 从缓存获取用户信息
wxCouponCVo = operations.get(key);
if (wxCouponCVo == null) {
return new ResultData(ErrorCode.COUPON_IS_EMPTY);
}
} else {
wxCouponCVo = wxCouponService.getVoById(wxCouponOrderCVo.getCouponId(),wxCouponOrderCVo.getTenantId());
if (wxCouponCVo == null) {
return new ResultData(ErrorCode.COUPON_IS_EMPTY);
}
// 插入缓存
operations.set(key, wxCouponCVo, 3600, TimeUnit.SECONDS);
SysConfig sysConfig = sysConfigService.getByKey(SysConfigConstant.handle_vierfy_seconds_key, getTenantInfo());
if (null == sysConfig || StringUtils.isBlank(sysConfig.getConfigItemValue())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"系统设置[手动核销超时时间未配置]");
}
Map retmap = new HashMap();
retmap.put("dynamicId", WxCouponOrderCVo.calcuteExpiredCouponOrderId(couponOrderId,wxCouponCVo.getHandleVierfySecodes()));
retmap.put("expiredSeconds", wxCouponCVo.getHandleVierfySecodes());
retmap.put("dynamicId", WxCouponOrderCVo.calcuteExpiredCouponOrderId(couponOrderId,Integer.parseInt(sysConfig.getConfigItemValue())));
retmap.put("expiredSeconds", Integer.parseInt(sysConfig.getConfigItemValue()));
return new ResultData(retmap);
}



+ 2
- 0
mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -49,6 +49,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};
private static String[] filterSubTables = new String[] {
@@ -84,6 +85,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};


+ 53
- 0
mallinkCallback/src/main/java/com/iformall/controller/callback/JinMaoController.java Просмотреть файл

@@ -195,5 +195,58 @@ public class JinMaoController extends BaseController {
}

}
@RequestMapping(value = "/dfh/verify")
public void dfhVerify(@RequestBody Map param) throws Exception {
logger.info("dfh verify:"+param);
try {
String price = param.get("price")==null?"":param.get("price").toString();
Integer payment = 0;
if(StringUtils.isNotBlank(price)) {
payment = new BigDecimal(price)
.multiply(new BigDecimal(100))
.intValue();
}
Integer num = param.get("num")==null?1:Integer.parseInt(param.get("num").toString());
String userPhone = param.get("userPhone")==null?"":param.get("userPhone").toString();
String gymName = param.get("gymName")==null?"":param.get("gymName").toString();
String payWay = param.get("payWay")==null?"":param.get("payWay").toString();
String orderId = param.get("ID")==null?"":param.get("ID").toString();
String timeStr = param.get("time")==null?"":param.get("time").toString();
Date paymentTime = null;
if(StringUtils.isNotBlank(timeStr)){
paymentTime = sdf.parse(timeStr);
}
String productName = param.get("productName")==null?"":param.get("productName").toString();
if(StringUtils.isNotBlank(userPhone) && userPhone.matches("^1[0-9]{10}$")
&& StringUtils.isNotBlank(orderId)){
WxCUserBasicInfo basicInfo = new WxCUserBasicInfo();
basicInfo.setPhone(userPhone);
wxCUserBasicInfoService.registerJinmao(tenantEntity,basicInfo);

JmSportOrder order = new JmSportOrder();
order.updateTenantInfo(tenantEntity);
order.setOrderId(orderId);
order.setUserPhone(userPhone);
order.setUserId(basicInfo.getId());
order.setProductName(productName);
order.setNum(num);
order.setPrice(price);
order.setPayment(payment);
order.setPaymentTime(paymentTime);
order.setPayWay(payWay);
order.setGymName(gymName);
jmSportOrderService.saveOrUpdate(order);

wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_DEV, basicInfo,tenantEntity,jinMaoOrderTagsDeveloper);

}else{
logger.error("JinMaoController --dfhOrder--订单手机号为空或者订单号为空-userPhone{}"+userPhone+"-orderId{}"+orderId);
}
}catch(Exception e){
logger.error("JinMaoController --dfhOrder",e);
}

}
}

+ 2
- 0
mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -49,6 +49,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};
private static String[] filterSubTables = new String[] {
@@ -84,6 +85,7 @@ public class TenantInfoImpl implements TenantInfo {
"wx_question_oneself_log",
"wx_question_oneself_topic",
"wx_question_oneself_user",
"sys_config"
};


+ 7
- 0
mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java Просмотреть файл

@@ -0,0 +1,7 @@
package com.iformall.common;

public class SysConfigConstant {

public static final String handle_vierfy_seconds_key="handleVierfySeconds";
public static final String equiment_vierfy_seconds_key="equimentVierfySeconds";
}

+ 35
- 0
mallinkService/src/main/java/com/iformall/domain/po/SysConfig.java Просмотреть файл

@@ -0,0 +1,35 @@
package com.iformall.domain.po;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@TableName(value = "sys_config")
@Data
@EqualsAndHashCode(callSuper = true)
public class SysConfig extends BaseEntity {
private static final long serialVersionUID = 1L;

protected Long id;

@io.swagger.annotations.ApiModelProperty(value="配置项key",name="configItemKey")
private String configItemKey;
@io.swagger.annotations.ApiModelProperty(value="配置项说明",name="configItemRemark")
private String configItemRemark;
@io.swagger.annotations.ApiModelProperty(value="",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="",name="updateDate")
private Date updateDate;
@io.swagger.annotations.ApiModelProperty(value="0-有效 1-无效",name="status")
private Integer status;

@io.swagger.annotations.ApiModelProperty(value="配置项value,查询显示用",name="configItemValue")
@TableField(exist = false)
private String configItemValue;
}

+ 38
- 0
mallinkService/src/main/java/com/iformall/domain/po/SysConfigValue.java Просмотреть файл

@@ -0,0 +1,38 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;


/**
* 系统用户Token
*
* @author Stormeye
*/
@Data
@TableName("sys_config_value")
@EqualsAndHashCode(callSuper = true)
public class SysConfigValue extends TenantEntity {
private static final long serialVersionUID = -5887774776970688169L;

private Long id;
@io.swagger.annotations.ApiModelProperty(value="配置项id",name="configItemId")
private Long configItemId;
@io.swagger.annotations.ApiModelProperty(value="配置项value",name="configItemValue")
private String configItemValue;
@io.swagger.annotations.ApiModelProperty(value="过期时间",name="expireTime")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime")
private Date updateDate;

}

+ 0
- 6
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java Просмотреть файл

@@ -226,12 +226,6 @@ public class WxCoupon extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value="卷包内容",name="giftList")
private String giftList;
@io.swagger.annotations.ApiModelProperty(value="手动核销过期时间,秒",name="handleVierfySecodes")
private int handleVierfySecodes;
@io.swagger.annotations.ApiModelProperty(value="设备核销过期时间,秒",name="equipmentVierfySecodes")
private int equipmentVierfySecodes;

@TableField(exist = false)
private List<WxCoupon> giftCouponList;



+ 14
- 0
mallinkService/src/main/java/com/iformall/mapper/SysConfigMapper.java Просмотреть файл

@@ -0,0 +1,14 @@
package com.iformall.mapper;

import java.util.*;
import com.iformall.common.CommonMapper;
import com.iformall.domain.po.SysConfig;

public interface SysConfigMapper extends CommonMapper<SysConfig, Long> {

List<SysConfig> findList(SysConfig sysMonitor);
SysConfig findByKey(SysConfig sysMonitor);
}

+ 10
- 0
mallinkService/src/main/java/com/iformall/mapper/SysConfigValueMapper.java Просмотреть файл

@@ -0,0 +1,10 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.SysConfigValue;

public interface SysConfigValueMapper extends CommonMapper<SysConfigValue, Long> {
SysConfigValue findByItemId(SysConfigValue record);
}

+ 37
- 0
mallinkService/src/main/java/com/iformall/service/SysConfigService.java Просмотреть файл

@@ -0,0 +1,37 @@
package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.SysConfig;
import com.iformall.domain.po.base.TenantEntity;

import java.util.List;

public interface SysConfigService {

/**
* 根据实体查询列表
*
* @param record
* @return
*/
List<SysConfig> getList(SysConfig record,TenantEntity tenantEntity);
/**
* 根据Id获得实体
*
* @param id
* @return
*/
SysConfig getById(Long id,TenantEntity tenantEntity);
SysConfig getByKey(String key,TenantEntity tenantEntity);
/**
* 保存或更新实体
*
* @param record
*/
void saveConfigValue(Long id,TenantEntity tenantEntity,String value);

}

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

@@ -0,0 +1,112 @@
package com.iformall.service.impl;

import java.util.*;
import com.iformall.domain.po.SysConfig;
import com.iformall.domain.po.SysConfigValue;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.mapper.SysConfigMapper;
import com.iformall.mapper.SysConfigValueMapper;
import com.iformall.service.SysConfigService;
import com.iformall.utils.RedisCacheUtils;

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 com.iformall.common.IdWorker;

@Service
public class SysConfigServiceImpl implements SysConfigService {
private static final String cache_prex = "sysconfig:%s:%s";
@Autowired
SysConfigMapper sysConfigMapper;
@Autowired
SysConfigValueMapper sysConfigValueMapper;
@Autowired
@Qualifier("objectCommonRedisTemplate")
RedisTemplate<String, Object> baseRedisTemplate;

@Override
public List<SysConfig> getList(SysConfig record,TenantEntity tenantEntity) {
List<SysConfig> list = sysConfigMapper.findList(record);
if (null != list) {
for (SysConfig config : list) {
SysConfigValue cvq = new SysConfigValue();
cvq.setConfigItemId(config.getId());
cvq.updateTenantInfo(tenantEntity);
SysConfigValue configValue = sysConfigValueMapper.findByItemId(cvq);
if (null != configValue) {
config.setConfigItemValue(configValue.getConfigItemValue());
}
}
}
return list;
}

@Override
public SysConfig getById(Long id,TenantEntity tenantEntity) {
SysConfig config = sysConfigMapper.selectById(id);
if (null != config ) {
SysConfigValue cvq = new SysConfigValue();
cvq.setConfigItemId(config.getId());
cvq.updateTenantInfo(tenantEntity);
SysConfigValue configValue = sysConfigValueMapper.findByItemId(cvq);
if (null != configValue) {
config.setConfigItemValue(configValue.getConfigItemValue());
}
}
return config;
}
@Override
public SysConfig getByKey(String key,TenantEntity tenantEntity) {
SysConfig config = RedisCacheUtils.getCacheObject(baseRedisTemplate, String.format(cache_prex, tenantEntity.getTenantId(),key), SysConfig.class);
if (null == config) {
SysConfig cq = new SysConfig();
cq.setConfigItemKey(key);
config = sysConfigMapper.findByKey(cq);
if (null != config ) {
SysConfigValue cvq = new SysConfigValue();
cvq.setConfigItemId(config.getId());
cvq.updateTenantInfo(tenantEntity);
SysConfigValue configValue = sysConfigValueMapper.findByItemId(cvq);
if (null != configValue) {
config.setConfigItemValue(configValue.getConfigItemValue());
}
RedisCacheUtils.cache(baseRedisTemplate, String.format(cache_prex, tenantEntity.getTenantId(),key), config, 3600*24*3);
}
}
return config;
}

@Override
public void saveConfigValue(Long id,TenantEntity tenantEntity,String value) {
SysConfig config = sysConfigMapper.selectById(id);
SysConfigValue cvq = new SysConfigValue();
cvq.setConfigItemId(config.getId());
cvq.updateTenantInfo(tenantEntity);
SysConfigValue configValue = sysConfigValueMapper.findByItemId(cvq);
if (null != configValue) {
configValue.setConfigItemValue(value);
configValue.setUpdateDate(new Date());
sysConfigValueMapper.updateById(configValue);
}else {
final IdWorker idWorker = IdWorker.get();
configValue = new SysConfigValue();
configValue.setConfigItemId(config.getId());
configValue.setId(idWorker.nextId());
configValue.updateTenantInfo(tenantEntity);
configValue.setConfigItemValue(value);
configValue.setCreateDate(new Date());
}
RedisCacheUtils.removeCache(baseRedisTemplate, String.format(cache_prex, tenantEntity.getTenantId(),config.getConfigItemKey()));
}

}

+ 49
- 0
mallinkService/src/main/resources/mapper/SysConfigMapper.xml Просмотреть файл

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.SysConfigMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.SysConfig">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="config_item_key" jdbcType="VARCHAR" property="configItemKey" />
<result column="config_item_remark" jdbcType="VARCHAR" property="configItemRemark" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="allColumns">
`id`,`config_item_key`,`config_item_remark`,`create_date`,`update_date`,`status`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != configItemKey ">
and `config_item_key` = #{configItemKey}
</if>
<if test=" null != status ">
and `status` = #{status}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</sql>
<select id="findList" parameterType="com.iformall.domain.po.SysConfig" resultMap="BaseResultMap">
select <include refid="allColumns" /> from sys_config
<include refid="dynamicWhereConditions" />
</select>
<select id="findByKey" parameterType="com.iformall.domain.po.SysConfig" resultMap="BaseResultMap">
select <include refid="allColumns" /> from sys_config where `config_item_key` = #{configItemKey}
</select>
</mapper>

+ 54
- 0
mallinkService/src/main/resources/mapper/SysConfigValueMapper.xml Просмотреть файл

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.SysConfigValueMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.SysConfigValue">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="config_item_id" jdbcType="BIGINT" property="configItemId"/>
<result column="config_item_value" jdbcType="VARCHAR" property="configItemValue"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`config_item_id`,`config_item_value`,`update_date`,`create_date`
</sql>

<sql id="dynamicWhereConditions">
where 1=1

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

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != configItemId ">
and `config_item_id` = #{configItemId}
</if>

<if test=" null != configItemValue ">
and `config_item_value` = #{configItemValue}
</if>

<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findByItemId" parameterType="com.iformall.domain.po.SysConfigValue" resultMap="BaseResultMap">
select <include refid="allColumns"/> from sys_config_value
where `config_item_id` = #{configItemId} and `tenant_id` = #{tenantId}
</select>
</mapper>

+ 1
- 9
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -54,8 +54,6 @@
<result column="content_type" property="contentType"/>
<result column="html" property="html"/>
<result column="source_type" jdbcType="INTEGER" property="sourceType"/>
<result column="handleVierfySecodes" jdbcType="INTEGER" property="handle_vierfy_secodes"/>
<result column="equipmentVierfySecodes" jdbcType="INTEGER" property="equipment_vierfy_secodes"/>
</resultMap>
<resultMap id="statisMap" type="com.iformall.domain.vo.WxCouponStatisVo">
<id column="id" jdbcType="BIGINT" property="id"/>
@@ -105,8 +103,6 @@
<result column="payment_rate" property="paymentRate"/>
<result column="change_rate" property="changeRate"/>
<result column="source_type" jdbcType="INTEGER" property="sourceType"/>
<result column="handleVierfySecodes" jdbcType="INTEGER" property="handle_vierfy_secodes"/>
<result column="equipmentVierfySecodes" jdbcType="INTEGER" property="equipment_vierfy_secodes"/>
</resultMap>

<sql id="allColumns">
@@ -115,7 +111,7 @@
c.`valid_type`,c.`valid_start_date`,c.`valid_end_date`,c.pick_start_date,c.pick_end_date,c.`valid_days`,c.`detail`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`,
c.`remark`,c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`,c.`support_transfer`,c.`subsidy_num`,c.`subsidy_type`,
c.`press_limit_num`, c.`press_limit_hours`, c.`auto_refund`,c.`credit_price`,c.`credit_refund`,c.`put_apply_status`,c.`stock_apply_status`,c.`cancle_apply_status`,
c.`conditions`,c.approval_type,c.content_type,c.source_type,c.password_support,c.gift_list,c.handle_vierfy_secodes,c.equipment_vierfy_secodes
c.`conditions`,c.approval_type,c.content_type,c.source_type,c.password_support,c.gift_list
</sql>

<sql id="statusColumns">
@@ -662,8 +658,6 @@

<result column="gift_list" jdbcType="VARCHAR" property="giftList"></result>
<result column="handle_vierfy_secodes" jdbcType="INTEGER" property="handleVierfySecodes"/>
<result column="equipment_vierfy_secodes" jdbcType="INTEGER" property="equipmentVierfySecodes"/>

<collection column="{productId=id,tenantId=tenant_id}" property="merchantVoList"
ofType="com.iformall.domain.vo.WxMerchantVo"
@@ -714,8 +708,6 @@
<result column="conditions" jdbcType="VARCHAR" property="conditions"/>
<result column="content_type" jdbcType="INTEGER" property="contentType"/>
<result column="source_type" jdbcType="INTEGER" property="sourceType"/>
<result column="handle_vierfy_secodes" jdbcType="INTEGER" property="handleVierfySecodes"/>
<result column="equipment_vierfy_secodes" jdbcType="INTEGER" property="equipmentVierfySecodes"/>
</resultMap>

<select id="findVoDetail" parameterType="java.util.HashMap" resultMap="WxCouponCVoMap">


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