| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package com.zhongshu.payment.client.service;
- import com.github.microservice.net.ResultContent;
- import com.zhongshu.payment.client.model.WalletModel;
- import com.zhongshu.payment.client.model.param.AmountUpdateParam;
- import com.zhongshu.payment.client.types.WalletType;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.http.MediaType;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RequestParam;
- /**
- * @author wjf
- * @date 2024/7/26
- */
- @FeignClient("paymentserver/manager/wallet")
- public interface WalletFeignService {
- /** 获取钱包信息 */
- @RequestMapping(value = "getWallet", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- ResultContent<WalletModel> getWallet(
- @RequestParam("oid") String oid,
- @RequestParam("walletType") WalletType walletType,
- @RequestParam("shopId") String shopId,
- @RequestParam ("userId")String userId);
- /** 充值 */
- @RequestMapping(value = "recharge", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
- ResultContent recharge(@RequestBody AmountUpdateParam param);
- /** 消费 */
- @RequestMapping(value = "consume", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
- ResultContent consume(@RequestBody AmountUpdateParam param);
- // /** 用户发起退款 */
- // @RequestMapping(value = "frozen", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
- // ResultContent frozen(@RequestBody AmountUpdateParam param);
- //
- // /** 退款(审批失败/取消) */
- // @RequestMapping(value = "cancelFrozen", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
- // ResultContent cancelFrozen(@RequestBody AmountUpdateParam param);
- /** 退款 */
- @RequestMapping(value = "refund", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
- ResultContent refund(@RequestBody AmountUpdateParam param);
- // /** 消费/退款 */
- // @RequestMapping(value = "tradeWallet", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- // ResultContent tradeWallet(@RequestBody WalletFlowModel param);
- // /** 增加可用余额 */
- // @RequestMapping(value = "addAmount", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- // ResultContent addAmount(@RequestParam("walletId")String walletId, @RequestParam("total") BigDecimal total, @RequestParam("outTradeNo") String outTradeNo, @RequestParam("type") TradeType type, @RequestParam("attach")String attach);
- //
- // /** 增加总金额 */
- // @RequestMapping(value = "addTotalAmount", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- // ResultContent addTotalAmount(@RequestParam("walletId")String walletId, @RequestParam("total") BigDecimal total, @RequestParam("outTradeNo") String outTradeNo, @RequestParam("type") TradeType type, @RequestParam("attach")String attach);
- //
- // /** 减少可用余额 */
- // @RequestMapping(value = "subtractAmount", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- // ResultContent subtractAmount(@RequestParam("walletId")String walletId, @RequestParam("total") BigDecimal total, @RequestParam("outTradeNo") String outTradeNo, @RequestParam("type") TradeType type, @RequestParam("attach")String attach);
- //
- // /** 减少总金额 */
- // @RequestMapping(value = "subtractTotalAmount", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- // ResultContent subtractTotalAmount(@RequestParam("walletId")String walletId, @RequestParam("total") BigDecimal total, @RequestParam("outTradeNo") String outTradeNo, @RequestParam("type") TradeType type, @RequestParam("attach")String attach);
- /** 查询钱包流水 */
- // List<WalletFlowModel> queryWalletFlow(String walletId);
- }
|