Browse Source

fix bug

release_toaliyun_real
xiaohanzi 5 years ago
parent
commit
68558f8476
4 changed files with 156 additions and 5 deletions
  1. +5
    -2
      mallinkCApi/src/main/java/com/iformall/controller/WxLiveController.java
  2. +145
    -0
      mallinkCApi/src/main/resources/application-prodDetry.yml
  3. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java
  4. +3
    -0
      mallinkService/src/main/java/com/iformall/service/pay/service/pay/wx/miniApp/appPay/WxMiniAppPayAdapterService.java

+ 5
- 2
mallinkCApi/src/main/java/com/iformall/controller/WxLiveController.java View File

@@ -35,8 +35,11 @@ public class WxLiveController extends BaseController {
WxMaService wxMaService = getWeappService(appId);
resultData.data = wxMaService.getLiveService().getLiveInfo(start,limit);
} catch (WxErrorException e) {
logger.error("getLiveinfos error", e);
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"["+appId+"]getLiveinfos error");
logger.error("["+appId+"]getLiveinfos error", e);
//错误代码:9410000, 错误信息:empty room list ,不抛出异常
if (e.getError().getErrorCode()!= 9410000) {
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"["+appId+"]getLiveinfos error");
}
}
return resultData;
}


+ 145
- 0
mallinkCApi/src/main/resources/application-prodDetry.yml View File

@@ -0,0 +1,145 @@
spring:
profiles:
include: aliyunRocketMQ
# JDBC
datasource:
url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false&useAffectedRows=true&allowMultiQueries=true
username: mallone
password: m@l9oNEl20#@
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 28000
minEvictableIdleTimeMillis: 28000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connectionProperties: "druid.stat.mergeSql=true;druid.stat.slowSqlMillis=60000"
# REDIS
redis:
host: r-2zeaglwf13qqmnllj5pd.redis.rds.aliyuncs.com
port: 6379
password: mallone:iF0rm@2l2ol9
timeout: 3600
expire: 1800 #30分钟
database: 1
defaultExpiration: 2592000 # 默认生命周期30天
jedis:
pool:
max-active: 100
max-idle: 20
max-wait: -1
min-idle: 0
# SMS
aliyun:
sms:
accessKeyId: LTAI4G7ixY4AhvM35F8o3W3V
accessKeySecret: VfWqGb83qIQrS9us45utskl8itd7ry
product: Dysmsapi
domain: dysmsapi.aliyuncs.com
regionId: cn-hangzhou
dateFormat: yyyyMMdd
endpointName: cn-hangzhou
oss:
endpoint: oss-cn-beijing.aliyuncs.com
keyid: LTAI4G7ixY4AhvM35F8o3W3V
keysecret: VfWqGb83qIQrS9us45utskl8itd7ry
bucketname: formall
filehost: malinkadmin
filedomain: https://formall.oss-accelerate.aliyuncs.com
# EMAIL
mail:
host: smtp.exmail.qq.com
username: zhengfangyuan@iformall.com
password: xnydCeUzofB2h8qp # 授权密码
properties:
mail:
smtp:
auth: true
starttls:
enable: true
socketFactory:
port: 465
class: javax.net.ssl.SSLSocketFactory
# RABBITMQ
rabbitmq:
host: localhost
port: 5672
username: admin
password: ibh2D9R3v2DEN3gk
#username: ENC(lRmLd6EzgeY1RT5ktcHv9g==)
#password: ENC(gBI8mCjr3OC0v57jcnSb660Ux7mW03K2oePgvohhg7w=)
publisher-confirms: true
publisher-returns: false
virtual-host: /
#
aliyunRocketmq:
accessKeyId: "LTAI4G7ixY4AhvM35F8o3W3V"
accessKeySecret: "VfWqGb83qIQrS9us45utskl8itd7ry"
groupId: "GID_P_1"
namesrvAddr: "http://MQ_INST_1796289517488555_Bcqaq2is.cn-beijing.mq-internal.aliyuncs.com:8080"
flyway:
enabled: false

aws:
clientRegion: cn-northwest-1
bucketName: iformall-net
access: AKIAOEHX2MJVBURWTB3Q
secret: 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
#access: ENC(a6SN1sZ1enNL49ypiOXkg/pPPAnZD8H4buQFTTKN08s=)
#secret: ENC(5P5ff4bTMJUbXVR4ZsM03UHzOKZ4+Zg5Iutcdkyp/Quny/oXg+A4KpfwEyGarlLu3vQMJahGP5M=)

wechat:
web:
appId: "wx9cc4ca09eb20fe03"
secret: "af1d7f7a1268022a73cb4ce0b9cf0985"
url: "https://admin.malls.iformall.com"
open:
componentAppId: wx7f58f461ec1e2b4f
componentSecret: 7eb9b795606739b5526dd7f61d923f5a
componentToken: formall2018
componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN
#componentAppId: ENC(b3JG0MUZgQfz5Zj+DC2ZM1zDeLOiGTmmeokfe2O8kaM=)
#componentSecret: ENC(QVyc4BPGdnSjXGs2ivgpDBE1v8wPWHLLRMYI7Vv8uYwC0SiZHQz0QpyyQV/b48Pb)
#componentToken: ENC(rkxj0733WxFFDLgA9x01m2s5Fi2L+0PC)
#componentAesKey: ENC(EIbJUBpbYOrLb4YQ/HXLQmxlxgAqIp2ZmpnGICC8pu5xiTz3Cqfkbwd2S8raCcK/IvYcX2GmedI=)
redis:
host: r-2zeaglwf13qqmnllj5pd.redis.rds.aliyuncs.com
port: 6379
password: mallone:iF0rm@2l2ol9
timeout: 3600
expire: 1800 #30分钟
database: 2
defaultExpiration: 2592000 # 默认生命周期30天
jedis:
pool:
max-active: 100
max-idle: 100
max-wait: -1
min-idle: 10

fm:
exception: true
exception_emails: houtaikaifa@iformall.com
deploy: 3
open: true
upload_dir: /root/uploads/

ueditor:
config: config.json
unified: true
upload-path: ./upload/
url-prefix: ""

logging:
level:
com.iformall.mapper: debug
path: ./logs/admin

+ 3
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java View File

@@ -137,7 +137,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
try {
wxOrderGroupService.createOrderGroup(order, wxCoupon,isScheduleTask);
} catch (Exception e) {
logger.error("参团失败" + e.getMessage());
logger.error("参团失败" + e.getMessage(),e);
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_FAILD.getCode());
order.setUpdateDate(new Date());
wxOrderMapper.updateById(order);
@@ -148,7 +148,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
try {
wxOrderService.couponOrderSuccess(order);
} catch (Exception e) {
logger.error(e.getMessage());
logger.error(e.getMessage(),e);
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "订单更新");
}
@@ -156,7 +156,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
try {
wxOrderService.sendOrderSuccessActionMsg(order);
} catch (Exception e) {
logger.error("内部消息发送失败: " + e.getMessage());
logger.error("内部消息发送失败: " + e.getMessage(),e);
throw new MallinkException(ErrorCode.MSG_INSIDE_ERROR);
}
}


+ 3
- 0
mallinkService/src/main/java/com/iformall/service/pay/service/pay/wx/miniApp/appPay/WxMiniAppPayAdapterService.java View File

@@ -16,8 +16,10 @@ import com.iformall.domain.po.WxAppinfo;
import com.iformall.domain.po.WxOrder;
import com.iformall.domain.po.WxPayAccount;
import com.iformall.domain.po.WxPayOrder;
import com.iformall.enums.EnumOrderStatus;
import com.iformall.enums.EnumPayMode;
import com.iformall.enums.EnumPayShare;
import com.iformall.enums.EnumPayStatus;
import com.iformall.exception.MallinkException;
import com.iformall.pay.WxPay;
import com.iformall.pay.WxPayOrderP;
@@ -94,6 +96,7 @@ public class WxMiniAppPayAdapterService extends BaseWxPayAdapterService implemen
// update payOrder with prepay_id
record.setPrepayId(prepay_id);
record.setUpdateTime(new Date());
record.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode());

String timestamp = String.valueOf(Utility.getCurrentTimeStamp());
Map<String, String> sighMap = MapUtil.getOrderMap();


Loading…
Cancel
Save