TRX 1 gadu atpakaļ
vecāks
revīzija
0fe5420c29

+ 11 - 3
PaymentServer/src/main/java/com/zhongshu/payment/server/core/controller/unionFrictionlessPay/CooperatorController.java

@@ -8,6 +8,7 @@ import com.zhongshu.card.client.model.payment.ExpenseFlowModel;
 import com.zhongshu.card.client.model.payment.ExpenseFlowSearch;
 import com.zhongshu.payment.client.payModel.commn.PayNotifyParam;
 import com.zhongshu.payment.client.payModel.cooperator.CooperatorParam;
+import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopOpenWithDrawModel;
 import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopWithDrawRecordModel;
 import com.zhongshu.payment.client.payModel.cooperator.platmatModel.ShopWithDrawRecordSearch;
 import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.UnionUserOpenInfoModel;
@@ -100,25 +101,32 @@ public class CooperatorController {
     }
 
     @Operation(summary = "根据ID查询提现记录详情", description = "根据ID查询提现记录")
-    @PostMapping(value = "getWithDrawById")
+    @GetMapping(value = "getWithDrawById")
     public ResultContent<ShopWithDrawRecordModel> getWithDrawById(@RequestParam("id") String id) {
         return cooperatorService.getWithDrawById(id);
     }
 
     @Operation(summary = "根据订单号查询记录详情", description = "根据订单号查询记录详情")
-    @PostMapping(value = "getWithDrawBySysOrderId")
+    @GetMapping(value = "getWithDrawBySysOrderId")
     public ResultContent<ShopWithDrawRecordModel> getWithDrawBySysOrderId(
             @RequestParam("sysOrderId") String sysOrderId) {
         return cooperatorService.getWithDrawBySysOrderId(sysOrderId);
     }
 
     @Operation(summary = "根据流水号查询记录详情", description = "根据流水号查询记录详情")
-    @PostMapping(value = "getWithDrawBySsn")
+    @GetMapping(value = "getWithDrawBySsn")
     public ResultContent<ShopWithDrawRecordModel> getWithDrawBySsn(
             @RequestParam("ssn") String ssn) {
         return cooperatorService.getWithDrawBySsn(ssn);
     }
 
+    @Operation(summary = "查询 商户开通提现信息", description = "查询 商户开通提现信息")
+    @GetMapping(value = "getOpenWithDrawInfo")
+    public ResultContent<ShopOpenWithDrawModel> getOpenWithDrawInfo(
+            @RequestParam("shopId") String shopId) {
+        return cooperatorService.getOpenWithDrawInfo(shopId);
+    }
+
     //---------------------------通知 start-----------------------------
     @Operation(summary = "提现结果通知回调")
     @PostMapping(value = "withDrawNotify/{sysOrderId}", consumes = MediaType.APPLICATION_JSON_VALUE)

+ 2 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/dao/unionFrictionlessPay/ShopOpenWithDrawDao.java

@@ -15,8 +15,8 @@ import java.util.List;
  */
 public interface ShopOpenWithDrawDao extends MongoDao<ShopOpenWithDraw> {
 
-    UnionUserOpenInfo findTopById(String id);
+    ShopOpenWithDraw findTopById(String id);
 
-    UnionUserOpenInfo findTopByShopId(String shopId);
+    ShopOpenWithDraw findTopByShopId(String shopId);
 
 }

+ 12 - 0
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/unionFrictionlessPay/CooperatorService.java

@@ -11,6 +11,7 @@ import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.ShopOpenWithDra
 import com.zhongshu.payment.server.core.dao.unionFrictionlessPay.ShopWithDrawRecordDao;
 import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.ShopOpenWithDraw;
 import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.ShopWithDrawRecord;
+import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.UnionUserOpenInfo;
 import com.zhongshu.payment.server.core.service.base.SuperService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
@@ -39,6 +40,17 @@ public class CooperatorService extends SuperService {
     @Autowired
     OrganizationFeignService organizationFeignService;
 
+    /**
+     * 查询 商户开通提现信息
+     *
+     * @param shopId
+     * @return
+     */
+    public ResultContent<ShopOpenWithDrawModel> getOpenWithDrawInfo(String shopId) {
+        ShopOpenWithDraw openInfo = shopOpenWithDrawDao.findTopByShopId(shopId);
+        return ResultContent.buildSuccess(toModel(openInfo));
+    }
+
     /**
      * 提现记录列表
      *