xucaiqin 1 giorno fa
parent
commit
41d622c163

+ 9 - 1
pom.xml

@@ -74,7 +74,11 @@
 
     <dependencyManagement>
         <dependencies>
-
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>2.0.7</version>
+            </dependency>
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-dependencies</artifactId>
@@ -530,6 +534,10 @@
                 <includes>
                     <include>**/*</include>
                 </includes>
+                <excludes>
+                    <exclude>**/*.yml</exclude>
+                    <exclude>**/*.properties</exclude>
+                </excludes>
             </resource>
             <resource>
                 <directory>src/main/resources</directory>

+ 16 - 0
sckw-modules/sckw-payment/pom.xml

@@ -30,17 +30,33 @@
         </dependencies>
     </dependencyManagement>
     <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
         <!-- 核心模块 -->
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-startup</artifactId>
             <version>${basic.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>spring-boot-starter-logging</artifactId>
+                    <groupId>org.springframework.boot</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
             <version>${basic.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>spring-boot-starter-logging</artifactId>
+                    <groupId>org.springframework.boot</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>

+ 7 - 7
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/NoticeController.java

@@ -1,6 +1,6 @@
 package com.sckw.payment.controller;
 
-import com.sckw.payment.api.model.dto.common.R;
+import com.sckw.core.web.response.BaseResult;
 import com.sckw.payment.pojo.dto.CashDto;
 import com.sckw.payment.pojo.dto.SplitDto;
 import com.sckw.payment.pojo.dto.UserDto;
@@ -35,8 +35,8 @@ public class NoticeController {
      */
     @Operation(summary = "用户开户回调", description = "用户开户回调")
     @PostMapping("/user")
-    public R<Object> createUser(@RequestBody UserDto userDto) {
-        return R.ok(walletService.userNotice(userDto));
+    public BaseResult<Object> createUser(@RequestBody UserDto userDto) {
+        return BaseResult.success(walletService.userNotice(userDto));
     }
 
     /**
@@ -44,8 +44,8 @@ public class NoticeController {
      */
     @Operation(summary = "提现回调通知", description = "提现回调通知")
     @PostMapping("/cash")
-    public R<Object> cash(CashDto cashDto) {
-        return R.ok(walletService.cashNotice(cashDto));
+    public BaseResult<Object> cash(CashDto cashDto) {
+        return BaseResult.success(walletService.cashNotice(cashDto));
     }
 
     /**
@@ -53,8 +53,8 @@ public class NoticeController {
      */
     @Operation(summary = "清分回调通知", description = "清分回调通知")
     @PostMapping("/split")
-    public R<Object> split(SplitDto splitDto) {
-        return R.ok(walletService.splitNotice(splitDto));
+    public BaseResult<Object> split(SplitDto splitDto) {
+        return BaseResult.success(walletService.splitNotice(splitDto));
     }
 
 }

+ 9 - 10
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletController.java

@@ -6,7 +6,6 @@ import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginEntHolder;
 import com.sckw.core.web.response.BaseResult;
 import com.sckw.payment.api.model.TradeEntInfoResVo;
-import com.sckw.payment.api.model.dto.common.R;
 import com.sckw.payment.pojo.CashParaPage;
 import com.sckw.payment.pojo.CashVo;
 import com.sckw.payment.pojo.UpdateCash;
@@ -69,7 +68,7 @@ public class WalletController {
      */
     @Operation(summary = "查询用户钱包信息", description = "查询用户钱包信息")
     @GetMapping("/info")
-    public R<WalletVo> userInfo() {
+    public BaseResult<WalletVo> userInfo() {
         return walletService.userInfo();
     }
 
@@ -78,7 +77,7 @@ public class WalletController {
      */
     @Operation(summary = "可提现余额", description = "可提现余额")
     @GetMapping("/cashInfo")
-    public R<WalletCashVo> cashInfo() {
+    public BaseResult<WalletCashVo> cashInfo() {
         return walletService.cashInfo();
     }
 
@@ -87,8 +86,8 @@ public class WalletController {
      */
     @Operation(summary = "更新预付直提开关", description = "更新预付直提开关")
     @PostMapping("/updateCash")
-    public R<Integer> updateCash(@RequestBody @Valid UpdateCash updateCash) {
-        return R.ok(walletService.updateCash(updateCash));
+    public BaseResult<Integer> updateCash(@RequestBody @Valid UpdateCash updateCash) {
+        return BaseResult.success(walletService.updateCash(updateCash));
     }
 
     @Operation(summary = "查询交易对方企业列表")
@@ -103,8 +102,8 @@ public class WalletController {
     @Operation(summary = "可提现余额分页查询", description = "可提现余额分页查询")
     @Parameter(name = "entId", description = "企业id", required = true)
     @PostMapping("/cashPage")
-    public R<PageRes<CashVo>> cashPage(@RequestBody @Valid CashParaPage cashParaPage) {
-        return R.ok(walletService.cashPage(cashParaPage));
+    public BaseResult<PageRes<CashVo>> cashPage(@RequestBody @Valid CashParaPage cashParaPage) {
+        return BaseResult.success(walletService.cashPage(cashParaPage));
     }
 
     /**
@@ -115,8 +114,8 @@ public class WalletController {
      */
     @Operation(summary = "提现", description = "发起提现操作")
     @PostMapping("cashOUt")
-    public R<Object> cashOUt(@RequestBody @Valid CashWalletReq cashWalletReq) {
-        return R.ok(walletService.cashOUt(cashWalletReq));
+    public BaseResult<Object> cashOUt(@RequestBody @Valid CashWalletReq cashWalletReq) {
+        return BaseResult.success(walletService.cashOUt(cashWalletReq));
     }
     //1、查询钱包信息
 
@@ -150,7 +149,7 @@ public class WalletController {
         } else if (entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))) {
             prepaidQuery.setEntType(EntTypeEnum.PURCHASER.getCode());
         }
-        R<WalletCashVo> walletCashVoR = walletService.cashInfo();
+        BaseResult<WalletCashVo> walletCashVoR = walletService.cashInfo();
 
         if (HttpStatus.SUCCESS_CODE == walletCashVoR.getCode()) {
             WalletCashVo data = walletCashVoR.getData();

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/PayXwService.java

@@ -25,7 +25,7 @@ public class PayXwService {
 
     private String jsonHttp(PayXwEnum payXwEnum, Object object) {
         String para = object instanceof JSONObject jsonObject ? jsonObject.toJSONString() : JSONObject.toJSONString(object);
-        log.info("{}入参->{}", payXwEnum.getDesc(), para);
+        log.info("{} 入参->{}", payXwEnum.getDesc(), para);
         OkHttpUtils okHttpUtils = OkHttpUtils.builder().url(xwAddress + payXwEnum.getAddr());
         okHttpUtils.addBodyJsonStr(para);
         String sync;
@@ -35,7 +35,7 @@ public class PayXwService {
             log.error("新网服务异常", e.getCause());
             throw new RuntimeException("支付服务异常!");
         }
-        log.info("{}返回值->{}", payXwEnum.getDesc(), sync);
+        log.info("{} 返回值->{}", payXwEnum.getDesc(), sync);
         return sync;
     }
 

+ 6 - 6
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/WalletService.java

@@ -321,7 +321,7 @@ public class WalletService {
      *
      * @return
      */
-    public R<WalletVo> userInfo() {
+    public BaseResult<WalletVo> userInfo() {
         KwpWallet one = kwpWalletMapper.selectOne(Wrappers.lambdaQuery(KwpWallet.class).eq(KwpWallet::getEntId, LoginUserHolder.getEntId())
                 .eq(KwpWallet::getDelFlag, 0).last("limit 1"));
         if (Objects.nonNull(one)) {
@@ -381,9 +381,9 @@ public class WalletService {
             bean.setProcessingAmount(summary.getTradingFreightTotal());
             bean.setPayingAmount(summary.getPayingFreightTotal());
 
-            return R.ok(bean);
+            return BaseResult.success(bean);
         }
-        return R.failed("暂未开通钱包");
+        return BaseResult.failed("暂未开通钱包");
     }
 
 
@@ -471,7 +471,7 @@ public class WalletService {
         throw new BusinessException("请稍后再试");
     }
 
-    public R<WalletCashVo> cashInfo() {
+    public BaseResult<WalletCashVo> cashInfo() {
         KwpWallet one = kwpWalletMapper.selectOne(Wrappers.lambdaQuery(KwpWallet.class).eq(KwpWallet::getEntId, LoginUserHolder.getEntId())
                 .eq(KwpWallet::getDelFlag, 0).last("limit 1"));
         if (Objects.nonNull(one)) {
@@ -480,9 +480,9 @@ public class WalletService {
             bean.setStatusLabel(WalletStatusEnum.getByCode(one.getStatus()));
             bean.setCashAmount(one.getCashAmount());
 
-            return R.ok(bean);
+            return BaseResult.success(bean);
         }
-        return R.failed("暂未开通钱包");
+        return BaseResult.failed("暂未开通钱包");
     }
 
     public List<TradeEntInfoResVo> queryEntList() {