添加接口防抖

This commit is contained in:
韩鹏辉
2024-06-14 14:24:14 +08:00
parent 6ab2a32c9f
commit ada1dafe86
5 changed files with 305 additions and 285 deletions

View File

@@ -1,6 +1,7 @@
package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit;
import com.chaozhanggui.system.cashierservice.service.PayService;
import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.IpUtil;
@@ -33,6 +34,7 @@ public class PayController {
* @return
*/
@RequestMapping("orderPay")
@LimitSubmit(key = "orderPay:%s")
public Result pay(HttpServletRequest request, @RequestHeader("openId") String openId, @RequestBody Map<String, String> map) {
if (ObjectUtil.isEmpty(map) || map.size() <= 0 || !map.containsKey("orderId") || ObjectUtil.isEmpty(map.get("orderId"))) {
return Result.fail("订单号不允许为空");
@@ -139,6 +141,7 @@ public class PayController {
* @return
*/
@RequestMapping("memeberIn")
@LimitSubmit(key = "memeberIn:%s")
public Result memeberIn(HttpServletRequest request, @RequestHeader("openId") String openId, @RequestHeader("id") String id,
@RequestBody Map<String, Object> map
) {