From dc3080f50c19b89b895e5c56baa53abbd8976464 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 03 Sep 2024 14:27:20 +0800
Subject: [PATCH] 1
---
src/main/java/com/nq/service/impl/UserPendingorderServiceImpl.java | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/nq/service/impl/UserPendingorderServiceImpl.java b/src/main/java/com/nq/service/impl/UserPendingorderServiceImpl.java
index f5637cb..3d476ab 100644
--- a/src/main/java/com/nq/service/impl/UserPendingorderServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserPendingorderServiceImpl.java
@@ -71,20 +71,20 @@
User user = this.iUserService.getCurrentRefreshUser(request);
if (user == null) {
- return ServerResponse.createByErrorMsg("Please log in first");
+ return ServerResponse.createByErrorMsg("Please log in first",request);
}
SiteSetting siteSetting = this.iSiteSettingService.getSiteSetting();
if (buyNum.intValue() < siteSetting.getBuyMinNum().intValue()) {
return ServerResponse.createByErrorMsg("The pending order failed, and the purchased quantity was less than" + siteSetting
- .getBuyMinNum() + "stocks");
+ .getBuyMinNum() + "stocks",request);
}
if (buyNum.intValue() > siteSetting.getBuyMaxNum().intValue()) {
return ServerResponse.createByErrorMsg("The pending order failed because the purchased quantity was greater than" + siteSetting
- .getBuyMaxNum() + "stocks");
+ .getBuyMaxNum() + "stocks",request);
}
UserPendingorder userPendingorder = userPendingorderMapper.selectOne(new QueryWrapper<UserPendingorder>().eq("user_id", user.getId()).eq("stock_id", stockId).eq("status", 0));
if (userPendingorder != null) {
- return ServerResponse.createByErrorMsg("Please do not repeat the order");
+ return ServerResponse.createByErrorMsg("Please do not repeat the order",request);
}
userPendingorder = new UserPendingorder();
@@ -101,9 +101,9 @@
userPendingorder.setStatus(0);
int ret = userPendingorderMapper.insert(userPendingorder);
if (ret > 0) {
- return ServerResponse.createBySuccessMsg("If the pending order is successfully added, the order will be automatically placed if the order conditions are met");
+ return ServerResponse.createBySuccessMsg("If the pending order is successfully added, the order will be automatically placed if the order conditions are met",request);
}
- return ServerResponse.createByErrorMsg("Add failure");
+ return ServerResponse.createByErrorMsg("Add failure",request);
}
@@ -296,19 +296,19 @@
User user = (User) JsonUtil.string2Obj(userJson, User.class);
UserPendingorder userPendingorder = this.userPendingorderMapper.selectById(id);
if (userPendingorder == null) {
- return ServerResponse.createByErrorMsg("The pending order does not exist");
+ return ServerResponse.createByErrorMsg("The pending order does not exist",request);
}
if (user.getId().intValue() != userPendingorder.getUserId().intValue()) {
- return ServerResponse.createByErrorMsg("The pending order does not belong to you");
+ return ServerResponse.createByErrorMsg("The pending order does not belong to you",request);
}
int delCount = this.userPendingorderMapper.deleteById(id);
if (delCount > 0) {
- return ServerResponse.createByErrorMsg("Successfully deleted");
+ return ServerResponse.createByErrorMsg("Successfully deleted",request);
}
- return ServerResponse.createByErrorMsg("Deletion failure");
+ return ServerResponse.createByErrorMsg("Deletion failure",request);
}
- return ServerResponse.createByErrorMsg("Please log in");
+ return ServerResponse.createByErrorMsg("Please log in",request);
}
--
Gitblit v1.9.3