diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PlaFormController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PlaFormController.java index 32c8040..9355c71 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PlaFormController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PlaFormController.java @@ -38,9 +38,9 @@ public class PlaFormController extends BaseController { */ @ApiOperation(value = "模型列表") @GetMapping("/list") - public List list() { + public R> list() { - return platFormService.list(); + return R.ok(platFormService.list()); } /*** diff --git a/mcwl-admin/src/main/resources/application.yml b/mcwl-admin/src/main/resources/application.yml index 311a165..b2d3e28 100644 --- a/mcwl-admin/src/main/resources/application.yml +++ b/mcwl-admin/src/main/resources/application.yml @@ -34,7 +34,7 @@ server: # 日志配置 logging: level: - com.mcwl: debug + com.mcwl: error org.springframework: warn # 用户配置 diff --git a/mcwl-framework/src/main/java/com/mcwl/framework/web/exception/GlobalExceptionHandler.java b/mcwl-framework/src/main/java/com/mcwl/framework/web/exception/GlobalExceptionHandler.java index 10d0ddf..a448df0 100644 --- a/mcwl-framework/src/main/java/com/mcwl/framework/web/exception/GlobalExceptionHandler.java +++ b/mcwl-framework/src/main/java/com/mcwl/framework/web/exception/GlobalExceptionHandler.java @@ -47,13 +47,13 @@ public class GlobalExceptionHandler { } /** - * redis异常 + * redis连接超时异常 */ @ExceptionHandler(QueryTimeoutException.class) public AjaxResult commandTimeoutException(QueryTimeoutException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); log.error("redis异常{},{}", requestURI, e.getMessage()); - return AjaxResult.error(HttpStatus.ERROR, "超时"); + return AjaxResult.error(HttpStatus.WARN, "超时"); } diff --git a/mcwl-framework/src/main/java/com/mcwl/framework/web/service/TokenService.java b/mcwl-framework/src/main/java/com/mcwl/framework/web/service/TokenService.java index 9592247..413d2fa 100644 --- a/mcwl-framework/src/main/java/com/mcwl/framework/web/service/TokenService.java +++ b/mcwl-framework/src/main/java/com/mcwl/framework/web/service/TokenService.java @@ -82,9 +82,6 @@ public class TokenService } catch (Exception e) { - if (e.getCause() instanceof io.lettuce.core.RedisCommandTimeoutException) { - throw new RedisCommandTimeoutException("连接超时"); - } log.error("获取用户信息异常'{}'", e.getMessage()); } } diff --git a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java index 63b27f7..575a848 100644 --- a/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java +++ b/mcwl-pay/src/main/java/com/mcwl/pay/service/impl/AliPayServiceImpl.java @@ -307,6 +307,8 @@ public class AliPayServiceImpl implements AliPayService { SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery() .eq(SysUserPayAccount::getUserId, SecurityUtils.getUserId()) + .eq(SysUserPayAccount::getAppId, aliConfig.getAppId()) + .eq(SysUserPayAccount::getType, 0) .one(); if (Objects.isNull(sysUserPayAccount)) { @@ -476,6 +478,7 @@ public class AliPayServiceImpl implements AliPayService { // 判断是否已经绑定过 SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery() .eq(SysUserPayAccount::getUserId, userId) + .eq(SysUserPayAccount::getAppId, aliConfig.getAppId()) .eq(SysUserPayAccount::getType, 0) .one(); if (Objects.nonNull(sysUserPayAccount)) { @@ -486,6 +489,7 @@ public class AliPayServiceImpl implements AliPayService { // 将openId与当前商城用户绑定(保存到数据库) SysUserPayAccount userPayAccount = new SysUserPayAccount(); userPayAccount.setUserId(userId); + userPayAccount.setAppId(aliConfig.getAppId()); userPayAccount.setOpenId(openId); userPayAccount.setType(0); sysUserPayAccountService.save(userPayAccount); diff --git a/mcwl-system/src/main/java/com/mcwl/system/domain/SysUserPayAccount.java b/mcwl-system/src/main/java/com/mcwl/system/domain/SysUserPayAccount.java index 3332604..d2fec7e 100644 --- a/mcwl-system/src/main/java/com/mcwl/system/domain/SysUserPayAccount.java +++ b/mcwl-system/src/main/java/com/mcwl/system/domain/SysUserPayAccount.java @@ -21,10 +21,17 @@ public class SysUserPayAccount extends BaseEntity { * 用户id */ private Long userId; + + /** + * 应用id + */ + private String appId; + /** * 账号唯一标识 */ private String openId; + /** * 账号类型 0 支付宝 1 微信 2 QQ */