优化支付、短信的配置内容
This commit is contained in:
parent
9398413999
commit
065bcc8a55
@ -176,3 +176,8 @@ ALTER TABLE `li_store_flow` ADD `bill_time` datetime(6) DEFAULT NULL COMMENT '
|
|||||||
ALTER TABLE `li_store_flow` ADD `full_refund` bit(1) DEFAULT NULL COMMENT '是否全部退款';
|
ALTER TABLE `li_store_flow` ADD `full_refund` bit(1) DEFAULT NULL COMMENT '是否全部退款';
|
||||||
ALTER TABLE `li_store_flow` ADD `profit_sharing_status` varchar(255) NULL COMMENT '分账状态';
|
ALTER TABLE `li_store_flow` ADD `profit_sharing_status` varchar(255) NULL COMMENT '分账状态';
|
||||||
ALTER TABLE `li_store_flow` ADD `profit_sharing` varchar(255) NULL COMMENT '分账详情';
|
ALTER TABLE `li_store_flow` ADD `profit_sharing` varchar(255) NULL COMMENT '分账详情';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `lilishop`.`li_setting` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `setting_value`) VALUES ('CONNECT_SETTING', 'admin', '2024-07-07 13:55:38.686000', b'0', NULL, NULL, '{\"callbackUrl\":\"https://buyer-api.pickmall.cn\",\"pc\":\"https://pc-b2b2c.pickmall.cn\",\"wap\":\"https://m-b2b2c.pickmall.cn\"}');
|
||||||
|
UPDATE `lilishop`.`li_setting` SET `create_by` = 'admin', `create_time` = '2021-01-23 02:18:03.299000', `delete_flag` = b'0', `update_by` = 'admin', `update_time` = '2024-07-07 13:53:44.732000', `setting_value` = '{\"accessKeyId\":\"test\",\"tencentSdkAppId\":\"null\",\"registerTemplateCode\":\"SMS_205755298\",\"huaweiSender\":\"null\",\"signName\":\"lili\",\"tencentSecretId\":\"null\",\"huaweiAppKey\":\"null\",\"isTestModel\":\"true\",\"tencentSecretKey\":\"null\",\"type\":\"ALI\",\"accessSecret\":\"test\",\"tencentSignName\":\"null\",\"huaweiSignature\":\"null\",\"payPasswordTemplateCode\":\"SMS_205755301\",\"walletPasswordTemplateCode\":\"SMS_205755297\",\"findPasswordTemplateCode\":\"SMS_205755301\",\"huaweiAppSecret\":\"null\",\"loginTemplateCode\":\"SMS_205755300\"}' WHERE `id` = 'SMS_SETTING';
|
@ -213,18 +213,6 @@ lili:
|
|||||||
lbs:
|
lbs:
|
||||||
key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT
|
key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT
|
||||||
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
||||||
#域名
|
|
||||||
domain:
|
|
||||||
pc: https://pc-b2b2c.pickmall.cn
|
|
||||||
wap: https://m-b2b2c.pickmall.cn
|
|
||||||
store: https://store-b2b2c.pickmall.cn
|
|
||||||
admin: https://admin-b2b2c.pickmall.cn
|
|
||||||
#api地址
|
|
||||||
api:
|
|
||||||
buyer: https://buyer-api.pickmall.cn
|
|
||||||
common: https://common-api.pickmall.cn
|
|
||||||
manager: https://admin-api.pickmall.cn
|
|
||||||
store: https://store-api.pickmall.cn
|
|
||||||
|
|
||||||
# jwt 细节设定
|
# jwt 细节设定
|
||||||
jwt-setting:
|
jwt-setting:
|
||||||
|
@ -190,18 +190,6 @@ lili:
|
|||||||
interfereNum: 0
|
interfereNum: 0
|
||||||
#允许误差像素
|
#允许误差像素
|
||||||
faultTolerant: 3
|
faultTolerant: 3
|
||||||
#短信模版配置
|
|
||||||
sms:
|
|
||||||
#登录
|
|
||||||
LOGIN: SMS_205755300
|
|
||||||
#注册
|
|
||||||
REGISTER: SMS_205755298
|
|
||||||
#找回密码
|
|
||||||
FIND_USER: SMS_205755301
|
|
||||||
#设置密码
|
|
||||||
UPDATE_PASSWORD: SMS_205755297
|
|
||||||
#支付密码
|
|
||||||
WALLET_PASSWORD: SMS_205755301
|
|
||||||
system:
|
system:
|
||||||
isTestModel: true
|
isTestModel: true
|
||||||
statistics:
|
statistics:
|
||||||
|
@ -209,21 +209,8 @@ lili:
|
|||||||
interfereNum: 1
|
interfereNum: 1
|
||||||
#允许误差像素
|
#允许误差像素
|
||||||
faultTolerant: 3
|
faultTolerant: 3
|
||||||
#短信模版配置
|
|
||||||
sms:
|
|
||||||
#登录
|
|
||||||
LOGIN: SMS_205755300
|
|
||||||
#注册
|
|
||||||
REGISTER: SMS_205755298
|
|
||||||
#找回密码
|
|
||||||
FIND_USER: SMS_205755301
|
|
||||||
#设置密码
|
|
||||||
UPDATE_PASSWORD: SMS_205755297
|
|
||||||
#支付密码
|
|
||||||
WALLET_PASSWORD: SMS_205755301
|
|
||||||
system:
|
system:
|
||||||
isDemoSite: false
|
isDemoSite: false
|
||||||
isTestModel: true
|
|
||||||
# 脱敏级别:
|
# 脱敏级别:
|
||||||
# 0:不做脱敏处理
|
# 0:不做脱敏处理
|
||||||
# 1:管理端用户手机号等信息脱敏
|
# 1:管理端用户手机号等信息脱敏
|
||||||
|
@ -14,23 +14,23 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
public class ApiProperties {
|
public class ApiProperties {
|
||||||
|
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 买家api
|
// * 买家api
|
||||||
*/
|
// */
|
||||||
private String buyer;
|
// private String buyer;
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 管理端域名
|
// * 管理端域名
|
||||||
*/
|
// */
|
||||||
private String store;
|
// private String store;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 管理端域名
|
// * 管理端域名
|
||||||
*/
|
// */
|
||||||
private String manager;
|
// private String manager;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 管理端域名
|
// * 管理端域名
|
||||||
*/
|
// */
|
||||||
private String common;
|
// private String common;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import cn.lili.modules.connect.request.BaseAuthWeChatPCRequest;
|
|||||||
import cn.lili.modules.connect.request.BaseAuthWeChatRequest;
|
import cn.lili.modules.connect.request.BaseAuthWeChatRequest;
|
||||||
import cn.lili.modules.connect.service.ConnectService;
|
import cn.lili.modules.connect.service.ConnectService;
|
||||||
import cn.lili.modules.system.entity.dos.Setting;
|
import cn.lili.modules.system.entity.dos.Setting;
|
||||||
|
import cn.lili.modules.system.entity.dto.connect.ConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.connect.QQConnectSetting;
|
import cn.lili.modules.system.entity.dto.connect.QQConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.connect.WechatConnectSetting;
|
import cn.lili.modules.system.entity.dto.connect.WechatConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.connect.dto.QQConnectSettingItem;
|
import cn.lili.modules.system.entity.dto.connect.dto.QQConnectSettingItem;
|
||||||
@ -70,8 +71,8 @@ public class ConnectUtil {
|
|||||||
* @param connectAuthEnum 用户枚举
|
* @param connectAuthEnum 用户枚举
|
||||||
* @return 回调地址
|
* @return 回调地址
|
||||||
*/
|
*/
|
||||||
String getRedirectUri(ConnectAuthEnum connectAuthEnum) {
|
String getRedirectUri(ConnectAuthEnum connectAuthEnum,String callbackUrl) {
|
||||||
return apiProperties.getBuyer() + prefix + connectAuthEnum.getName();
|
return callbackUrl + prefix + connectAuthEnum.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,10 +107,13 @@ public class ConnectUtil {
|
|||||||
//缓存写入登录结果,300秒有效
|
//缓存写入登录结果,300秒有效
|
||||||
cache.put(CachePrefix.CONNECT_RESULT.getPrefix() + callback.getCode(), resultMessage, 300L);
|
cache.put(CachePrefix.CONNECT_RESULT.getPrefix() + callback.getCode(), resultMessage, 300L);
|
||||||
|
|
||||||
|
Setting setting = settingService.get(SettingEnum.CONNECT_SUPPORT.name());
|
||||||
|
ConnectSetting connectSetting = JSONUtil.toBean(setting.getSettingValue(), ConnectSetting.class);
|
||||||
|
|
||||||
//跳转地址
|
//跳转地址
|
||||||
String url = this.check(httpServletRequest.getHeader("user-agent")) ?
|
String url = this.check(httpServletRequest.getHeader("user-agent")) ?
|
||||||
domainProperties.getWap() + "/pages/passport/login?state=" + callback.getCode() :
|
connectSetting.getWap() + "/pages/passport/login?state=" + callback.getCode() :
|
||||||
domainProperties.getPc() + "/login?state=" + callback.getCode();
|
connectSetting.getPc() + "/login?state=" + callback.getCode();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
httpServletResponse.sendRedirect(url);
|
httpServletResponse.sendRedirect(url);
|
||||||
@ -151,13 +155,15 @@ public class ConnectUtil {
|
|||||||
//寻找配置
|
//寻找配置
|
||||||
Setting setting = settingService.get(SettingEnum.WECHAT_CONNECT.name());
|
Setting setting = settingService.get(SettingEnum.WECHAT_CONNECT.name());
|
||||||
WechatConnectSetting wechatConnectSetting = JSONUtil.toBean(setting.getSettingValue(), WechatConnectSetting.class);
|
WechatConnectSetting wechatConnectSetting = JSONUtil.toBean(setting.getSettingValue(), WechatConnectSetting.class);
|
||||||
|
//登录设置
|
||||||
|
ConnectSetting connectSetting = JSONUtil.toBean(settingService.get(SettingEnum.CONNECT_SETTING.name()).getSettingValue(), ConnectSetting.class);
|
||||||
|
|
||||||
for (WechatConnectSettingItem wechatConnectSettingItem : wechatConnectSetting.getWechatConnectSettingItems()) {
|
for (WechatConnectSettingItem wechatConnectSettingItem : wechatConnectSetting.getWechatConnectSettingItems()) {
|
||||||
if (wechatConnectSettingItem.getClientType().equals(ClientTypeEnum.H5.name())) {
|
if (wechatConnectSettingItem.getClientType().equals(ClientTypeEnum.H5.name())) {
|
||||||
authRequest = new BaseAuthWeChatRequest(AuthConfig.builder()
|
authRequest = new BaseAuthWeChatRequest(AuthConfig.builder()
|
||||||
.clientId(wechatConnectSettingItem.getAppId())
|
.clientId(wechatConnectSettingItem.getAppId())
|
||||||
.clientSecret(wechatConnectSettingItem.getAppSecret())
|
.clientSecret(wechatConnectSettingItem.getAppSecret())
|
||||||
.redirectUri(getRedirectUri(authInterface))
|
.redirectUri(getRedirectUri(authInterface, connectSetting.getCallbackUrl()))
|
||||||
.build(), cache);
|
.build(), cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -167,13 +173,14 @@ public class ConnectUtil {
|
|||||||
//寻找配置
|
//寻找配置
|
||||||
Setting setting = settingService.get(SettingEnum.WECHAT_CONNECT.name());
|
Setting setting = settingService.get(SettingEnum.WECHAT_CONNECT.name());
|
||||||
WechatConnectSetting wechatConnectSetting = JSONUtil.toBean(setting.getSettingValue(), WechatConnectSetting.class);
|
WechatConnectSetting wechatConnectSetting = JSONUtil.toBean(setting.getSettingValue(), WechatConnectSetting.class);
|
||||||
|
//登录设置
|
||||||
|
ConnectSetting connectSetting = JSONUtil.toBean(settingService.get(SettingEnum.CONNECT_SETTING.name()).getSettingValue(), ConnectSetting.class);
|
||||||
for (WechatConnectSettingItem wechatConnectSettingItem : wechatConnectSetting.getWechatConnectSettingItems()) {
|
for (WechatConnectSettingItem wechatConnectSettingItem : wechatConnectSetting.getWechatConnectSettingItems()) {
|
||||||
if (wechatConnectSettingItem.getClientType().equals(ClientTypeEnum.PC.name())) {
|
if (wechatConnectSettingItem.getClientType().equals(ClientTypeEnum.PC.name())) {
|
||||||
authRequest = new BaseAuthWeChatPCRequest(AuthConfig.builder()
|
authRequest = new BaseAuthWeChatPCRequest(AuthConfig.builder()
|
||||||
.clientId(wechatConnectSettingItem.getAppId())
|
.clientId(wechatConnectSettingItem.getAppId())
|
||||||
.clientSecret(wechatConnectSettingItem.getAppSecret())
|
.clientSecret(wechatConnectSettingItem.getAppSecret())
|
||||||
.redirectUri(getRedirectUri(authInterface))
|
.redirectUri(getRedirectUri(authInterface, connectSetting.getCallbackUrl()))
|
||||||
.build(), cache);
|
.build(), cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,13 +191,14 @@ public class ConnectUtil {
|
|||||||
//寻找配置
|
//寻找配置
|
||||||
Setting setting = settingService.get(SettingEnum.QQ_CONNECT.name());
|
Setting setting = settingService.get(SettingEnum.QQ_CONNECT.name());
|
||||||
QQConnectSetting qqConnectSetting = JSONUtil.toBean(setting.getSettingValue(), QQConnectSetting.class);
|
QQConnectSetting qqConnectSetting = JSONUtil.toBean(setting.getSettingValue(), QQConnectSetting.class);
|
||||||
|
//登录设置
|
||||||
|
ConnectSetting connectSetting = JSONUtil.toBean(settingService.get(SettingEnum.CONNECT_SETTING.name()).getSettingValue(), ConnectSetting.class);
|
||||||
for (QQConnectSettingItem qqConnectSettingItem : qqConnectSetting.getQqConnectSettingItemList()) {
|
for (QQConnectSettingItem qqConnectSettingItem : qqConnectSetting.getQqConnectSettingItemList()) {
|
||||||
if (qqConnectSettingItem.getClientType().equals(ClientTypeEnum.PC.name())) {
|
if (qqConnectSettingItem.getClientType().equals(ClientTypeEnum.PC.name())) {
|
||||||
authRequest = new BaseAuthQQRequest(AuthConfig.builder()
|
authRequest = new BaseAuthQQRequest(AuthConfig.builder()
|
||||||
.clientId(qqConnectSettingItem.getAppId())
|
.clientId(qqConnectSettingItem.getAppId())
|
||||||
.clientSecret(qqConnectSettingItem.getAppKey())
|
.clientSecret(qqConnectSettingItem.getAppKey())
|
||||||
.redirectUri(getRedirectUri(authInterface))
|
.redirectUri(getRedirectUri(authInterface, connectSetting.getCallbackUrl()))
|
||||||
//这里qq获取unionid 需要配置为true,详情可以查阅属性说明,内部有帮助文档
|
//这里qq获取unionid 需要配置为true,详情可以查阅属性说明,内部有帮助文档
|
||||||
.unionId(true)
|
.unionId(true)
|
||||||
.build(), cache);
|
.build(), cache);
|
||||||
|
@ -72,11 +72,6 @@ public class AliPayPlugin implements Payment {
|
|||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private SettingService settingService;
|
private SettingService settingService;
|
||||||
/**
|
|
||||||
* API域名
|
|
||||||
*/
|
|
||||||
@Autowired
|
|
||||||
private ApiProperties apiProperties;
|
|
||||||
/**
|
/**
|
||||||
* 域名配置
|
* 域名配置
|
||||||
*/
|
*/
|
||||||
@ -87,6 +82,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
public ResultMessage<Object> h5pay(HttpServletRequest request, HttpServletResponse response, PayParam payParam) {
|
public ResultMessage<Object> h5pay(HttpServletRequest request, HttpServletResponse response, PayParam payParam) {
|
||||||
|
|
||||||
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
||||||
|
AlipayPaymentSetting alipayPaymentSetting = alipayPaymentSetting();
|
||||||
//请求订单编号
|
//请求订单编号
|
||||||
String outTradeNo = SnowFlake.getIdStr();
|
String outTradeNo = SnowFlake.getIdStr();
|
||||||
//准备支付参数
|
//准备支付参数
|
||||||
@ -102,8 +98,8 @@ public class AliPayPlugin implements Payment {
|
|||||||
payModel.setProductCode("QUICK_WAP_PAY");
|
payModel.setProductCode("QUICK_WAP_PAY");
|
||||||
try {
|
try {
|
||||||
log.info("支付宝H5支付:{}", JSONUtil.toJsonStr(payModel));
|
log.info("支付宝H5支付:{}", JSONUtil.toJsonStr(payModel));
|
||||||
AliPayRequest.wapPay(response, payModel, callbackUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY),
|
AliPayRequest.wapPay(response, payModel, callbackUrl(alipayPaymentSetting.getCallbackUrl(), PaymentMethodEnum.ALIPAY),
|
||||||
notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY));
|
notifyUrl(alipayPaymentSetting.getCallbackUrl(), PaymentMethodEnum.ALIPAY));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("H5支付异常", e);
|
log.error("H5支付异常", e);
|
||||||
throw new ServiceException(ResultCode.ALIPAY_EXCEPTION);
|
throw new ServiceException(ResultCode.ALIPAY_EXCEPTION);
|
||||||
@ -122,6 +118,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
||||||
|
AlipayPaymentSetting alipayPaymentSetting = alipayPaymentSetting();
|
||||||
//请求订单编号
|
//请求订单编号
|
||||||
String outTradeNo = SnowFlake.getIdStr();
|
String outTradeNo = SnowFlake.getIdStr();
|
||||||
|
|
||||||
@ -139,7 +136,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
payModel.setProductCode("QUICK_MSECURITY_PAY");
|
payModel.setProductCode("QUICK_MSECURITY_PAY");
|
||||||
|
|
||||||
log.info("支付宝APP支付:{}", payModel);
|
log.info("支付宝APP支付:{}", payModel);
|
||||||
String orderInfo = AliPayRequest.appPayToResponse(payModel, notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY)).getBody();
|
String orderInfo = AliPayRequest.appPayToResponse(payModel, notifyUrl(alipayPaymentSetting.getCallbackUrl(), PaymentMethodEnum.ALIPAY)).getBody();
|
||||||
log.info("支付宝APP支付返回内容:{}", orderInfo);
|
log.info("支付宝APP支付返回内容:{}", orderInfo);
|
||||||
return ResultUtil.data(orderInfo);
|
return ResultUtil.data(orderInfo);
|
||||||
} catch (AlipayApiException e) {
|
} catch (AlipayApiException e) {
|
||||||
@ -156,6 +153,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
|
||||||
|
AlipayPaymentSetting alipayPaymentSetting = alipayPaymentSetting();
|
||||||
|
|
||||||
AlipayTradePrecreateModel payModel = new AlipayTradePrecreateModel();
|
AlipayTradePrecreateModel payModel = new AlipayTradePrecreateModel();
|
||||||
|
|
||||||
@ -172,7 +170,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
payModel.setOutTradeNo(outTradeNo);
|
payModel.setOutTradeNo(outTradeNo);
|
||||||
log.info("支付宝扫码:{}", payModel);
|
log.info("支付宝扫码:{}", payModel);
|
||||||
String resultStr =
|
String resultStr =
|
||||||
AliPayRequest.tradePrecreatePayToResponse(payModel, notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY)).getBody();
|
AliPayRequest.tradePrecreatePayToResponse(payModel, notifyUrl(alipayPaymentSetting.getCallbackUrl(), PaymentMethodEnum.ALIPAY)).getBody();
|
||||||
|
|
||||||
log.info("支付宝扫码交互返回:{}", resultStr);
|
log.info("支付宝扫码交互返回:{}", resultStr);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(resultStr);
|
JSONObject jsonObject = JSONObject.parseObject(resultStr);
|
||||||
@ -338,7 +336,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取微信支付配置
|
* 获取支付宝配置
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -93,11 +93,6 @@ public class WechatPlugin implements Payment {
|
|||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private RefundLogService refundLogService;
|
private RefundLogService refundLogService;
|
||||||
/**
|
|
||||||
* API域名
|
|
||||||
*/
|
|
||||||
@Autowired
|
|
||||||
private ApiProperties apiProperties;
|
|
||||||
/**
|
/**
|
||||||
* 配置
|
* 配置
|
||||||
*/
|
*/
|
||||||
@ -151,7 +146,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setOut_trade_no(outOrderNo)
|
.setOut_trade_no(outOrderNo)
|
||||||
.setTime_expire(timeExpire)
|
.setTime_expire(timeExpire)
|
||||||
.setAttach(attach)
|
.setAttach(attach)
|
||||||
.setNotify_url(notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT))
|
.setNotify_url(notifyUrl(wechatPaymentSetting().getCallbackUrl(),PaymentMethodEnum.WECHAT))
|
||||||
.setAmount(new Amount().setTotal(fen)).setScene_info(sceneInfo);
|
.setAmount(new Amount().setTotal(fen)).setScene_info(sceneInfo);
|
||||||
|
|
||||||
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
||||||
@ -210,7 +205,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setOut_trade_no(outOrderNo)
|
.setOut_trade_no(outOrderNo)
|
||||||
.setTime_expire(timeExpire)
|
.setTime_expire(timeExpire)
|
||||||
.setAttach(attach)
|
.setAttach(attach)
|
||||||
.setNotify_url(notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT))
|
.setNotify_url(notifyUrl(wechatPaymentSetting().getCallbackUrl(), PaymentMethodEnum.WECHAT))
|
||||||
.setAmount(new Amount().setTotal(fen))
|
.setAmount(new Amount().setTotal(fen))
|
||||||
.setPayer(payer);
|
.setPayer(payer);
|
||||||
|
|
||||||
@ -275,7 +270,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setOut_trade_no(outOrderNo)
|
.setOut_trade_no(outOrderNo)
|
||||||
.setTime_expire(timeExpire)
|
.setTime_expire(timeExpire)
|
||||||
.setAttach(attach)
|
.setAttach(attach)
|
||||||
.setNotify_url(notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT))
|
.setNotify_url(notifyUrl(wechatPaymentSetting().getCallbackUrl(), PaymentMethodEnum.WECHAT))
|
||||||
.setAmount(new Amount().setTotal(fen));
|
.setAmount(new Amount().setTotal(fen));
|
||||||
|
|
||||||
|
|
||||||
@ -344,7 +339,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setTime_expire(timeExpire)
|
.setTime_expire(timeExpire)
|
||||||
//回传参数
|
//回传参数
|
||||||
.setAttach(attach)
|
.setAttach(attach)
|
||||||
.setNotify_url(notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT))
|
.setNotify_url(notifyUrl(wechatPaymentSetting().getCallbackUrl(), PaymentMethodEnum.WECHAT))
|
||||||
.setAmount(new Amount().setTotal(fen));
|
.setAmount(new Amount().setTotal(fen));
|
||||||
|
|
||||||
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
||||||
@ -417,7 +412,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setOut_trade_no(outOrderNo)
|
.setOut_trade_no(outOrderNo)
|
||||||
.setTime_expire(timeExpire)
|
.setTime_expire(timeExpire)
|
||||||
.setAttach(attach)
|
.setAttach(attach)
|
||||||
.setNotify_url(notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT))
|
.setNotify_url(notifyUrl(wechatPaymentSetting().getCallbackUrl(), PaymentMethodEnum.WECHAT))
|
||||||
.setAmount(new Amount().setTotal(fen))
|
.setAmount(new Amount().setTotal(fen))
|
||||||
.setPayer(payer);
|
.setPayer(payer);
|
||||||
|
|
||||||
@ -618,7 +613,7 @@ public class WechatPlugin implements Payment {
|
|||||||
.setOut_refund_no(refundLog.getOutOrderNo())
|
.setOut_refund_no(refundLog.getOutOrderNo())
|
||||||
.setReason(refundLog.getRefundReason())
|
.setReason(refundLog.getRefundReason())
|
||||||
.setAmount(amount)
|
.setAmount(amount)
|
||||||
.setNotify_url(refundNotifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.WECHAT));
|
.setNotify_url(refundNotifyUrl(wechatPaymentSetting().getCallbackUrl(), PaymentMethodEnum.WECHAT));
|
||||||
|
|
||||||
WechatPaymentSetting setting = wechatPaymentSetting();
|
WechatPaymentSetting setting = wechatPaymentSetting();
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public class SmsUtilAliImplService implements SmsUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//如果是测试模式 默认验证码 6个1
|
//如果是测试模式 默认验证码 6个1
|
||||||
if (systemSettingProperties.getIsTestModel()) {
|
if (smsSetting.getIsTestModel()) {
|
||||||
code = "111111";
|
code = "111111";
|
||||||
log.info("测试模式 - 接收手机:{},验证码:{}", mobile, code);
|
log.info("测试模式 - 接收手机:{},验证码:{}", mobile, code);
|
||||||
} else {
|
} else {
|
||||||
|
@ -18,6 +18,30 @@ public class SmsSetting implements Serializable {
|
|||||||
* 类型
|
* 类型
|
||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
/**
|
||||||
|
* 是否测试模式
|
||||||
|
*/
|
||||||
|
private Boolean isTestModel;
|
||||||
|
/**
|
||||||
|
* 登录短信模板CODE
|
||||||
|
*/
|
||||||
|
private String loginTemplateCode;
|
||||||
|
/**
|
||||||
|
* 注册短信模板CODE
|
||||||
|
*/
|
||||||
|
private String registerTemplateCode;
|
||||||
|
/**
|
||||||
|
* 找回密码短信模板CODE
|
||||||
|
*/
|
||||||
|
private String findPasswordTemplateCode;
|
||||||
|
/**
|
||||||
|
* 设置密码短信模板CODE
|
||||||
|
*/
|
||||||
|
private String walletPasswordTemplateCode;
|
||||||
|
/**
|
||||||
|
* 支付密码短信模板CODE
|
||||||
|
*/
|
||||||
|
private String payPasswordTemplateCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* key
|
* key
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
package cn.lili.modules.system.entity.dto.connect;
|
||||||
|
|
||||||
|
import cn.lili.modules.system.entity.dto.connect.dto.WechatConnectSettingItem;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录设置
|
||||||
|
*
|
||||||
|
* @author Chopper
|
||||||
|
* @since 2020/11/17 8:00 下午
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ConnectSetting {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 买家PC端域名
|
||||||
|
*/
|
||||||
|
private String pc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 买家WAP端域名
|
||||||
|
*/
|
||||||
|
private String wap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回调域名
|
||||||
|
*/
|
||||||
|
private String callbackUrl;
|
||||||
|
}
|
@ -38,4 +38,9 @@ public class AlipayPaymentSetting {
|
|||||||
*/
|
*/
|
||||||
private String rootCertPath;
|
private String rootCertPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回调API地址
|
||||||
|
*/
|
||||||
|
private String callbackUrl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,4 +57,8 @@ public class WechatPaymentSetting {
|
|||||||
* apiv3私钥
|
* apiv3私钥
|
||||||
*/
|
*/
|
||||||
private String apiKey3;
|
private String apiKey3;
|
||||||
|
/**
|
||||||
|
* 回调API地址
|
||||||
|
*/
|
||||||
|
private String callbackUrl;
|
||||||
}
|
}
|
||||||
|
@ -34,10 +34,14 @@ public enum SettingEnum {
|
|||||||
//IM 配置
|
//IM 配置
|
||||||
IM_SETTING,
|
IM_SETTING,
|
||||||
|
|
||||||
|
//登录设置
|
||||||
|
CONNECT_SUPPORT,
|
||||||
//微信 联合登陆设置
|
//微信 联合登陆设置
|
||||||
WECHAT_CONNECT,
|
WECHAT_CONNECT,
|
||||||
//QQ 浏览器 联合登录设置
|
//QQ 浏览器 联合登录设置
|
||||||
QQ_CONNECT,
|
QQ_CONNECT,
|
||||||
|
//登录设置
|
||||||
|
CONNECT_SETTING,
|
||||||
|
|
||||||
//各端支持支付设置
|
//各端支持支付设置
|
||||||
PAYMENT_SUPPORT,
|
PAYMENT_SUPPORT,
|
||||||
|
@ -9,6 +9,7 @@ import cn.lili.common.exception.ServiceException;
|
|||||||
import cn.lili.common.vo.ResultMessage;
|
import cn.lili.common.vo.ResultMessage;
|
||||||
import cn.lili.modules.system.entity.dos.Setting;
|
import cn.lili.modules.system.entity.dos.Setting;
|
||||||
import cn.lili.modules.system.entity.dto.*;
|
import cn.lili.modules.system.entity.dto.*;
|
||||||
|
import cn.lili.modules.system.entity.dto.connect.ConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.connect.QQConnectSetting;
|
import cn.lili.modules.system.entity.dto.connect.QQConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.connect.WechatConnectSetting;
|
import cn.lili.modules.system.entity.dto.connect.WechatConnectSetting;
|
||||||
import cn.lili.modules.system.entity.dto.payment.AlipayPaymentSetting;
|
import cn.lili.modules.system.entity.dto.payment.AlipayPaymentSetting;
|
||||||
@ -53,7 +54,7 @@ public class SettingManagerController {
|
|||||||
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
|
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
|
||||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT," +
|
"QQ_WEB_CONNECT,QQ_APP_CONNECT," +
|
||||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_CONNECT," +
|
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_CONNECT," +
|
||||||
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING,EXPERIENCE_SETTING,IM")
|
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING,EXPERIENCE_SETTING,IM,CONNECT_SETTING")
|
||||||
public ResultMessage saveConfig(@PathVariable String key, @RequestBody String configValue) {
|
public ResultMessage saveConfig(@PathVariable String key, @RequestBody String configValue) {
|
||||||
SettingEnum settingEnum = SettingEnum.valueOf(key);
|
SettingEnum settingEnum = SettingEnum.valueOf(key);
|
||||||
//获取系统配置
|
//获取系统配置
|
||||||
@ -164,6 +165,10 @@ public class SettingManagerController {
|
|||||||
return setting == null ?
|
return setting == null ?
|
||||||
ResultUtil.data(new QQConnectSetting()) :
|
ResultUtil.data(new QQConnectSetting()) :
|
||||||
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), QQConnectSetting.class));
|
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), QQConnectSetting.class));
|
||||||
|
case CONNECT_SETTING:
|
||||||
|
return setting == null ?
|
||||||
|
ResultUtil.data(new ConnectSetting()) :
|
||||||
|
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), ConnectSetting.class));
|
||||||
case PAYMENT_SUPPORT:
|
case PAYMENT_SUPPORT:
|
||||||
return setting == null ?
|
return setting == null ?
|
||||||
ResultUtil.data(new PaymentSupportSetting(new PaymentSupportForm())) :
|
ResultUtil.data(new PaymentSupportSetting(new PaymentSupportForm())) :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user