xiaohanzi 6 лет назад
Родитель
Сommit
a1a7570a2b
10 измененных файлов: 22 добавлений и 22 удалений
  1. +2
    -1
      mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java
  2. +0
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java
  3. +4
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  4. +3
    -3
      mallinkAdmin/src/main/resources/application-dev.yml
  5. +2
    -2
      mallinkCallback/src/main/resources/application-dev.yml
  6. +2
    -2
      mallinkMQConsumer/src/main/resources/application-dev.yml
  7. +2
    -2
      mallinkPosApi/src/main/resources/application-dev.yml
  8. +2
    -2
      mallinkSchedule/src/main/resources/application-dev.yml
  9. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  10. +2
    -2
      mallinkWebSocketServer/src/main/resources/application-dev.yml

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

@@ -102,6 +102,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/wechat/login", "anon"); // 微信第三方登录callback filterChainDefinitionMap.put("/wechat/login", "anon"); // 微信第三方登录callback
filterChainDefinitionMap.put("/wechat/callback", "anon"); // 微信网页登录回调 filterChainDefinitionMap.put("/wechat/callback", "anon"); // 微信网页登录回调
filterChainDefinitionMap.put("/wechat/weChatUserLogin", "anon"); // 微信第三方登录 filterChainDefinitionMap.put("/wechat/weChatUserLogin", "anon"); // 微信第三方登录
// 验证码 // 验证码
filterChainDefinitionMap.put("/captcha.jpg", "anon"); filterChainDefinitionMap.put("/captcha.jpg", "anon");
// 官网 // 官网
@@ -116,7 +117,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/wxMallApply/sendvalidationcode", "anon"); filterChainDefinitionMap.put("/wxMallApply/sendvalidationcode", "anon");


// 补发消息 // 补发消息
filterChainDefinitionMap.put("/msgrecord/resendMsg", "anon");
filterChainDefinitionMap.put("/wxCoupon/updateStokeAndValidDate", "anon");


// static files // static files
filterChainDefinitionMap.put("/css/**", "anon"); filterChainDefinitionMap.put("/css/**", "anon");


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

@@ -66,7 +66,6 @@ public class BaseController {
public TenantEntity getTenantInfo(){ public TenantEntity getTenantInfo(){
Session session = SecurityUtils.getSubject().getSession(); Session session = SecurityUtils.getSubject().getSession();
String tenantId = (String)session.getAttribute(UserSession.tenantId); String tenantId = (String)session.getAttribute(UserSession.tenantId);

TenantEntity tenantEntity = new TenantEntity(){{ TenantEntity tenantEntity = new TenantEntity(){{
setTenantId(tenantId); setTenantId(tenantId);
}}; }};


+ 4
- 4
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -99,7 +99,7 @@ public class WxCouponController extends BaseController {
if (resultData.code != 200) { if (resultData.code != 200) {
return resultData; return resultData;
} }
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getInventory());
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getRemainInventory());
//启动投放审批 //启动投放审批
if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) { if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) {
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
@@ -128,7 +128,7 @@ public class WxCouponController extends BaseController {
return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。");
} }
} }
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getInventory());
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getRemainInventory());
//启动审批流 //启动审批流
if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) {
logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType")); logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType"));
@@ -251,9 +251,9 @@ public class WxCouponController extends BaseController {
updateCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); updateCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
updateCoupon.setUpdateDate(new Date()); updateCoupon.setUpdateDate(new Date());
wxCouponService.update(updateCoupon); wxCouponService.update(updateCoupon);
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getInventory());
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getRemainInventory());
} else { } else {
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getInventory());
redisLock.setCouponStock(wxCoupon.getId(), wxCoupon.getRemainInventory());
return wxCouponService.updateCouponStockAndEndTime(wxCoupon); return wxCouponService.updateCouponStockAndEndTime(wxCoupon);
} }




+ 3
- 3
mallinkAdmin/src/main/resources/application-dev.yml Просмотреть файл

@@ -4,7 +4,7 @@ spring:
#include: rabbitMQ #include: rabbitMQ
# JDBC # JDBC
datasource: datasource:
url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true
url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true
username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) username: ENC(dZ8fmrtuBMQYaRytKQgTqg==)
password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4)
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
@@ -27,7 +27,7 @@ spring:
#date-format: yyyy-MM-dd HH:mm:ss #date-format: yyyy-MM-dd HH:mm:ss
# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -98,7 +98,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


+ 2
- 2
mallinkCallback/src/main/resources/application-dev.yml Просмотреть файл

@@ -27,7 +27,7 @@ spring:
#date-format: yyyy-MM-dd HH:mm:ss #date-format: yyyy-MM-dd HH:mm:ss
# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -97,7 +97,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


+ 2
- 2
mallinkMQConsumer/src/main/resources/application-dev.yml Просмотреть файл

@@ -28,7 +28,7 @@ spring:


# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -91,7 +91,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


+ 2
- 2
mallinkPosApi/src/main/resources/application-dev.yml Просмотреть файл

@@ -26,7 +26,7 @@ spring:
#date-format: yyyy-MM-dd HH:mm:ss #date-format: yyyy-MM-dd HH:mm:ss
# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -95,7 +95,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


+ 2
- 2
mallinkSchedule/src/main/resources/application-dev.yml Просмотреть файл

@@ -28,7 +28,7 @@ spring:


# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -91,7 +91,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


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

@@ -622,7 +622,7 @@ public class WxOrderServiceImpl implements WxOrderService {
} }
if (count >= coupon.getUseLimitQuantity()) { if (count >= coupon.getUseLimitQuantity()) {
logger.error("此券购买数量已超限, couponId: " + couponIdStr + ", count: " + count); logger.error("此券购买数量已超限, couponId: " + couponIdStr + ", count: " + count);
throw new MallinkException(ErrorCode.ORDER_IS_LIMITED);
throw new MallinkException(ErrorCode.ORDER_IS_LIMITED.getCode(),"此券购买数量已超限, couponId: " + couponIdStr + ", count: " + count);
} }


try { try {
@@ -638,8 +638,8 @@ public class WxOrderServiceImpl implements WxOrderService {
msg.setMsgType(EnumMsgRecordType.COUPON_STOCK.getCode()); msg.setMsgType(EnumMsgRecordType.COUPON_STOCK.getCode());
mqBaseProducer.sendMessage(msg, EnumMsgMqTopic.STOCK.getCode(), "*", "decrease_stock_"+coupon.getId()); mqBaseProducer.sendMessage(msg, EnumMsgMqTopic.STOCK.getCode(), "*", "decrease_stock_"+coupon.getId());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.error("此券减库存失败, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.ORDER_IS_FAIL);
logger.error("此券减库存失败, couponId: " + couponIdStr,e);
throw new MallinkException(ErrorCode.ORDER_IS_FAIL.getCode(),e.getMessage());
} }
} }




+ 2
- 2
mallinkWebSocketServer/src/main/resources/application-dev.yml Просмотреть файл

@@ -28,7 +28,7 @@ spring:


# REDIS # REDIS
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600
@@ -91,7 +91,7 @@ wechat:
componentToken: "formall2018" componentToken: "formall2018"
componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN"
redis: redis:
host: 202.165.179.86
host: 101.201.103.81
port: 6379 port: 6379
password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk)
timeout: 3600 timeout: 3600


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