|
@@ -4,20 +4,30 @@ import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.helper.AuthHelper;
|
|
import com.github.microservice.auth.security.helper.AuthHelper;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
import com.github.microservice.net.ResultContent;
|
|
|
|
|
+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.commn.PayNotifyParam;
|
|
|
import com.zhongshu.payment.client.payModel.cooperator.CooperatorParam;
|
|
import com.zhongshu.payment.client.payModel.cooperator.CooperatorParam;
|
|
|
|
|
+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;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.model.UnionUserOpenInfoModel;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.SignInParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.SignInParam;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserRescissionParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserRescissionParam;
|
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserSignQueryParam;
|
|
import com.zhongshu.payment.client.payModel.unionFrictionlessPay.paymentModel.UserSignQueryParam;
|
|
|
|
|
+import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.CooperatorService;
|
|
|
import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.UnionFrictionlessPayMainService;
|
|
import com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay.UnionFrictionlessPayMainService;
|
|
|
import io.swagger.v3.oas.annotations.Hidden;
|
|
import io.swagger.v3.oas.annotations.Hidden;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
|
|
+import org.springframework.data.web.PageableDefault;
|
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
+import org.springframework.util.Assert;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
@@ -41,6 +51,9 @@ public class CooperatorController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
AuthHelper authHelper;
|
|
AuthHelper authHelper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ CooperatorService cooperatorService;
|
|
|
|
|
+
|
|
|
//---------------------------业务 start-----------------------------
|
|
//---------------------------业务 start-----------------------------
|
|
|
@Operation(summary = "查询商户可提现金额")
|
|
@Operation(summary = "查询商户可提现金额")
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
@@ -77,6 +90,35 @@ public class CooperatorController {
|
|
|
return unionFrictionlessPayMainService.openWithdraw(param);
|
|
return unionFrictionlessPayMainService.openWithdraw(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
|
|
+ @Operation(summary = "提现记录-分页列表", description = "提现记录-分页列表")
|
|
|
|
|
+ @RequestMapping(value = {"pageWithDraw"}, method = {RequestMethod.POST})
|
|
|
|
|
+ public ResultContent<Page<ShopWithDrawRecordModel>> pageWithDraw(
|
|
|
|
|
+ @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
|
|
|
|
|
+ @Parameter(required = false) ShopWithDrawRecordSearch param) {
|
|
|
|
|
+ return cooperatorService.pageWithDraw(pageable, param);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "根据ID查询提现记录详情", description = "根据ID查询提现记录")
|
|
|
|
|
+ @PostMapping(value = "getWithDrawById")
|
|
|
|
|
+ public ResultContent<ShopWithDrawRecordModel> getWithDrawById(@RequestParam("id") String id) {
|
|
|
|
|
+ return cooperatorService.getWithDrawById(id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "根据订单号查询记录详情", description = "根据订单号查询记录详情")
|
|
|
|
|
+ @PostMapping(value = "getWithDrawBySysOrderId")
|
|
|
|
|
+ public ResultContent<ShopWithDrawRecordModel> getWithDrawBySysOrderId(
|
|
|
|
|
+ @RequestParam("sysOrderId") String sysOrderId) {
|
|
|
|
|
+ return cooperatorService.getWithDrawBySysOrderId(sysOrderId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "根据流水号查询记录详情", description = "根据流水号查询记录详情")
|
|
|
|
|
+ @PostMapping(value = "getWithDrawBySsn")
|
|
|
|
|
+ public ResultContent<ShopWithDrawRecordModel> getWithDrawBySsn(
|
|
|
|
|
+ @RequestParam("ssn") String ssn) {
|
|
|
|
|
+ return cooperatorService.getWithDrawBySsn(ssn);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//---------------------------通知 start-----------------------------
|
|
//---------------------------通知 start-----------------------------
|
|
|
@Operation(summary = "提现结果通知回调")
|
|
@Operation(summary = "提现结果通知回调")
|
|
|
@PostMapping(value = "withDrawNotify/{sysOrderId}", consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
@PostMapping(value = "withDrawNotify/{sysOrderId}", consumes = MediaType.APPLICATION_JSON_VALUE)
|