swagger 推广后台 优化对战百佳历史接口
This commit is contained in:
-5
@@ -12,8 +12,6 @@ import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.MaYi.config.MYConfig;
|
||||
import com.ruoyi.thirdparty.MaYi.service.MYService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -28,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "聚合支付")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/mayi")
|
||||
@@ -41,7 +38,6 @@ public class MYController extends BaseController {
|
||||
private TtUserService userService;
|
||||
|
||||
// 下单
|
||||
@ApiOperation("预下单")
|
||||
@PostMapping("/ApiAddTrans")
|
||||
@UpdateUserCache
|
||||
public R ApiAddTrans(HttpServletRequest request, @RequestBody @Validated CreateOrderParam param) {
|
||||
@@ -58,7 +54,6 @@ public class MYController extends BaseController {
|
||||
}
|
||||
|
||||
// 支付回调
|
||||
@ApiOperation("支付回调")
|
||||
// @PostMapping("/notify")
|
||||
public String addTransNotify(@RequestBody PayNotifyRequest data) {
|
||||
log.info("聚合支付支付回调 {}", JSONUtil.toJsonStr(data));
|
||||
|
||||
-7
@@ -12,8 +12,6 @@ import com.ruoyi.thirdparty.abkpay.service.AbkPayPaymentService;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.OrderStatusRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -36,7 +34,6 @@ import java.util.Map;
|
||||
* orderStatus —— 查询本地订单支付状态(供前端轮询)
|
||||
* queryPay —— 主动查询平台订单
|
||||
*/
|
||||
@Api(tags = "abkpay充值")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/abkpay")
|
||||
@@ -51,7 +48,6 @@ public class AbkPayController {
|
||||
/**
|
||||
* 创建充值订单(默认由统一充值路由调用,独立入口默认关闭)
|
||||
*/
|
||||
@ApiOperation("创建充值订单")
|
||||
@UserPermission
|
||||
@PostMapping("/pay")
|
||||
public R<PayResponse> pay(@RequestBody @Validated PayRequest param) {
|
||||
@@ -71,7 +67,6 @@ public class AbkPayController {
|
||||
* 平台订单成功或失败都会回调,商户须返回字符串 "SUCCESS"(大小写均可)。
|
||||
* 处理失败(验签失败/订单不存在等)返回非 SUCCESS,促使平台重推。
|
||||
*/
|
||||
@ApiOperation("充值回调通知")
|
||||
@Anonymous
|
||||
@PostMapping("/notify")
|
||||
@ResponseBody
|
||||
@@ -88,7 +83,6 @@ public class AbkPayController {
|
||||
/**
|
||||
* 查询本地订单支付状态(供前端轮询)
|
||||
*/
|
||||
@ApiOperation("查询本地订单支付状态")
|
||||
@UserPermission
|
||||
@PostMapping("/orderStatus")
|
||||
public R<Map<String, Object>> orderStatus(@RequestBody @Validated OrderStatusRequest param) {
|
||||
@@ -99,7 +93,6 @@ public class AbkPayController {
|
||||
/**
|
||||
* 主动查询平台订单(仅允许查询本人订单)
|
||||
*/
|
||||
@ApiOperation("查询充值订单")
|
||||
@UserPermission
|
||||
@GetMapping("/queryPay")
|
||||
public R<AbkPayResult> queryPay(@RequestParam String outTradeNo) {
|
||||
|
||||
-4
@@ -10,14 +10,11 @@ import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.alipay.service.AliPayService;
|
||||
import com.ruoyi.thirdparty.wechat.service.ApiTokenService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "支付宝")
|
||||
@RestController
|
||||
@RequestMapping("/api/alipay")
|
||||
public class AliPayController {
|
||||
@@ -34,7 +31,6 @@ public class AliPayController {
|
||||
this.ttUserService = ttUserService;
|
||||
}
|
||||
|
||||
@ApiOperation("支付")
|
||||
@UserPermission
|
||||
@PostMapping(value = "/trade/page/pay")
|
||||
public R pay(@RequestBody @Validated CreateOrderParam param) {
|
||||
|
||||
-4
@@ -8,8 +8,6 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.baiweipay.service.BaiweiPayService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -17,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "百威支付")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/baiweipay")
|
||||
@@ -29,7 +26,6 @@ public class BaiweiPayController {
|
||||
@Autowired
|
||||
private BaiweiPayService baiweiPayService;
|
||||
|
||||
@ApiOperation("支付")
|
||||
@UserPermission
|
||||
@PostMapping(value = "/pay")
|
||||
public R pay(@RequestBody @Validated CreateOrderParam param) {
|
||||
|
||||
-8
@@ -10,8 +10,6 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.thirdparty.chengduhipay.model.PaymentData;
|
||||
import com.ruoyi.thirdparty.chengduhipay.service.ChengduHipayPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -28,7 +26,6 @@ import java.util.Map;
|
||||
* GET /api/chengduhipay/queryPay —— 查询充值订单
|
||||
* GET /api/chengduhipay/balance —— 查询商户余额
|
||||
*/
|
||||
@Api(tags = "成都Hipay充值")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/chengduhipay")
|
||||
@@ -44,7 +41,6 @@ public class ChengduHipayController {
|
||||
* 创建充值订单
|
||||
* 对应API文档2.1节:POST /pay/pay/createpay
|
||||
*/
|
||||
@ApiOperation("创建充值订单")
|
||||
@UserPermission
|
||||
// @PostMapping("/pay")
|
||||
public R pay(@RequestBody @Validated PayRequest param) {
|
||||
@@ -63,7 +59,6 @@ public class ChengduHipayController {
|
||||
* 通用返回格式: {"code":1, "msg":"success", "data":"{...}"}
|
||||
* data字段为JSON字符串,需要反序列化
|
||||
*/
|
||||
@ApiOperation("充值回调通知")
|
||||
@Anonymous
|
||||
// @PostMapping("/notify")
|
||||
public String notify(@RequestBody Map<String, String> params) {
|
||||
@@ -77,7 +72,6 @@ public class ChengduHipayController {
|
||||
* 前端轮询逻辑建议:每 2~3 秒调一次,最多 60 秒,遇到 success=true 即弹出“充值成功”并刷新余额。
|
||||
* @param param 请求体,包含创建充值接口返回的本地订单号 orderId
|
||||
*/
|
||||
@ApiOperation("查询本地订单支付状态")
|
||||
@UserPermission
|
||||
@PostMapping("/orderStatus")
|
||||
public R<Map<String, Object>> orderStatus(@RequestBody @Validated OrderStatusRequest param) {
|
||||
@@ -90,7 +84,6 @@ public class ChengduHipayController {
|
||||
* 对应API文档2.3节:GET /pay/pay/getpay
|
||||
* @param Id Hipay平台返回的订单唯一编号
|
||||
*/
|
||||
@ApiOperation("查询充值订单")
|
||||
@GetMapping("/queryPay")
|
||||
public R<PaymentData> queryPay(@RequestParam String Id) {
|
||||
return chengduHipayPaymentService.getPay(Id);
|
||||
@@ -100,7 +93,6 @@ public class ChengduHipayController {
|
||||
* 查询商户余额
|
||||
* 对应API文档4节:GET /pay/pay/getbalance
|
||||
*/
|
||||
@ApiOperation("查询商户余额")
|
||||
@GetMapping("/balance")
|
||||
public R<String> balance() {
|
||||
return chengduHipayPaymentService.getBalance();
|
||||
|
||||
-4
@@ -2,8 +2,6 @@ package com.ruoyi.thirdparty.common.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.thirdparty.common.service.ApiCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -12,7 +10,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Api(tags = "第三方公共接口")
|
||||
@RestController
|
||||
@RequestMapping("/api/thirdparty/common")
|
||||
public class ApiCommonController {
|
||||
@@ -23,7 +20,6 @@ public class ApiCommonController {
|
||||
this.commonService = commonService;
|
||||
}
|
||||
|
||||
@ApiOperation("生成二维码")
|
||||
@PostMapping("/skipLinkToQRCode")
|
||||
public R<Object> skipLinkToQRCode(HttpServletResponse response, @RequestParam("contents") String contents) throws IOException {
|
||||
return commonService.writerPayImage(response, contents);
|
||||
|
||||
-5
@@ -11,8 +11,6 @@ import com.ruoyi.domain.common.constant.PayOrderStatus;
|
||||
import com.ruoyi.domain.dto.recharge.RechargeConfigOrderVo;
|
||||
import com.ruoyi.domain.entity.TtOrder;
|
||||
import com.ruoyi.domain.entity.TtRechargeConfig;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -26,7 +24,6 @@ import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Api(tags = "充值配置接口")
|
||||
@RestController
|
||||
@RequestMapping("/api/recharge/config")
|
||||
public class ApiRechargeConfigController extends BaseController {
|
||||
@@ -37,7 +34,6 @@ public class ApiRechargeConfigController extends BaseController {
|
||||
@Autowired
|
||||
private TtOrderService ttOrderService;
|
||||
|
||||
@ApiOperation("充值结果列表")
|
||||
@PostMapping("/order")
|
||||
public R<List<RechargeConfigOrderVo>> order() {
|
||||
startPage();
|
||||
@@ -72,7 +68,6 @@ public class ApiRechargeConfigController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("充值列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<TtRechargeConfig>> list() {
|
||||
startPage();
|
||||
|
||||
-6
@@ -29,8 +29,6 @@ import com.ruoyi.thirdparty.common.service.PayFrequencyGuard;
|
||||
import com.ruoyi.thirdparty.abkpay.service.AbkPayPaymentService;
|
||||
import com.ruoyi.thirdparty.itpay.service.ItPayPaymentService;
|
||||
import com.ruoyi.thirdparty.snappay.service.SnapPayPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -42,7 +40,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags = "充值")
|
||||
@RestController
|
||||
@RequestMapping("/api/recharge")
|
||||
public class ApiRechargeController extends BaseController {
|
||||
@@ -86,7 +83,6 @@ public class ApiRechargeController extends BaseController {
|
||||
this.payFrequencyGuard = payFrequencyGuard;
|
||||
}
|
||||
|
||||
@ApiOperation("卡支付")
|
||||
@UpdateUserCache
|
||||
@RateLimiter(time = 60, count = 30, limitType = LimitType.IP)
|
||||
@PostMapping("/cardPay")
|
||||
@@ -124,7 +120,6 @@ public class ApiRechargeController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("充值列表")
|
||||
// @UpdateUserCache
|
||||
@Anonymous
|
||||
@PostMapping("/list")
|
||||
@@ -159,7 +154,6 @@ public class ApiRechargeController extends BaseController {
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
@ApiOperation("统一充值下单(按权重分配支付公司)")
|
||||
@UserPermission
|
||||
@PostMapping("/unifiedPay")
|
||||
public R unifiedPay(@RequestBody UnifiedPayRequest request) {
|
||||
|
||||
+2
-28
@@ -8,17 +8,13 @@ import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.thirdparty.common.model.ApiSmsBody;
|
||||
import com.ruoyi.thirdparty.common.model.ApiSmsNoSliderBody;
|
||||
import com.ruoyi.thirdparty.common.service.ApiSmsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "短信")
|
||||
@RestController
|
||||
@RequestMapping("/api/sms")
|
||||
public class ApiSmsController extends BaseController {
|
||||
@@ -35,7 +31,6 @@ public class ApiSmsController extends BaseController {
|
||||
this.apiSmsService = apiSmsService;
|
||||
}
|
||||
|
||||
@ApiOperation("获取短信验证码")
|
||||
@Anonymous
|
||||
@PostMapping("/getVerifyCode")
|
||||
public R<Object> getVerifyCode(@RequestBody ApiSmsBody smsBody) {
|
||||
@@ -56,6 +51,8 @@ public class ApiSmsController extends BaseController {
|
||||
if (StringUtils.isEmpty(storedCaptchaId) || !storedCaptchaId.equals(captchaId)) {
|
||||
return R.fail("滑块验证已过期或无效,请重新验证");
|
||||
}
|
||||
// 一次性消费:同一个 captchaId 在 5 分钟有效期内只能换一条短信,否则可重放刷短信
|
||||
redisCache.deleteObject(verifiedKey);
|
||||
|
||||
String msg = apiSmsService.getVerifyCode(smsBody);
|
||||
if (StringUtils.isNotEmpty(msg)) {
|
||||
@@ -67,27 +64,4 @@ public class ApiSmsController extends BaseController {
|
||||
}
|
||||
return R.ok("获取验证码成功,请注意短信通知!");
|
||||
}
|
||||
|
||||
@ApiOperation("获取短信验证码(免滑块)")
|
||||
@Anonymous
|
||||
@PostMapping("/getVerifyCodeNoSlider")
|
||||
public R<Object> getVerifyCodeNoSlider(@RequestBody ApiSmsNoSliderBody body) {
|
||||
String websiteMaintenance = sysConfigService.selectConfigByKey("websiteMaintenance");
|
||||
if ("1".equals(websiteMaintenance)) {
|
||||
return R.fail("网站维护中......");
|
||||
}
|
||||
|
||||
// 不校验滑块,直接发送验证码;适配 service 层入参不含 captchaId
|
||||
ApiSmsBody smsBody = new ApiSmsBody();
|
||||
smsBody.setPhoneNumber(body.getPhoneNumber());
|
||||
smsBody.setType(body.getType());
|
||||
String msg = apiSmsService.getVerifyCode(smsBody);
|
||||
if (StringUtils.isNotEmpty(msg)) {
|
||||
if (msg.contains("次数") || msg.contains("余额") || msg.contains("不足")) {
|
||||
return R.fail(999, "短信发送次数不足");
|
||||
}
|
||||
return R.fail(msg);
|
||||
}
|
||||
return R.ok("获取验证码成功,请注意短信通知!");
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -8,8 +8,6 @@ import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.thirdparty.common.service.DeliverGoodsService;
|
||||
import com.ruoyi.thirdparty.zbt.param.ProductListParams;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -17,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "管理端发货管理")
|
||||
@RestController
|
||||
@RequestMapping("/admin/deliverGoods")
|
||||
public class DeliverGoodsController extends BaseController {
|
||||
@@ -38,14 +35,12 @@ public class DeliverGoodsController extends BaseController {
|
||||
}
|
||||
|
||||
// 获取饰品在各个平台的在售信息
|
||||
@ApiOperation("获取饰品在各个平台的在售信息")
|
||||
@PostMapping("/getAvailableMarketList")
|
||||
public R getAvailableMarketList(@RequestBody GetAvailableMarketListParam param) {
|
||||
return deliverGoodsService.getAvailableMarketList(param);
|
||||
}
|
||||
|
||||
// 根据饰品hashName获取所有平台的在售列表(弃用接口)
|
||||
@ApiOperation("根据饰品hashName获取所有平台的在售列表(弃用接口)")
|
||||
@GetMapping("/getAvailableMarketListByHashName/{marketHashName}")
|
||||
public R<List<AvailableMarketOrnamentVO>> getAvailableMarketListByHashName(@PathVariable("marketHashName") String marketHashName,
|
||||
ProductListParams productListParams) {
|
||||
@@ -54,26 +49,22 @@ public class DeliverGoodsController extends BaseController {
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@ApiOperation("购买发货")
|
||||
@PostMapping("/tradeBuy")
|
||||
public R tradeBuy(@RequestBody TradeBuyParam param) {
|
||||
return deliverGoodsService.tradeBuy(param);
|
||||
}
|
||||
|
||||
@ApiOperation("手动确认发货")
|
||||
@PostMapping("/tradeConfirm")
|
||||
public R tradeConfirm(@RequestBody TradeManualConfirmParam param) {
|
||||
return deliverGoodsService.tradeConfirm(param);
|
||||
}
|
||||
|
||||
@ApiOperation("同步状态")
|
||||
@GetMapping("/synchronousStatus")
|
||||
public R<Boolean> synchronousStatus(String outTradeNo) {
|
||||
String msg = deliverGoodsService.synchronousStatus(outTradeNo);
|
||||
return StringUtils.isEmpty(msg) ? R.ok(true, "同步成功!") : R.fail(false, msg);
|
||||
}
|
||||
|
||||
@ApiOperation("一键同步状态")
|
||||
@GetMapping("/syncAllStatus")
|
||||
public R syncAllStatus() {
|
||||
int row = deliverGoodsService.syncAllStatus();
|
||||
|
||||
Vendored
-4
@@ -1,15 +1,11 @@
|
||||
package com.ruoyi.thirdparty.common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiSmsBody {
|
||||
private String phoneNumber;
|
||||
@ApiModelProperty("1注册 2登录 3更换手机号 4找回密码 5实名认证")
|
||||
private String type;
|
||||
@ApiModelProperty("滑块验证码ID")
|
||||
private String captchaId;
|
||||
@ApiModelProperty("上级邀请码(推广后台登录:手机号未注册时用它校验是否可自动注册为主播)")
|
||||
private String parentInvitationCode;
|
||||
}
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.ruoyi.thirdparty.common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 免滑块短信验证码请求体(不含 captchaId)
|
||||
*/
|
||||
@Data
|
||||
public class ApiSmsNoSliderBody {
|
||||
@ApiModelProperty("手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
@ApiModelProperty("1注册 2登录 3更换手机号 4找回密码 5实名认证")
|
||||
private String type;
|
||||
}
|
||||
-3
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.thirdparty.common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,9 +11,7 @@ public class UnifiedPayRequest {
|
||||
@NotNull(message = "商品id不能为空")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty("支付方式:1=支付宝,2=银联")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("1:原有支付,2:图片支付")
|
||||
private Integer payWay = 1;
|
||||
}
|
||||
|
||||
+33
-19
@@ -57,6 +57,9 @@ public class ApiSmsServiceImpl implements ApiSmsService {
|
||||
private static final int SMS_RATE_LIMIT_MAX_COUNT = 3;
|
||||
private static final int SMS_RATE_LIMIT_MINUTES = 10;
|
||||
|
||||
/** 单个验证码试错上限:4 位码不设上限可被穷举,超过即作废重发 */
|
||||
private static final int CAPTCHA_MAX_ATTEMPTS = 5;
|
||||
|
||||
@Override
|
||||
public String getVerifyCode(ApiSmsBody smsBody) {
|
||||
String phoneNumber = smsBody.getPhoneNumber();
|
||||
@@ -71,12 +74,7 @@ public class ApiSmsServiceImpl implements ApiSmsService {
|
||||
if (!Validator.isMobile(phoneNumber)) {
|
||||
return "手机号格式错误,请检查手机号是否输入正确!";
|
||||
}
|
||||
// 频率限制:同一手机号 10 分钟内最多发送 3 次(不限类型,防止跨类型刷短信)
|
||||
String rateLimitKey = "sms:rate_limit:" + phoneNumber;
|
||||
Integer sendCount = redisCache.getCacheObject(rateLimitKey);
|
||||
if (sendCount != null && sendCount >= SMS_RATE_LIMIT_MAX_COUNT) {
|
||||
return "操作过于频繁,请" + SMS_RATE_LIMIT_MINUTES + "分钟后再试";
|
||||
}
|
||||
// 手机号格式错误、无权限这类校验不占发送额度,额度只在真正要发短信时扣
|
||||
if ("1".equals(type) && !userService.checkPhoneUnique(TtUser.builder().phoneNumber(phoneNumber).build())) {
|
||||
return "手机号'" + phoneNumber + "'已被注册!";
|
||||
}
|
||||
@@ -100,6 +98,16 @@ public class ApiSmsServiceImpl implements ApiSmsService {
|
||||
if (StringUtils.isNotEmpty(cacheCode)) {
|
||||
return "验证码已发送,请注意手机短信信息!";
|
||||
}
|
||||
// 频率限制:同一手机号 10 分钟内最多发送 3 次(不限类型,防止跨类型刷短信)。
|
||||
// 用 Redis INCR 原子扣额度:读-改-写会被并发点两下绕过(两端都读到 2,各写 3,实发 4 条)
|
||||
String rateLimitKey = "sms:rate_limit:" + phoneNumber;
|
||||
Long sendCount = redisCache.redisTemplate.opsForValue().increment(rateLimitKey);
|
||||
if (sendCount != null && sendCount == 1L) {
|
||||
redisCache.expire(rateLimitKey, SMS_RATE_LIMIT_MINUTES, TimeUnit.MINUTES);
|
||||
}
|
||||
if (sendCount != null && sendCount > SMS_RATE_LIMIT_MAX_COUNT) {
|
||||
return "操作过于频繁,请" + SMS_RATE_LIMIT_MINUTES + "分钟后再试";
|
||||
}
|
||||
String randomCode = RandomUtil.randomNumbers(4);
|
||||
// 网易云信
|
||||
// String code = yunXinNoteService.sendNote(phoneNumber, randomCode);
|
||||
@@ -128,24 +136,30 @@ public class ApiSmsServiceImpl implements ApiSmsService {
|
||||
// if (!"000".equals(code)) {
|
||||
// return "发送短信验证码时出现异常!";
|
||||
// }
|
||||
// 更新发送频率计数(保留剩余 TTL,避免重置窗口)
|
||||
if (sendCount == null) {
|
||||
redisCache.setCacheObject(rateLimitKey, 1, SMS_RATE_LIMIT_MINUTES, TimeUnit.MINUTES);
|
||||
} else {
|
||||
long remainTtl = redisCache.getExpire(rateLimitKey);
|
||||
redisCache.setCacheObject(rateLimitKey, sendCount + 1,
|
||||
remainTtl > 0 ? (int) remainTtl : SMS_RATE_LIMIT_MINUTES * 60, TimeUnit.SECONDS);
|
||||
}
|
||||
// 发送额度已在上面原子扣减(撞额度上限时已提前 return),这里只写验证码
|
||||
redisCache.setCacheObject(verifyKey, randomCode, 5, TimeUnit.MINUTES);
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String validateCaptcha(String code, String verifyKey) {
|
||||
verifyKey = CacheConstants.CAPTCHA_CODE_KEY + verifyKey;
|
||||
String captcha = redisCache.getCacheObject(verifyKey);
|
||||
if (!code.equalsIgnoreCase(captcha)) return "验证码错误";
|
||||
redisCache.deleteObject(verifyKey);
|
||||
return "success";
|
||||
String codeKey = CacheConstants.CAPTCHA_CODE_KEY + verifyKey;
|
||||
String attemptKey = codeKey + ":fail";
|
||||
String captcha = redisCache.getCacheObject(codeKey);
|
||||
if (code != null && code.equalsIgnoreCase(captcha)) {
|
||||
redisCache.deleteObject(codeKey);
|
||||
redisCache.deleteObject(attemptKey);
|
||||
return "success";
|
||||
}
|
||||
Integer attempts = redisCache.getCacheObject(attemptKey);
|
||||
int fails = (attempts == null ? 0 : attempts) + 1;
|
||||
if (fails >= CAPTCHA_MAX_ATTEMPTS) {
|
||||
// 试错超限:作废验证码,必须重新获取
|
||||
redisCache.deleteObject(codeKey);
|
||||
redisCache.deleteObject(attemptKey);
|
||||
return "验证码错误次数过多,请重新获取验证码";
|
||||
}
|
||||
redisCache.setCacheObject(attemptKey, fails, 5, TimeUnit.MINUTES);
|
||||
return "验证码错误";
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import com.ruoyi.thirdparty.zbt.param.SearchParams;
|
||||
import com.ruoyi.thirdparty.zbt.result.ResultZbt;
|
||||
import com.ruoyi.thirdparty.zbt.result.product.SearchData;
|
||||
import com.ruoyi.thirdparty.zbt.service.ZBTService;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
-4
@@ -9,8 +9,6 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.gfht.service.GfhtService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -18,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "国富汇通")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/gfht")
|
||||
@@ -30,7 +27,6 @@ public class GfhtController extends BaseController {
|
||||
@Autowired
|
||||
private GfhtService gfhtService;
|
||||
|
||||
@ApiOperation("支付")
|
||||
@UserPermission
|
||||
@PostMapping(value = "/pay")
|
||||
public R pay(@RequestBody @Validated CreateOrderParam param) {
|
||||
|
||||
-4
@@ -9,8 +9,6 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.hipay.service.HipayPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -18,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/hipay")
|
||||
@@ -30,7 +27,6 @@ public class HiPayController {
|
||||
@Autowired
|
||||
private HipayPaymentService hipayPaymentService;
|
||||
|
||||
@ApiOperation("支付")
|
||||
@UserPermission
|
||||
// @PostMapping(value = "/pay")
|
||||
public R pay(@RequestBody @Validated PayRequest param) {
|
||||
|
||||
skins-service/service-thirdparty/src/main/java/com/ruoyi/thirdparty/hipay/controller/PayRequest.java
Vendored
-3
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.thirdparty.hipay.controller;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -14,9 +13,7 @@ public class PayRequest {
|
||||
@Min(value = 1, message = "最小值1")
|
||||
private Integer goodsNum;
|
||||
|
||||
@ApiModelProperty("1:支付宝1 2:支付宝2")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("1:原有支付,2:图片支付")
|
||||
private Integer payWay = 1;
|
||||
}
|
||||
|
||||
-7
@@ -12,8 +12,6 @@ import com.ruoyi.thirdparty.chengduhipay.controller.PayRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayResponse;
|
||||
import com.ruoyi.thirdparty.itpay.model.ItPayCreateResult;
|
||||
import com.ruoyi.thirdparty.itpay.service.ItPayPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -29,7 +27,6 @@ import java.util.Map;
|
||||
* orderStatus —— 查询本地订单支付状态(供前端轮询)
|
||||
* queryPay —— 主动查询平台订单
|
||||
*/
|
||||
@Api(tags = "itpay充值")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/itpay")
|
||||
@@ -44,7 +41,6 @@ public class ItPayController {
|
||||
/**
|
||||
* 创建充值订单
|
||||
*/
|
||||
@ApiOperation("创建充值订单")
|
||||
@UserPermission
|
||||
// @PostMapping("/pay")
|
||||
public R<PayResponse> pay(@RequestBody @Validated PayRequest param) {
|
||||
@@ -61,7 +57,6 @@ public class ItPayController {
|
||||
* 平台订单成功或失败都会回调,商户须返回字符串 "success"。
|
||||
* 处理失败(验签失败/订单不存在等)返回非 success,促使平台重推。
|
||||
*/
|
||||
@ApiOperation("充值回调通知")
|
||||
@Anonymous
|
||||
@PostMapping("/notify")
|
||||
@ResponseBody
|
||||
@@ -78,7 +73,6 @@ public class ItPayController {
|
||||
/**
|
||||
* 查询本地订单支付状态(供前端轮询)
|
||||
*/
|
||||
@ApiOperation("查询本地订单支付状态")
|
||||
@UserPermission
|
||||
@PostMapping("/orderStatus")
|
||||
public R<Map<String, Object>> orderStatus(@RequestBody @Validated OrderStatusRequest param) {
|
||||
@@ -89,7 +83,6 @@ public class ItPayController {
|
||||
/**
|
||||
* 主动查询平台订单
|
||||
*/
|
||||
@ApiOperation("查询充值订单")
|
||||
@GetMapping("/queryPay")
|
||||
public R<ItPayCreateResult> queryPay(@RequestParam String merOrderTid) {
|
||||
return itPayPaymentService.queryPay(merOrderTid);
|
||||
|
||||
-5
@@ -9,14 +9,11 @@ import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.thirdparty.jiujia.domain.CallbackBody;
|
||||
import com.ruoyi.thirdparty.jiujia.service.JiuJiaPayService;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "九嘉支付")
|
||||
@RestController
|
||||
@RequestMapping("/api/jiuJiaPay")
|
||||
public class JiuJiaPayController extends BaseController {
|
||||
@@ -34,14 +31,12 @@ public class JiuJiaPayController extends BaseController {
|
||||
}
|
||||
|
||||
// TODO: 2024/4/11 要修改!!!
|
||||
@ApiOperation("回滚")
|
||||
@Anonymous
|
||||
@PostMapping("/callback")
|
||||
public String callback(@RequestBody CallbackBody callbackBody) {
|
||||
return jiuJiaPayService.callback(callbackBody);
|
||||
}
|
||||
|
||||
@ApiOperation("九嘉预下单")
|
||||
@PostMapping("/createPay")
|
||||
public R<Object> createPay(@RequestBody CreateOrderParam createOrderBody) {
|
||||
String websiteMaintenance = sysConfigService.selectConfigByKey("websiteMaintenance");
|
||||
|
||||
-8
@@ -12,8 +12,6 @@ import com.ruoyi.thirdparty.chengduhipay.controller.OrderStatusRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayResponse;
|
||||
import com.ruoyi.thirdparty.richku.service.RichKuPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -27,7 +25,6 @@ import java.util.Map;
|
||||
/**
|
||||
* RichKu 充值接口
|
||||
*/
|
||||
@Api(tags = "RichKu充值")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/richku")
|
||||
@@ -42,7 +39,6 @@ public class RichKuController {
|
||||
/**
|
||||
* 创建充值订单
|
||||
*/
|
||||
@ApiOperation("创建充值订单")
|
||||
@UserPermission
|
||||
// @PostMapping("/pay")
|
||||
public R<PayResponse> pay(@RequestBody @Validated PayRequest param, HttpServletRequest request) {
|
||||
@@ -60,7 +56,6 @@ public class RichKuController {
|
||||
* RichKu 平台在用户支付成功后通过 x-www-form-urlencoded 方式 POST 通知
|
||||
* 必须返回纯文本 "OK"
|
||||
*/
|
||||
@ApiOperation("充值回调通知")
|
||||
@Anonymous
|
||||
@PostMapping(value = "/notify", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
||||
@ResponseBody
|
||||
@@ -76,7 +71,6 @@ public class RichKuController {
|
||||
/**
|
||||
* 查询本地订单支付状态(供前端轮询)
|
||||
*/
|
||||
@ApiOperation("查询本地订单支付状态")
|
||||
@UserPermission
|
||||
@PostMapping("/orderStatus")
|
||||
public R<Map<String, Object>> orderStatus(@RequestBody @Validated OrderStatusRequest param) {
|
||||
@@ -87,7 +81,6 @@ public class RichKuController {
|
||||
/**
|
||||
* 查询外部订单
|
||||
*/
|
||||
@ApiOperation("查询充值订单")
|
||||
@GetMapping("/queryPay")
|
||||
public R<Map<String, String>> queryPay(@RequestParam String orderId) {
|
||||
return richKuPaymentService.queryPay(orderId);
|
||||
@@ -96,7 +89,6 @@ public class RichKuController {
|
||||
/**
|
||||
* 查询商户余额
|
||||
*/
|
||||
@ApiOperation("查询商户余额")
|
||||
@GetMapping("/balance")
|
||||
public R<String> balance() {
|
||||
return richKuPaymentService.getBalance();
|
||||
|
||||
-7
@@ -12,8 +12,6 @@ import com.ruoyi.thirdparty.chengduhipay.controller.OrderStatusRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayRequest;
|
||||
import com.ruoyi.thirdparty.chengduhipay.controller.PayResponse;
|
||||
import com.ruoyi.thirdparty.snappay.service.SnapPayPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -35,7 +33,6 @@ import java.util.Map;
|
||||
* orderStatus —— 查询本地订单支付状态(供前端轮询)
|
||||
* queryPay —— 主动查询平台交易
|
||||
*/
|
||||
@Api(tags = "snappay充值")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/snappay")
|
||||
@@ -50,7 +47,6 @@ public class SnapPayController {
|
||||
/**
|
||||
* 创建充值订单(默认由统一充值路由调用)
|
||||
*/
|
||||
@ApiOperation("创建充值订单")
|
||||
@UserPermission
|
||||
@PostMapping("/pay")
|
||||
public R<PayResponse> pay(@RequestBody @Validated PayRequest param) {
|
||||
@@ -70,7 +66,6 @@ public class SnapPayController {
|
||||
* 交易进入终态时平台会回调,商户须返回字符串 "success"。
|
||||
* 处理失败(验签失败/订单不存在等)返回非 success,促使平台重推。
|
||||
*/
|
||||
@ApiOperation("充值回调通知")
|
||||
@Anonymous
|
||||
@PostMapping("/notify")
|
||||
@ResponseBody
|
||||
@@ -87,7 +82,6 @@ public class SnapPayController {
|
||||
/**
|
||||
* 查询本地订单支付状态(供前端轮询)
|
||||
*/
|
||||
@ApiOperation("查询本地订单支付状态")
|
||||
@UserPermission
|
||||
@PostMapping("/orderStatus")
|
||||
public R<Map<String, Object>> orderStatus(@RequestBody @Validated OrderStatusRequest param) {
|
||||
@@ -98,7 +92,6 @@ public class SnapPayController {
|
||||
/**
|
||||
* 主动查询平台交易(仅允许查询本人订单)
|
||||
*/
|
||||
@ApiOperation("查询充值订单")
|
||||
@UserPermission
|
||||
@GetMapping("/queryPay")
|
||||
public R<JSONObject> queryPay(@RequestParam String merchantOrderId) {
|
||||
|
||||
+2
-8
@@ -8,8 +8,6 @@ import com.ruoyi.thirdparty.wechat.domain.PayOrderParam;
|
||||
import com.ruoyi.thirdparty.wechat.service.ApiTokenService;
|
||||
import com.ruoyi.thirdparty.wechat.service.TianXinService;
|
||||
import com.ruoyi.thirdparty.wechat.utils.GetIpUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -19,7 +17,6 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUserId;
|
||||
|
||||
@Api(tags = "田心支付")
|
||||
@RestController
|
||||
@RequestMapping("/api/tianxinOrder")
|
||||
public class TianXinController {
|
||||
@@ -36,9 +33,8 @@ public class TianXinController {
|
||||
this.ttUserService = ttUserService;
|
||||
}
|
||||
|
||||
@ApiOperation("预下单")
|
||||
@UserPermission
|
||||
@PostMapping("/createOrder")
|
||||
// [停用-前端零调用] @PostMapping("/createOrder")
|
||||
public AjaxResult createOrder(@RequestBody PayOrderParam param, HttpServletRequest request) {
|
||||
|
||||
// 判断是否开启田心支付
|
||||
@@ -58,14 +54,12 @@ public class TianXinController {
|
||||
// return tianXinService.createOrder(param, ttUser, ip);
|
||||
}
|
||||
|
||||
@ApiOperation("查询订单状态")
|
||||
@UserPermission
|
||||
@PostMapping(value = "/queryOrderStatus")
|
||||
// [停用-前端零调用] @PostMapping(value = "/queryOrderStatus")
|
||||
public AjaxResult queryOrderStatus(String sdorderno) {
|
||||
return tianXinService.queryOrderStatus(sdorderno);
|
||||
}
|
||||
|
||||
@ApiOperation("回调")
|
||||
// @RequestMapping(value = "/callBack")
|
||||
public String returnCallBack(HttpServletRequest request) {
|
||||
return tianXinService.callBack(request);
|
||||
|
||||
-4
@@ -9,8 +9,6 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.thirdparty.xinghuopay.service.XinghuoPayService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -18,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "XinghuoPay")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/xinghuopay")
|
||||
@@ -30,7 +27,6 @@ public class XinghuoPayController extends BaseController {
|
||||
@Autowired
|
||||
private XinghuoPayService xinghuoService;
|
||||
|
||||
@ApiOperation("支付")
|
||||
@UserPermission
|
||||
@PostMapping(value = "/pay")
|
||||
public R pay(@RequestBody @Validated CreateOrderParam param) {
|
||||
|
||||
-9
@@ -10,8 +10,6 @@ import com.ruoyi.domain.entity.TtOrnamentsYY;
|
||||
import com.ruoyi.thirdparty.yyyouping.service.yyyoupingService;
|
||||
import com.ruoyi.thirdparty.yyyouping.utils.YYClient;
|
||||
import com.ruoyi.thirdparty.yyyouping.utils.common.YYResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -28,7 +26,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags = "YYYouPing")
|
||||
@RestController
|
||||
@RequestMapping("api/yyyouping")
|
||||
public class yyyoupingController {
|
||||
@@ -49,7 +46,6 @@ public class yyyoupingController {
|
||||
private TtOrnamentYYService ttOrnamentYYService;
|
||||
|
||||
// 加载平台的饰品数据
|
||||
@ApiOperation("加载平台的饰品数据")
|
||||
@GetMapping("loadData")
|
||||
public R loadData(){
|
||||
// 读json
|
||||
@@ -62,7 +58,6 @@ public class yyyoupingController {
|
||||
}
|
||||
|
||||
// 通过此接口可获取悠悠有品所有商品对应的模板ID的下载链接。
|
||||
@ApiOperation("查询模板ID下载链接")
|
||||
@GetMapping("yyApiTemplateQuery")
|
||||
public R yyApiTemplateQuery(){
|
||||
YYResult yyResult = yyyoupingService.yyApiTemplateQuery(new HashMap<>());
|
||||
@@ -70,14 +65,12 @@ public class yyyoupingController {
|
||||
return R.ok(yyResult);
|
||||
}
|
||||
|
||||
@ApiOperation("查询商品列表")
|
||||
@PostMapping("yyApiGoodsQuery")
|
||||
public R yyApiGoodsQuery(@RequestBody Map<String,Object> map){
|
||||
yyyoupingService.yyApiGoodsQuery(map);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("余额查询")
|
||||
@PostMapping("yyApiGetAssetsInfo")
|
||||
public R yyApiGetAssetsInfo(){
|
||||
YYResult yyResult = yyyoupingService.yyApiGetAssetsInfo();
|
||||
@@ -85,7 +78,6 @@ public class yyyoupingController {
|
||||
return R.ok(yyResult);
|
||||
}
|
||||
|
||||
@ApiOperation("批量查询模板饰品的在售列表")
|
||||
@PostMapping("/yyApiBatchGetOnSaleCommodityInfo")
|
||||
public R balance(@RequestBody List<String> ids) {
|
||||
ArrayList<Object> list = new ArrayList<>();
|
||||
@@ -100,7 +92,6 @@ public class yyyoupingController {
|
||||
return R.ok(yyResult);
|
||||
}
|
||||
|
||||
@ApiOperation("按类别查询模板销售")
|
||||
@GetMapping("/yyApiQueryTemplateSaleByCategory")
|
||||
public R yyApiQueryTemplateSaleByCategory() throws Exception {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ import com.ruoyi.thirdparty.yyyouping.config.YYConfig;
|
||||
import com.ruoyi.thirdparty.yyyouping.service.yyyoupingService;
|
||||
import com.ruoyi.thirdparty.yyyouping.utils.common.RSAUtils;
|
||||
import com.ruoyi.thirdparty.yyyouping.utils.common.YYResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
-5
@@ -8,14 +8,11 @@ import com.ruoyi.thirdparty.zbt.result.user.BusinessData;
|
||||
import com.ruoyi.thirdparty.zbt.result.user.UserAccountModel;
|
||||
import com.ruoyi.thirdparty.zbt.service.ZBTService;
|
||||
import com.ruoyi.thirdparty.zbt.util.ZBTUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "扎比特")
|
||||
@RestController
|
||||
@RequestMapping
|
||||
public class ZBTController {
|
||||
@@ -26,7 +23,6 @@ public class ZBTController {
|
||||
this.zbtService = zbtService;
|
||||
}
|
||||
|
||||
@ApiOperation("管理端查询用户余额")
|
||||
@GetMapping("/admin/zbt/balance")
|
||||
public R<UserAccountModel> balance() {
|
||||
ResultZbt<UserAccountModel> balance = zbtService.balance();
|
||||
@@ -34,7 +30,6 @@ public class ZBTController {
|
||||
return R.fail("用户余额查询失败");
|
||||
}
|
||||
|
||||
@ApiOperation("管理端获取开发者信息")
|
||||
@GetMapping("/admin/zbt/developmentInfo")
|
||||
public R<BusinessData> developmentInfo() {
|
||||
ResultZbt<BusinessData> developmentInfo = zbtService.developmentInfo();
|
||||
|
||||
+3
-11
@@ -10,8 +10,6 @@ import com.ruoyi.domain.other.CreateOrderParam;
|
||||
import com.ruoyi.domain.entity.sys.TtUser;
|
||||
import com.ruoyi.thirdparty.zyZFB.config.ZYConfig;
|
||||
import com.ruoyi.thirdparty.zyZFB.service.zyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -24,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "中云支付宝")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/zyZFB")
|
||||
@@ -40,7 +37,6 @@ public class ZyController extends BaseController {
|
||||
private TtUserService userService;
|
||||
|
||||
// 下单
|
||||
@ApiOperation("预下单接口")
|
||||
@PostMapping("/ApiAddTrans")
|
||||
@UpdateUserCache
|
||||
public R ApiAddTrans(HttpServletRequest request, CreateOrderParam param) {
|
||||
@@ -71,7 +67,6 @@ public class ZyController extends BaseController {
|
||||
}
|
||||
|
||||
// 支付回调
|
||||
@ApiOperation("支付回调")
|
||||
// @PostMapping("/addTransNotify")
|
||||
public String addTransNotify(PayNotifyData data) {
|
||||
log.info("支付回调 {}", JSONUtil.toJsonStr(data));
|
||||
@@ -79,22 +74,19 @@ public class ZyController extends BaseController {
|
||||
}
|
||||
|
||||
// 查询订单接口
|
||||
@ApiOperation("查询订单")
|
||||
@PostMapping("/ApiQueryTrans")
|
||||
// [停用-前端零调用] @PostMapping("/ApiQueryTrans")
|
||||
public String ApiQueryTrans(HttpServletRequest request, Map<String, String> param) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
// 代付接口
|
||||
@ApiOperation("代付")
|
||||
@PostMapping("/ApiPropayTrans")
|
||||
// [停用-前端零调用] @PostMapping("/ApiPropayTrans")
|
||||
public String ApiPropayTrans(HttpServletRequest request, Map<String, String> param) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
// 查询余额接口
|
||||
@ApiOperation("查询余额")
|
||||
@PostMapping("/ApiQueryBalancePHP")
|
||||
// [停用-前端零调用] @PostMapping("/ApiQueryBalancePHP")
|
||||
public String ApiQueryBalancePHP(HttpServletRequest request, Map<String, String> param) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user