From 79e82d188a24ad92395ac4b39c1a49266a647c3f Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 04 十二月 2024 15:44:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java | 4
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java | 4
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java | 4
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserBankMapper.java | 7
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 6
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java | 17
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserBankServiceImpl.java | 11
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java | 15
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java | 26 +
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java | 51 ++
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java | 19 +
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/AES.java | 0
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java | 3
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java | 109 +++---
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java | 5
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 4
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java | 2
ruoyi-service/ruoyi-order/pom.xml | 7
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipSettingServiceImpl.java | 40 ++
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/TaskUtil.java | 2
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java | 31 +
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java | 2
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/VipSettingService.java | 10
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java | 60 +++
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserBankService.java | 7
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java | 3
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java | 111 ++++++
.gitignore | 3
ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/order/account/RuoYiAccountApplicationTests.java | 0
ruoyi-service/ruoyi-account/pom.xml | 4
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java | 71 +++
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/CommissionService.java | 12
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/IndexConfigSetDto.java | 4
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java | 10
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java | 29 +
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java | 15
ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | 1
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java | 2
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml | 6
ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java | 39 ++
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WeChatUtil.java | 0
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java | 14
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java | 5
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java | 16
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/StartPageSetDto.java | 18 +
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java | 13
ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | 3
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WxPKCS7Encoder.java | 0
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java | 24 +
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java | 43 ++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java | 4
/dev/null | 8
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WXCore.java | 0
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java | 2
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java | 10
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java | 4
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java | 2
ruoyi-service/ruoyi-other/pom.xml | 6
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java | 72 +++
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java | 3
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java | 6
67 files changed, 857 insertions(+), 164 deletions(-)
diff --git a/.gitignore b/.gitignore
index 09e64c6..29f93e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,5 @@
*.yaml
*.yml
-*.log
\ No newline at end of file
+*.log
+*.iml
\ No newline at end of file
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java
index 050669a..c877f44 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.domain.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
@@ -22,7 +23,8 @@
public AppUserClient create(Throwable cause) {
return new AppUserClient() {
- @Override
+ @PostMapping("/appUser/getAppUserById")
+ @Override
public AppUser getAppUserById(Long id) {
log.error("根据id获取用户失败:{}", cause.getMessage());
throw new RuntimeException("根据id获取用户失败");
@@ -45,6 +47,19 @@
log.error("获取用户门店信息失败:{}", cause.getMessage());
throw new RuntimeException("获取用户门店信息失败");
}
+
+ @Override
+ public R<List<AppUser>> getUserAncestorList(Long id) {
+ log.error("获取用户祖籍列表失败:{}", cause.getMessage());
+ throw new RuntimeException("获取用户祖籍列表失败");
+ }
+ @Override
+ public R<Long> getVipCount(Long userId, Integer vipId) {
+ log.error("获取直推会员数失败:{}", cause.getMessage());
+ throw new RuntimeException("获取直推会员数失败");
+ }
+
+
};
}
}
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
index 57e4ac5..85d2b62 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -25,16 +25,16 @@
* @param id
* @return
*/
- @PostMapping("/appUser/getAppUserById")
+ @PostMapping("/app-user/getAppUserById")
AppUser getAppUserById(@RequestParam("id") Long id);
/**
* 根据id编辑用户
*/
- @PostMapping("/appUser/editAppUserById")
+ @PostMapping("/app-user/editAppUserById")
R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser);
- @PostMapping("/appUser/getCouponCount")
+ @PostMapping("/app-user/getCouponCount")
R<Long> getCouponCount(@RequestParam("userId")Long userId, @RequestParam("couponId") Integer couponId );
/**
@@ -43,4 +43,14 @@
@GetMapping("/appUserShop/shop/{userId}")
R<List<AppUserShop>> getAppUserShop(@PathVariable("userId") Long userId);
+ /**
+ * 根据用户id获取用户的祖籍列表
+ */
+ @GetMapping("/appletLogin/getUserAncestorList")
+ R<List<AppUser>> getUserAncestorList(@RequestParam("id") Long id);
+
+
+
+ @PostMapping("/app-user/getVipCount")
+ R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId );
}
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
index 63362a1..4914aad 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -148,11 +148,8 @@
@ApiModelProperty(value = "分销总金额")
@TableField("total_distribution_amount")
private BigDecimal totalDistributionAmount;
-
- @ApiModelProperty(value = "账户余额")
- @TableField("balance")
- private BigDecimal balance;
-
+
+
@ApiModelProperty(value = "剩余积分")
@TableField("lave_point")
private Integer lavePoint;
@@ -194,24 +191,31 @@
private String districtCode;
@ApiModelProperty("等级1会员数")
+ @TableField(exist = false)
private Long count1;
@ApiModelProperty("等级2会员数")
+ @TableField(exist = false)
private Long count2;
@ApiModelProperty("等级3会员数")
+ @TableField(exist = false)
private Long count3;
@ApiModelProperty("等级4会员数")
+ @TableField(exist = false)
private Long count4;
@ApiModelProperty("等级5会员数")
+ @TableField(exist = false)
private Long count5;
@ApiModelProperty("等级6会员数")
+ @TableField(exist = false)
private Long count6;
@ApiModelProperty("等级7会员数")
+ @TableField(exist = false)
private Long count7;
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
index 9792ae1..a3a839d 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
@@ -1,6 +1,7 @@
package com.ruoyi.account.api.model;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
@@ -47,4 +48,13 @@
@ApiModelProperty("添加时间")
private LocalDateTime createTime;
+
+ @TableField(exist = false)
+ @ApiModelProperty("消费用户名称")
+ private String userName;
+
+ @TableField(exist = false)
+ @ApiModelProperty("消费金额")
+ private BigDecimal amount;
+
}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java
new file mode 100644
index 0000000..d62e606
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java
@@ -0,0 +1,19 @@
+//package factory;
+//
+//import feignClient.RemoteOrderClient;
+//import org.springframework.cloud.openfeign.FallbackFactory;
+//import org.springframework.stereotype.Component;
+//
+///**
+// * 订单服务降级处理
+// * @author luofl
+// */
+//@Component
+//public class RemoteOrderFallbackFactory implements FallbackFactory<RemoteOrderClient> {
+//
+// @Override
+// public RemoteOrderClient create(Throwable cause) {
+// return new RemoteOrderClient() {
+// };
+// }
+//}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java
new file mode 100644
index 0000000..cb7c62f
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java
@@ -0,0 +1,31 @@
+package com.ruoyi.order.factory;
+
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
+import lombok.extern.slf4j.Slf4j;
+import com.ruoyi.order.model.Order;
+import com.ruoyi.order.model.OrderGood;
+import org.springframework.cloud.openfeign.FallbackFactory;
+
+import java.util.List;
+
+@Slf4j
+public class RemoteOrderGoodsFallbackFactory implements FallbackFactory<RemoteOrderGoodsClient> {
+ @Override
+ public RemoteOrderGoodsClient create(Throwable cause) {
+ return new RemoteOrderGoodsClient(){
+ @Override
+ public R<List<OrderGood>> goodsOrder(List<Long> goodsIds) {
+ log.error("获取订单商品失败:{}", cause.getMessage());
+ throw new RuntimeException("获取订单商品失败");
+ }
+
+ @Override
+ public R<List<Order>> getOrderListByIds(List<Long> orderIds) {
+ log.error("获取订单列表失败:{}", cause.getMessage());
+ throw new RuntimeException("获取订单列表失败");
+ }
+ };
+
+ }
+}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java
new file mode 100644
index 0000000..1bfdb19
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java
@@ -0,0 +1,24 @@
+//package feignClient;
+//
+//import com.ruoyi.common.core.constant.ServiceNameConstants;
+//import com.ruoyi.common.core.domain.R;
+//import factory.RemoteOrderFallbackFactory;
+//import model.Order;
+//import model.OrderGood;
+//import org.springframework.cloud.openfeign.FeignClient;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestParam;
+//
+//import java.util.List;
+//
+///**
+// * 订单远程调用接口
+// * @author luofl
+// */
+//@FeignClient(contextId = "RemoteOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class)
+//public interface RemoteOrderClient {
+//
+//
+//}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderGoodsClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java
similarity index 65%
rename from ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderGoodsClient.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java
index 95afd49..2a5b441 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderGoodsClient.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java
@@ -1,10 +1,11 @@
-package feignClient;
+package com.ruoyi.order.feignClient;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
-import factory.RemoteOrderGoodsFallbackFactory;
-import model.OrderGood;
+import com.ruoyi.order.factory.RemoteOrderGoodsFallbackFactory;
+import com.ruoyi.order.model.Order;
+import com.ruoyi.order.model.OrderGood;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -19,4 +20,10 @@
*/
@PostMapping("/order-good/selectGoodsOrder")
public R<List<OrderGood>> goodsOrder(@RequestBody List<Long> goodsIds);
+
+ /**
+ * 根据ids查找订单列表
+ */
+ @PostMapping("/order/getOrderListByIds")
+ public R<List<Order>> getOrderListByIds(@RequestBody List<Long> orderIds);
}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/model/Order.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java
similarity index 93%
rename from ruoyi-api/ruoyi-api-order/src/main/java/model/Order.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java
index 3497fd6..2f29822 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/model/Order.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java
@@ -1,4 +1,4 @@
-package model;
+package com.ruoyi.order.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -44,10 +44,18 @@
@TableField("order_status")
private Integer orderStatus;
+ @ApiModelProperty(value = "是否已分佣: 0-否 1-是")
+ @TableField("is_commission")
+ private Integer isCommission;
+
@ApiModelProperty(value = "核销时间")
@TableField("end_time")
private LocalDateTime endTime;
+ @ApiModelProperty(value = "售后截止日期")
+ @TableField("after_sale_time")
+ private LocalDateTime afterSaleTime;
+
@ApiModelProperty(value = "技师id")
@TableField("technician_id")
private Integer technicianId;
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/model/OrderGood.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
similarity index 98%
rename from ruoyi-api/ruoyi-api-order/src/main/java/model/OrderGood.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
index cc8495c..6379aa0 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/model/OrderGood.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
@@ -1,4 +1,4 @@
-package model;
+package com.ruoyi.order.model;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/model/RefundPass.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java
similarity index 98%
rename from ruoyi-api/ruoyi-api-order/src/main/java/model/RefundPass.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java
index 5781668..9f9db3d 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/model/RefundPass.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java
@@ -1,4 +1,4 @@
-package model;
+package com.ruoyi.order.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/model/ShoppingCart.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java
similarity index 96%
rename from ruoyi-api/ruoyi-api-order/src/main/java/model/ShoppingCart.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java
index 3029323..11b064f 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/model/ShoppingCart.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java
@@ -1,4 +1,4 @@
-package model;
+package com.ruoyi.order.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
similarity index 95%
rename from ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
index 2377c61..bf677d3 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
@@ -18,7 +18,7 @@
private List<OrderGoodsVO> goodsList;
@ApiModelProperty(value = "使用积分")
- private BigDecimal point;
+ private Integer point;
@ApiModelProperty(value = "收货地址id")
private Long addressId;
@@ -54,7 +54,7 @@
private BigDecimal expressAmount;
@ApiModelProperty(value = "可获得积分")
- private BigDecimal pointAmount;
+ private Integer pointAmount;
@ApiModelProperty(value = "实际支付价格")
private BigDecimal paymentAmount;
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java
similarity index 96%
rename from ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java
rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java
index e19f665..f733df3 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java
@@ -10,7 +10,7 @@
@ApiModel(value = "订单商品")
public class OrderGoodsVO {
@ApiModelProperty(value = "商品id")
- private Long goodsId;
+ private Integer goodsId;
@ApiModelProperty(value = "商品名称")
private String goodsName;
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java
deleted file mode 100644
index 031b643..0000000
--- a/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package factory;
-
-import feignClient.RemoteOrderClient;
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.springframework.stereotype.Component;
-
-/**
- * 订单服务降级处理
- * @author luofl
- */
-@Component
-public class RemoteOrderFallbackFactory implements FallbackFactory<RemoteOrderClient> {
-
- @Override
- public RemoteOrderClient create(Throwable cause) {
- return new RemoteOrderClient() {
- };
- }
-}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderGoodsFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderGoodsFallbackFactory.java
deleted file mode 100644
index d270ee6..0000000
--- a/ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderGoodsFallbackFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package factory;
-
-import com.ruoyi.common.core.domain.R;
-import feignClient.RemoteOrderGoodsClient;
-import lombok.extern.slf4j.Slf4j;
-import model.OrderGood;
-import org.springframework.cloud.openfeign.FallbackFactory;
-
-import java.util.List;
-
-@Slf4j
-public class RemoteOrderGoodsFallbackFactory implements FallbackFactory<RemoteOrderGoodsClient> {
- @Override
- public RemoteOrderGoodsClient create(Throwable cause) {
- return new RemoteOrderGoodsClient(){
- @Override
- public R<List<OrderGood>> goodsOrder(List<Long> goodsIds) {
- log.error("编辑用户信息失败:{}", cause.getMessage());
- throw new RuntimeException("编辑用户信息失败");
- }
- };
- }
-}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java
deleted file mode 100644
index 362df6f..0000000
--- a/ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package feignClient;
-
-import com.ruoyi.common.core.constant.ServiceNameConstants;
-import com.ruoyi.common.core.domain.R;
-import factory.RemoteOrderFallbackFactory;
-import model.Order;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-/**
- * 订单远程调用接口
- * @author luofl
- */
-@FeignClient(contextId = "RemoteOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class)
-public interface RemoteOrderClient {
-}
diff --git a/ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index e69de29..fa4f530 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+com.ruoyi.order.factory.RemoteOrderGoodsFallbackFactory
\ No newline at end of file
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java
index 5fbef93..d8c2d8a 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java
@@ -26,7 +26,7 @@
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "1:合伙人积分设置一 2:合伙人积分设置二 3:会员说明设置 4:活动管理-活动设置 1开0关")
+ @ApiModelProperty(value = "1:合伙人积分设置一 2:合伙人积分设置二 3:会员说明设置 4:活动管理-活动设置 1开0关 5:售后设置")
@TableId("id")
private Integer id;
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java
index 58d75bd..d01cb46 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java
@@ -55,6 +55,10 @@
@TableField("vip_withdrawal_min_amount")
private BigDecimal vipWithdrawalMinAmount;
+ @ApiModelProperty(value = "提现手续费")
+ @TableField("vip_withdrawal_fee")
+ private BigDecimal vipWithdrawalFee;
+
@ApiModelProperty(value = "积分转赠权限 1开0关")
@TableField("vip_gift_role")
private Integer vipGiftRole;
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/IndexConfigSetDto.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/IndexConfigSetDto.java
index 00a8f45..43238d6 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/IndexConfigSetDto.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/IndexConfigSetDto.java
@@ -11,8 +11,12 @@
private String pic1;
@ApiModelProperty("跳转类型1 - 1无2外部链接3商品详情4秒杀商品详情5领卷中心")
private Integer direct1;
+ @ApiModelProperty("跳转内容1")
+ private String content1;
@ApiModelProperty("宣传图片2")
private String pic2;
+ @ApiModelProperty("跳转内容2")
+ private String content2;
@ApiModelProperty("跳转类型2 - 1无2外部链接3商品详情4秒杀商品详情5领卷中心")
private String direct2;
@ApiModelProperty("公司简介")
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/StartPageSetDto.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/StartPageSetDto.java
new file mode 100644
index 0000000..0302abf
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/StartPageSetDto.java
@@ -0,0 +1,18 @@
+package com.ruoyi.other.api.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class StartPageSetDto {
+ @ApiModelProperty("启动页倒计时")
+ private Integer waitTime;
+ @ApiModelProperty("1图片2视频")
+ private Integer type;
+ @ApiModelProperty("对应文件地址")
+ private String url;
+
+
+
+
+}
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java
deleted file mode 100644
index 3fc2995..0000000
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ruoyi.other.api.factory;
-
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.api.feignClient.TechnicianClient;
-import org.springframework.cloud.openfeign.FallbackFactory;
-
-public class TechnicianClientFallbackFactory implements FallbackFactory<TechnicianClient> {
- @Override
- public TechnicianClient create(Throwable cause) {
- return new TechnicianClient() {
- @Override
- public R<Technician> shopdetail(Integer techId) {
- return R.fail("根据省市区获取地区价格配置失败:" + cause.getMessage());
- }
-
- @Override
- public R<Void> updateStatus(Integer status, Integer subscribeId) {
- return R.fail("跟新技师预约状态失败:" + cause.getMessage());
- }
- };
- }
-}
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java
index 7df1f05..d99075a 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/RemoteVipSettingClient.java
@@ -6,10 +6,11 @@
import com.ruoyi.other.api.factory.RemoteVipSettingFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
-@FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteVipSettingFallbackFactory.class)
+@FeignClient(contextId = "RemoteVipSettingClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = RemoteVipSettingFallbackFactory.class)
public interface RemoteVipSettingClient {
@GetMapping("/vip-setting/getVipSettingById")
- R<VipSetting> getVipSettingById(Integer id);
+ R<VipSetting> getVipSettingById(@RequestParam(value = "id",required = true) Integer id);
}
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java
index d340d35..da8b289 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java
@@ -13,8 +13,8 @@
public interface TechnicianClient {
@PostMapping("/technician/shop/detail")
- R<Technician> shopdetail(@RequestParam Integer techId);
+ R<Technician> shopdetail(@RequestParam("techId") Integer techId);
@PutMapping("/technician-subscribe/updateStatus")
- R<Void> updateStatus(@RequestParam Integer status, @RequestParam Integer subscribeId);
+ R<Void> updateStatus(@RequestParam("status") Integer status, @RequestParam("subscribeId") Integer subscribeId);
}
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/vo/GetGoodsShopByGoodsIds.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/vo/GetGoodsShopByGoodsIds.java
deleted file mode 100644
index 81a2f96..0000000
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/vo/GetGoodsShopByGoodsIds.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ruoyi.other.api.vo;
-
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author zhibing.pu
- * @Date 2024/12/2 10:18
- */
-@Data
-public class GetGoodsShopByGoodsIds {
- /**
- * 门店id
- */
- private Integer shopId;
- /**
- * 商品id集合
- */
- private List<Integer> goodsIds;
-}
diff --git a/ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index f665d51..1790609 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -11,4 +11,5 @@
com.ruoyi.other.api.factory.CouponInfoClientFallbackFactory
com.ruoyi.other.api.factory.SystemConfigClientFallbackFactory
com.ruoyi.other.api.factory.StoreFallbackFactory
-com.ruoyi.other.api.factory.CouponClientFallbackFactory
\ No newline at end of file
+com.ruoyi.other.api.factory.CouponClientFallbackFactory
+com.ruoyi.other.api.factory.TechnicianClientFallbackFactory
\ No newline at end of file
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java
deleted file mode 100644
index f77183a..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package com.ruoyi.common.core.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.math.BigDecimal;
-import org.apache.poi.ss.usermodel.HorizontalAlignment;
-import org.apache.poi.ss.usermodel.IndexedColors;
-import com.ruoyi.common.core.utils.poi.ExcelHandlerAdapter;
-
-/**
- * 自定义导出Excel数据注解
- *
- * @author ruoyi
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
-public @interface Excel
-{
- /**
- * 导出时在excel中排序
- */
- public int sort() default Integer.MAX_VALUE;
-
- /**
- * 导出到Excel中的名字.
- */
- public String name() default "";
-
- /**
- * 日期格式, 如: yyyy-MM-dd
- */
- public String dateFormat() default "";
-
- /**
- * 读取内容转表达式 (如: 0=男,1=女,2=未知)
- */
- public String readConverterExp() default "";
-
- /**
- * 分隔符,读取字符串组内容
- */
- public String separator() default ",";
-
- /**
- * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
- */
- public int scale() default -1;
-
- /**
- * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
- */
- public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
-
- /**
- * 导出时在excel中每个列的高度 单位为字符
- */
- public double height() default 14;
-
- /**
- * 导出时在excel中每个列的宽 单位为字符
- */
- public double width() default 16;
-
- /**
- * 文字后缀,如% 90 变成90%
- */
- public String suffix() default "";
-
- /**
- * 当值为空时,字段的默认值
- */
- public String defaultValue() default "";
-
- /**
- * 提示信息
- */
- public String prompt() default "";
-
- /**
- * 设置只能选择不能输入的列内容.
- */
- public String[] combo() default {};
-
- /**
- * 是否需要纵向合并单元格,应对需求:含有list集合单元格)
- */
- public boolean needMerge() default false;
-
- /**
- * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
- */
- public boolean isExport() default true;
-
- /**
- * 另一个类中的属性名称,支持多级获取,以小数点隔开
- */
- public String targetAttr() default "";
-
- /**
- * 是否自动统计数据,在最后追加一行统计数据总和
- */
- public boolean isStatistics() default false;
-
- /**
- * 导出类型(0数字 1字符串)
- */
- public ColumnType cellType() default ColumnType.STRING;
-
- /**
- * 导出列头背景色
- */
- public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
-
- /**
- * 导出列头字体颜色
- */
- public IndexedColors headerColor() default IndexedColors.WHITE;
-
- /**
- * 导出单元格背景色
- */
- public IndexedColors backgroundColor() default IndexedColors.WHITE;
-
- /**
- * 导出单元格字体颜色
- */
- public IndexedColors color() default IndexedColors.BLACK;
-
- /**
- * 导出字段对齐方式
- */
- public HorizontalAlignment align() default HorizontalAlignment.CENTER;
-
- /**
- * 自定义数据处理器
- */
- public Class<?> handler() default ExcelHandlerAdapter.class;
-
- /**
- * 自定义数据处理器参数
- */
- public String[] args() default {};
-
- /**
- * 字段类型(0:导出导入;1:仅导出;2:仅导入)
- */
- Type type() default Type.ALL;
-
- public enum Type
- {
- ALL(0), EXPORT(1), IMPORT(2);
- private final int value;
-
- Type(int value)
- {
- this.value = value;
- }
-
- public int value()
- {
- return this.value;
- }
- }
-
- public enum ColumnType
- {
- NUMERIC(0), STRING(1), IMAGE(2);
- private final int value;
-
- ColumnType(int value)
- {
- this.value = value;
- }
-
- public int value()
- {
- return this.value;
- }
- }
-}
\ No newline at end of file
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excels.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excels.java
deleted file mode 100644
index 38135e7..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excels.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.common.core.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Excel注解集
- *
- * @author ruoyi
- */
-@Target(ElementType.FIELD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Excels
-{
- Excel[] value();
-}
\ No newline at end of file
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java
deleted file mode 100644
index 6d079b5..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ApproveConfigEnum {
-
- /*审批类型 1=交车审批、2=续约审批、3=退车审批*/
-
- DELIVERY_APPROVAL(1, "交车审批"),
- RENEWAL_APPROVAL(2, "续约审批"),
- RETURN_APPROVAL(3, "退车审批");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ApproveConfigEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ApproveConfigEnum fromCode(Integer code) {
- ApproveConfigEnum[] resultTypes = ApproveConfigEnum.values();
- for (ApproveConfigEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditStateEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditStateEnum.java
deleted file mode 100644
index 9a6f806..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditStateEnum.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum AuditStateEnum {
-
- /*审核状态 0待审批 1通过 2驳回 3已撤回*/
-
- PENDING_APPROVAL(0, "待审批"),
- APPROVED(1, "审批通过"),
- APPROVAL_REJECTION(2, "审批驳回"),
- WITHDRAWN(3, "已撤回");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- AuditStateEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static AuditStateEnum fromCode(Integer code) {
- AuditStateEnum[] resultTypes = AuditStateEnum.values();
- for (AuditStateEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditTypeEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditTypeEnum.java
deleted file mode 100644
index 242381f..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/AuditTypeEnum.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum AuditTypeEnum {
-
- /*审核类型 1交车申请 2续约申请 3退车申请 4事故账单申请*/
-
- DELIVERY_APPLICATION(1, "交车申请"),
- RENEWAL_APPLICATION(2, "续约申请"),
- RETURN_APPLICATION(3, "退车申请"),
- ACCIDENT_BILL_APPLICATION(4, "事故账单申请");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- AuditTypeEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static AuditTypeEnum fromCode(Integer code) {
- AuditTypeEnum[] resultTypes = AuditTypeEnum.values();
- for (AuditTypeEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/CarStateEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/CarStateEnum.java
deleted file mode 100644
index 7c67e22..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/CarStateEnum.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum CarStateEnum {
-
- /*状态1= 待上户、2=待办证、3=待整备、4=待租、5=已租、6=已处置*/
-
- PENDING_REGISTRATION(1, "待上户"),
- PENDING_CERTIFICATE(2, "待办证"),
- TO_BE_PREPARED(3, "待整备"),
- FOR_RENT(4, "待租"),
- RENTED(5, "已租"),
- DISPOSED(6, "已处置");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- CarStateEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static CarStateEnum fromCode(Integer code) {
- CarStateEnum[] resultTypes = CarStateEnum.values();
- for (CarStateEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DelFlagEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DelFlagEnum.java
deleted file mode 100644
index 5d770d3..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DelFlagEnum.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @author xiaochen
- * @ClassName Disable
- * @Description
- * @date 2022-06-08 16:55
- */
-public enum DelFlagEnum {
- NO(0, "否"),
- YES(1, "是");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- DelFlagEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static DelFlagEnum fromCode(Integer code) {
- DelFlagEnum[] resultTypes = DelFlagEnum.values();
- for (DelFlagEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DisabledEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DisabledEnum.java
deleted file mode 100644
index f43f4df..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/DisabledEnum.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @author xiaochen
- * @ClassName Disable
- * @Description
- * @date 2022-06-08 16:55
- */
-public enum DisabledEnum {
- NO(0, "否"),
- YES(1, "是");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- DisabledEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static DisabledEnum fromCode(Integer code) {
- DisabledEnum[] resultTypes = DisabledEnum.values();
- for (DisabledEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/HandoverStateEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/HandoverStateEnum.java
deleted file mode 100644
index e8b13fa..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/HandoverStateEnum.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum HandoverStateEnum {
-
- /*交车状态 1待交车 2待审批 3已交车 4审批拒绝*/
-
- VEHICLE_DELIVERED(1, "待交车"),
- PENDING_APPROVAL(2, "待审批"),
- DELIVERED(3, "已交车"),
- APPROVAL_REJECTION(4, "审批拒绝"),
- REVOKED(5, "已撤销");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- HandoverStateEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static HandoverStateEnum fromCode(Integer code) {
- HandoverStateEnum[] resultTypes = HandoverStateEnum.values();
- for (HandoverStateEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ImportTypeEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ImportTypeEnum.java
deleted file mode 100644
index 34f21bc..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ImportTypeEnum.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ImportTypeEnum {
-
- /*1=新车车辆导入 、2=已有车辆导入、3=上户导入、4=设备导入、5=违章导入、6=违章图片导入、7=保养记录导入、8=保单导入、9=合同导入*/
-
- NEW_CAR(1, "新车车辆导入"),
- EXIST_CAR(2, "已有车辆导入"),
- WEALTHY(3, "上户导入"),
- DEVICE(4, "设备导入"),
- VIOLATION(5, "违章导入"),
- VIOLATION_PICTURE(6, "违章图片导入"),
- SERVICE(7, "保养记录导入"),
- WARRANTY(8, "保单导入"),
- CONTRACT(9, "合同导入"),
- CERTIFICATE(10, "办证导入"),
- INSPECTANNUALLY(11, "车辆年检导入"),
- MAINTENANCE(12, "车辆维修导入");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ImportTypeEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ImportTypeEnum fromCode(Integer code) {
- ImportTypeEnum[] resultTypes = ImportTypeEnum.values();
- for (ImportTypeEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/InsureTypeEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/InsureTypeEnum.java
deleted file mode 100644
index 3900c9d..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/InsureTypeEnum.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum InsureTypeEnum {
-
- /*保险类型 1=商业险、2=交强险、3=承运人责任险、4=客伤险、5=盗抢险*/
-
- COMMERCIAL_INSURANCE(1, "商业险"),
- COMPULSORY_INSURANCE(2, "交强险"),
- CARRIER_LIABILITY_INSURANCE(3, "承运人责任险"),
- CUSTOMER_INJURY_INSURANCE(4, "客伤险"),
- THEFT_INSURANCE(5, "盗抢险");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- InsureTypeEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static InsureTypeEnum fromCode(Integer code) {
- InsureTypeEnum[] resultTypes = InsureTypeEnum.values();
- for (InsureTypeEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnCarTypeEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnCarTypeEnum.java
deleted file mode 100644
index bdce874..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnCarTypeEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ReturnCarTypeEnum {
-
- /*合同类型 合同到期、提前退车、强制收车*/
- EXPIRE(1, "合同到期"),
- EARLY_WITHDRAWAL(2, "提前退车"),
- COMPULSORY_COLLECTION(3, "强制收车");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ReturnCarTypeEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ReturnCarTypeEnum fromCode(Integer code) {
- ReturnCarTypeEnum[] resultTypes = ReturnCarTypeEnum.values();
- for (ReturnCarTypeEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnStateEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnStateEnum.java
deleted file mode 100644
index 7914cdc..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnStateEnum.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ReturnStateEnum {
-
- /*退车状态 1=待验车 2=待生成账单 3=待审批 4=已退车 5=审批拒绝*/
-
- VEHICLE_INSPECTED(1, "待验车"),
- PENDING_BILL_GENERATION(2, "待生成账单"),
- PENDING_APPROVAL(3, "待审批"),
- RETURNED_VEHICLE(4, "已退车"),
- APPROVAL_REJECTION(5, "审批拒绝"),
- REVOKED(6, "已撤销");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ReturnStateEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ReturnStateEnum fromCode(Integer code) {
- ReturnStateEnum[] resultTypes = ReturnStateEnum.values();
- for (ReturnStateEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/UserStatus.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/UserStatus.java
deleted file mode 100644
index 65a8cd8..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/UserStatus.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-/**
- * 用户状态
- *
- * @author ruoyi
- */
-public enum UserStatus
-{
- OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
-
- private final String code;
- private final String info;
-
- UserStatus(String code, String info)
- {
- this.code = code;
- this.info = info;
- }
-
- public String getCode()
- {
- return code;
- }
-
- public String getInfo()
- {
- return info;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/WarrantyStateEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/WarrantyStateEnum.java
deleted file mode 100644
index cad7e1b..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/WarrantyStateEnum.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ruoyi.common.core.enums;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum WarrantyStateEnum {
-
- /*保单状态 1正常 2已脱保 3已停保 4即将到期 5建议停保*/
-
- NORMAL(1, "正常"),
- DELISTED(2, "已脱保"),
- DISCONTINUED_WARRANTY(3, "已停保"),
- DUE(4, "即将到期"),
- SUGGEST_DISCONTINUING_MAINTENANCE(5, "建议停保");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- WarrantyStateEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static WarrantyStateEnum fromCode(Integer code) {
- WarrantyStateEnum[] resultTypes = WarrantyStateEnum.values();
- for (WarrantyStateEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java
deleted file mode 100644
index 33aa0dd..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.ruoyi.common.core.enums.status;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum AdvertisingStatusEnum {
-
-
- NO(0, "否"),
- YES(1, "是");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- AdvertisingStatusEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static AdvertisingStatusEnum fromCode(Integer code) {
- AdvertisingStatusEnum[] resultTypes = AdvertisingStatusEnum.values();
- for (AdvertisingStatusEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AppUserStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AppUserStatusEnum.java
deleted file mode 100644
index a9d6f08..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AppUserStatusEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.ruoyi.common.core.enums.status;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum AppUserStatusEnum {
-
-
- NORMAL(1, "正常"),
- FREEZE(2, "冻结"),
- LOGOFF(3, "注销");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- AppUserStatusEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static AppUserStatusEnum fromCode(Integer code) {
- AppUserStatusEnum[] resultTypes = AppUserStatusEnum.values();
- for (AppUserStatusEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunModeEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunModeEnum.java
deleted file mode 100644
index 78f4886..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunModeEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.ruoyi.common.core.enums.status;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ChargingGunModeEnum {
-
-
- SUPER_SUFFICIENT(1, "超级快充"),
- FAST_SUFFICIENT(2, "快充"),
- SLOW_SUFFICIENT(3, "慢充");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ChargingGunModeEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ChargingGunModeEnum fromCode(Integer code) {
- ChargingGunModeEnum[] resultTypes = ChargingGunModeEnum.values();
- for (ChargingGunModeEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunStatusEnum.java
deleted file mode 100644
index 219aea2..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/ChargingGunStatusEnum.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.ruoyi.common.core.enums.status;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum ChargingGunStatusEnum {
-
-
- OFFLINE(1, "离线"),
- IDLE(2, "空闲"),
- OCCUPATION_UNCHARGED(3, "占用(未充电)"),
- OCCUPATION_CHARGING(4, "占用(充电中)"),
- OCCUPATION_FULL(5, "占用(已充满)"),
- OCCUPATION_LOCK(6, "占用(预约锁定)"),
- FAULT(7, "故障");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- ChargingGunStatusEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static ChargingGunStatusEnum fromCode(Integer code) {
- ChargingGunStatusEnum[] resultTypes = ChargingGunStatusEnum.values();
- for (ChargingGunStatusEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/SiteStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/SiteStatusEnum.java
deleted file mode 100644
index 5d08b48..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/SiteStatusEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.ruoyi.common.core.enums.status;
-
-import lombok.Getter;
-
-/**
- * @Description
- * @Author xiaochen
- * @Date 2023/6/8 16:42
- */
-public enum SiteStatusEnum {
-
-
- NORMAL_USE(1, "正常使用"),
- IN_MAINTENANCE(2, "维修中"),
- CLOSE_OFFLINE(3, "关闭下线");
-
- @Getter
- private String desc;
-
-
- @Getter
- private int code;
-
-
- SiteStatusEnum(int code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- /**
- * 通过code获取枚举
- *
- * @param code
- * @return
- */
- public static SiteStatusEnum fromCode(Integer code) {
- SiteStatusEnum[] resultTypes = SiteStatusEnum.values();
- for (SiteStatusEnum resultType : resultTypes) {
- if (code.equals(resultType.getCode())) {
- return resultType;
- }
- }
- return null;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotLoginException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotLoginException.java
deleted file mode 100644
index 01e5771..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotLoginException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.common.core.exception.auth;
-
-/**
- * 未能通过的登录认证异常
- *
- * @author ruoyi
- */
-public class NotLoginException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- public NotLoginException(String message)
- {
- super(message);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotPermissionException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotPermissionException.java
deleted file mode 100644
index 6e9d3db..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/auth/NotPermissionException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ruoyi.common.core.exception.auth;
-
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * 未能通过的权限认证异常
- *
- * @author ruoyi
- */
-public class NotPermissionException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- public NotPermissionException(String permission)
- {
- super(permission);
- }
-
- public NotPermissionException(String[] permissions)
- {
- super(StringUtils.join(permissions, ","));
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/base/BaseException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/base/BaseException.java
deleted file mode 100644
index 3d2fa10..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/base/BaseException.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.ruoyi.common.core.exception.base;
-
-/**
- * 基础异常
- *
- * @author ruoyi
- */
-public class BaseException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * 所属模块
- */
- private String module;
-
- /**
- * 错误码
- */
- private String code;
-
- /**
- * 错误码对应的参数
- */
- private Object[] args;
-
- /**
- * 错误消息
- */
- private String defaultMessage;
-
- public BaseException(String module, String code, Object[] args, String defaultMessage)
- {
- this.module = module;
- this.code = code;
- this.args = args;
- this.defaultMessage = defaultMessage;
- }
-
- public BaseException(String module, String code, Object[] args)
- {
- this(module, code, args, null);
- }
-
- public BaseException(String module, String defaultMessage)
- {
- this(module, null, null, defaultMessage);
- }
-
- public BaseException(String code, Object[] args)
- {
- this(null, code, args, null);
- }
-
- public BaseException(String defaultMessage)
- {
- this(null, null, null, defaultMessage);
- }
-
- public String getModule()
- {
- return module;
- }
-
- public String getCode()
- {
- return code;
- }
-
- public Object[] getArgs()
- {
- return args;
- }
-
- public String getDefaultMessage()
- {
- return defaultMessage;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileException.java
deleted file mode 100644
index a156b7b..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileException.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.common.core.exception.file;
-
-import com.ruoyi.common.core.exception.base.BaseException;
-
-/**
- * 文件信息异常类
- *
- * @author ruoyi
- */
-public class FileException extends BaseException
-{
- private static final long serialVersionUID = 1L;
-
- public FileException(String code, Object[] args, String msg)
- {
- super("file", code, args, msg);
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileNameLengthLimitExceededException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileNameLengthLimitExceededException.java
deleted file mode 100644
index e8a4199..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileNameLengthLimitExceededException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.common.core.exception.file;
-
-/**
- * 文件名称超长限制异常类
- *
- * @author ruoyi
- */
-public class FileNameLengthLimitExceededException extends FileException
-{
- private static final long serialVersionUID = 1L;
-
- public FileNameLengthLimitExceededException(int defaultFileNameLength)
- {
- super("upload.filename.exceed.length", new Object[] { defaultFileNameLength }, "the filename is too long");
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileSizeLimitExceededException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileSizeLimitExceededException.java
deleted file mode 100644
index b592b6f..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileSizeLimitExceededException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.common.core.exception.file;
-
-/**
- * 文件名大小限制异常类
- *
- * @author ruoyi
- */
-public class FileSizeLimitExceededException extends FileException
-{
- private static final long serialVersionUID = 1L;
-
- public FileSizeLimitExceededException(long defaultMaxSize)
- {
- super("upload.exceed.maxSize", new Object[] { defaultMaxSize }, "the filesize is too large");
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java
deleted file mode 100644
index c0f57cb..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.ruoyi.common.core.exception.file;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-/**
- * 文件上传异常类
- *
- * @author ruoyi
- */
-public class FileUploadException extends Exception
-{
-
- private static final long serialVersionUID = 1L;
-
- private final Throwable cause;
-
- public FileUploadException()
- {
- this(null, null);
- }
-
- public FileUploadException(final String msg)
- {
- this(msg, null);
- }
-
- public FileUploadException(String msg, Throwable cause)
- {
- super(msg);
- this.cause = cause;
- }
-
- @Override
- public void printStackTrace(PrintStream stream)
- {
- super.printStackTrace(stream);
- if (cause != null)
- {
- stream.println("Caused by:");
- cause.printStackTrace(stream);
- }
- }
-
- @Override
- public void printStackTrace(PrintWriter writer)
- {
- super.printStackTrace(writer);
- if (cause != null)
- {
- writer.println("Caused by:");
- cause.printStackTrace(writer);
- }
- }
-
- @Override
- public Throwable getCause()
- {
- return cause;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/InvalidExtensionException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/InvalidExtensionException.java
deleted file mode 100644
index 2a0b906..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/InvalidExtensionException.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.ruoyi.common.core.exception.file;
-
-import java.util.Arrays;
-
-/**
- * 文件上传 误异常类
- *
- * @author ruoyi
- */
-public class InvalidExtensionException extends FileUploadException
-{
- private static final long serialVersionUID = 1L;
-
- private String[] allowedExtension;
- private String extension;
- private String filename;
-
- public InvalidExtensionException(String[] allowedExtension, String extension, String filename)
- {
- super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]");
- this.allowedExtension = allowedExtension;
- this.extension = extension;
- this.filename = filename;
- }
-
- public String[] getAllowedExtension()
- {
- return allowedExtension;
- }
-
- public String getExtension()
- {
- return extension;
- }
-
- public String getFilename()
- {
- return filename;
- }
-
- public static class InvalidImageExtensionException extends InvalidExtensionException
- {
- private static final long serialVersionUID = 1L;
-
- public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
- {
- super(allowedExtension, extension, filename);
- }
- }
-
- public static class InvalidFlashExtensionException extends InvalidExtensionException
- {
- private static final long serialVersionUID = 1L;
-
- public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
- {
- super(allowedExtension, extension, filename);
- }
- }
-
- public static class InvalidMediaExtensionException extends InvalidExtensionException
- {
- private static final long serialVersionUID = 1L;
-
- public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
- {
- super(allowedExtension, extension, filename);
- }
- }
-
- public static class InvalidVideoExtensionException extends InvalidExtensionException
- {
- private static final long serialVersionUID = 1L;
-
- public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename)
- {
- super(allowedExtension, extension, filename);
- }
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/CaptchaExpireException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/CaptchaExpireException.java
deleted file mode 100644
index ec68864..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/CaptchaExpireException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.common.core.exception.user;
-
-/**
- * 验证码失效异常类
- *
- * @author ruoyi
- */
-public class CaptchaExpireException extends UserException
-{
- private static final long serialVersionUID = 1L;
-
- public CaptchaExpireException()
- {
- super("user.jcaptcha.expire", null);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserAppletException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserAppletException.java
deleted file mode 100644
index b8da2e9..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserAppletException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.ruoyi.common.core.exception.user;
-
-/**
- * 学生端登录异常信息
- *
- * @author HJL
- * @version 1.0
- * @since 2024-05-24 11:35
- */
-public class UserAppletException extends RuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 错误提示
- */
- private String message;
-
- /**
- * 错误码
- */
- private int code;
-
- public UserAppletException() {
- }
-
- public UserAppletException(String message, Integer code) {
- this.message = message;
- this.code = code;
- }
-
- @Override
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public int getCode() {
- return code;
- }
-
- public void setCode(int code) {
- this.code = code;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserException.java
deleted file mode 100644
index 8ae8ea3..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.common.core.exception.user;
-
-import com.ruoyi.common.core.exception.base.BaseException;
-
-/**
- * 用户信息异常类
- *
- * @author ruoyi
- */
-public class UserException extends BaseException
-{
- private static final long serialVersionUID = 1L;
-
- public UserException(String code, Object[] args)
- {
- super("user", code, args, null);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserPasswordNotMatchException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserPasswordNotMatchException.java
deleted file mode 100644
index 2e1a6b1..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/user/UserPasswordNotMatchException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.common.core.exception.user;
-
-/**
- * 用户密码不正确或不符合规范异常类
- *
- * @author ruoyi
- */
-public class UserPasswordNotMatchException extends UserException
-{
- private static final long serialVersionUID = 1L;
-
- public UserPasswordNotMatchException()
- {
- super("user.password.not.match", null);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/query/TimeRangePageQuery.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/query/TimeRangePageQuery.java
deleted file mode 100644
index 4199627..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/query/TimeRangePageQuery.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.ruoyi.common.core.query;
-
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.core.web.page.BasePage;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Objects;
-
-/**
- * @author xiaochen
- * @ClassName TimeRangePageDTO
- * @Description
- * @date 2023-06-4 14:42
- */
-@ApiModel("时间范围分页dto")
-public class TimeRangePageQuery extends BasePage {
- @ApiModelProperty("开始时间 格式 yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date startTime;
-
- @ApiModelProperty("结束时间 格式 yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date endTime;
-
- public String getStartTime() {
- if (Objects.nonNull(startTime)) {
- return new SimpleDateFormat("yyyy-MM-dd").format(startTime) + " 00:00:00";
- }
- return null;
- }
-
- public void setStartTime(Date startTime) {
- this.startTime = startTime;
- }
-
- public String getEndTime() {
- if (Objects.nonNull(endTime)) {
- return new SimpleDateFormat("yyyy-MM-dd").format(endTime) + " 23:59:59";
- }
- return null;
- }
-
- public void setEndTime(Date endTime) {
- this.endTime = endTime;
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/CodeGenerateUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/CodeGenerateUtils.java
deleted file mode 100644
index 32309d1..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/CodeGenerateUtils.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.ruoyi.common.core.utils;
-
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-
-/**
- * @Description 活动订单操作
- * @Author xiaochen
- * @Date 2021/7/28 10:26
- */
-public class CodeGenerateUtils {
-
- /**
- * @return
- * @Description 获取商品编码
- * 商品编码规则:nanoTime(后5位)*5位随机数(10000~99999)
- * @Author xiaochen
- */
- public static String generateProductCode() {
- long nanoPart = System.nanoTime() % 100000L;
- if (nanoPart < 10000L) {
- nanoPart += 10000L;
- }
- long randomPart = (long) (Math.random() * (90000) + 10000);
- String code = "0" + String.valueOf((new BigDecimal(nanoPart).multiply(new BigDecimal(randomPart))));
- return code.substring(code.length() - 10);
- }
-
- /**
- * @param id: 用户id
- * @return
- * @Description 生成订单编号
- * 订单编号规则:(10位):(年末尾*月,取后2位)+(用户ID%3.33*日取整后2位)+(timestamp*10000以内随机数,取后6位)
- * @Author xiaochen
- */
- public static String generateOrderSn(long id) {
- Calendar calendar = Calendar.getInstance();
- int year = calendar.get(Calendar.YEAR);
- year = year % 10;
- if (year == 0) year = 10;
- int month = calendar.get(Calendar.MONTH) + 1;
- int yearMonth = year * month;
- String yearMonthPart = "0" + yearMonth;
- yearMonthPart = yearMonthPart.substring(yearMonthPart.length() - 2);
-
- int day = calendar.get(Calendar.DAY_OF_MONTH);
- int dayNum = (int) ((id % 3.33) * day);
- String dayPart = "0" + dayNum;
- dayPart = dayPart.substring(dayPart.length() - 2);
-
- String timestampPart = "" + (Math.random() * 10000) * (System.currentTimeMillis() / 10000);
- timestampPart = timestampPart.replace(".", "").replace("E", "");
- timestampPart = timestampPart.substring(0, 6);
- return yearMonthPart + dayPart + timestampPart;
- }
-
- /**
- * @return
- * @Description 生成统一支付单号 规则:年(2)月(2)日(2)时(2)分(2)+timestamp*5位随机整数取后5位
- * @Author xiaochen
- */
- public static String generateVolumeSn() {
- Calendar calendar = Calendar.getInstance();
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
- String dateTime = dateFormat.format(calendar.getTime());
- dateTime = dateTime.substring(2);
- String timestampPart = "" + (Math.random() * 10000) * (System.currentTimeMillis() / 10000);
- timestampPart = timestampPart.replace(".", "").replace("E", "");
- timestampPart = timestampPart.substring(0, 5);
- return dateTime + timestampPart;
- }
-
- public static void main(String[] args) {
- for (long i = 0; i < 20; i++) {
- //String timestampPart = ""+(Math.random() * 10000) * (System.currentTimeMillis()/10000);
- //System.out.println(timestampPart);
- //System.out.println(generateOrderSn(i));
- long l = System.currentTimeMillis() * Long.valueOf(CodeGenerateUtils.generateProductCode().substring(0, 5));
- System.out.println(String.valueOf(l).substring(0,10));
- }
-
- }
-
- /**
- * @description id补0生成编号
- * @author jqs
- * @date 2024/4/17 14:19
- * @param totalLength
- * @param id
- * @return String
- */
- public static String toFillZeroCode(int totalLength, Long id) {
- String idStr = id.toString();
- int length = idStr.length();
- if(totalLength <= length){
- return idStr;
- }
- int fillLength = totalLength - length;
- StringBuilder idsbs = new StringBuilder();
- for (int i = 0; i < fillLength; i++) {
- idsbs.append("0");
- }
- return idsbs.append(idStr).toString();
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ExceptionUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ExceptionUtil.java
deleted file mode 100644
index 12f6c72..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ExceptionUtil.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.ruoyi.common.core.utils;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import org.apache.commons.lang3.exception.ExceptionUtils;
-
-/**
- * 错误信息处理类。
- *
- * @author ruoyi
- */
-public class ExceptionUtil
-{
- /**
- * 获取exception的详细错误信息。
- */
- public static String getExceptionMessage(Throwable e)
- {
- StringWriter sw = new StringWriter();
- e.printStackTrace(new PrintWriter(sw, true));
- return sw.toString();
- }
-
- public static String getRootErrorMessage(Exception e)
- {
- Throwable root = ExceptionUtils.getRootCause(e);
- root = (root == null ? e : root);
- if (root == null)
- {
- return "";
- }
- String msg = root.getMessage();
- if (msg == null)
- {
- return "null";
- }
- return StringUtils.defaultString(msg);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/MsgUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/MsgUtil.java
deleted file mode 100644
index 14c12e1..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/MsgUtil.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package com.ruoyi.common.core.utils;
-
-import com.alibaba.fastjson2.JSON;
-import com.ruoyi.common.core.constant.MsgConstants;
-import com.ruoyi.common.core.utils.req.SubmitTempletReq;
-import org.apache.commons.codec.binary.Base64;
-
-import java.util.concurrent.ThreadLocalRandom;
-
-public class MsgUtil {
-
- public final static String ecName= "四川明星新能源科技有限公司";
- public final static String secretKey= "MX_xny2023?9";
- public final static String sign= "1PUAVuY2b";
-
-
-
- /**
- * 更换手机号:【签名】验证码:XXX,用于更换手机号。请勿转发。
- * @param phone 手机号
- * @param code 验证码
- * @return
- */
- public static String codeMsg(String phone,String code){
- SubmitTempletReq submitReq = new SubmitTempletReq();
- String[] paramss = {code};
- submitReq.setApId(MsgConstants.CODE_AP_ID);
- submitReq.setEcName(ecName);
- submitReq.setSecretKey(secretKey);
- submitReq.setParams(JSON.toJSONString(paramss));
- submitReq.setMobiles(phone);
- submitReq.setAddSerial("");
- submitReq.setSign(sign);
- submitReq.setTemplateId(MsgConstants.CODE_TEMPLATE_ID);
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(submitReq.getEcName());
- stringBuffer.append(submitReq.getApId());
- stringBuffer.append(submitReq.getSecretKey());
- stringBuffer.append(submitReq.getTemplateId());
- stringBuffer.append(submitReq.getMobiles());
- stringBuffer.append(submitReq.getParams());
- stringBuffer.append(submitReq.getSign());
- stringBuffer.append(submitReq.getAddSerial());
- submitReq.setMac(MD5Util.getMD5(stringBuffer.toString()));
- String reqText = JSON.toJSONString(submitReq);
- //加密
- String encode = Base64.encodeBase64String(reqText.getBytes());
- System.err.println(encode);
- return encode;
- }
-
- /**
- * 更换手机号:【签名】验证码:XXX,用于更换手机号。请勿转发。
- * @param phone 手机号
- * @param code 验证码
- * @return
- */
- public static String applyCodeMsg(String phone,String code){
- SubmitTempletReq submitReq = new SubmitTempletReq();
- String[] paramss = {code};
- submitReq.setApId(MsgConstants.APPLY_AP_ID);
- submitReq.setEcName(ecName);
- submitReq.setSecretKey(secretKey);
- submitReq.setParams(JSON.toJSONString(paramss));
- submitReq.setMobiles(phone);
- submitReq.setAddSerial("");
- submitReq.setSign(sign);
- submitReq.setTemplateId(MsgConstants.APPLY_TEMPLATE_ID);
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(submitReq.getEcName());
- stringBuffer.append(submitReq.getApId());
- stringBuffer.append(submitReq.getSecretKey());
- stringBuffer.append(submitReq.getTemplateId());
- stringBuffer.append(submitReq.getMobiles());
- stringBuffer.append(submitReq.getParams());
- stringBuffer.append(submitReq.getSign());
- stringBuffer.append(submitReq.getAddSerial());
- submitReq.setMac(MD5Util.getMD5(stringBuffer.toString()));
- String reqText = JSON.toJSONString(submitReq);
- //加密
- String encode = Base64.encodeBase64String(reqText.getBytes());
- System.err.println(encode);
- return encode;
- }
-
-
- /**
- * 停车占位提醒:车辆已在3小时前完成充电,请及时取车,避免长时间占用充电资源。
- * @param phone 手机号
- * @return
- */
- public static String stopMsg(String phone){
- SubmitTempletReq submitReq = new SubmitTempletReq();
- submitReq.setTemplateId(MsgConstants.STOP_TEMPLATE_ID);
- submitReq.setApId(MsgConstants.STOP_AP_ID);
- submitReq.setEcName(ecName);
- submitReq.setSecretKey(secretKey);
- submitReq.setMobiles(phone);
- submitReq.setAddSerial("");
- submitReq.setSign(sign);
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(submitReq.getEcName());
- stringBuffer.append(submitReq.getApId());
- stringBuffer.append(submitReq.getSecretKey());
- stringBuffer.append(submitReq.getTemplateId());
- stringBuffer.append(submitReq.getMobiles());
- stringBuffer.append(submitReq.getParams());
- stringBuffer.append(submitReq.getSign());
- stringBuffer.append(submitReq.getAddSerial());
- submitReq.setMac(MD5Util.getMD5(stringBuffer.toString()));
- String reqText = JSON.toJSONString(submitReq);
- //加密
- String encode = Base64.encodeBase64String(reqText.getBytes());
- System.err.println(encode);
- return encode;
- }
-
- /**
- * 充电结束:车辆充电结束,请及时取车。
- * @param phone 手机号
- * @return
- */
- public static String chargeStopMsg(String phone){
- SubmitTempletReq submitReq = new SubmitTempletReq();
- submitReq.setTemplateId(MsgConstants.CHARGE_TEMPLATE_ID);
- submitReq.setApId(MsgConstants.CHARGE_AP_ID);
- submitReq.setEcName(ecName);
- submitReq.setSecretKey(secretKey);
- submitReq.setMobiles(phone);
- submitReq.setAddSerial("");
- submitReq.setSign(sign);
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(submitReq.getEcName());
- stringBuffer.append(submitReq.getApId());
- stringBuffer.append(submitReq.getSecretKey());
- stringBuffer.append(submitReq.getTemplateId());
- stringBuffer.append(submitReq.getMobiles());
- stringBuffer.append(submitReq.getParams());
- stringBuffer.append(submitReq.getSign());
- stringBuffer.append(submitReq.getAddSerial());
- submitReq.setMac(MD5Util.getMD5(stringBuffer.toString()));
- String reqText = JSON.toJSONString(submitReq);
- //加密
- String encode = Base64.encodeBase64String(reqText.getBytes());
- System.err.println(encode);
- return encode;
- }
-
- /** phone 单词可拼接5000个号码
- * 桩故障(自动/手动):检测到【电站1】【编号】号桩设备离线,请及时查看处理!
- * @param phone 手机号
- * @param site 站点名称
- * @param chargeGun 桩编号
- * @return
- */
- public static String faultMsg(String phone,String site,String chargeGun){
- SubmitTempletReq submitReq = new SubmitTempletReq();
- if(site.length()<=10){
- String[] paramss = {site,chargeGun};
- submitReq.setParams(JSON.toJSONString(paramss));
- }else{
- String work1 = site.substring(0,10);
- String[] paramss = {work1,chargeGun};
- submitReq.setParams(JSON.toJSONString(paramss));
- }
- submitReq.setTemplateId(MsgConstants.FAULT_TEMPLATE_ID);
- submitReq.setApId(MsgConstants.FAULT_AP_ID);
- submitReq.setEcName(ecName);
- submitReq.setSecretKey(secretKey);
- submitReq.setMobiles(phone);
- submitReq.setAddSerial("");
- submitReq.setSign(sign);
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(submitReq.getEcName());
- stringBuffer.append(submitReq.getApId());
- stringBuffer.append(submitReq.getSecretKey());
- stringBuffer.append(submitReq.getTemplateId());
- stringBuffer.append(submitReq.getMobiles());
- stringBuffer.append(submitReq.getParams());
- stringBuffer.append(submitReq.getSign());
- stringBuffer.append(submitReq.getAddSerial());
- submitReq.setMac(MD5Util.getMD5(stringBuffer.toString()));
- String reqText = JSON.toJSONString(submitReq);
- //加密
- String encode = Base64.encodeBase64String(reqText.getBytes());
- System.err.println(encode);
- return encode;
- }
- /**
- * 生成验证码
- * @return
- */
- public static String createCode(){
- return String.valueOf(ThreadLocalRandom.current().nextInt(100000, 999999));
- }
-
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ObsUploadUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ObsUploadUtil.java
deleted file mode 100644
index f5239c8..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ObsUploadUtil.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.ruoyi.common.core.utils;
-
-import com.obs.services.ObsClient;
-import com.obs.services.model.ObjectMetadata;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.UUID;
-
-public class ObsUploadUtil {
-
- public static String endPoint = "obs.cn-southwest-2.myhuaweicloud.com";
- public static String accessKeyId = "LP9N1TLAYN8ERS1PVIYK";
- public static String accessKeySecret = "bV55lFHi1cG0SYBvnab8yIgDX6etKRSLh5j1gkPR";
- public static String bucketName = "haitunyingyu";
- public static String oss_domain = "https://haitunyingyu.obs.cn-southwest-2.myhuaweicloud.com/";
- // 创建ObsClient实例
- public static ObsClient obsClient = new ObsClient(accessKeyId, accessKeySecret, endPoint);
-
- public static String obsUpload(MultipartFile file) throws IOException{
- //CommonsMultipartFile file = (CommonsMultipartFile)multipartFile;
- String fileName = "";
- if(file!=null && !"".equals(file.getOriginalFilename()) && file.getOriginalFilename()!=null){
- InputStream content = file.getInputStream();//获得指定文件的输入流
- ObjectMetadata meta = new ObjectMetadata();// 创建上传Object的Metadata
- meta.setContentLength(file.getSize()); // 必须设置ContentLength
- String originalFilename = file.getOriginalFilename();
- if (originalFilename.contains("apk")){
- fileName = "bf2fe5c5499341e5bc0d56c0c7d5fb2e.apk";
- System.err.println("apk");
- }else{
- fileName = UUID.randomUUID().toString().replaceAll("-","") + originalFilename.subSequence(originalFilename.lastIndexOf("."), originalFilename.length());
- }
- obsClient.putObject(bucketName,"admin/"+fileName,content,meta);// 上传Object.
- if(fileName != null && !"".equals(fileName)){
- System.out.println(fileName);
- fileName = oss_domain+"admin/"+fileName;
- }
- }
- return fileName;
- }
-
- /**
- * 删除某个Object
- *
- * @param bucketUrl
- * @return
- */
- public static boolean deleteObject(String bucketUrl) {
- try {
- bucketUrl=bucketUrl.replace(oss_domain+"web","");
- // 删除Object.
- obsClient.deleteObject(bucketName, bucketUrl);
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- } finally {
- //ossClient.shutdown();
- }
- return true;
- }
-
-// public static void createBucket(String bucketName)
-// {
-// //初始化 OSSClient
-//// ossClient = new OssClient(endPoint, accessKeyId, accessKeySecret);
-//
-// // 新建一个Bucket
-// Bucket bucket = ossClient.createBucket(bucketName);
-// System.out.println(bucket.getName());
-// System.out.println(bucket.getCreationDate());
-// }
-//
-// public static void main(String[] args) {
-// OssUploadUtil.createBucket("ssfdfsd");
-// }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
deleted file mode 100644
index 2d0ec81..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
+++ /dev/null
@@ -1,561 +0,0 @@
-package com.ruoyi.common.core.utils;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import org.springframework.util.AntPathMatcher;
-import com.ruoyi.common.core.constant.Constants;
-import com.ruoyi.common.core.text.StrFormatter;
-
-/**
- * 字符串工具类
- *
- * @author ruoyi
- */
-public class StringUtils extends org.apache.commons.lang3.StringUtils
-{
- /** 空字符串 */
- private static final String NULLSTR = "";
-
- /** 下划线 */
- private static final char SEPARATOR = '_';
-
- /**
- * 获取参数不为空值
- *
- * @param value defaultValue 要判断的value
- * @return value 返回值
- */
- public static <T> T nvl(T value, T defaultValue)
- {
- return value != null ? value : defaultValue;
- }
-
- /**
- * * 判断一个Collection是否为空, 包含List,Set,Queue
- *
- * @param coll 要判断的Collection
- * @return true:为空 false:非空
- */
- public static boolean isEmpty(Collection<?> coll)
- {
- return isNull(coll) || coll.isEmpty();
- }
-
- /**
- * * 判断一个Collection是否非空,包含List,Set,Queue
- *
- * @param coll 要判断的Collection
- * @return true:非空 false:空
- */
- public static boolean isNotEmpty(Collection<?> coll)
- {
- return !isEmpty(coll);
- }
-
- /**
- * * 判断一个对象数组是否为空
- *
- * @param objects 要判断的对象数组
- ** @return true:为空 false:非空
- */
- public static boolean isEmpty(Object[] objects)
- {
- return isNull(objects) || (objects.length == 0);
- }
-
- /**
- * * 判断一个对象数组是否非空
- *
- * @param objects 要判断的对象数组
- * @return true:非空 false:空
- */
- public static boolean isNotEmpty(Object[] objects)
- {
- return !isEmpty(objects);
- }
-
- /**
- * * 判断一个Map是否为空
- *
- * @param map 要判断的Map
- * @return true:为空 false:非空
- */
- public static boolean isEmpty(Map<?, ?> map)
- {
- return isNull(map) || map.isEmpty();
- }
-
- /**
- * * 判断一个Map是否为空
- *
- * @param map 要判断的Map
- * @return true:非空 false:空
- */
- public static boolean isNotEmpty(Map<?, ?> map)
- {
- return !isEmpty(map);
- }
-
- /**
- * * 判断一个字符串是否为空串
- *
- * @param str String
- * @return true:为空 false:非空
- */
- public static boolean isEmpty(String str)
- {
- return isNull(str) || NULLSTR.equals(str.trim());
- }
-
- /**
- * * 判断一个字符串是否为非空串
- *
- * @param str String
- * @return true:非空串 false:空串
- */
- public static boolean isNotEmpty(String str)
- {
- return !isEmpty(str);
- }
-
- /**
- * * 判断一个对象是否为空
- *
- * @param object Object
- * @return true:为空 false:非空
- */
- public static boolean isNull(Object object)
- {
- return object == null;
- }
-
- /**
- * * 判断一个对象是否非空
- *
- * @param object Object
- * @return true:非空 false:空
- */
- public static boolean isNotNull(Object object)
- {
- return !isNull(object);
- }
-
- /**
- * * 判断一个对象是否是数组类型(Java基本型别的数组)
- *
- * @param object 对象
- * @return true:是数组 false:不是数组
- */
- public static boolean isArray(Object object)
- {
- return isNotNull(object) && object.getClass().isArray();
- }
-
- /**
- * 去空格
- */
- public static String trim(String str)
- {
- return (str == null ? "" : str.trim());
- }
-
- /**
- * 截取字符串
- *
- * @param str 字符串
- * @param start 开始
- * @return 结果
- */
- public static String substring(final String str, int start)
- {
- if (str == null)
- {
- return NULLSTR;
- }
-
- if (start < 0)
- {
- start = str.length() + start;
- }
-
- if (start < 0)
- {
- start = 0;
- }
- if (start > str.length())
- {
- return NULLSTR;
- }
-
- return str.substring(start);
- }
-
- /**
- * 截取字符串
- *
- * @param str 字符串
- * @param start 开始
- * @param end 结束
- * @return 结果
- */
- public static String substring(final String str, int start, int end)
- {
- if (str == null)
- {
- return NULLSTR;
- }
-
- if (end < 0)
- {
- end = str.length() + end;
- }
- if (start < 0)
- {
- start = str.length() + start;
- }
-
- if (end > str.length())
- {
- end = str.length();
- }
-
- if (start > end)
- {
- return NULLSTR;
- }
-
- if (start < 0)
- {
- start = 0;
- }
- if (end < 0)
- {
- end = 0;
- }
-
- return str.substring(start, end);
- }
-
- /**
- * 判断是否为空,并且不是空白字符
- *
- * @param str 要判断的value
- * @return 结果
- */
- public static boolean hasText(String str)
- {
- return (str != null && !str.isEmpty() && containsText(str));
- }
-
- private static boolean containsText(CharSequence str)
- {
- int strLen = str.length();
- for (int i = 0; i < strLen; i++)
- {
- if (!Character.isWhitespace(str.charAt(i)))
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * 格式化文本, {} 表示占位符<br>
- * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
- * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
- * 例:<br>
- * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
- * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
- * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
- *
- * @param template 文本模板,被替换的部分用 {} 表示
- * @param params 参数值
- * @return 格式化后的文本
- */
- public static String format(String template, Object... params)
- {
- if (isEmpty(params) || isEmpty(template))
- {
- return template;
- }
- return StrFormatter.format(template, params);
- }
-
- /**
- * 是否为http(s)://开头
- *
- * @param link 链接
- * @return 结果
- */
- public static boolean ishttp(String link)
- {
- return StringUtils.startsWithAny(link, Constants.HTTP, Constants.HTTPS);
- }
-
- /**
- * 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
- *
- * @param collection 给定的集合
- * @param array 给定的数组
- * @return boolean 结果
- */
- public static boolean containsAny(Collection<String> collection, String... array)
- {
- if (isEmpty(collection) || isEmpty(array))
- {
- return false;
- }
- else
- {
- for (String str : array)
- {
- if (collection.contains(str))
- {
- return true;
- }
- }
- return false;
- }
- }
-
- /**
- * 驼峰转下划线命名
- */
- public static String toUnderScoreCase(String str)
- {
- if (str == null)
- {
- return null;
- }
- StringBuilder sb = new StringBuilder();
- // 前置字符是否大写
- boolean preCharIsUpperCase = true;
- // 当前字符是否大写
- boolean curreCharIsUpperCase = true;
- // 下一字符是否大写
- boolean nexteCharIsUpperCase = true;
- for (int i = 0; i < str.length(); i++)
- {
- char c = str.charAt(i);
- if (i > 0)
- {
- preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
- }
- else
- {
- preCharIsUpperCase = false;
- }
-
- curreCharIsUpperCase = Character.isUpperCase(c);
-
- if (i < (str.length() - 1))
- {
- nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
- }
-
- if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase)
- {
- sb.append(SEPARATOR);
- }
- else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase)
- {
- sb.append(SEPARATOR);
- }
- sb.append(Character.toLowerCase(c));
- }
-
- return sb.toString();
- }
-
- /**
- * 是否包含字符串
- *
- * @param str 验证字符串
- * @param strs 字符串组
- * @return 包含返回true
- */
- public static boolean inStringIgnoreCase(String str, String... strs)
- {
- if (str != null && strs != null)
- {
- for (String s : strs)
- {
- if (str.equalsIgnoreCase(trim(s)))
- {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
- *
- * @param name 转换前的下划线大写方式命名的字符串
- * @return 转换后的驼峰式命名的字符串
- */
- public static String convertToCamelCase(String name)
- {
- StringBuilder result = new StringBuilder();
- // 快速检查
- if (name == null || name.isEmpty())
- {
- // 没必要转换
- return "";
- }
- else if (!name.contains("_"))
- {
- // 不含下划线,仅将首字母大写
- return name.substring(0, 1).toUpperCase() + name.substring(1);
- }
- // 用下划线将原始字符串分割
- String[] camels = name.split("_");
- for (String camel : camels)
- {
- // 跳过原始字符串中开头、结尾的下换线或双重下划线
- if (camel.isEmpty())
- {
- continue;
- }
- // 首字母大写
- result.append(camel.substring(0, 1).toUpperCase());
- result.append(camel.substring(1).toLowerCase());
- }
- return result.toString();
- }
-
- /**
- * 驼峰式命名法
- * 例如:user_name->userName
- */
- public static String toCamelCase(String s)
- {
- if (s == null)
- {
- return null;
- }
- if (s.indexOf(SEPARATOR) == -1)
- {
- return s;
- }
- s = s.toLowerCase();
- StringBuilder sb = new StringBuilder(s.length());
- boolean upperCase = false;
- for (int i = 0; i < s.length(); i++)
- {
- char c = s.charAt(i);
-
- if (c == SEPARATOR)
- {
- upperCase = true;
- }
- else if (upperCase)
- {
- sb.append(Character.toUpperCase(c));
- upperCase = false;
- }
- else
- {
- sb.append(c);
- }
- }
- return sb.toString();
- }
-
- /**
- * 查找指定字符串是否匹配指定字符串列表中的任意一个字符串
- *
- * @param str 指定字符串
- * @param strs 需要检查的字符串数组
- * @return 是否匹配
- */
- public static boolean matches(String str, List<String> strs)
- {
- if (isEmpty(str) || isEmpty(strs))
- {
- return false;
- }
- for (String pattern : strs)
- {
- if (isMatch(pattern, str))
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * 判断url是否与规则配置:
- * ? 表示单个字符;
- * * 表示一层路径内的任意字符串,不可跨层级;
- * ** 表示任意层路径;
- *
- * @param pattern 匹配规则
- * @param url 需要匹配的url
- * @return
- */
- public static boolean isMatch(String pattern, String url)
- {
- AntPathMatcher matcher = new AntPathMatcher();
- return matcher.match(pattern, url);
- }
-
- @SuppressWarnings("unchecked")
- public static <T> T cast(Object obj)
- {
- return (T) obj;
- }
-
- /**
- * 数字左边补齐0,使之达到指定长度。注意,如果数字转换为字符串后,长度大于size,则只保留 最后size个字符。
- *
- * @param num 数字对象
- * @param size 字符串指定长度
- * @return 返回数字的字符串格式,该字符串为指定长度。
- */
- public static final String padl(final Number num, final int size)
- {
- return padl(num.toString(), size, '0');
- }
-
- /**
- * 字符串左补齐。如果原始字符串s长度大于size,则只保留最后size个字符。
- *
- * @param s 原始字符串
- * @param size 字符串指定长度
- * @param c 用于补齐的字符
- * @return 返回指定长度的字符串,由原字符串左补齐或截取得到。
- */
- public static final String padl(final String s, final int size, final char c)
- {
- final StringBuilder sb = new StringBuilder(size);
- if (s != null)
- {
- final int len = s.length();
- if (s.length() <= size)
- {
- for (int i = size - len; i > 0; i--)
- {
- sb.append(c);
- }
- sb.append(s);
- }
- else
- {
- return s.substring(len - size, len);
- }
- }
- else
- {
- for (int i = size; i > 0; i--)
- {
- sb.append(c);
- }
- }
- return sb.toString();
- }
-}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ip/IpUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ip/IpUtils.java
deleted file mode 100644
index cf5108b..0000000
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ip/IpUtils.java
+++ /dev/null
@@ -1,382 +0,0 @@
-package com.ruoyi.common.core.utils.ip;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import javax.servlet.http.HttpServletRequest;
-import com.ruoyi.common.core.utils.ServletUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-
-/**
- * 获取IP方法
- *
- * @author ruoyi
- */
-public class IpUtils
-{
- public final static String REGX_0_255 = "(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)";
- // 匹配 ip
- public final static String REGX_IP = "((" + REGX_0_255 + "\\.){3}" + REGX_0_255 + ")";
- public final static String REGX_IP_WILDCARD = "(((\\*\\.){3}\\*)|(" + REGX_0_255 + "(\\.\\*){3})|(" + REGX_0_255 + "\\." + REGX_0_255 + ")(\\.\\*){2}" + "|((" + REGX_0_255 + "\\.){3}\\*))";
- // 匹配网段
- public final static String REGX_IP_SEG = "(" + REGX_IP + "\\-" + REGX_IP + ")";
-
- /**
- * 获取客户端IP
- *
- * @return IP地址
- */
- public static String getIpAddr()
- {
- return getIpAddr(ServletUtils.getRequest());
- }
-
- /**
- * 获取客户端IP
- *
- * @param request 请求对象
- * @return IP地址
- */
- public static String getIpAddr(HttpServletRequest request)
- {
- if (request == null)
- {
- return "unknown";
- }
- String ip = request.getHeader("x-forwarded-for");
- if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
- {
- ip = request.getHeader("Proxy-Client-IP");
- }
- if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
- {
- ip = request.getHeader("X-Forwarded-For");
- }
- if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
- {
- ip = request.getHeader("WL-Proxy-Client-IP");
- }
- if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
- {
- ip = request.getHeader("X-Real-IP");
- }
-
- if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
- {
- ip = request.getRemoteAddr();
- }
-
- return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip);
- }
-
- /**
- * 检查是否为内部IP地址
- *
- * @param ip IP地址
- * @return 结果
- */
- public static boolean internalIp(String ip)
- {
- byte[] addr = textToNumericFormatV4(ip);
- return internalIp(addr) || "127.0.0.1".equals(ip);
- }
-
- /**
- * 检查是否为内部IP地址
- *
- * @param addr byte地址
- * @return 结果
- */
- private static boolean internalIp(byte[] addr)
- {
- if (StringUtils.isNull(addr) || addr.length < 2)
- {
- return true;
- }
- final byte b0 = addr[0];
- final byte b1 = addr[1];
- // 10.x.x.x/8
- final byte SECTION_1 = 0x0A;
- // 172.16.x.x/12
- final byte SECTION_2 = (byte) 0xAC;
- final byte SECTION_3 = (byte) 0x10;
- final byte SECTION_4 = (byte) 0x1F;
- // 192.168.x.x/16
- final byte SECTION_5 = (byte) 0xC0;
- final byte SECTION_6 = (byte) 0xA8;
- switch (b0)
- {
- case SECTION_1:
- return true;
- case SECTION_2:
- if (b1 >= SECTION_3 && b1 <= SECTION_4)
- {
- return true;
- }
- case SECTION_5:
- switch (b1)
- {
- case SECTION_6:
- return true;
- }
- default:
- return false;
- }
- }
-
- /**
- * 将IPv4地址转换成字节
- *
- * @param text IPv4地址
- * @return byte 字节
- */
- public static byte[] textToNumericFormatV4(String text)
- {
- if (text.length() == 0)
- {
- return null;
- }
-
- byte[] bytes = new byte[4];
- String[] elements = text.split("\\.", -1);
- try
- {
- long l;
- int i;
- switch (elements.length)
- {
- case 1:
- l = Long.parseLong(elements[0]);
- if ((l < 0L) || (l > 4294967295L))
- {
- return null;
- }
- bytes[0] = (byte) (int) (l >> 24 & 0xFF);
- bytes[1] = (byte) (int) ((l & 0xFFFFFF) >> 16 & 0xFF);
- bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
- bytes[3] = (byte) (int) (l & 0xFF);
- break;
- case 2:
- l = Integer.parseInt(elements[0]);
- if ((l < 0L) || (l > 255L))
- {
- return null;
- }
- bytes[0] = (byte) (int) (l & 0xFF);
- l = Integer.parseInt(elements[1]);
- if ((l < 0L) || (l > 16777215L))
- {
- return null;
- }
- bytes[1] = (byte) (int) (l >> 16 & 0xFF);
- bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
- bytes[3] = (byte) (int) (l & 0xFF);
- break;
- case 3:
- for (i = 0; i < 2; ++i)
- {
- l = Integer.parseInt(elements[i]);
- if ((l < 0L) || (l > 255L))
- {
- return null;
- }
- bytes[i] = (byte) (int) (l & 0xFF);
- }
- l = Integer.parseInt(elements[2]);
- if ((l < 0L) || (l > 65535L))
- {
- return null;
- }
- bytes[2] = (byte) (int) (l >> 8 & 0xFF);
- bytes[3] = (byte) (int) (l & 0xFF);
- break;
- case 4:
- for (i = 0; i < 4; ++i)
- {
- l = Integer.parseInt(elements[i]);
- if ((l < 0L) || (l > 255L))
- {
- return null;
- }
- bytes[i] = (byte) (int) (l & 0xFF);
- }
- break;
- default:
- return null;
- }
- }
- catch (NumberFormatException e)
- {
- return null;
- }
- return bytes;
- }
-
- /**
- * 获取IP地址
- *
- * @return 本地IP地址
- */
- public static String getHostIp()
- {
- try
- {
- return InetAddress.getLocalHost().getHostAddress();
- }
- catch (UnknownHostException e)
- {
- }
- return "127.0.0.1";
- }
-
- /**
- * 获取主机名
- *
- * @return 本地主机名
- */
- public static String getHostName()
- {
- try
- {
- return InetAddress.getLocalHost().getHostName();
- }
- catch (UnknownHostException e)
- {
- }
- return "未知";
- }
-
- /**
- * 从多级反向代理中获得第一个非unknown IP地址
- *
- * @param ip 获得的IP地址
- * @return 第一个非unknown IP地址
- */
- public static String getMultistageReverseProxyIp(String ip)
- {
- // 多级反向代理检测
- if (ip != null && ip.indexOf(",") > 0)
- {
- final String[] ips = ip.trim().split(",");
- for (String subIp : ips)
- {
- if (false == isUnknown(subIp))
- {
- ip = subIp;
- break;
- }
- }
- }
- return StringUtils.substring(ip, 0, 255);
- }
-
- /**
- * 检测给定字符串是否为未知,多用于检测HTTP请求相关
- *
- * @param checkString 被检测的字符串
- * @return 是否未知
- */
- public static boolean isUnknown(String checkString)
- {
- return StringUtils.isBlank(checkString) || "unknown".equalsIgnoreCase(checkString);
- }
-
- /**
- * 是否为IP
- */
- public static boolean isIP(String ip)
- {
- return StringUtils.isNotBlank(ip) && ip.matches(REGX_IP);
- }
-
- /**
- * 是否为IP,或 *为间隔的通配符地址
- */
- public static boolean isIpWildCard(String ip)
- {
- return StringUtils.isNotBlank(ip) && ip.matches(REGX_IP_WILDCARD);
- }
-
- /**
- * 检测参数是否在ip通配符里
- */
- public static boolean ipIsInWildCardNoCheck(String ipWildCard, String ip)
- {
- String[] s1 = ipWildCard.split("\\.");
- String[] s2 = ip.split("\\.");
- boolean isMatchedSeg = true;
- for (int i = 0; i < s1.length && !s1[i].equals("*"); i++)
- {
- if (!s1[i].equals(s2[i]))
- {
- isMatchedSeg = false;
- break;
- }
- }
- return isMatchedSeg;
- }
-
- /**
- * 是否为特定格式如:“10.10.10.1-10.10.10.99”的ip段字符串
- */
- public static boolean isIPSegment(String ipSeg)
- {
- return StringUtils.isNotBlank(ipSeg) && ipSeg.matches(REGX_IP_SEG);
- }
-
- /**
- * 判断ip是否在指定网段中
- */
- public static boolean ipIsInNetNoCheck(String iparea, String ip)
- {
- int idx = iparea.indexOf('-');
- String[] sips = iparea.substring(0, idx).split("\\.");
- String[] sipe = iparea.substring(idx + 1).split("\\.");
- String[] sipt = ip.split("\\.");
- long ips = 0L, ipe = 0L, ipt = 0L;
- for (int i = 0; i < 4; ++i)
- {
- ips = ips << 8 | Integer.parseInt(sips[i]);
- ipe = ipe << 8 | Integer.parseInt(sipe[i]);
- ipt = ipt << 8 | Integer.parseInt(sipt[i]);
- }
- if (ips > ipe)
- {
- long t = ips;
- ips = ipe;
- ipe = t;
- }
- return ips <= ipt && ipt <= ipe;
- }
-
- /**
- * 校验ip是否符合过滤串规则
- *
- * @param filter 过滤IP列表,支持后缀'*'通配,支持网段如:`10.10.10.1-10.10.10.99`
- * @param ip 校验IP地址
- * @return boolean 结果
- */
- public static boolean isMatchedIp(String filter, String ip)
- {
- if (StringUtils.isEmpty(filter) || StringUtils.isEmpty(ip))
- {
- return false;
- }
- String[] ips = filter.split(";");
- for (String iStr : ips)
- {
- if (isIP(iStr) && iStr.equals(ip))
- {
- return true;
- }
- else if (isIpWildCard(iStr) && ipIsInWildCardNoCheck(iStr, ip))
- {
- return true;
- }
- else if (isIPSegment(iStr) && ipIsInNetNoCheck(iStr, ip))
- {
- return true;
- }
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/annotation/DistributedLock.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/annotation/DistributedLock.java
deleted file mode 100644
index 93a38a7..0000000
--- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/annotation/DistributedLock.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.ruoyi.common.redis.annotation;
-
-import java.lang.annotation.*;
-
-/**
- * @Descreption: 分布式锁注解
- * @Author: luofl
- * @Date: 2024/11/26 16:43
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface DistributedLock {
-
- /**
- * 锁名字(没有EL解析)
- */
- String lockName() default "";
-
- /**
- * 锁前缀(有EL解析)
- */
- String lockNamePre() default "";
-
- /**
- * 锁后缀(有EL解析)
- */
- String lockNamePost() default "";
-
- /**
- * 锁前后缀拼接分隔符
- */
- String separator() default "_";
-}
diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/FastJson2JsonRedisSerializer.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/FastJson2JsonRedisSerializer.java
deleted file mode 100644
index 80e1be4..0000000
--- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/FastJson2JsonRedisSerializer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ruoyi.common.redis.configure;
-
-import java.nio.charset.Charset;
-import org.springframework.data.redis.serializer.RedisSerializer;
-import org.springframework.data.redis.serializer.SerializationException;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONReader;
-import com.alibaba.fastjson2.JSONWriter;
-
-/**
- * Redis使用FastJson序列化
- *
- * @author ruoyi
- */
-public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
-{
- public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
-
- private Class<T> clazz;
-
-
- public FastJson2JsonRedisSerializer(Class<T> clazz)
- {
- super();
- this.clazz = clazz;
- }
-
- @Override
- public byte[] serialize(T t) throws SerializationException
- {
- if (t == null)
- {
- return new byte[0];
- }
- return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(DEFAULT_CHARSET);
- }
-
- @Override
- public T deserialize(byte[] bytes) throws SerializationException
- {
- if (bytes == null || bytes.length <= 0)
- {
- return null;
- }
- String str = new String(bytes, DEFAULT_CHARSET);
-
- return JSON.parseObject(str, clazz, JSONReader.Feature.SupportAutoType);
- }
-}
diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java
deleted file mode 100644
index 6e1ec8a..0000000
--- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.ruoyi.common.redis.configure;
-
-import org.springframework.boot.autoconfigure.AutoConfigureBefore;
-import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
-import org.springframework.cache.annotation.CachingConfigurerSupport;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-/**
- * redis配置
- *
- * @author ruoyi
- */
-@Configuration
-@EnableCaching
-@AutoConfigureBefore(RedisAutoConfiguration.class)
-public class RedisConfig extends CachingConfigurerSupport
-{
- @Bean
- @SuppressWarnings(value = { "unchecked", "rawtypes" })
- public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
- {
- RedisTemplate<Object, Object> template = new RedisTemplate<>();
- template.setConnectionFactory(connectionFactory);
-
- FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
-
- // 使用StringRedisSerializer来序列化和反序列化redis的key值
- template.setKeySerializer(new StringRedisSerializer());
- template.setValueSerializer(serializer);
-
- // Hash的key也采用StringRedisSerializer的序列化方式
- template.setHashKeySerializer(new StringRedisSerializer());
- template.setHashValueSerializer(serializer);
-
- template.afterPropertiesSet();
- return template;
- }
-}
diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java
deleted file mode 100644
index 5d3ad86..0000000
--- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java
+++ /dev/null
@@ -1,276 +0,0 @@
-package com.ruoyi.common.redis.service;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.BoundSetOperations;
-import org.springframework.data.redis.core.HashOperations;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.ValueOperations;
-import org.springframework.stereotype.Component;
-
-/**
- * spring redis 工具类
- *
- * @author ruoyi
- **/
-@SuppressWarnings(value = { "unchecked", "rawtypes" })
-@Component
-public class RedisService
-{
- @Autowired
- public RedisTemplate redisTemplate;
-
- /**
- * 缓存基本的对象,Integer、String、实体类等
- *
- * @param key 缓存的键值
- * @param value 缓存的值
- */
- public <T> void setCacheObject(final String key, final T value)
- {
- redisTemplate.opsForValue().set(key, value);
- }
-
- /**
- * 缓存基本的对象,Integer、String、实体类等
- *
- * @param key 缓存的键值
- * @param value 缓存的值
- * @param timeout 时间
- * @param timeUnit 时间颗粒度
- */
- public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit)
- {
- redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
- }
-
- /**
- * 设置有效时间
- *
- * @param key Redis键
- * @param timeout 超时时间
- * @return true=设置成功;false=设置失败
- */
- public boolean expire(final String key, final long timeout)
- {
- return expire(key, timeout, TimeUnit.SECONDS);
- }
-
- /**
- * 设置有效时间
- *
- * @param key Redis键
- * @param timeout 超时时间
- * @param unit 时间单位
- * @return true=设置成功;false=设置失败
- */
- public boolean expire(final String key, final long timeout, final TimeUnit unit)
- {
- return redisTemplate.expire(key, timeout, unit);
- }
-
- /**
- * 获取有效时间
- *
- * @param key Redis键
- * @return 有效时间
- */
- public long getExpire(final String key)
- {
- return redisTemplate.getExpire(key);
- }
-
- /**
- * 判断 key是否存在
- *
- * @param key 键
- * @return true 存在 false不存在
- */
- public Boolean hasKey(String key)
- {
- return redisTemplate.hasKey(key);
- }
-
- /**
- * 获得缓存的基本对象。
- *
- * @param key 缓存键值
- * @return 缓存键值对应的数据
- */
- public <T> T getCacheObject(final String key)
- {
- ValueOperations<String, T> operation = redisTemplate.opsForValue();
- return operation.get(key);
- }
-
- /**
- * 删除单个对象
- *
- * @param key
- */
- public boolean deleteObject(final String key)
- {
- return redisTemplate.delete(key);
- }
-
- /**
- * 删除集合对象
- *
- * @param collection 多个对象
- * @return
- */
- public boolean deleteObject(final Collection collection)
- {
- return redisTemplate.delete(collection) > 0;
- }
-
- /**
- * 缓存List数据
- *
- * @param key 缓存的键值
- * @param dataList 待缓存的List数据
- * @return 缓存的对象
- */
- public <T> long setCacheList(final String key, final List<T> dataList)
- {
- Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
- return count == null ? 0 : count;
- }
-
- /**
- * 获得缓存的list对象
- *
- * @param key 缓存的键值
- * @return 缓存键值对应的数据
- */
- public <T> List<T> getCacheList(final String key)
- {
- return redisTemplate.opsForList().range(key, 0, -1);
- }
-
- /**
- * 缓存Set
- *
- * @param key 缓存键值
- * @param dataSet 缓存的数据
- * @return 缓存数据的对象
- */
- public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet)
- {
- BoundSetOperations<String, T> setOperation = redisTemplate.boundSetOps(key);
- Iterator<T> it = dataSet.iterator();
- while (it.hasNext())
- {
- setOperation.add(it.next());
- }
- return setOperation;
- }
-
- /**
- * 获得缓存的set
- *
- * @param key
- * @return
- */
- public <T> Set<T> getCacheSet(final String key)
- {
- return redisTemplate.opsForSet().members(key);
- }
-
- /**
- * 缓存Map
- *
- * @param key
- * @param dataMap
- */
- public <T> void setCacheMap(final String key, final Map<String, T> dataMap)
- {
- if (dataMap != null) {
- redisTemplate.opsForHash().putAll(key, dataMap);
- }
- }
-
- public <T> void setCacheMap(final String key, final Map<String, T> dataMap, long timeout)
- {
- if (dataMap != null) {
- redisTemplate.opsForHash().putAll(key, dataMap);
- redisTemplate.expire(key, timeout, TimeUnit.SECONDS);
- }
- }
-
- /**
- * 获得缓存的Map
- *
- * @param key
- * @return
- */
- public <T> Map<String, T> getCacheMap(final String key)
- {
- return redisTemplate.opsForHash().entries(key);
- }
-
- /**
- * 往Hash中存入数据
- *
- * @param key Redis键
- * @param hKey Hash键
- * @param value 值
- */
- public <T> void setCacheMapValue(final String key, final String hKey, final T value)
- {
- redisTemplate.opsForHash().put(key, hKey, value);
- }
-
- /**
- * 获取Hash中的数据
- *
- * @param key Redis键
- * @param hKey Hash键
- * @return Hash中的对象
- */
- public <T> T getCacheMapValue(final String key, final String hKey)
- {
- HashOperations<String, String, T> opsForHash = redisTemplate.opsForHash();
- return opsForHash.get(key, hKey);
- }
-
- /**
- * 获取多个Hash中的数据
- *
- * @param key Redis键
- * @param hKeys Hash键集合
- * @return Hash对象集合
- */
- public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys)
- {
- return redisTemplate.opsForHash().multiGet(key, hKeys);
- }
-
- /**
- * 删除Hash中的某条数据
- *
- * @param key Redis键
- * @param hKey Hash键
- * @return 是否成功
- */
- public boolean deleteCacheMapValue(final String key, final String hKey)
- {
- return redisTemplate.opsForHash().delete(key, hKey) > 0;
- }
-
- /**
- * 获得缓存的基本对象列表
- *
- * @param pattern 字符串前缀
- * @return 对象列表
- */
- public Collection<String> keys(final String pattern)
- {
- return redisTemplate.keys(pattern);
- }
-}
diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java
new file mode 100644
index 0000000..f6915f7
--- /dev/null
+++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java
@@ -0,0 +1,39 @@
+package com.ruoyi.job.task;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Set;
+
+@Component("ryTask")
+@Log4j2
+public class AfterSalesTask {
+ @Resource
+ private RedisTemplate<String, String> redisTemplate;
+
+ /**
+ * 计算佣金(设置每分钟执行一次)
+ */
+ public void afterSales()
+ {
+ long now = System.currentTimeMillis() / 1000; // 获取当前时间戳(秒)
+ // 从延迟队列中获取需要处理的订单
+ Set<String> orderIds = redisTemplate.opsForZSet().rangeByScore("delay_queue:commission", 0, now);
+ if (orderIds != null && !orderIds.isEmpty()) {
+ // 处理完后移除已处理的订单
+ redisTemplate.opsForZSet().removeRangeByScore("delay_queue:commission", 0, now);
+ }
+ }
+
+ /**
+ * 佣金补偿(每天执行一次)
+ * redis未配置持久化,为防止数据丢失,每天执行一次,将到期未处理的订单重新放入延迟队列中
+ */
+ public void afterSalesCompensation()
+ {
+ // 获取未处理的订单
+
+ }
+}
diff --git a/ruoyi-service/ruoyi-account/pom.xml b/ruoyi-service/ruoyi-account/pom.xml
index 7e756da..7f5e8f8 100644
--- a/ruoyi-service/ruoyi-account/pom.xml
+++ b/ruoyi-service/ruoyi-account/pom.xml
@@ -121,6 +121,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.github.pagehelper</groupId>
+ <artifactId>pagehelper-spring-boot-starter</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java
index 50bce9b..718a22d 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java
@@ -1,10 +1,16 @@
package com.ruoyi.account.controller;
import com.ruoyi.account.api.model.AppUserBank;
+import com.ruoyi.account.service.AppUserBankService;
+import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.security.service.TokenService;
+import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
/**
* @author zhibing.pu
@@ -14,7 +20,11 @@
@RestController
@RequestMapping("/appUserBank")
public class AppUserBankController {
-
+ @Resource
+ private AppUserBankService appUserBankService;
+ @Resource
+ private TokenService tokenService;
+
@@ -23,15 +33,25 @@
@PostMapping("/saveAppUserBank")
@ApiOperation(value = "保存银行卡")
public AjaxResult saveAppUserBank(@RequestBody AppUserBank appUserBank){
+ LoginUser loginUserApplet = tokenService.getLoginUserApplet();
+ AppUserBank bank = appUserBankService.getById(loginUserApplet.getUserid());
+ if (bank == null){
+ appUserBankService.save(appUserBank);
+ }else {
+ BeanUtils.copyBeanProp(bank,appUserBank);
+ appUserBankService.updateById(bank);
+ }
return AjaxResult.success();
}
-
+
@ResponseBody
@GetMapping("/getAppUserBank")
@ApiOperation(value = "获取银行卡信息")
public AjaxResult<AppUserBank> getAppUserBank(){
- return AjaxResult.success();
+ LoginUser loginUserApplet = tokenService.getLoginUserApplet();
+ AppUserBank bank = appUserBankService.getById(loginUserApplet.getUserid());
+ return AjaxResult.success(bank);
}
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
index f627213..f0a5e35 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -4,8 +4,10 @@
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.UserCancellationLog;
+import com.ruoyi.account.api.model.UserCoupon;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.UserCancellationLogService;
+import com.ruoyi.account.service.UserCouponService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.Shop;
@@ -56,6 +58,19 @@
private AppUserService appUserService;
@Resource
private StoreClient storeClient;
+ @Resource
+ private UserCouponService userCouponService;
+
+
+ @ResponseBody
+ @PostMapping("/mobileLogin")
+ @ApiOperation(value = "手机号登录")
+ public R<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){
+ return appUserService.mobileLogin(mobileLogin);
+ }
+
+
+
@@ -68,12 +83,34 @@
@ResponseBody
- @PostMapping("/mobileLogin")
- @ApiOperation(value = "手机号登录")
- public R<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){
- return appUserService.mobileLogin(mobileLogin);
+ @PostMapping("/getAppUserById")
+ public AppUser getAppUserById(@RequestParam("id") Long id){
+ return appUserService.getById(id);
}
-
+
+ @ResponseBody
+ @PostMapping("/editAppUserById")
+ public R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser) {
+ appUserService.updateById(appUser);
+ return R.ok();
+
+ }
+
+ @ResponseBody
+ @PostMapping("/getCouponCount")
+ public R<Long> getCouponCount(@RequestParam("userId")Long userId, @RequestParam("couponId") Integer couponId ){
+ Long count = userCouponService.lambdaQuery().eq(UserCoupon::getAppUserId, userId).eq(UserCoupon::getCouponId, couponId).count();
+ return R.ok(count);
+ }
+
+ @ResponseBody
+ @PostMapping("/getVipCount")
+ public R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId ){
+ Long count = appUserService.lambdaQuery().eq(AppUser::getInviteUserId, userId).eq(AppUser::getVipId, vipId).count();
+ return R.ok(count);
+ }
+
+
@ResponseBody
@@ -147,7 +184,9 @@
}
- @PostMapping("/index")
+
+
+ @GetMapping("/index")
@ApiOperation(value = "个人中心首页", tags = {"小程序-个人中心首页"})
public R<AppUser> index(){
System.err.println("=-====");
@@ -185,6 +224,15 @@
}
+ /**
+ * 获取用户的祖籍列表
+ */
+ @GetMapping("/getUserAncestorList")
+ public R<List<AppUser>> getUserAncestorList(Long id){
+ List<AppUser> list = appUserService.getUserAncestorList(id,null);
+ return R.ok(list);
+ }
+
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
index 1846885..dd50fd1 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -99,7 +99,7 @@
if (data==null){
return R.fail("当前优惠券不存在,请刷新后重试");
}
- if (data.getSendType()!=1&&byId.getLavePoint().compareTo(data.getNeedPoint())==-1){
+ if (data.getSendType()!=1&&byId.getLavePoint().compareTo(data.getNeedPoint().intValue())==-1){
return R.fail("当前积分不足,兑换失败");
}
//检验发放时间
@@ -112,12 +112,12 @@
UserPoint userPoint = new UserPoint();
userPoint.setType(4);
userPoint.setHistoricalPoint(byId.getLavePoint());
- userPoint.setVariablePoint(data.getNeedPoint());
+ userPoint.setVariablePoint(data.getNeedPoint().intValue());
userPoint.setAppUserId(userid);
userPoint.setObjectId(Long.valueOf(data.getId()));
userPointService.save(userPoint);
//扣除积分
- byId.setLavePoint(byId.getLavePoint().subtract(userPoint.getVariablePoint()));
+ byId.setLavePoint(byId.getLavePoint() - userPoint.getVariablePoint());
appUserService.updateById(byId);
}
//增加优惠券记录,根据时间类型设置开始结束时间
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
index cb8e4e0..780c330 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
@@ -29,7 +29,7 @@
*/
@RestController
@RequestMapping("/user-point")
-@Api("用户积分")
+@Api(tags = "个人积分")
public class UserPointController extends BaseController {
@Resource
private UserPointService userPointService;
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
index 291de10..8c47f79 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
@@ -1,25 +1,39 @@
package com.ruoyi.account.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.BalanceChangeRecord;
+import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.BalanceChangeRecordService;
+import com.ruoyi.account.service.VipSettingService;
import com.ruoyi.account.service.WalletService;
import com.ruoyi.account.vo.WalletVO;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
+import com.ruoyi.order.model.Order;
+import com.ruoyi.other.api.domain.VipSetting;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.YearMonth;
import java.util.List;
+import java.util.stream.Collectors;
-@Api("钱包")
+@Api(tags = "小程序-个人中心-我的钱包")
@RestController
@RequestMapping("wallet")
public class WalletController extends BaseController {
@@ -29,27 +43,73 @@
private TokenService tokenService;
@Resource
private WalletService walletService;
+ @Resource
+ private RemoteOrderGoodsClient remoteOrderGoodsClient;
+ @Resource
+ private AppUserService appUserService;
+ @Resource
+ private VipSettingService vipSettingService;
/**
* 钱包详情
*/
@GetMapping("detail")
- @ApiOperation(value = "钱包详情", notes = "钱包详情", tags = {"小程序-个人中心-我的钱包-钱包详情"})
+ @ApiOperation(value = "钱包详情", notes = "钱包详情")
public R<WalletVO> detail() {
LoginUser loginUserApplet = tokenService.getLoginUserApplet();
+ VipSetting vipSetting = vipSettingService.getVipSettingByUserId(loginUserApplet.getUserid());
WalletVO walletVO = walletService.getWalletByUserId(loginUserApplet.getUserid());
+ walletVO.setVipWithdrawalFee(vipSetting.getVipWithdrawalFee());
return R.ok(walletVO);
}
/**
* 变更明细
*/
- @ApiOperation(value = "变更明细", notes = "变更明细", tags = {"小程序-个人中心-我的钱包-变更记录"})
+ @ApiOperation(value = "变更明细", notes = "变更明细")
@GetMapping("change")
- public R<List<BalanceChangeRecord>> change() {
+ public R<List<BalanceChangeRecord>> change(@ApiParam(value = "变更类型")
+ @RequestParam(required = false) Integer changeType,
+ @ApiParam(value = "创建时间")
+ @RequestParam(required = false)
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ LocalDate createTime) {
Long userId = SecurityUtils.getUserId();
- return R.ok(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>()
- .eq(BalanceChangeRecord::getAppUserId, userId)));
+
+ LocalDateTime startTime = null;
+ LocalDateTime endTime = null;
+ if (createTime != null) {
+ // 将 createTime 设置为当天的开始时间 (00:00)
+ startTime = createTime.atStartOfDay();
+
+ // 使用 YearMonth 来获取该月的最后一天
+ YearMonth yearMonth = YearMonth.from(createTime);
+ LocalDate lastDayOfMonth = yearMonth.atEndOfMonth();
+
+ // 将最后一天转换为 LocalDateTime,并设置为当天的最后一秒 (23:59:59.999)
+ endTime = lastDayOfMonth.atTime(LocalTime.MAX);
+ }
+
+ List<BalanceChangeRecord> list = balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>()
+ .eq(changeType != null, BalanceChangeRecord::getChangeType, changeType)
+ .between(startTime != null, BalanceChangeRecord::getCreateTime, startTime, endTime)
+ .eq(BalanceChangeRecord::getAppUserId, userId));
+
+ List<Long> orderIds = list.stream().map(BalanceChangeRecord::getOrderId).collect(Collectors.toList());
+ R<List<Order>> r = remoteOrderGoodsClient.getOrderListByIds(orderIds);
+ if (!R.isSuccess(r)){
+ return R.fail(r.getMsg());
+ }
+ List<Order> orderList = r.getData();
+ list.forEach(bc -> {
+ orderList.stream().filter(o -> o.getId().equals(bc.getOrderId())).findFirst().ifPresent(o -> {
+ Long appUserId = o.getAppUserId();
+ AppUser appUser = appUserService.getById(appUserId);
+ bc.setUserName(appUser.getName());
+ bc.setAmount(o.getPaymentAmount());
+ });
+ });
+ return R.ok(list);
}
// /**
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserBankMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserBankMapper.java
new file mode 100644
index 0000000..dbe1670
--- /dev/null
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserBankMapper.java
@@ -0,0 +1,7 @@
+package com.ruoyi.account.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.account.api.model.AppUserBank;
+
+public interface AppUserBankMapper extends BaseMapper<AppUserBank> {
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserBankService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserBankService.java
new file mode 100644
index 0000000..4b3d5fe
--- /dev/null
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserBankService.java
@@ -0,0 +1,7 @@
+package com.ruoyi.account.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.account.api.model.AppUserBank;
+
+public interface AppUserBankService extends IService<AppUserBank> {
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java
index 96f9fec..a313542 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java
@@ -57,4 +57,9 @@
* @return
*/
List<NearbyReferrerVo> getNearbyReferrer(NearbyReferrer nearbyReferrer);
+
+ /**
+ * 获取用户的祖籍列表
+ */
+ List<AppUser> getUserAncestorList(Long id,List<AppUser> list);
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/VipSettingService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/VipSettingService.java
new file mode 100644
index 0000000..cd40400
--- /dev/null
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/VipSettingService.java
@@ -0,0 +1,10 @@
+package com.ruoyi.account.service;
+
+import com.ruoyi.other.api.domain.VipSetting;
+
+public interface VipSettingService {
+
+ VipSetting getVipSettingById(Integer id);
+
+ VipSetting getVipSettingByUserId(Long appUserId);
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserBankServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserBankServiceImpl.java
new file mode 100644
index 0000000..d0032c3
--- /dev/null
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserBankServiceImpl.java
@@ -0,0 +1,11 @@
+package com.ruoyi.account.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.account.api.model.AppUserBank;
+import com.ruoyi.account.mapper.AppUserBankMapper;
+import com.ruoyi.account.service.AppUserBankService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AppUserBankServiceImpl extends ServiceImpl<AppUserBankMapper, AppUserBank> implements AppUserBankService {
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
index bfb01d7..da54600 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -18,14 +18,13 @@
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.feignClient.SysUserClient;
import com.ruoyi.system.api.model.LoginUser;
+import org.checkerframework.checker.units.qual.A;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* <p>
@@ -308,11 +307,11 @@
}
public AppUser getTopAppUser(List<AppUser> list, Long id){
- AppUser appUser = list.stream().filter(s -> s.getInviteUserId().equals(id)).findFirst().get();
+ AppUser appUser = list.stream().filter(s -> s.getId().equals(id)).findFirst().get();
if(null == appUser.getInviteUserId()){
return appUser;
}
- return getTopAppUser(list, appUser.getId());
+ return getTopAppUser(list, appUser.getInviteUserId());
}
@@ -330,4 +329,38 @@
List<NearbyReferrerVo> list = this.baseMapper.getNearbyReferrer(cityCode, nearbyReferrer);
return list;
}
+
+ @Override
+ public List<AppUser> getUserAncestorList(Long id, List<AppUser> list) {
+ if (list == null) {
+ list = new ArrayList<>();
+ }
+
+ Set<Long> visitedIds = new HashSet<>();
+ Long currentId = id;
+
+ while (currentId != null && !visitedIds.contains(currentId)) {
+ AppUser appUser = getById(currentId);
+ if (appUser == null) {
+ break; // 如果用户不存在,终止循环
+ }
+
+ Long inviteUserId = appUser.getInviteUserId();
+ if (inviteUserId != null) {
+ AppUser invitedUser = getById(inviteUserId);
+ if (invitedUser != null) {
+ list.add(invitedUser);
+ visitedIds.add(currentId);
+ currentId = inviteUserId;
+ } else {
+ break; // 如果邀请用户不存在,终止循环
+ }
+ } else {
+ break; // 如果没有邀请用户,终止循环
+ }
+ }
+
+ return list;
+ }
+
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
index c94835c..1cedad4 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -40,10 +40,10 @@
List<UserPoint> userPointList = list(new LambdaQueryWrapper<UserPoint>()
.eq(UserPoint::getAppUserId, userId));
- Map<Integer, BigDecimal> userBalanceMap = userPointList.stream()
+ Map<Integer, Integer> userBalanceMap = userPointList.stream()
.collect(Collectors.toMap(UserPoint::getType, UserPoint::getBalance));
- BigDecimal lavePoint = appUser.getLavePoint();
+ Integer lavePoint = appUser.getLavePoint();
UserPointVO userPointVO = new UserPointVO();
userPointVO.setTotalPoint(lavePoint);
userPointVO.setShopPoint(userBalanceMap.get(PointChangeType.CONSUME.getCode()));
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipSettingServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipSettingServiceImpl.java
new file mode 100644
index 0000000..c770692
--- /dev/null
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipSettingServiceImpl.java
@@ -0,0 +1,40 @@
+package com.ruoyi.account.service.impl;
+
+import com.ruoyi.account.api.feignClient.AppUserClient;
+import com.ruoyi.account.api.model.AppUser;
+import com.ruoyi.account.service.VipSettingService;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.other.api.domain.VipSetting;
+import com.ruoyi.other.api.feignClient.RemoteVipSettingClient;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service
+public class VipSettingServiceImpl implements VipSettingService {
+
+ @Resource
+ private RemoteVipSettingClient remoteVipSettingClient;
+ @Resource
+ private AppUserClient appUserClient;
+
+
+ @Override
+ public VipSetting getVipSettingById(Integer id) {
+ R<VipSetting> vipSettingById = remoteVipSettingClient.getVipSettingById(id);
+ if (!R.isSuccess(vipSettingById)){
+ throw new ServiceException("会员等级获取失败");
+ }
+ return vipSettingById.getData();
+ }
+
+ @Override
+ public VipSetting getVipSettingByUserId(Long appUserId) {
+ AppUser appUser = appUserClient.getAppUserById(appUserId);
+ if(null == appUser){
+ throw new ServiceException("用户不存在");
+ }
+ return getVipSettingById(appUser.getVipId());
+ }
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java
index c6f7b55..0d4f040 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java
@@ -34,9 +34,6 @@
}
Integer vipId = appUser.getVipId();
R<VipSetting> r = remoteVipSettingClient.getVipSettingById(vipId);
- if (r == null || r.getCode() != R.SUCCESS) {
- throw new RuntimeException("获取会员设置信息失败");
- }
VipSetting data = r.getData();
if (data == null) {
throw new RuntimeException("会员设置信息为空");
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java
index d17cb72..3217523 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java
@@ -1,13 +1,25 @@
package com.ruoyi.account.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.account.api.feignClient.AppUserClient;
+import com.ruoyi.account.api.model.AppUser;
+import com.ruoyi.account.api.model.WithdrawalRequests;
import com.ruoyi.account.dto.WithdrawalRequestsDTO;
import com.ruoyi.account.mapper.WithdrawalRequestsMapper;
-import com.ruoyi.account.api.model.WithdrawalRequests;
+import com.ruoyi.account.service.VipSettingService;
import com.ruoyi.account.service.WithdrawalRequestsService;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.bean.BeanUtils;
+import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.other.api.domain.VipSetting;
+import com.ruoyi.system.api.model.LoginUser;
import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
/**
* <p>
@@ -19,9 +31,45 @@
*/
@Service
public class WithdrawalRequestsServiceImpl extends ServiceImpl<WithdrawalRequestsMapper, WithdrawalRequests> implements WithdrawalRequestsService {
+ @Resource
+ private TokenService tokenService;
+ @Resource
+ private AppUserClient appUserClient;
+ @Resource
+ private VipSettingService vipSettingService;
+
+ public static final BigDecimal MAX_WITHDRAWAL_AMOUNT = new BigDecimal("200");
+ public static final BigDecimal VIP_WITHDRAWAL_FEE_DENOMINATOR = new BigDecimal("100");
@Override
public void withdrawalApply(WithdrawalRequestsDTO params) {
+ if (params.getWithdrawalAmount().compareTo(MAX_WITHDRAWAL_AMOUNT) > 0) {
+ throw new ServiceException("提现失败,单次提现金额不能超过200元!");
+ }
+
+ LoginUser loginUserApplet = tokenService.getLoginUserApplet();
+ AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid());
+
+ if (appUser.getWithdrawableAmount().compareTo(params.getWithdrawalAmount()) < 0) {
+ throw new ServiceException("提现失败,可提现金额不足!");
+ }
+
+ Integer vipId = appUser.getVipId();
+ VipSetting vipSetting = vipSettingService.getVipSettingById(vipId);
+ if (vipSetting.getVipWithdrawalRole() == 0) {
+ throw new ServiceException("提现失败,当前会员等级不允许提现!");
+ }
+ BigDecimal vipWithdrawalMinAmount = vipSetting.getVipWithdrawalMinAmount();
+ if (params.getWithdrawalAmount().compareTo(vipWithdrawalMinAmount) < 0) {
+ throw new ServiceException("提现失败,提现金额不能小于" + vipWithdrawalMinAmount + "元!");
+ }
+ // 提现手续费
+ BigDecimal vipWithdrawalFee = vipSetting.getVipWithdrawalFee()
+ .divide(VIP_WITHDRAWAL_FEE_DENOMINATOR, 2, RoundingMode.HALF_UP);
+ // 减去手续费
+ params.setWithdrawalAmount(params.getWithdrawalAmount()
+ .subtract(params.getWithdrawalAmount().multiply(vipWithdrawalFee)));
+
WithdrawalRequests withdrawalRequests = new WithdrawalRequests();
BeanUtils.copyBeanProp(withdrawalRequests, params);
withdrawalRequests.setDelFlag(0);
@@ -29,4 +77,5 @@
withdrawalRequests.setAuditStatus(1);
save(withdrawalRequests);
}
+
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/TaskUtil.java
similarity index 91%
rename from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java
rename to ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/TaskUtil.java
index 7f028bc..a2e399d 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/TaskUtil.java
@@ -1,4 +1,4 @@
-package com.ruoyi.account.util;
+package com.ruoyi.account.util.weChat;
import org.springframework.scheduling.annotation.Scheduled;
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/AES.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/AES.java
similarity index 100%
rename from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/AES.java
rename to ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/AES.java
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WXCore.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WXCore.java
similarity index 100%
rename from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WXCore.java
rename to ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WXCore.java
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WeChatUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WeChatUtil.java
similarity index 100%
rename from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WeChatUtil.java
rename to ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WeChatUtil.java
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WxPKCS7Encoder.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WxPKCS7Encoder.java
similarity index 100%
rename from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WxPKCS7Encoder.java
rename to ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/weChat/WxPKCS7Encoder.java
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
index 92dc03c..bab1ff6 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
@@ -16,7 +16,7 @@
private Integer type;
@ApiModelProperty(value = "变动金额")
- private BigDecimal variablePoint;
+ private Integer variablePoint;
@ApiModelProperty(value = "变动时间")
private LocalDateTime createTime;
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java
index a3dc126..01f5b32 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java
@@ -1,31 +1,28 @@
package com.ruoyi.account.vo;
-import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
-
-import java.math.BigDecimal;
@Data
@ApiModel(value="UserPoint对象", description="")
public class UserPointVO {
@ApiModelProperty(value = "总积分")
- private BigDecimal totalPoint;
+ private Integer totalPoint;
@ApiModelProperty(value = "消费积分数")
- private BigDecimal shopPoint;
+ private Integer shopPoint;
@ApiModelProperty(value = "返佣积分数")
- private BigDecimal sharePoint;
+ private Integer sharePoint;
@ApiModelProperty(value = "拉新积分")
- private BigDecimal pullNewPoint;
+ private Integer pullNewPoint;
@ApiModelProperty(value = "门店业绩积分")
- private BigDecimal shopAchievementPoint;
+ private Integer shopAchievementPoint;
@ApiModelProperty(value = "门店返佣积分")
- private BigDecimal shopSharePoint;
+ private Integer shopSharePoint;
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java
index 4e0bd10..f430752 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java
@@ -33,4 +33,7 @@
@ApiModelProperty(value = "分销总金额")
private BigDecimal totalDistributionAmount;
+
+ @ApiModelProperty(value = "提现手续费")
+ private BigDecimal vipWithdrawalFee;
}
diff --git a/ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/account/RuoYiAccountApplicationTests.java b/ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/order/account/RuoYiAccountApplicationTests.java
similarity index 100%
rename from ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/account/RuoYiAccountApplicationTests.java
rename to ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/order/account/RuoYiAccountApplicationTests.java
diff --git a/ruoyi-service/ruoyi-order/pom.xml b/ruoyi-service/ruoyi-order/pom.xml
index 05fd8b5..788f0f9 100644
--- a/ruoyi-service/ruoyi-order/pom.xml
+++ b/ruoyi-service/ruoyi-order/pom.xml
@@ -124,7 +124,7 @@
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
- <version>3.5.2</version>
+ <version>3.5.4</version>
</dependency>
<dependency>
@@ -145,6 +145,11 @@
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>com.github.pagehelper</groupId>
+ <artifactId>pagehelper-spring-boot-starter</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index a0873b2..ae1e65c 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -5,6 +5,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.service.OrderService;
+import org.springframework.web.bind.annotation.*;
import com.ruoyi.order.vo.OrderDetailVO;
import com.ruoyi.order.vo.OrderVO;
import com.ruoyi.system.api.model.LoginUser;
@@ -12,11 +13,7 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import model.Order;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.order.model.Order;
import javax.annotation.Resource;
import java.util.List;
@@ -53,6 +50,14 @@
}
/**
+ * 通过订单ids获取订单列表
+ */
+ @PostMapping("/getOrderListByIds")
+ public R<List<Order>> getOrderListByIds(@RequestBody List<Long> ids){
+ return R.ok(orderService.listByIds(ids));
+ }
+
+ /**
* 订单详情
*/
@ApiOperation(value = "订单详情", tags = {"小程序-订单详情"})
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderGoodController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderGoodController.java
deleted file mode 100644
index aead1c6..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderGoodController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.ruoyi.order.controller;
-
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.order.service.OrderGoodService;
-import model.OrderGood;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-/**
- * <p>
- * 前端控制器
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-@RestController
-@RequestMapping("/order-good")
-public class OrderGoodController extends BaseController {
- @Resource
- private OrderGoodService orderGoodService;
-
- /**
- * 查询指定商品订单
- */
- @PostMapping("/selectGoodsOrder")
- public R<List<OrderGood>> selectGoodsOrder(@RequestBody List<Long> goodsIds){
- startPage();
- List<OrderGood> orderGoods = orderGoodService.list(new LambdaQueryWrapper<OrderGood>()
- .in(OrderGood::getGoodsId, goodsIds));
- return R.ok(orderGoods);
- }
-}
-
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
index 8b28d1f..a4d0f97 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -2,7 +2,6 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.service.ShoppingCartService;
@@ -11,7 +10,7 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import model.ShoppingCart;
+import com.ruoyi.order.model.ShoppingCart;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderStatus.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderStatus.java
deleted file mode 100644
index c8cfe81..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderStatus.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.ruoyi.order.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum OrderStatus {
- PENDING_SHIPMENT(1, "待发货"),
- PENDING_RECEIPT(2, "待收货"),
- PENDING_USE(3, "待使用"),
- COMPLETED(4, "已完成"),
- CANCELLED(5, "已取消"),
- REFUNDED(6, "已退款"),
- AFTER_SALE(7, "售后中");
-
- private final int code;
- private final String description;
-
- OrderStatus(int code, String description) {
- this.code = code;
- this.description = description;
- }
-
- // 根据代码获取对应的OrderStatus
- public static OrderStatus fromCode(int code) {
- for (OrderStatus status : values()) {
- if (status.getCode() == code) {
- return status;
- }
- }
- throw new IllegalArgumentException("Unknown order status code: " + code);
- }
-}
\ No newline at end of file
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderType.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderType.java
deleted file mode 100644
index c3a581f..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/enums/OrderType.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.ruoyi.order.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum OrderType {
- SERVICE(1, "服务单"),
- GOOD(2, "商品单");
-
- private final int code;
- private final String description;
-
- OrderType(int code, String description) {
- this.code = code;
- this.description = description;
- }
-
- public static OrderType fromCode(int code) {
- for (OrderType type : OrderType.values()) {
- if (type.getCode() == code) {
- return type;
- }
- }
- return null;
- }
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderGoodMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderGoodMapper.java
deleted file mode 100644
index ca051dc..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderGoodMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.order.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import model.OrderGood;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-public interface OrderGoodMapper extends BaseMapper<OrderGood> {
-
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
index ee18d39..6fa0cb8 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
@@ -2,7 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.order.vo.OrderVO;
-import model.Order;
+import com.ruoyi.order.model.Order;
import java.util.List;
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
index 026de1b..f735924 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
@@ -1,7 +1,7 @@
package com.ruoyi.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import model.RefundPass;
+import com.ruoyi.order.model.RefundPass;
/**
* <p>
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java
index 19d6849..16438ec 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java
@@ -1,7 +1,7 @@
package com.ruoyi.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import model.ShoppingCart;
+import com.ruoyi.order.model.ShoppingCart;
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/CommissionService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/CommissionService.java
new file mode 100644
index 0000000..da99507
--- /dev/null
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/CommissionService.java
@@ -0,0 +1,12 @@
+package com.ruoyi.order.service;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+public interface CommissionService {
+
+ // 计算佣金
+ void calculationCommission(List<Long> orderIds);
+
+ void addToCommissionDelayQueue(Long orderId, LocalDateTime afterSalesDeadline);
+}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java
deleted file mode 100644
index 975af3f..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.order.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import model.OrderGood;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-public interface OrderGoodService extends IService<OrderGood> {
-
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
deleted file mode 100644
index 60fda94..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.ruoyi.order.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.order.vo.OrderDetailVO;
-import com.ruoyi.order.vo.OrderVO;
-import model.Order;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-public interface OrderService extends IService<Order> {
- List<OrderVO> selectOrderListByUserId(Integer status,Long userId);
-
- OrderDetailVO getOrderDetail(Long orderId);
-
- boolean check(Order order, Integer shopId, Long userId);
-
- void writeOff(String code,Integer shopId);
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java
deleted file mode 100644
index 92edce7..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.order.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import model.RefundPass;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-public interface RefundPassService extends IService<RefundPass> {
-
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java
deleted file mode 100644
index 9d62792..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.ruoyi.order.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.order.vo.*;
-import model.ShoppingCart;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import java.util.List;
-
-public interface ShoppingCartService extends IService<ShoppingCart> {
-
-
- /**
- * 获取购物车列表数据
- * @param type
- * @param shopId
- * @return
- */
- List<MyShoppingCartVo> getMyShoppingCart(Integer type, Integer shopId);
-
- /**
- * 添加商品
- * @param shoppingCart
- */
- void addGoods(ShoppingCart shoppingCart);
-
-
- /**
- * 修改购物车数量
- * @param setGoodsNumber
- * @return
- */
- R setGoodsNumber(SetGoodsNumber setGoodsNumber);
-
-
- /**
- * 确认购物车订单
- * @param confirmOrder
- * @return
- */
- ConfirmOrderVo confirmOrder(ConfirmOrder confirmOrder);
-
-
- /**
- * 购物车支付操作
- * @param shoppingCartPayment
- * @return
- */
- R shoppingCartPayment(ShoppingCartPayment shoppingCartPayment);
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
new file mode 100644
index 0000000..2efa1cb
--- /dev/null
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
@@ -0,0 +1,111 @@
+package com.ruoyi.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.account.api.feignClient.AppUserClient;
+import com.ruoyi.account.api.model.AppUser;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.order.service.CommissionService;
+import com.ruoyi.order.service.OrderGoodService;
+import com.ruoyi.order.service.OrderService;
+import com.ruoyi.other.api.domain.Shop;
+import com.ruoyi.other.api.feignClient.ShopClient;
+import com.ruoyi.order.model.Order;
+import com.ruoyi.order.model.OrderGood;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class CommissionServiceImpl implements CommissionService {
+ @Resource
+ private OrderService orderService;
+ @Resource
+ private OrderGoodService orderGoodService;
+ @Resource
+ private AppUserClient appUserClient;
+ @Resource
+ private ShopClient shopClient;
+ @Resource
+ private RedisTemplate<String, String> redisTemplate;
+
+ /**
+ * 返佣延迟队列(redis有序集合)
+ *
+ * @param orderId 订单ID
+ * @param afterSalesDeadline 售后截止日期(计算日期)
+ */
+ @Override
+ public void addToCommissionDelayQueue(Long orderId, LocalDateTime afterSalesDeadline) {
+ // 获取订单售后截止日期时间戳(秒)
+ long deadlineTimestamp = afterSalesDeadline.atZone(ZoneId.systemDefault()).toEpochSecond();
+ redisTemplate.opsForZSet().add("delay_queue:commission", orderId.toString(), deadlineTimestamp);
+ }
+
+ @Override
+ public void calculationCommission(List<Long> orderIds) {
+ List<OrderGood> orderGoods = orderGoodService.list(new LambdaQueryWrapper<OrderGood>()
+ .in(OrderGood::getOrderId, orderIds));
+
+ Map<Long, List<OrderGood>> ogMap = orderGoods.stream().collect(Collectors.groupingBy(OrderGood::getOrderId));
+
+ for (Map.Entry<Long, List<OrderGood>> entry : ogMap.entrySet()) {
+ Long k = entry.getKey();
+ List<OrderGood> v = entry.getValue();
+ Order order = orderService.getById(k);
+ if (order.getIsCommission() == 1) {
+ continue;
+ }
+ R<Shop> r = shopClient.getShopById(order.getShopId());
+ if (!R.isSuccess(r)) {
+ throw new RuntimeException("获取门店信息失败");
+ }
+ Shop shop = r.getData();
+ if (shop == null) {
+ throw new RuntimeException("获取门店信息失败");
+ }
+
+ Long appUserId = order.getAppUserId();
+ AppUser appUser = appUserClient.getAppUserById(appUserId);
+ if (appUser == null) {
+ throw new RuntimeException("获取用户信息失败");
+ }
+ Long inviteUserId = appUser.getInviteUserId();
+ AppUser inviteUser = appUserClient.getAppUserById(inviteUserId);
+
+ for (OrderGood og : v) {// 累计分销金额
+
+ // 上级分销金额
+ if (inviteUser != null){
+ BigDecimal superiorSubcommission = og.getSuperiorSubcommission();
+ BigDecimal totalDistributionAmount = inviteUser.getTotalDistributionAmount();
+ totalDistributionAmount = totalDistributionAmount.add(superiorSubcommission);
+ //
+ Integer superiorType = og.getSuperiorType();
+ Integer sharePoint = inviteUser.getSharePoint();
+ if (superiorType == 1) {
+ Integer superiorRebatePoints = og.getSuperiorRebatePoints();
+ sharePoint = sharePoint + superiorRebatePoints;
+ } else if (superiorType == 2) {
+
+ } else {
+ continue;
+ }
+ inviteUser.setTotalDistributionAmount(totalDistributionAmount);
+ inviteUser.setSharePoint(sharePoint);
+ }
+
+ // 门店分销金额
+ og.getBoundShopCharges();
+ }
+ }
+
+
+ }
+}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderGoodServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderGoodServiceImpl.java
deleted file mode 100644
index c6a9eb8..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderGoodServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.order.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.order.mapper.OrderGoodMapper;
-import com.ruoyi.order.service.OrderGoodService;
-import model.OrderGood;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-@Service
-public class OrderGoodServiceImpl extends ServiceImpl<OrderGoodMapper, OrderGood> implements OrderGoodService {
-
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
deleted file mode 100644
index a59f576..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package com.ruoyi.order.service.impl;
-
-import com.alibaba.fastjson2.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.account.api.feignClient.AppUserClient;
-import com.ruoyi.account.api.model.AppUserShop;
-import com.ruoyi.account.api.model.UserAddress;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.order.enums.OrderStatus;
-import com.ruoyi.order.enums.OrderType;
-import com.ruoyi.order.mapper.OrderGoodMapper;
-import com.ruoyi.order.mapper.OrderMapper;
-import com.ruoyi.order.service.OrderService;
-import com.ruoyi.order.vo.OrderDetailVO;
-import com.ruoyi.order.vo.OrderGoodsVO;
-import com.ruoyi.order.vo.OrderVO;
-import com.ruoyi.other.api.domain.CouponInfo;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.OrderActivityInfo;
-import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.api.feignClient.TechnicianClient;
-import com.ruoyi.system.api.model.LoginUser;
-import model.Order;
-import model.OrderGood;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-@Service
-public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
- @Resource
- private OrderMapper orderMapper;
- @Resource
- private OrderGoodMapper orderGoodMapper;
- @Resource
- private AppUserClient appUserClient;
- @Resource
- private TokenService tokenService;
- @Resource
- private TechnicianClient technicianClient;
-
- @Override
- public List<OrderVO> selectOrderListByUserId(Integer status, Long userId) {
- return orderMapper.selectOrderListByUserId(status, userId);
- }
-
-
-
-
- @Override
- public OrderDetailVO getOrderDetail(Long orderId) {
- Order order = orderMapper.selectById(orderId);
- if (order == null){
- throw new ServiceException("订单不存在");
- }
- // 商品
- List<OrderGood> orderGoods = orderGoodMapper.selectList(new LambdaQueryWrapper<OrderGood>()
- .eq(OrderGood::getOrderId, orderId));
-
- List<OrderGoodsVO> goodsList = new ArrayList<>();
- for (OrderGood orderGood : orderGoods) {
- String goodJson = orderGood.getGoodJson();
- Goods goods = JSONObject.parseObject(goodJson, Goods.class);
-
- OrderGoodsVO orderGoodsVO = new OrderGoodsVO();
- orderGoodsVO.setGoodsId(orderGood.getGoodsId());
- orderGoodsVO.setGoodsName(goods.getName());
- orderGoodsVO.setType(goods.getType());
- orderGoodsVO.setNum(orderGood.getNum());
- orderGoodsVO.setGoodsPic(goods.getHomePagePicture());
- orderGoodsVO.setSellingPrice(goods.getSellingPrice());
- orderGoodsVO.setOriginalPrice(goods.getOriginalPrice());
- goodsList.add(orderGoodsVO);
- }
-
-
- // 收货地址
- String addressJson = order.getAddressJson();
- UserAddress userAddress = new UserAddress();
- if (StringUtils.isNotEmpty(addressJson)){
- userAddress = JSONObject.parseObject(addressJson, UserAddress.class);
-
- }
-
- // 优惠券
- String couponJson = order.getCouponJson();
- CouponInfo couponInfo = new CouponInfo();
- if (StringUtils.isNotEmpty(couponJson)){
- couponInfo = JSONObject.parseObject(couponJson, CouponInfo.class);
- }
-
- // 参与活动
- String activityJson = order.getActivityJson();
- OrderActivityInfo orderActivityInfo = new OrderActivityInfo();
- if (StringUtils.isNotEmpty(activityJson)){
- orderActivityInfo = JSONObject.parseObject(activityJson, OrderActivityInfo.class);
- }
-
- OrderDetailVO orderDetailVO = new OrderDetailVO();
- orderDetailVO.setId(order.getId());
- orderDetailVO.setPoint(order.getPoint());
- orderDetailVO.setAddressId(userAddress.getId());
- orderDetailVO.setRecieveName(userAddress.getRecieveName());
- orderDetailVO.setRecievePhone(userAddress.getRecievePhone());
- orderDetailVO.setRecieveAddress(userAddress.getRecieveAddress());
- orderDetailVO.setOrderNumber(order.getOrderNumber());
- orderDetailVO.setCreateTime(order.getCreateTime());
- orderDetailVO.setTotalAmount(order.getTotalAmount());
- orderDetailVO.setCouponName(couponInfo.getCouponName());
- orderDetailVO.setActivityName(orderActivityInfo.getActivityName());
- orderDetailVO.setCouponAmount(order.getDiscountTotalAmount());
- orderDetailVO.setExpressAmount(order.getExpressAmount());
- orderDetailVO.setPointAmount(order.getGetPoint());
- orderDetailVO.setPaymentAmount(order.getPaymentAmount());
- orderDetailVO.setGoodsList(goodsList);
- return orderDetailVO;
- }
-
- @Override
- public boolean check(Order order, Integer shopId, Long userId) {
- R<List<AppUserShop>> r = appUserClient.getAppUserShop(userId);
- if (r.getCode() != R.SUCCESS){
- throw new ServiceException("获取用户门店信息失败");
- }
- List<AppUserShop> appUserShopList = r.getData();
- if (appUserShopList == null || appUserShopList.isEmpty()){
- return false;
- }
-
- // 判断用户是否拥有该门店
- List<AppUserShop> userShopList = appUserShopList.stream()
- .filter(appUserShop -> appUserShop.getShopId().equals(shopId))
- .collect(Collectors.toList());
- if (userShopList.isEmpty()){
- return false;
- }
-
- // 判断订单是否属于该门店
- if (order == null){
- throw new ServiceException("订单不存在");
- }
-
- return order.getShopId().equals(shopId);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void writeOff(String code,Integer shopId) {
- LoginUser loginUserApplet = tokenService.getLoginUserApplet();
- Order order = orderMapper.selectOne(new LambdaQueryWrapper<Order>()
- .eq(Order::getOrderNumber, code));
- boolean check = check(order, shopId, loginUserApplet.getUserid());
- if (!check){
- throw new ServiceException("订单不存在");
- }
- order.setOrderStatus(OrderStatus.COMPLETED.getCode());
- orderMapper.updateById(order);
- Integer orderType = order.getOrderType();
- if (orderType.equals(OrderType.SERVICE.getCode())){
- R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId());
- if (shopdetail.getCode() != R.SUCCESS){
- throw new ServiceException("获取技师信息失败");
- }
- Technician technician = shopdetail.getData();
- R<Void> r = technicianClient.updateStatus(2, technician.getId());
- if (r.getCode() != R.SUCCESS){
- throw new ServiceException("修改技师状态失败");
- }
- }
- }
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
deleted file mode 100644
index d0a59ec..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.order.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.order.mapper.RefundPassMapper;
-import com.ruoyi.order.service.RefundPassService;
-import model.RefundPass;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-21
- */
-@Service
-public class RefundPassServiceImpl extends ServiceImpl<RefundPassMapper, RefundPass> implements RefundPassService {
-
-}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
deleted file mode 100644
index cac0a44..0000000
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
+++ /dev/null
@@ -1,975 +0,0 @@
-package com.ruoyi.order.service.impl;
-
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONArray;
-import com.alibaba.fastjson2.JSONObject;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.account.api.feignClient.*;
-import com.ruoyi.account.api.model.AppUser;
-import com.ruoyi.account.api.model.BalanceChangeRecord;
-import com.ruoyi.account.api.model.UserAddress;
-import com.ruoyi.account.api.model.UserPoint;
-import com.ruoyi.account.api.vo.CouponInfoVo;
-import com.ruoyi.account.api.vo.PaymentUserCoupon;
-import com.ruoyi.account.api.vo.PaymentUserCouponVo;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.order.mapper.ShoppingCartMapper;
-import com.ruoyi.order.service.OrderGoodService;
-import com.ruoyi.order.service.OrderService;
-import com.ruoyi.order.service.ShoppingCartService;
-import com.ruoyi.order.vo.*;
-import com.ruoyi.other.api.domain.*;
-import com.ruoyi.other.api.feignClient.*;
-import com.ruoyi.other.api.vo.GetGoodsBargainPrice;
-import com.ruoyi.other.api.vo.GetGoodsShopByGoodsIds;
-import com.ruoyi.other.api.vo.GetSeckillActivityInfo;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import model.Order;
-import model.OrderGood;
-import model.ShoppingCart;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.text.SimpleDateFormat;
-import java.time.LocalDateTime;
-import java.util.*;
-import java.util.stream.Collectors;
-
-@Service
-public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, ShoppingCart> implements ShoppingCartService {
-
- @Resource
- private TokenService tokenService;
-
- @Resource
- private GoodsClient goodsClient;
-
- @Resource
- private GoodsShopClient goodsShopClient;
-
- @Resource
- private AppUserClient appUserClient;
-
- @Resource
- private GoodsAreaClient goodsAreaClient;
-
- @Resource
- private GoodsVipClient goodsVipClient;
-
- @Resource
- private SeckillActivityInfoClient seckillActivityInfoClient;
-
- @Resource
- private GoodsBargainPriceClient goodsBargainPriceClient;
-
- @Resource
- private OrderService orderService;
-
- @Resource
- private OrderGoodService orderGoodService;
-
- @Resource
- private ShopClient shopClient;
-
- @Resource
- private OrderActivityInfoClient orderActivityInfoClient;
-
- @Resource
- private BaseSettingClient baseSettingClient;
-
- @Resource
- private UserAddressClient userAddressClient;
-
- @Resource
- private UserCouponClient userCouponClient;
-
- @Resource
- private SystemConfigClient systemConfigClient;
-
- @Resource
- private UserPointClient userPointClient;
-
- @Resource
- private BalanceChangeRecordClient balanceChangeRecordClient;
-
-
-
-
-
-
- /**
- * 获取购物车列表
- * @param type
- * @param shopId
- * @return
- */
- @Override
- public List<MyShoppingCartVo> getMyShoppingCart(Integer type, Integer shopId) {
- Long userid = tokenService.getLoginUserApplet().getUserid();
- AppUser appUser = appUserClient.getAppUserById(userid);
- //获取对应类型的商品数据
- List<Goods> data = goodsClient.getGoodsByType(type).getData();
- if(null == data){
- throw new RuntimeException("根据类型(1=服务商品,2=单品商品)获取商品数据失败");
- }
- List<Integer> goodsIds = data.stream().map(Goods::getId).collect(Collectors.toList());
- //查询符合商品类型的商品数据
- List<ShoppingCart> list = this.list(new LambdaQueryWrapper<ShoppingCart>().eq(ShoppingCart::getAppUserId, userid).in(ShoppingCart::getGoodsId, goodsIds));
- //构建返回数据
- List<MyShoppingCartVo> page = buildDetail(appUser, shopId, list, null);
- return page;
- }
-
-
- /**
- * 获取支付价格
- * @param appUser
- * @param goodsId
- * @param shopId
- * @return
- */
- public Price getPrice(AppUser appUser, Integer goodsId, Integer shopId){
- //获取支付价格
- //秒杀活动>门店特价>地区价格>会员价格
- //判断是否有秒杀活动
- Price price = new Price();
- GetSeckillActivityInfo info = new GetSeckillActivityInfo();
- info.setGoodsId(goodsId);
- info.setVip(appUser.getVipId());
- GoodsSeckill goodsSeckill = seckillActivityInfoClient.getSeckillActivityInfo(info).getData();
- if(null == goodsSeckill){
- //没有秒杀价,则判断门店特价
- GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice();
- goodsBargainPrice.setGoodsId(goodsId);
- goodsBargainPrice.setVip(appUser.getVipId());
- goodsBargainPrice.setShopId(shopId);
- GoodsBargainPriceDetail bargainPriceDetail = goodsBargainPriceClient.getGoodsBargainPrice(goodsBargainPrice).getData();
- if(null == bargainPriceDetail){
- //没有门店特价,判断地区价格配置
- GoodsArea area = new GoodsArea();
- area.setDistrictsCode(appUser.getDistrictCode());
- area.setCityCode(appUser.getCityCode());
- area.setProvinceCode(appUser.getProvinceCode());
- area.setVip(appUser.getVipId());
- GoodsArea goodsArea = goodsAreaClient.getGoodsArea(area).getData();
- if(null == goodsArea){
- //没有地区价格,则使用会员价格
- GoodsVip goodsVip = goodsVipClient.getGoodsVip(appUser.getVipId()).getData();
- if(null == goodsVip){
- //没有配置价格,直接使用原始基础价格
- return null;
- }else{
- price.setCash(goodsVip.getSellingPrice());
- price.setPoint(goodsVip.getIntegral());
- price.setCashPayment(goodsVip.getCashPayment() == 1 ? true : false);
- price.setPointPayment(goodsVip.getPointPayment() == 1 ? true : false);
- price.setEarnSpendingPoints(goodsVip.getEarnSpendingPoints());
- price.setSuperiorSubcommission(goodsVip.getSuperiorSubcommission());
- price.setSuperiorRebatePoints(goodsVip.getSuperiorRebatePoints());
- price.setSuperiorType(goodsVip.getSuperiorType());
- price.setServuceShopCharges(goodsVip.getServuceShopCharges());
- price.setServuceShopPoints(goodsVip.getServuceShopPoints());
- price.setTechnicianPoints(goodsVip.getTechnicianPoints());
- price.setBoundShopCharges(goodsVip.getBoundShopCharges());
- price.setBoundShopPoints(goodsVip.getBoundShopPoints());
- price.setBoundShopSuperiorsCharges(goodsVip.getBoundShopSuperiorsCharges());
- price.setBoundShopSuperiorsPoints(goodsVip.getBoundShopSuperiorsPoints());
- }
- }else{
- price.setCash(goodsArea.getSellingPrice());
- price.setPoint(goodsArea.getIntegral());
- price.setCashPayment(goodsArea.getCashPayment() == 1 ? true : false);
- price.setPointPayment(goodsArea.getPointPayment() == 1 ? true : false);
- price.setEarnSpendingPoints(goodsArea.getEarnSpendingPoints());
- price.setSuperiorSubcommission(goodsArea.getSuperiorSubcommission());
- price.setSuperiorRebatePoints(goodsArea.getSuperiorRebatePoints());
- price.setSuperiorType(goodsArea.getSuperiorType());
- price.setServuceShopCharges(goodsArea.getServuceShopCharges());
- price.setServuceShopPoints(goodsArea.getServuceShopPoints());
- price.setTechnicianPoints(goodsArea.getTechnicianPoints());
- price.setBoundShopCharges(goodsArea.getBoundShopCharges());
- price.setBoundShopPoints(goodsArea.getBoundShopPoints());
- price.setBoundShopSuperiorsCharges(goodsArea.getBoundShopSuperiorsCharges());
- price.setBoundShopSuperiorsPoints(goodsArea.getBoundShopSuperiorsPoints());
- }
- }else{
- price.setCash(bargainPriceDetail.getSellingPrice());
- price.setPoint(bargainPriceDetail.getIntegral());
- price.setCashPayment(bargainPriceDetail.getSellingPrice() != null ? true : false);
- price.setPointPayment(bargainPriceDetail.getIntegral() != null ? true : false);
- //门店特价,消费积分使用会员等级的消费积分
- GoodsArea area = new GoodsArea();
- area.setDistrictsCode(appUser.getDistrictCode());
- area.setCityCode(appUser.getCityCode());
- area.setProvinceCode(appUser.getProvinceCode());
- area.setVip(appUser.getVipId());
- GoodsArea goodsArea = goodsAreaClient.getGoodsArea(area).getData();
- price.setEarnSpendingPoints(goodsArea.getEarnSpendingPoints());
- price.setSuperiorSubcommission(goodsArea.getSuperiorSubcommission());
- price.setSuperiorRebatePoints(goodsArea.getSuperiorRebatePoints());
- price.setSuperiorType(goodsArea.getSuperiorType());
- price.setServuceShopCharges(goodsArea.getServuceShopCharges());
- price.setServuceShopPoints(goodsArea.getServuceShopPoints());
- price.setTechnicianPoints(goodsArea.getTechnicianPoints());
- price.setBoundShopCharges(goodsArea.getBoundShopCharges());
- price.setBoundShopPoints(goodsArea.getBoundShopPoints());
- price.setBoundShopSuperiorsCharges(goodsArea.getBoundShopSuperiorsCharges());
- price.setBoundShopSuperiorsPoints(goodsArea.getBoundShopSuperiorsPoints());
- }
- }else{
- //构建价格数据
- if(goodsSeckill.getCashPayment() == 1 && goodsSeckill.getPointPayment() == 1){
- price.setCash(goodsSeckill.getSellingPrice());
- price.setPoint(goodsSeckill.getIntegral());
- }
- if(goodsSeckill.getCashPayment() == 1 && goodsSeckill.getPointPayment() == 0){
- price.setCash(goodsSeckill.getSellingPrice());
- }
- if(goodsSeckill.getCashPayment() == 0 && goodsSeckill.getPointPayment() == 1){
- price.setPoint(goodsSeckill.getIntegral());
- }
- price.setCashPayment(goodsSeckill.getCashPayment() == 1 ? true : false);
- price.setPointPayment(goodsSeckill.getPointPayment() == 1 ? true : false);
- price.setEndTime(goodsSeckill.getEndTime());
- price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints());
- price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission());
- price.setSuperiorRebatePoints(goodsSeckill.getSuperiorRebatePoints());
- price.setSuperiorType(goodsSeckill.getSuperiorType());
- price.setServuceShopCharges(goodsSeckill.getServuceShopCharges());
- price.setServuceShopPoints(goodsSeckill.getServuceShopPoints());
- price.setTechnicianPoints(goodsSeckill.getTechnicianPoints());
- price.setBoundShopCharges(goodsSeckill.getBoundShopCharges());
- price.setBoundShopPoints(goodsSeckill.getBoundShopPoints());
- price.setBoundShopSuperiorsCharges(goodsSeckill.getBoundShopSuperiorsCharges());
- price.setBoundShopSuperiorsPoints(goodsSeckill.getBoundShopSuperiorsPoints());
- }
- return price;
- }
-
-
- @Data
- class Price {
- /**
- * 现金
- */
- private BigDecimal cash;
- /**
- * 积分
- */
- private Integer point;
- /**
- * 获取结束时间
- */
- private Long endTime;
- /**
- * 现金支付
- */
- private Boolean cashPayment;
- /**
- * 积分支付
- */
- private Boolean pointPayment;
- /**
- * 可获得消费积分
- */
- private Integer earnSpendingPoints;
- /**
- * 上级获得分佣金额
- */
- private BigDecimal superiorSubcommission;
- /**
- * 上级获得返佣积分
- */
- private Integer superiorRebatePoints;
- /**
- * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
- */
- private Integer superiorType;
- /**
- * 核销门店可获得服务费
- */
- private BigDecimal servuceShopCharges;
- /**
- * 核销门店可获得服务积分
- */
- private Integer servuceShopPoints;
- /**
- * 技师可获得服务积分
- */
- private Integer technicianPoints;
- /**
- * 绑定门店可获得分佣金额
- */
- private BigDecimal boundShopCharges;
- /**
- * 绑定门店可获得返佣积分
- */
- private Integer boundShopPoints;
- /**
- * 绑定门店上级门店可获得分佣金额
- */
- private BigDecimal boundShopSuperiorsCharges;
- /**
- * 绑定门店上级门店可获得返佣积分
- */
- private Integer boundShopSuperiorsPoints;
- }
-
-
- @Override
- public void addGoods(ShoppingCart shoppingCart) {
- Long userid = tokenService.getLoginUserApplet().getUserid();
- shoppingCart.setAppUserId(userid);
- this.save(shoppingCart);
- }
-
-
- /**
- * 修改购物车数量
- * @param setGoodsNumber
- * @return
- */
- @Override
- public R setGoodsNumber(SetGoodsNumber setGoodsNumber) {
- if(0 >= setGoodsNumber.getNumber()){
- return R.fail("修改数量不能小于等于0");
- }
- ShoppingCart shoppingCart = this.getById(setGoodsNumber.getId());
- Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();
- if(null != goods.getPurchaseLimit() && -1 != goods.getPurchaseLimit() && goods.getPurchaseLimit() < setGoodsNumber.getNumber()){
- return R.fail("修改数量不能大于限购数量");
- }
- if(null != shoppingCart){
- shoppingCart.setNumber(setGoodsNumber.getNumber());
- this.updateById(shoppingCart);
- }
- return R.ok();
- }
-
-
- /**
- * 确认购物车订单
- * @param confirmOrder
- * @return
- */
- @Override
- public ConfirmOrderVo confirmOrder(ConfirmOrder confirmOrder) {
- Long userid = tokenService.getLoginUserApplet().getUserid();
- AppUser appUser = appUserClient.getAppUserById(userid);
- Integer shopId = confirmOrder.getShopId();
- Shop shop = shopClient.getShopById(shopId).getData();
- String goodsJson = confirmOrder.getGoodsJson();
- List<Long> ids = new ArrayList<>();
- JSONArray objects = JSON.parseArray(goodsJson);
- for (int i = 0; i < objects.size(); i++) {
- Long id = objects.getJSONObject(i).getLong("id");
- ids.add(id);
- }
- List<ShoppingCart> list = this.listByIds(ids);
- ConfirmOrderVo confirmOrderVo = new ConfirmOrderVo();
- //构建商品明细列表
- List<MyShoppingCartVo> goodsList = buildDetail(appUser, shopId, list, objects);
- confirmOrderVo.setGoodsList(goodsList);
- confirmOrderVo.setShopId(confirmOrder.getShopId());
- confirmOrderVo.setShopName(shop.getName());
- //现金支付
- if(confirmOrder.getPaymentType() == 1){
- BigDecimal bigDecimal = goodsList.stream().map(MyShoppingCartVo::getCash).reduce(BigDecimal::add).get();
- confirmOrderVo.setOrderMoney(bigDecimal);
- }else{
- int sum = goodsList.stream().mapToInt(MyShoppingCartVo::getPoint).sum();
- confirmOrderVo.setOrderPoint(sum);
- }
- //查询当前是否有订单活动
- OrderActivityInfo orderActivityInfo = orderActivityInfoClient.getNowOrderActivityInfo(appUser.getVipId()).getData();
- BigDecimal orderMoney = confirmOrderVo.getOrderMoney();
- BigDecimal paymentMoney = orderMoney;
- //满XX才打折,只有现金才能优惠
- if(null != orderActivityInfo && confirmOrder.getPaymentType() == 1 && orderActivityInfo.getConditionAmount().compareTo(orderMoney) <= 0){
- confirmOrderVo.setActivityName(orderActivityInfo.getActivityName());
- paymentMoney = orderActivityInfo.getDiscount().divide(new BigDecimal(10)).multiply(orderMoney);
- confirmOrderVo.setDiscountAmount(orderMoney.subtract(paymentMoney).setScale(2, RoundingMode.HALF_EVEN));
- }
- BaseSetting baseSetting = baseSettingClient.getBaseSetting(4).getData();
- confirmOrderVo.setUseSimultaneously(baseSetting.getContent().equals("1") ? true : false);
- int earnPoint = goodsList.stream().mapToInt(MyShoppingCartVo::getEarnSpendingPoints).sum();
- confirmOrderVo.setEarnPoint(earnPoint);
- //支付金额,订单金额-订单优惠
- confirmOrderVo.setPayMoney(paymentMoney);
- confirmOrderVo.setResidualPoint(appUser.getLavePoint().intValue());
- //获取默认收货地址
- UserAddress userAddress = userAddressClient.getDefaultUserAddress(userid).getData();
- confirmOrderVo.setUserAddress(userAddress);
- confirmOrderVo.setPaymentType(confirmOrder.getPaymentType());
- //获取用户优惠券,用户全部优惠券,不能使用的需要标识出来置灰展示
- PaymentUserCoupon paymentUserCoupon = new PaymentUserCoupon();
- paymentUserCoupon.setUserId(userid);
- paymentUserCoupon.setOrderMoney(orderMoney);
- paymentUserCoupon.setType(confirmOrder.getType());
- if(confirmOrder.getPaymentType() == 1){
- List<PaymentUserCouponVo> data = userCouponClient.getPaymentUserCoupon(paymentUserCoupon).getData();
- for (PaymentUserCouponVo couponInfo : data) {
- List<Integer> forGoodIds = couponInfo.getForGoodIds();
- //全部商品适用
- if(null == forGoodIds){
- //满减券
- if(1 == couponInfo.getCouponType() && orderMoney.compareTo(couponInfo.getConditionAmount()) >= 0){
- couponInfo.setAvailable(true);
- }
- //代金券和折扣券
- if(2 == couponInfo.getCouponType() || 3 == couponInfo.getCouponType()){
- couponInfo.setAvailable(true);
- }
- }else{
- //部分商品适用
- BigDecimal goodsMoney = BigDecimal.ZERO;
- for (MyShoppingCartVo myShoppingCartVo : goodsList) {
- Integer goodsId = myShoppingCartVo.getGoodsId();
- BigDecimal cash = myShoppingCartVo.getCash();
- if(forGoodIds.contains(goodsId)){
- goodsMoney = goodsMoney.add(cash);
- }
- }
- //满减
- if(1 == couponInfo.getCouponType() && couponInfo.getConditionAmount().compareTo(goodsMoney) <= 0){
- couponInfo.setAvailable(true);
- }
- //代金券
- if(2 == couponInfo.getCouponType() || 3 == couponInfo.getCouponType()){
- couponInfo.setAvailable(true);
- }
- }
- }
- confirmOrderVo.setCoupon(data);
- }
- //获取快递策略
- SystemConfig systemConfig = systemConfigClient.getSystemConfig(3).getData();
- JSONObject jsonObject = JSON.parseObject(systemConfig.getContent());
- confirmOrderVo.setExpressFee(jsonObject.getBigDecimal("expressFee"));
- List<Integer> vip = jsonObject.getJSONArray("vip").toList(Integer.class);
- //包邮条件(所有会员或者满足条件的会员)
- if(vip.get(0) == -1 || vip.contains(appUser.getVipId())){
- if(confirmOrder.getPaymentType() == 1){
- //现金支付,支付金额满足包邮条件
- BigDecimal cash = jsonObject.getBigDecimal("cash");
- if(confirmOrderVo.getPayMoney().compareTo(cash) >= 0){
- confirmOrderVo.setExpressFee(BigDecimal.ZERO);
- }
- }else{
- //积分支付,支付积分是否满足包邮条件
- Integer point = jsonObject.getInteger("point");
- if(confirmOrderVo.getOrderPoint().compareTo(point) >= 0){
- confirmOrderVo.setExpressFee(BigDecimal.ZERO);
- }
- }
- }
- return confirmOrderVo;
- }
-
-
- /**
- * 构建购物车商品列表
- * @param appUser
- * @param shopId
- * @param list
- * @param objects
- * @return
- */
- private List<MyShoppingCartVo> buildDetail(AppUser appUser, Integer shopId, List<ShoppingCart> list, JSONArray objects){
- List<MyShoppingCartVo> page = new ArrayList<>();
- for (ShoppingCart shoppingCart : list) {
- Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();
- MyShoppingCartVo vo = new MyShoppingCartVo();
- vo.setId(shoppingCart.getId());
- vo.setGoodsId(goods.getId());
- vo.setHomePicture(goods.getHomePagePicture());
- vo.setName(goods.getName());
- int num = shoppingCart.getNumber();
- if(null != objects){
- for (int i = 0; i < objects.size(); i++) {
- Long id = objects.getJSONObject(i).getLong("id");
- if(id.equals(shoppingCart.getId())){
- num = objects.getJSONObject(i).getInteger("num");
- break;
- }
- }
- }
- //获取支付价格
- Price price = getPrice(appUser, shoppingCart.getGoodsId(), shopId);
- if(null == price){
- //使用商品的基础价格
- price.setCash(1 == goods.getCashPayment() ? goods.getSellingPrice() : null);
- price.setPoint(1 == goods.getPointPayment() ? goods.getIntegral() : null);
- price.setCashPayment(goods.getCashPayment() == 1 ? true : false);
- price.setPointPayment(goods.getPointPayment() == 1 ? true : false);
- }
- vo.setCash(price.getCash());
- vo.setPoint(price.getPoint());
- vo.setCashPayment(price.getCashPayment());
- vo.setPointPayment(price.getPointPayment());
- vo.setEndTime(price.getEndTime());
- vo.setOriginalPrice(goods.getOriginalPrice().toString());
- vo.setNumber(num);
- GoodsShop goodsShop = new GoodsShop();
- goodsShop.setGoodsId(shoppingCart.getGoodsId());
- goodsShop.setShopId(shopId);
- GoodsShop goodsShop1 = goodsShopClient.getGoodsShop(goodsShop).getData();
- vo.setVerifiable(null == goodsShop1 ? false : true);
- //判断当前数量是否已经超出限购数量(需要计算已经购买的数量)
- if(null == goods.getPurchaseLimit() || -1 == goods.getPurchaseLimit()){
- vo.setPurchaseLimit(false);
- }else{
- List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().eq(Order::getAppUserId, appUser.getId()).eq(Order::getDelFlag, 0).in(Order::getOrderStatus, Arrays.asList(4, 8)));
- List<Long> orderIds = orders.stream().map(Order::getId).collect(Collectors.toList());
- int sum = 0;
- if(orderIds.size() > 0){
- List<OrderGood> orderGoodList = orderGoodService.list(new LambdaQueryWrapper<OrderGood>().in(OrderGood::getOrderId, orderIds)
- .eq(OrderGood::getGoodsId, shoppingCart.getGoodsId()).eq(OrderGood::getDelFlag, 0));
- sum = orderGoodList.stream().mapToInt(OrderGood::getNum).sum();
- }
- vo.setPurchaseLimit((num + sum) > goods.getPurchaseLimit() ? true : false);
- }
- vo.setDistributionMode(goods.getDistributionMode());
- vo.setEarnSpendingPoints(price.getEarnSpendingPoints());
- vo.setSuperiorSubcommission(price.getSuperiorSubcommission());
- vo.setSuperiorRebatePoints(price.getSuperiorRebatePoints());
- vo.setSuperiorType(price.getSuperiorType());
- vo.setServuceShopCharges(price.getServuceShopCharges());
- vo.setServuceShopPoints(price.getServuceShopPoints());
- vo.setTechnicianPoints(price.getTechnicianPoints());
- vo.setBoundShopCharges(price.getBoundShopCharges());
- vo.setBoundShopPoints(price.getBoundShopPoints());
- vo.setBoundShopSuperiorsCharges(price.getBoundShopSuperiorsCharges());
- vo.setBoundShopSuperiorsPoints(price.getBoundShopSuperiorsPoints());
- page.add(vo);
- }
- return page;
- }
-
-
- /**
- * 购物车支付操作
- * @param shoppingCartPayment
- * @return
- */
- @Override
- public R shoppingCartPayment(ShoppingCartPayment shoppingCartPayment) {
- Long userid = tokenService.getLoginUserApplet().getUserid();
- AppUser appUser = appUserClient.getAppUserById(userid);
- Integer shopId = shoppingCartPayment.getShopId();
- String goodsJson = shoppingCartPayment.getGoodsJson();
- List<Long> ids = new ArrayList<>();
- Integer num = 0;
- JSONArray objects = JSON.parseArray(goodsJson);
- for (int i = 0; i < objects.size(); i++) {
- Long id = objects.getJSONObject(i).getLong("id");
- Integer num1 = objects.getJSONObject(i).getInteger("num");
- num += num1;
- ShoppingCart shoppingCart = this.getById(id);
- //判断当前数量是否已经超出限购数量(需要计算已经购买的数量)
- Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();
- if(null != goods.getPurchaseLimit() && -1 != goods.getPurchaseLimit()){
- List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().eq(Order::getAppUserId, appUser.getId()).eq(Order::getDelFlag, 0).in(Order::getOrderStatus, Arrays.asList(4, 8)));
- List<Long> orderIds = orders.stream().map(Order::getId).collect(Collectors.toList());
- int sum = 0;
- if(orderIds.size() > 0){
- List<OrderGood> orderGoodList = orderGoodService.list(new LambdaQueryWrapper<OrderGood>().in(OrderGood::getOrderId, orderIds)
- .eq(OrderGood::getGoodsId, shoppingCart.getGoodsId()).eq(OrderGood::getDelFlag, 0));
- sum = orderGoodList.stream().mapToInt(OrderGood::getNum).sum();
- }
- if((num1 + sum) > goods.getPurchaseLimit()){
- return R.fail(goods.getName() + "已超出购买上限");
- }
- }
- ids.add(id);
- }
-
- List<ShoppingCart> list = this.listByIds(ids);
- //构建商品明细列表
- List<MyShoppingCartVo> goodsList = buildDetail(appUser, shopId, list, objects);
- //判断支付当时是否正确
- if(1 == shoppingCartPayment.getPaymentType() || 2 == shoppingCartPayment.getPaymentType()){
- //现金支付
- long count = goodsList.stream().filter(s -> s.getCashPayment()).count();
- if(count != goodsList.size()){
- return R.fail("支付方式不正确");
- }
- } else if(3 == shoppingCartPayment.getPaymentType()){
- //积分支付
- long count = goodsList.stream().filter(s -> s.getPointPayment()).count();
- if(count != goodsList.size()){
- return R.fail("支付方式不正确");
- }
- }else{
- return R.fail("支付方式不正确");
- }
- //判断门店是都可以核销所有的商品
- List<Integer> goodsIds = goodsList.stream().map(MyShoppingCartVo::getGoodsId).collect(Collectors.toList());
- GetGoodsShopByGoodsIds goodsShopByGoodsIds = new GetGoodsShopByGoodsIds();
- goodsShopByGoodsIds.setGoodsIds(goodsIds);
- goodsShopByGoodsIds.setShopId(shopId);
- List<GoodsShop> data = goodsShopClient.getGoodsShopByGoodsIds(goodsShopByGoodsIds).getData();
- List<Integer> collect = data.stream().map(GoodsShop::getGoodsId).collect(Collectors.toList());
- if(data.size() != goodsList.size()){
- String goodsName = "";
- for (Integer goodsId : goodsIds) {
- if(!collect.contains(goodsId)){
- goodsName = goodsClient.getGoodsById(goodsId).getData().getName();
- break;
- }
- }
- return R.fail(goodsName + "不能在该门店核销");
- }
- //开始构建支付信息
- //现金支付的订单金额
- BigDecimal orderMoney = BigDecimal.ZERO;
- //折扣(9折)
- BigDecimal discount = null;
- //积分支付的订单积分
- Integer orderPoint = 0;
- if(3 != shoppingCartPayment.getPaymentType()){
- orderMoney = goodsList.stream().map(MyShoppingCartVo::getCash).reduce(BigDecimal::add).get();
- }else{
- orderPoint = goodsList.stream().mapToInt(MyShoppingCartVo::getPoint).sum();
- if(appUser.getLavePoint().intValue() < orderPoint){
- return R.fail("账户剩余积分不足");
- }
- }
- //现金的支付金额
- BigDecimal paymentMoney = orderMoney;
- //满减金额
- BigDecimal fullReductionAmount = BigDecimal.ZERO;
- //代金券抵扣金额
- BigDecimal moneyAmount = BigDecimal.ZERO;
- //折扣券抵扣金额
- BigDecimal discountAmount = BigDecimal.ZERO;
- //活动优惠金额
- BigDecimal activityAmount = BigDecimal.ZERO;
-
- //减去优惠券优惠金额
- CouponInfoVo couponInfoVo = null;
- if(null != shoppingCartPayment.getUserCouponId() && 3 != shoppingCartPayment.getPaymentType()){
- couponInfoVo = userCouponClient.getCouponInfo(shoppingCartPayment.getUserCouponId()).getData();
- String forGoodIds = couponInfoVo.getForGoodIds();
- List<Integer> parseArray = JSON.parseArray(forGoodIds, Integer.class);
- //全部商品
- if(parseArray.contains(-1)){
- //满减
- if(1 == couponInfoVo.getCouponType() && couponInfoVo.getConditionAmount().compareTo(paymentMoney) <= 0){
- paymentMoney = paymentMoney.subtract(couponInfoVo.getDiscountAmount());
- fullReductionAmount = fullReductionAmount.add(couponInfoVo.getDiscountAmount());
- }
- //代金券
- if(2 == couponInfoVo.getCouponType()){
- paymentMoney = paymentMoney.subtract(couponInfoVo.getMoneyAmount());
- moneyAmount = moneyAmount.add(couponInfoVo.getMoneyAmount());
- if(paymentMoney.compareTo(BigDecimal.ZERO) < 0){
- paymentMoney = BigDecimal.ZERO;
- }
- }
- //折扣券
- if(3 == couponInfoVo.getCouponType()){
- BigDecimal paymentMoney1 = couponInfoVo.getDiscount().divide(new BigDecimal(10)).multiply(paymentMoney);
- BigDecimal bigDecimal = paymentMoney.subtract(paymentMoney1).setScale(2, RoundingMode.HALF_EVEN);
- discount = couponInfoVo.getDiscount();
- paymentMoney = paymentMoney1;
- discountAmount = discountAmount.add(bigDecimal);
- }
- }else{
- //部分商品,需要计算参与优惠商品的支付金额,然后再对商品进行优惠券处理
- paymentMoney = BigDecimal.ZERO;
- BigDecimal goodsMoney = BigDecimal.ZERO;
- for (MyShoppingCartVo myShoppingCartVo : goodsList) {
- Integer goodsId = myShoppingCartVo.getGoodsId();
- BigDecimal cash = myShoppingCartVo.getCash();
- if(parseArray.contains(goodsId)){
- goodsMoney = goodsMoney.add(cash);
- }else{
- paymentMoney = paymentMoney.add(cash);
- }
- }
-
- //满减
- if(1 == couponInfoVo.getCouponType() && couponInfoVo.getConditionAmount().compareTo(goodsMoney) <= 0){
- goodsMoney = goodsMoney.subtract(couponInfoVo.getDiscountAmount());
- fullReductionAmount = fullReductionAmount.add(couponInfoVo.getDiscountAmount());
- }
- //代金券
- if(2 == couponInfoVo.getCouponType()){
- goodsMoney = goodsMoney.subtract(couponInfoVo.getMoneyAmount());
- moneyAmount = moneyAmount.add(couponInfoVo.getMoneyAmount());
- if(goodsMoney.compareTo(BigDecimal.ZERO) < 0){
- goodsMoney = BigDecimal.ZERO;
- }
- }
- //折扣券
- if(3 == couponInfoVo.getCouponType()){
- BigDecimal paymentMoney1 = couponInfoVo.getDiscount().divide(new BigDecimal(10)).multiply(goodsMoney);
- BigDecimal bigDecimal = goodsMoney.subtract(paymentMoney1).setScale(2, RoundingMode.HALF_EVEN);
- discount = couponInfoVo.getDiscount();
- goodsMoney = paymentMoney1;
- discountAmount = discountAmount.add(bigDecimal);
- }
- paymentMoney = paymentMoney.add(goodsMoney);
- }
- }
-
- //查询当前是否有订单活动
- OrderActivityInfo orderActivityInfo = orderActivityInfoClient.getNowOrderActivityInfo(appUser.getVipId()).getData();
- BaseSetting baseSetting = baseSettingClient.getBaseSetting(4).getData();
- //系统活动设置(优惠券和活动能否同时使用)
- boolean useSimultaneously = baseSetting.getContent().equals("1") ? true : false;
- //满XX才打折,只有现金才能优惠
- //如果使用优惠券,则需要判断是否可以和同时使用,且活动满足使用条件。
- //没有使用优惠券,只需要判断是都满足使用条件
- if(((useSimultaneously && null != shoppingCartPayment.getUserCouponId()) || null == shoppingCartPayment.getUserCouponId()) &&
- null != orderActivityInfo && shoppingCartPayment.getPaymentType() != 3 && orderActivityInfo.getConditionAmount().compareTo(paymentMoney) <= 0){
- BigDecimal paymentMoney1 = orderActivityInfo.getDiscount().divide(new BigDecimal(10)).multiply(paymentMoney);
- BigDecimal bigDecimal = paymentMoney.subtract(paymentMoney1).setScale(2, RoundingMode.HALF_EVEN);
- discount = orderActivityInfo.getDiscount();
- paymentMoney = paymentMoney1;
- activityAmount = activityAmount.add(bigDecimal);
- }
-
- //可获得的消费积分
- int earnPoint = goodsList.stream().mapToInt(MyShoppingCartVo::getEarnSpendingPoints).sum();
- if(null != shoppingCartPayment.getUserAddressId()){
- userAddressClient.getUserAddressById(shoppingCartPayment.getUserAddressId()).getData();
- }
-
- //获取快递策略,计算快递费
- BigDecimal expressFee = BigDecimal.ZERO;
- if(null != shoppingCartPayment.getUserAddressId()){
- SystemConfig systemConfig = systemConfigClient.getSystemConfig(3).getData();
- JSONObject jsonObject = JSON.parseObject(systemConfig.getContent());
- //快递费
- expressFee = jsonObject.getBigDecimal("expressFee");
- List<Integer> vip = jsonObject.getJSONArray("vip").toList(Integer.class);
- //包邮条件(所有会员或者满足条件的会员)
- if(vip.get(0) == -1 || vip.contains(appUser.getVipId())){
- if(shoppingCartPayment.getPaymentType() != 3){
- //现金支付,支付金额满足包邮条件
- BigDecimal cash = jsonObject.getBigDecimal("cash");
- if(paymentMoney.compareTo(cash) >= 0){
- expressFee = BigDecimal.ZERO;
- }
- }else{
- //积分支付,支付积分是否满足包邮条件
- Integer point = jsonObject.getInteger("point");
- if(orderPoint.compareTo(point) >= 0){
- expressFee = BigDecimal.ZERO;
- }
- }
- }
- }
- //构建订单明细
- Order order = new Order();
- order.setAppUserId(userid);
- order.setNum(num);
- String goodPics = "";
- String goodName = "";
- for (MyShoppingCartVo myShoppingCartVo : goodsList) {
- goodPics += myShoppingCartVo.getHomePicture() + ",";
- goodName += myShoppingCartVo.getName() + ",";
- }
- order.setGoodPics(goodPics.substring(0, goodPics.length() - 1));
- order.setGoodName(goodName.substring(0, goodName.length() - 1));
- Goods goods = goodsClient.getGoodsById(goodsList.get(0).getGoodsId()).getData();
- order.setOrderType(goods.getType());
- order.setOrderStatus(1);
- SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
- order.setOrderNumber("QJS" + getNumber(3) + sdf.format(new Date()));
- order.setTotalAmount(orderMoney.setScale(2, RoundingMode.HALF_EVEN));
- order.setFullReductionAmount(fullReductionAmount);
- order.setMoneyAmount(moneyAmount);
- order.setDiscountAmount(discountAmount);
- order.setActivityAmount(activityAmount);
- order.setDiscountTotalAmount(fullReductionAmount.add(moneyAmount).add(discountAmount).add(activityAmount));
- order.setPaymentAmount(paymentMoney);
- order.setPoint(orderPoint);
- order.setPayMethod(shoppingCartPayment.getPaymentType());
- if(3 != shoppingCartPayment.getPaymentType() && (fullReductionAmount.compareTo(BigDecimal.ZERO) > 0 ||moneyAmount.compareTo(BigDecimal.ZERO) > 0 || discountAmount.compareTo(BigDecimal.ZERO) > 0)){
- order.setCouponJson(JSON.toJSONString(couponInfoVo));
- }
- if(activityAmount.compareTo(BigDecimal.ZERO) > 0){
- order.setActivityJson(JSON.toJSONString(orderActivityInfo));
- }
- if(null != shoppingCartPayment.getUserAddressId()){
- UserAddress address = userAddressClient.getUserAddressById(shoppingCartPayment.getUserAddressId()).getData();
- order.setExpressAmount(expressFee);
- order.setAddressJson(JSON.toJSONString(address));
- }
- order.setGetPoint(earnPoint);
- order.setPayStatus(1);
- order.setShopId(shoppingCartPayment.getShopId());
- order.setDelFlag(0);
- order.setCreateTime(LocalDateTime.now());
-
- if(2 == shoppingCartPayment.getPaymentType()){
- BigDecimal balance = appUser.getBalance();
- if(balance.compareTo(paymentMoney.add(expressFee)) < 0){
- return R.fail("账户余额不足");
- }
- }
- orderService.save(order);
- //构建订单明细数据
- for (MyShoppingCartVo myShoppingCartVo : goodsList) {
- OrderGood orderGood = new OrderGood();
- orderGood.setGoodsId(myShoppingCartVo.getGoodsId());
- orderGood.setOrderId(order.getId());
- GetSeckillActivityInfo info = new GetSeckillActivityInfo();
- info.setGoodsId(myShoppingCartVo.getGoodsId());
- info.setVip(appUser.getVipId());
- GoodsSeckill goodsSeckill = seckillActivityInfoClient.getSeckillActivityInfo(info).getData();
- if(null != goodsSeckill){
- orderGood.setSeckillJson(JSON.toJSONString(goodsSeckill));
- }
- for (int i = 0; i < objects.size(); i++) {
- Long id = objects.getJSONObject(i).getLong("id");
- if(myShoppingCartVo.getId().equals(id)){
- Integer num1 = objects.getJSONObject(i).getInteger("num");
- orderGood.setNum(num1);
- Goods goods1 = goodsClient.getGoodsById(myShoppingCartVo.getGoodsId()).getData();
- orderGood.setGoodJson(JSON.toJSONString(goods1));
- break;
- }
- }
- orderGood.setDelFlag(0);
- orderGood.setCreateTime(LocalDateTime.now());
- orderGood.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints());
- orderGood.setSuperiorSubcommission(myShoppingCartVo.getSuperiorSubcommission());
- orderGood.setSuperiorRebatePoints(myShoppingCartVo.getSuperiorRebatePoints());
- orderGood.setSuperiorType(myShoppingCartVo.getSuperiorType());
- orderGood.setServuceShopCharges(myShoppingCartVo.getServuceShopCharges());
- orderGood.setServuceShopPoints(myShoppingCartVo.getServuceShopPoints());
- orderGood.setTechnicianPoints(myShoppingCartVo.getTechnicianPoints());
- orderGood.setBoundShopCharges(myShoppingCartVo.getBoundShopCharges());
- orderGood.setBoundShopPoints(myShoppingCartVo.getBoundShopPoints());
- orderGood.setBoundShopSuperiorsCharges(myShoppingCartVo.getBoundShopSuperiorsCharges());
- orderGood.setBoundShopSuperiorsPoints(myShoppingCartVo.getBoundShopSuperiorsPoints());
- orderGoodService.save(orderGood);
- }
-
- //开始构建支付数据
- //现金支付
- paymentMoney = paymentMoney.add(expressFee).setScale(2, RoundingMode.HALF_EVEN);
- if(1 == shoppingCartPayment.getPaymentType()){
- //调起微信支付 TODO 待完善
-
-
-
- }
- //账户余额
- if(2 == shoppingCartPayment.getPaymentType()){
- BigDecimal totalRedPacketAmount = appUser.getTotalRedPacketAmount();
- BigDecimal totalDistributionAmount = appUser.getTotalDistributionAmount();
- BigDecimal balance = appUser.getBalance();
- if(paymentMoney.compareTo(totalRedPacketAmount) <= 0){
- totalRedPacketAmount = totalRedPacketAmount.subtract(paymentMoney);
- balance = balance.subtract(paymentMoney);
- appUser.setTotalRedPacketAmount(totalRedPacketAmount);
- appUser.setBalance(balance);
- }else{
- paymentMoney = paymentMoney.subtract(totalRedPacketAmount);
- totalRedPacketAmount = BigDecimal.ZERO;
- if(paymentMoney.compareTo(totalDistributionAmount) <= 0){
- totalDistributionAmount = totalDistributionAmount.subtract(paymentMoney);
- balance = balance.subtract(paymentMoney);
- appUser.setTotalRedPacketAmount(totalRedPacketAmount);
- appUser.setTotalDistributionAmount(totalDistributionAmount);
- appUser.setBalance(balance);
- }else{
- paymentMoney = paymentMoney.subtract(totalDistributionAmount);
- totalDistributionAmount = BigDecimal.ZERO;
- balance = balance.subtract(paymentMoney);
- appUser.setTotalRedPacketAmount(totalRedPacketAmount);
- appUser.setTotalDistributionAmount(totalDistributionAmount);
- appUser.setBalance(balance);
- }
- }
- //构建积分流水记录
- if(earnPoint > 0){
- appUser.setShopPoint(appUser.getShopPoint() + earnPoint);
- appUser.setLavePoint(appUser.getLavePoint() + earnPoint);
-
- UserPoint userPoint = new UserPoint();
- userPoint.setType(1);
- userPoint.setHistoricalPoint(appUser.getLavePoint() - earnPoint);
- userPoint.setVariablePoint(earnPoint);
- userPoint.setBalance(appUser.getLavePoint());
- userPoint.setCreateTime(LocalDateTime.now());
- userPoint.setAppUserId(appUser.getId());
- userPoint.setObjectId(order.getId());
- userPointClient.saveUserPoint(userPoint);
- }
- appUserClient.editAppUserById(appUser);
- //构建余额明细变动记录
- BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord();
- balanceChangeRecord.setAppUserId(appUser.getId());
- balanceChangeRecord.setOrderId(order.getId());
- balanceChangeRecord.setChangeType(5);
- balanceChangeRecord.setBeforeAmount(balance.add(paymentMoney));
- balanceChangeRecord.setChangeAmount(paymentMoney);
- balanceChangeRecord.setAfterAmount(balance);
- balanceChangeRecord.setDelFlag(0);
- balanceChangeRecord.setCreateTime(LocalDateTime.now());
- balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord);
- //修改订支付状态
- order.setPayStatus(2);
- orderService.updateById(order);
- //删除购物车数据
- this.removeBatchByIds(ids);
- }
- //积分支付
- if(3 == shoppingCartPayment.getPaymentType()){
- Integer lavePoint = appUser.getLavePoint();
- appUser.setLavePoint(lavePoint - orderPoint);
- appUser.setShopPoint(appUser.getShopPoint() + earnPoint);
- appUser.setLavePoint(appUser.getLavePoint() + earnPoint);
- appUserClient.editAppUserById(appUser);
- //构建积分流水记录
- UserPoint userPoint = new UserPoint();
- userPoint.setType(4);
- userPoint.setHistoricalPoint(lavePoint);
- userPoint.setVariablePoint(orderPoint);
- userPoint.setBalance(appUser.getLavePoint());
- userPoint.setCreateTime(LocalDateTime.now());
- userPoint.setAppUserId(appUser.getId());
- userPoint.setObjectId(order.getId());
- userPointClient.saveUserPoint(userPoint);
- if(earnPoint > 0){
- userPoint = new UserPoint();
- userPoint.setType(1);
- userPoint.setHistoricalPoint(appUser.getLavePoint() - earnPoint);
- userPoint.setVariablePoint(earnPoint);
- userPoint.setBalance(appUser.getLavePoint());
- userPoint.setCreateTime(LocalDateTime.now());
- userPoint.setAppUserId(appUser.getId());
- userPoint.setObjectId(order.getId());
- userPointClient.saveUserPoint(userPoint);
- }
- //修改订支付状态
- order.setPayStatus(2);
- orderService.updateById(order);
- //删除购物车数据
- this.removeBatchByIds(ids);
- }
- return R.ok();
- }
-
-
- public String getNumber(Integer size){
- String str = "";
- for (Integer i = 0; i < size; i++) {
- str += Double.valueOf(Math.random() * 10).intValue();
- }
- return str;
- }
-}
diff --git a/ruoyi-service/ruoyi-order/src/test/java/com/ruoyi/order/RuoYiOrderApplicationTests.java b/ruoyi-service/ruoyi-order/src/test/java/com/ruoyi/order/RuoYiOrderApplicationTests.java
deleted file mode 100644
index a8977b3..0000000
--- a/ruoyi-service/ruoyi-order/src/test/java/com/ruoyi/order/RuoYiOrderApplicationTests.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.ruoyi.order;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = RuoYiOrderApplication.class)
-public class RuoYiOrderApplicationTests {
-
- @Test
- public void test(){
- }
-}
diff --git a/ruoyi-service/ruoyi-other/pom.xml b/ruoyi-service/ruoyi-other/pom.xml
index 0bef49f..2ee7e3b 100644
--- a/ruoyi-service/ruoyi-other/pom.xml
+++ b/ruoyi-service/ruoyi-other/pom.xml
@@ -114,7 +114,7 @@
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
- <version>3.5.2</version>
+ <version>3.5.4</version>
</dependency>
<dependency>
@@ -132,6 +132,10 @@
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.github.pagehelper</groupId>
+ <artifactId>pagehelper-spring-boot-starter</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/RuoYiOtherApplication.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/RuoYiOtherApplication.java
deleted file mode 100644
index baa0983..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/RuoYiOtherApplication.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.ruoyi.other;
-
-import com.ruoyi.common.security.annotation.EnableCustomConfig;
-import com.ruoyi.common.security.annotation.EnableRyFeignClients;
-import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.servlet.ServletComponentScan;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-/**
- * 账户模块
- * @author ruoyi
- */
-@EnableCustomConfig
-@MapperScan({"com.ruoyi.other.mapper"})
-@EnableCustomSwagger2
-@EnableRyFeignClients
-@SpringBootApplication
-@EnableScheduling//开启定时任务
-@ServletComponentScan
-@EnableTransactionManagement//开启事务
-public class RuoYiOtherApplication {
- public static void main(String[] args) {
- SpringApplication.run(RuoYiOtherApplication.class, args);
- System.out.println("(♥◠‿◠)ノ゙ 基础模块启动成功 ლ(´ڡ`ლ)゙ \n" +
- " .-------. ____ __ \n" +
- " | _ _ \\ \\ \\ / / \n" +
- " | ( ' ) | \\ _. / ' \n" +
- " |(_ o _) / _( )_ .' \n" +
- " | (_,_).' __ ___(_ o _)' \n" +
- " | |\\ \\ | || |(_,_)' \n" +
- " | | \\ `' /| `-' / \n" +
- " | | \\ / \\ / \n" +
- " ''-' `'-' `-..-' ");
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java
deleted file mode 100644
index 2e56889..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.ruoyi.other.config;
-
-import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
-import com.ruoyi.common.security.service.TokenService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.ibatis.reflection.MetaObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.util.Date;
-
-/**
- * @author xiaochen
- * @ClassName DataUpdateInterceptor
- * @Description 数据更新操作处理
- * @date 2021-12-15
- * <p>
- * 注意,之前在此处注入了 JwtTokenUtils
- * <p>
- * 造成spring循环依赖,项目支棱不起来
- */
-@Slf4j
-@Configuration
-public class DataUpdateHandlerConfig implements MetaObjectHandler {
-
- @Autowired
- private TokenService tokenService;
-
- /**
- * 新增数据执行
- *
- * @param metaObject
- */
- @Override
- public void insertFill(MetaObject metaObject) {
- this.setFieldValByName("createTime", LocalDateTime.now(), metaObject);
- this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
- }
-
- /**
- * 修改数据执行
- *
- * @param metaObject
- */
- @Override
- public void updateFill(MetaObject metaObject) {
- this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java
deleted file mode 100644
index 2509b1d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.ruoyi.other.config;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * http请求工具配置
- *
- * @author: KingKong
- * @create: 2018-11-14 10:47
- **/
-@Configuration
-public class HttpConfig {
-
- @Autowired
- private RestTemplateBuilder builder;
-
- @Bean
- public RestTemplate restTemplate() {
- return builder.build();
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/MybatisPlusConfig.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/MybatisPlusConfig.java
deleted file mode 100644
index 7f556ce..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/MybatisPlusConfig.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.ruoyi.other.config;
-
-import com.baomidou.mybatisplus.annotation.DbType;
-import com.baomidou.mybatisplus.core.config.GlobalConfig;
-import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
-import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author xiaochen
- * @ClassName MybatisPlusConfig
- * @Description MybatisPlus相关配置
- * @date 2020-09-22 11:22、
- * 直接以实现类作为bean的注入(有事务管理的类)
- * @EnableTransactionManagement(proxyTargetClass = true)
- */
-@Configuration
-public class MybatisPlusConfig {
- private final DataUpdateHandlerConfig dataUpdateHandler;
-
- @Autowired
- public MybatisPlusConfig(DataUpdateHandlerConfig dataUpdateHandler) {
- this.dataUpdateHandler = dataUpdateHandler;
- }
-
- /**
- * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题
- */
- @Bean
- public MybatisPlusInterceptor mybatisPlusInterceptor() {
- MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
- interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
- return interceptor;
- }
-
- /**
- * 自动填充功能
- *
- * @return
- */
- @Bean
- public GlobalConfig globalConfig() {
- GlobalConfig globalConfig = new GlobalConfig();
- globalConfig.setMetaObjectHandler(dataUpdateHandler);
- return globalConfig;
- }
-
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
index 5fe3a69..bb53a14 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
@@ -32,8 +32,8 @@
@ApiOperation(value = "banner列表", tags = {"小程序-banner"})
public R<List<Banner>> list(String name, Integer jumpType, Integer position){
List<Banner> list = bannerService.lambdaQuery().like(StringUtils.isNotEmpty(name), Banner::getName, name)
- .eq(Banner::getJumpType, jumpType)
- .eq(Banner::getPosition, position)
+ .eq(jumpType!=null,Banner::getJumpType, jumpType)
+ .eq(position!=null,Banner::getPosition, position)
.list();
return R.ok(list);
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
index 3f1dfcc..a63bd12 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -34,7 +34,7 @@
@Resource
private GoodsCategoryService goodsCategoryService;
- @PostMapping("/index/list")
+ @GetMapping("/index/list")
@ApiOperation(value = "商品分类", tags = {"小程序-首页"})
public R<List<GoodsCategory>> indexlist(){
List<GoodsCategory> indexlist = goodsCategoryService.lambdaQuery()
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 130409a..a2910c8 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -10,16 +10,10 @@
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.enums.ShopStatus;
-import com.ruoyi.other.service.ShopService;
-import com.ruoyi.other.service.TechnicianService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
-import com.ruoyi.other.vo.NearbyShopVO;
-import com.ruoyi.other.vo.ShopDetailVO;
-import com.ruoyi.other.vo.VerifiableShopVo;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
index 53ff538..8a05bbc 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.SystemConfig;
import com.ruoyi.other.api.dto.IndexConfigSetDto;
+import com.ruoyi.other.api.dto.StartPageSetDto;
import com.ruoyi.other.service.SystemConfigService;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
@@ -40,7 +41,7 @@
systemConfigService.save(systemConfig);
return R.ok();
}
- @PostMapping("/index/detail")
+ @GetMapping("/index/detail")
@ApiOperation(value = "宣传图片-公司简介", tags = {"后台-广告管理-首页配置","小程序-首页"})
public R<IndexConfigSetDto> detail(){
SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 2).one();
@@ -65,5 +66,31 @@
return R.ok(one);
}
+ @PostMapping("/index/start")
+ @ApiOperation(value = "宣传图片-公司简介", tags = {"小程序-启动页"})
+ public R<StartPageSetDto> indexstart(){
+ SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 1).one();
+ if (one==null){
+ return R.ok();
+ }
+ StartPageSetDto indexConfigSetDto = JSONObject.parseObject(one.getContent(), StartPageSetDto.class);
+ return R.ok(indexConfigSetDto);
+
+ }
+
+ @PostMapping("/startPage/add")
+ @ApiOperation(value = "添加", tags = {"后台-广告管理-启动页管理"})
+ public R startPageadd(@RequestBody StartPageSetDto startPageSetDto){
+ //先删除type=1的数据
+ List<SystemConfig> list = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 1).list();
+ systemConfigService.removeBatchByIds(list);
+ SystemConfig systemConfig = new SystemConfig();
+ systemConfig.setType(1);
+ systemConfig.setContent(JSON.toJSONString(startPageSetDto));
+ systemConfigService.save(systemConfig);
+ return R.ok();
+ }
+
+
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
index d93d7bb..cb7a0ba 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
@@ -54,62 +54,61 @@
private TechnicianSubscribeService technicianSubscribeService;
@Resource
private TokenService tokenService;
- @PostMapping("/shop/list")
- @ApiOperation(value = "获取门店的技师列表", tags = {"小程序-门店详情-技师预约"})
- public R<Page<Technician>> shoplist(@RequestParam Integer shopId,@RequestParam Integer pageNum,@RequestParam Integer pageSize){
- //查出技师列表
- Page<Technician> page = technicianService.lambdaQuery().eq(Technician::getShopId, shopId).eq(Technician::getStatus, 2).page(Page.of(pageNum, pageSize));
- for (Technician technician : page.getRecords()) {
- //查出技师订单
- R<List<Long>> orderIdsByTechId = orderClient.getOrderIdsByTechId(technician.getId());
- if (orderIdsByTechId.getData().isEmpty()){
- technician.setGrade(new BigDecimal(0));
- technician.setServeCount(0);
- continue;
- }
- //查出技师评价
- List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().in(GoodsEvaluate::getOrderId, orderIdsByTechId.getData()).list();
+// @PostMapping("/shop/list")
+// @ApiOperation(value = "获取门店的技师列表", tags = {"小程序-门店详情-技师预约"})
+// public R<Page<Technician>> shoplist(@RequestParam Integer shopId,@RequestParam Integer pageNum,@RequestParam Integer pageSize){
+// //查出技师列表
+// Page<Technician> page = technicianService.lambdaQuery().eq(Technician::getShopId, shopId).eq(Technician::getStatus, 2).page(Page.of(pageNum, pageSize));
+// for (Technician technician : page.getRecords()) {
+// //查出技师订单
+// R<List<Long>> orderIdsByTechId = orderClient.getOrderIdsByTechId(technician.getId());
+// if (orderIdsByTechId.getData().isEmpty()){
+// technician.setGrade(new BigDecimal(0));
+// technician.setServeCount(0);
+// continue;
+// }
+// //查出技师评价
+// List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().in(GoodsEvaluate::getOrderId, orderIdsByTechId.getData()).list();
+//
+// //算出平均分并保留一位小数
+// BigDecimal avg = list.stream().map(GoodsEvaluate::getGrade).reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(list.size()), 1, BigDecimal.ROUND_HALF_UP);
+// technician.setGrade(avg);
+// technician.setServeCount(orderIdsByTechId.getData().size());
+//
+// }
+// return R.ok(page);
+// }
- //算出平均分并保留一位小数
- BigDecimal avg = list.stream().map(GoodsEvaluate::getGrade).reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(list.size()), 1, BigDecimal.ROUND_HALF_UP);
- technician.setGrade(avg);
- technician.setServeCount(orderIdsByTechId.getData().size());
-
- }
- return R.ok(page);
- }
-
- @PostMapping("/shop/detail")
- @ApiOperation(value = "获取门店的技师详情", tags = {"小程序-门店详情-技师预约"})
- public R<Technician> shopdetail(@RequestParam Integer techId) {
- //查出技师列表
- Technician technician = technicianService.getById(techId);
-
- //查出技师订单
- R<List<Long>> orderIdsByTechId = orderClient.getOrderIdsByTechId(technician.getId());
- if (orderIdsByTechId.getData().isEmpty()) {
- technician.setGrade(new BigDecimal(0));
- technician.setServeCount(0);
- return R.ok(technician);
- }
- //查出技师评价
- List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().in(GoodsEvaluate::getOrderId, orderIdsByTechId.getData()).list();
-
- //算出平均分并保留一位小数
- BigDecimal avg = list.stream().map(GoodsEvaluate::getGrade).reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(list.size()), 1, BigDecimal.ROUND_HALF_UP);
- technician.setGrade(avg);
- technician.setServeCount(orderIdsByTechId.getData().size());
- return R.ok(technician);
- }
-
- @PostMapping("/shop/tech")
- @ApiOperation(value = "预约操作", tags = {"小程序-门店详情-技师预约"})
- public R<Technician> shoptech(@RequestBody TechnicianSubscribe subscribe) {
- Long userId = tokenService.getLoginUserApplet().getUserid();
- subscribe.setAppUserId(userId);
- technicianSubscribeService.save(subscribe);
- return R.ok();
- }
+// @PostMapping("/shop/detail")
+// @ApiOperation(value = "获取门店的技师详情", tags = {"小程序-门店详情-技师预约"})
+// public R<Technician> shopdetail(@RequestParam Integer techId){
+// //查出技师列表
+// Technician technician = technicianService.getById(techId);
+//
+// //查出技师订单
+// R<List<Long>> orderIdsByTechId = orderClient.getOrderIdsByTechId(technician.getId());
+// if (orderIdsByTechId.getData().isEmpty()){
+// technician.setGrade(new BigDecimal(0));
+// technician.setServeCount(0);
+// return R.ok(technician);
+// }
+// //查出技师评价
+// List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().in(GoodsEvaluate::getOrderId, orderIdsByTechId.getData()).list();
+//
+// //算出平均分并保留一位小数
+// BigDecimal avg = list.stream().map(GoodsEvaluate::getGrade).reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(list.size()), 1, BigDecimal.ROUND_HALF_UP);
+// technician.setGrade(avg);
+// technician.setServeCount(orderIdsByTechId.getData().size());
+// return R.ok(technician);
+// }
+// @PostMapping("/shop/tech")
+// @ApiOperation(value = "预约操作", tags = {"小程序-门店详情-技师预约"})
+// public R<Technician> shoptech(@RequestBody TechnicianSubscribe subscribe){
+// Long userId = tokenService.getLoginUserApplet().getUserid();
+// subscribe.setAppUserId(userId);
+// technicianSubscribeService.save(subscribe);
+// return R.ok();
+// }
/**
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
index fb1ef6c..f28c7ca 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -75,12 +75,12 @@
}
/**
- * 跟新技师预约状态
+ * 更新技师预约状态
*
* @param status
*/
@PutMapping("/updateStatus")
- @ApiOperation(value = "跟新技师预约状态", notes = "跟新技师预约状态", tags = {"后台-技师预约管理-跟新技师预约状态"})
+ @ApiOperation(value = "更新技师预约状态", notes = "更新技师预约状态", tags = {"后台-技师预约管理-更新技师预约状态"})
public R<Void> updateStatus(@ApiParam @RequestParam Integer status, @ApiParam @RequestParam Long subscribeId) {
boolean update = technicianSubscribeService.update(new LambdaUpdateWrapper<TechnicianSubscribe>()
.eq(TechnicianSubscribe::getId, subscribeId)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java
index 5543b93..f6515b0 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java
@@ -1,21 +1,22 @@
package com.ruoyi.other.controller;
+import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.security.service.TokenService;
+import com.ruoyi.other.api.domain.VipGood;
import com.ruoyi.other.api.domain.VipSetting;
+import com.ruoyi.other.service.VipGoodService;
import com.ruoyi.other.service.VipSettingService;
import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.VipSetting;
import com.ruoyi.other.service.VipSettingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@@ -36,18 +37,74 @@
public class VipSettingController {
@Resource
private VipSettingService vipSettingService;
+ @Resource
+ private AppUserClient appUserClient;
+ @Resource
+ private TokenService tokenService;
+ @Resource
+ private VipGoodService vipGoodService;
+
@PostMapping("/info")
- @ApiOperation(value = "获取各级会员信息", tags = {"小程序-个人中心首页"})
- public R<List<VipSetting>> info(){
+ @ApiOperation(value = "获取各级会员信息", tags = {"小程序-个人中心首页", "小程序-会员中心"})
+ public R<List<VipSetting>> info() {
List<VipSetting> list = vipSettingService.list();
return R.ok(list);
}
+// @PostMapping("/button/agent/check")
+// @ApiOperation(value = "准代理,代理按钮是否展示", tags = {"小程序-个人中心首页","小程序-会员中心"})
+// public R<Boolean> buttoncheck(@ApiParam("4准代理,5代理")Integer id) {
+// Long userid = tokenService.getLoginUserApplet().getUserid();
+// AppUser appUserById = appUserClient.getAppUserById(userid);
+// Boolean back = true;
+// VipSetting byId = vipSettingService.getById(id);
+// //第一种判断
+// if (byId == null) {
+// back = false;
+// } else {
+// if (byId.getVipAgentLevelUpRole() == null || byId.getVipAgentLevelUpRole() == 0) {
+// back = false;
+// }
+// if (byId.getVipLevelUpShop() == null || byId.getVipLevelUpShare() == null) {
+// back = false;
+// } else {
+// if (back && appUserById.getShopPoint().compareTo(byId.getVipLevelUpShop()) > 0 && appUserById.getSharePoint().compareTo(byId.getVipLevelUpShare()) > 0) {
+// back = true;
+// }
+// }
+// if (back) {
+// return R.ok(true);
+// }
+// //第二种判断
+// if (byId.getVipDirectVipRole() == null || byId.getVipDirectVipRole() == 0 || byId.getVipDirectVipNum() == null) {
+// back = false;
+// } else {
+// //拿到当前用户直推钻石会员人数
+// Long data = appUserClient.getVipCount(userid, 3).getData();
+// if (data >= byId.getVipDirectVipNum()) {
+// return R.ok(true);
+// }
+// }
+// //第三种判断
+// List<VipGood> list = vipGoodService.lambdaQuery().eq(VipGood::getVipId, id).list();
+// for (VipGood vipGood : list) {
+// //挨个判断是否购买商品
+//
+//
+// }
+// }
+//
+// return R.ok();
+// }
+
@GetMapping("getVipSettingById")
@ApiOperation(value = "获取会员设置")
- public R<VipSetting> getVipSettingById(@ApiParam(value = "会员id") Integer id){
+ public R<VipSetting> getVipSettingById(@ApiParam(value = "会员id") @RequestParam Integer id) {
return R.ok(vipSettingService.getById(id));
}
}
+
+
+
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/GoodsStatus.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/GoodsStatus.java
deleted file mode 100644
index 1a6702b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/GoodsStatus.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum GoodsStatus {
- DOWN(0, "下架"),
- UP(1, "上架");
-
- private final Integer code;
- private final String desc;
-
- GoodsStatus(Integer code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/PhoneType.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/PhoneType.java
deleted file mode 100644
index 7fe4fd8..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/PhoneType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum PhoneType {
- PLATFORM(1, "平台"),
- SHOP(2, "门店");
-
- private final Integer code;
- private final String desc;
-
- PhoneType(Integer code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAddType.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAddType.java
deleted file mode 100644
index 819df7b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAddType.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum ShareAddType {
- PLATFORM(1, "平台添加"),
- PROMPOTERS(2, "推广人添加"),
- STORE(3, "门店添加");
-
- private final Integer code;
- private final String message;
-
- ShareAddType(Integer code, String message) {
- this.code = code;
- this.message = message;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAuditStatus.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAuditStatus.java
deleted file mode 100644
index 1f0ce88..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAuditStatus.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum ShareAuditStatus {
- WAIT(0, "待审核"),
- SUCCESS(1, "审核通过"),
- FAIL(2, "审核失败");
-
- private final Integer code;
- private final String message;
-
- ShareAuditStatus(Integer code, String message) {
- this.code = code;
- this.message = message;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShopStatus.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShopStatus.java
deleted file mode 100644
index a82be5a..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShopStatus.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum ShopStatus {
- SHOP_STATUS_NORMAL(1, "正常"),
- SHOP_STATUS_FREEZE(2, "冻结");
-
- private final Integer code;
- private final String message;
-
- ShopStatus(Integer code, String message) {
- this.code = code;
- this.message = message;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianErrorCode.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianErrorCode.java
deleted file mode 100644
index 50ab4e6..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianErrorCode.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum TechnicianErrorCode {
- TECHNICIAN_ALREADY_SUBSCRIBED(1001, "该技师已被预约"),
- ;
-
- private final int code;
- private final String message;
-
- TechnicianErrorCode(int code, String message) {
- this.code = code;
- this.message = message;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianStatus.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianStatus.java
deleted file mode 100644
index 3edfa0c..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianStatus.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.ruoyi.other.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum TechnicianStatus {
- UNSUBSCRIBE(0, "待服务"),
- SERVE(1, "已服务"),
- CANCEL(2, "已取消");
- private final Integer code;
- private final String message;
-
- TechnicianStatus(Integer code, String message) {
- this.code = code;
- this.message = message;
- }
-
- public static String getMessage(Integer code) {
- for (TechnicianStatus value : TechnicianStatus.values()) {
- if (value.getCode().equals(code)) {
- return value.getMessage();
- }
- }
- return null;
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java
deleted file mode 100644
index cb4a599..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.ruoyi.other.filter;
-
-import com.alibaba.fastjson.JSON;
-import com.ruoyi.account.api.feignClient.AppUserClient;
-import com.ruoyi.account.api.model.AppUser;
-import com.ruoyi.common.core.constant.TokenConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.feignClient.SysUserClient;
-import org.apache.logging.log4j.core.config.Order;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import javax.servlet.*;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-/**
- * @author zhibing.pu
- * @Date 2024/8/23 11:22
- */
-@Order(-200)
-@Component
-public class AuthFilter implements Filter {
- private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
-
- @Lazy
- @Resource
- private AppUserClient appUserClient;
-
- @Lazy
- @Resource
- private SysUserClient sysUserClient;
-
-
- @Override
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
- HttpServletRequest request = (HttpServletRequest) servletRequest;
- HttpServletResponse response = (HttpServletResponse) servletResponse;
- String userid = request.getHeader("user_id");
- if(StringUtils.isEmpty(userid)){
- filterChain.doFilter(servletRequest, servletResponse);
- return;
- }
- String userType = request.getHeader("user_type");
- //管理后台用户
- if ("system".equals(userType)) {
- SysUser sysUser = sysUserClient.getSysUser(Long.valueOf(userid)).getData();
- if(null == sysUser || "2".equals(sysUser.getDelFlag())){
- log.error("[账户异常处理]请求账户id:{}", userid);
- unauthorizedResponse(response,"无效的账户");
- return;
- }
- if("1".equals(sysUser.getStatus())){
- log.error("[账户异常处理]请求账户id:{}", userid);
- unauthorizedResponse(response,"账户已被停用,请联系系统管理员!");
- return;
- }
- }
- //小程序用户
- if ("applet".equals(userType)) {
- AppUser appUser = appUserClient.getAppUserById(Long.valueOf(userid));
- if(null == appUser || appUser.getDelFlag() || 3 == appUser.getStatus()){
- log.error("[账户异常处理]请求账户id:{}", userid);
- unauthorizedResponse(response,"无效的账户");
- return;
- }
- if(2 == appUser.getStatus()){
- log.error("[账户异常处理]请求账户id:{}", userid);
- unauthorizedResponse(response,"账户已被冻结,请联系系统管理员!");
- return;
- }
- }
- filterChain.doFilter(servletRequest, servletResponse);
- }
-
-
-
- private void unauthorizedResponse(HttpServletResponse response, String msg) {
- response.setStatus(HttpStatus.OK.value());
- response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_UTF8_VALUE);
- PrintWriter writer = null;
- try {
- writer = response.getWriter();
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- writer.println(JSON.toJSONString(R.fail(msg)));
- writer.flush();
- writer.close();
- }
-
-
-
- /**
- * 获取请求token
- */
- private String getToken(HttpServletRequest request) {
- String token = request.getHeader(TokenConstants.AUTHENTICATION);
- // 如果前端设置了令牌前缀,则裁剪掉前缀
- if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX)) {
- token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
- }
- return token;
- }
-
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/AgreementMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/AgreementMapper.java
deleted file mode 100644
index 1baf74d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/AgreementMapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Agreement;
-
-/**
- * @author zhibing.pu
- * @Date 2024/11/21 10:46
- */
-public interface AgreementMapper extends BaseMapper<Agreement> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BannerMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BannerMapper.java
deleted file mode 100644
index c192df5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BannerMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Banner;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface BannerMapper extends BaseMapper<Banner> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BaseSettingMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BaseSettingMapper.java
deleted file mode 100644
index 3b3eab0..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/BaseSettingMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.BaseSetting;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface BaseSettingMapper extends BaseMapper<BaseSetting> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/CouponInfoMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/CouponInfoMapper.java
deleted file mode 100644
index fd17103..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/CouponInfoMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.CouponInfo;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface CouponInfoMapper extends BaseMapper<CouponInfo> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAppUserMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAppUserMapper.java
deleted file mode 100644
index c614e37..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAppUserMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsAppUser;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsAppUserMapper extends BaseMapper<GoodsAppUser> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAreaMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAreaMapper.java
deleted file mode 100644
index 6eaf296..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsAreaMapper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsArea;
-
-public interface GoodsAreaMapper extends BaseMapper<GoodsArea> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceDetailMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceDetailMapper.java
deleted file mode 100644
index 8dc830a..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceDetailMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsBargainPriceDetail;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsBargainPriceDetailMapper extends BaseMapper<GoodsBargainPriceDetail> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceMapper.java
deleted file mode 100644
index 7b958bd..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsBargainPriceMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsBargainPrice;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsBargainPriceMapper extends BaseMapper<GoodsBargainPrice> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsCategoryMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsCategoryMapper.java
deleted file mode 100644
index 0a1a2ae..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsCategoryMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsCategory;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsCategoryMapper extends BaseMapper<GoodsCategory> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsEvaluateMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsEvaluateMapper.java
deleted file mode 100644
index 758376d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsEvaluateMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsEvaluate;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsEvaluateMapper extends BaseMapper<GoodsEvaluate> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsMapper.java
deleted file mode 100644
index 2058cb9..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsMapper.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Goods;
-
-import java.util.List;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsMapper extends BaseMapper<Goods> {
- List<Goods> selectListByShopId(Integer shopId, Integer vip);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsSeckillMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsSeckillMapper.java
deleted file mode 100644
index ee9ecb7..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsSeckillMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsSeckill;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsSeckillMapper extends BaseMapper<GoodsSeckill> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsShopMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsShopMapper.java
deleted file mode 100644
index 981cb2f..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsShopMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsShop;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsShopMapper extends BaseMapper<GoodsShop> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsVipMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsVipMapper.java
deleted file mode 100644
index 0dcd4c9..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/GoodsVipMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.GoodsVip;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsVipMapper extends BaseMapper<GoodsVip> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/OrderActivityInfoMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/OrderActivityInfoMapper.java
deleted file mode 100644
index 971eb7f..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/OrderActivityInfoMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.OrderActivityInfo;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface OrderActivityInfoMapper extends BaseMapper<OrderActivityInfo> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PhoneMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PhoneMapper.java
deleted file mode 100644
index 78d1335..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PhoneMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.ruoyi.other.api.domain.Phone;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface PhoneMapper extends BaseMapper<Phone> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PointSettingMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PointSettingMapper.java
deleted file mode 100644
index 1b28234..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/PointSettingMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.PointSetting;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface PointSettingMapper extends BaseMapper<PointSetting> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RechargeSetMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RechargeSetMapper.java
deleted file mode 100644
index ed11de4..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RechargeSetMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.RechargeSet;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface RechargeSetMapper extends BaseMapper<RechargeSet> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RedPackegeSetMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RedPackegeSetMapper.java
deleted file mode 100644
index af26b30..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RedPackegeSetMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.RedPackegeSet;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface RedPackegeSetMapper extends BaseMapper<RedPackegeSet> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RegionMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RegionMapper.java
deleted file mode 100644
index 0f5ea38..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/RegionMapper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Region;
-
-public interface RegionMapper extends BaseMapper<Region> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SeckillActivityInfoMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SeckillActivityInfoMapper.java
deleted file mode 100644
index 91eb0a3..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SeckillActivityInfoMapper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.SeckillActivityInfo;
-import com.ruoyi.other.vo.SeckillActivityDetailVO;
-import com.ruoyi.other.vo.SeckillActivityVO;
-
-import java.util.List;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface SeckillActivityInfoMapper extends BaseMapper<SeckillActivityInfo> {
-
- List<SeckillActivityVO> listSeckillActivity(Goods goods);
-
- SeckillActivityDetailVO selectDetail(Integer seckillActivityId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShareMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShareMapper.java
deleted file mode 100644
index a116b92..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShareMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Share;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShareMapper extends BaseMapper<Share> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopBalanceStatementMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopBalanceStatementMapper.java
deleted file mode 100644
index 3363860..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopBalanceStatementMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.ShopBalanceStatement;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopBalanceStatementMapper extends BaseMapper<ShopBalanceStatement> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
deleted file mode 100644
index 9255a70..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Shop;
-import com.ruoyi.other.vo.NearbyShopVO;
-import com.ruoyi.other.vo.ShopDetailVO;
-
-import java.util.List;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopMapper extends BaseMapper<Shop> {
-
- List<NearbyShopVO> selectNearbyShopList(String longitude, String latitude);
-
- ShopDetailVO selectShopDetail(Integer shopId);
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopPointMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopPointMapper.java
deleted file mode 100644
index f1e5685..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopPointMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.ShopPoint;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopPointMapper extends BaseMapper<ShopPoint> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopWithdrawMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopWithdrawMapper.java
deleted file mode 100644
index 91f40d5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopWithdrawMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.ShopWithdraw;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopWithdrawMapper extends BaseMapper<ShopWithdraw> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SystemConfigMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SystemConfigMapper.java
deleted file mode 100644
index a068a21..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SystemConfigMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.SystemConfig;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface SystemConfigMapper extends BaseMapper<SystemConfig> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
deleted file mode 100644
index c3b24f7..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.vo.TechnicianDetailVO;
-import com.ruoyi.other.vo.TechnicianVO;
-
-import java.util.List;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface TechnicianMapper extends BaseMapper<Technician> {
-
- List<TechnicianVO> selectTechnicianListByShopId(Long shopId);
-
- TechnicianDetailVO selectTechnicianDetail(Long technicianId);
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java
deleted file mode 100644
index b3a3294..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.TechnicianSubscribe;
-import com.ruoyi.other.vo.TechnicianSubscribeVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface TechnicianSubscribeMapper extends BaseMapper<TechnicianSubscribe> {
-
- /**
- * 查看用户预约记录
- * @param shopId
- * @return
- */
- public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(@Param("userId") Long userId,
- @Param("shopId") Long shopId);
- public List<TechnicianSubscribeVO> getTechnicianSubscribeByUser(@Param("userId") Long userId,
- @Param("status") Integer status);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipGoodMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipGoodMapper.java
deleted file mode 100644
index 4f6ca6e..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipGoodMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.other.api.domain.VipGood;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface VipGoodMapper extends BaseMapper<VipGood> {
-
- /**
- * 查询指定商品的指定会员价格
- */
- VipGood selectVipGood(Long goodsId, Integer vipId);
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipSettingMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipSettingMapper.java
deleted file mode 100644
index 1db8d1a..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/VipSettingMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.mapper;
-
-import com.ruoyi.other.api.domain.VipSetting;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface VipSettingMapper extends BaseMapper<VipSetting> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/AgreementService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/AgreementService.java
deleted file mode 100644
index a90eb63..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/AgreementService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Agreement;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface AgreementService extends IService<Agreement> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BannerService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BannerService.java
deleted file mode 100644
index 8d9a39d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BannerService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Banner;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface BannerService extends IService<Banner> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BaseSettingService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BaseSettingService.java
deleted file mode 100644
index c5803d0..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/BaseSettingService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.BaseSetting;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface BaseSettingService extends IService<BaseSetting> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/CouponInfoService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/CouponInfoService.java
deleted file mode 100644
index fdd24a5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/CouponInfoService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.CouponInfo;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface CouponInfoService extends IService<CouponInfo> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAppUserService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAppUserService.java
deleted file mode 100644
index 7da4769..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAppUserService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsAppUser;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsAppUserService extends IService<GoodsAppUser> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAreaService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAreaService.java
deleted file mode 100644
index dc21a7e..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsAreaService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsArea;
-
-public interface GoodsAreaService extends IService<GoodsArea> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceDetailService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceDetailService.java
deleted file mode 100644
index 72d5848..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceDetailService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsBargainPriceDetail;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsBargainPriceDetailService extends IService<GoodsBargainPriceDetail> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceService.java
deleted file mode 100644
index b6a4b60..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsBargainPriceService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsBargainPrice;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsBargainPriceService extends IService<GoodsBargainPrice> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsCategoryService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsCategoryService.java
deleted file mode 100644
index 104e840..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsCategoryService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsCategory;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsCategoryService extends IService<GoodsCategory> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsEvaluateService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsEvaluateService.java
deleted file mode 100644
index 94d3a87..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsEvaluateService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsEvaluate;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsEvaluateService extends IService<GoodsEvaluate> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsSeckillService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsSeckillService.java
deleted file mode 100644
index fe2e6f9..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsSeckillService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsSeckill;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsSeckillService extends IService<GoodsSeckill> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
deleted file mode 100644
index d33e0d5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.vo.GoodsVO;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsService extends IService<Goods> {
-
- List<GoodsVO> goodsList(Goods goods);
-
- GoodsVO goodsDetail(Long goodsId);
-
- List<Goods> getGoodsListByShopId(Integer shopId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsShopService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsShopService.java
deleted file mode 100644
index d0e6b12..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsShopService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsShop;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsShopService extends IService<GoodsShop> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsVipService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsVipService.java
deleted file mode 100644
index 5d0cd4a..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsVipService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.GoodsVip;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface GoodsVipService extends IService<GoodsVip> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/IAgreementService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/IAgreementService.java
deleted file mode 100644
index f4a93d1..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/IAgreementService.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Agreement;
-
-/**
- * @author zhibing.pu
- * @Date 2024/11/21 10:46
- */
-public interface IAgreementService extends IService<Agreement> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/OrderActivityInfoService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/OrderActivityInfoService.java
deleted file mode 100644
index 0d437b5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/OrderActivityInfoService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.ruoyi.other.api.domain.OrderActivityInfo;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface OrderActivityInfoService extends IService<OrderActivityInfo> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PhoneService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PhoneService.java
deleted file mode 100644
index 3031087..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PhoneService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Phone;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface PhoneService extends IService<Phone> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PointSettingService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PointSettingService.java
deleted file mode 100644
index dfeef36..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/PointSettingService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.PointSetting;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface PointSettingService extends IService<PointSetting> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RechargeSetService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RechargeSetService.java
deleted file mode 100644
index 1180e24..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RechargeSetService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.RechargeSet;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface RechargeSetService extends IService<RechargeSet> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RedPackegeSetService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RedPackegeSetService.java
deleted file mode 100644
index a3c879f..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RedPackegeSetService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.ruoyi.other.api.domain.RedPackegeSet;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface RedPackegeSetService extends IService<RedPackegeSet> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RegionService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RegionService.java
deleted file mode 100644
index ef39093..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/RegionService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Region;
-
-public interface RegionService extends IService<Region> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SeckillActivityInfoService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SeckillActivityInfoService.java
deleted file mode 100644
index 1d46d76..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SeckillActivityInfoService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.SeckillActivityInfo;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.vo.SeckillActivityDetailVO;
-import com.ruoyi.other.vo.SeckillActivityVO;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface SeckillActivityInfoService extends IService<SeckillActivityInfo> {
-
- List<SeckillActivityVO> listSeckillActivity(Goods goods);
-
- SeckillActivityDetailVO detail(Integer seckillActivityId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShareService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShareService.java
deleted file mode 100644
index a77005b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShareService.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.ruoyi.other.api.domain.Share;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShareService extends IService<Share> {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopBalanceStatementService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopBalanceStatementService.java
deleted file mode 100644
index 5328644..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopBalanceStatementService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.ShopBalanceStatement;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopBalanceStatementService extends IService<ShopBalanceStatement> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopPointService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopPointService.java
deleted file mode 100644
index 9d017fb..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopPointService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.ShopPoint;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopPointService extends IService<ShopPoint> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
deleted file mode 100644
index eedaaca..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.Shop;
-import com.ruoyi.other.vo.NearbyShopVO;
-import com.ruoyi.other.vo.ShopDetailVO;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopService extends IService<Shop> {
-
- List<NearbyShopVO> nearbyShopList(String longitude, String latitude);
-
- ShopDetailVO getShopDetail(Integer shopId,String longitude, String latitude);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopWithdrawService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopWithdrawService.java
deleted file mode 100644
index 599fe7b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopWithdrawService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.ShopWithdraw;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface ShopWithdrawService extends IService<ShopWithdraw> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SystemConfigService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SystemConfigService.java
deleted file mode 100644
index 2162c83..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SystemConfigService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.SystemConfig;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface SystemConfigService extends IService<SystemConfig> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
deleted file mode 100644
index 7be2cbc..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.vo.TechnicianDetailVO;
-import com.ruoyi.other.vo.TechnicianVO;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface TechnicianService extends IService<Technician> {
- List<TechnicianVO> getTechnicianListByShopId(Long shopId);
-
- TechnicianDetailVO technicianDetail(Long technicianId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java
deleted file mode 100644
index d3796aa..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.TechnicianSubscribe;
-import com.ruoyi.other.vo.TechnicianSubscribeVO;
-
-import java.util.List;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface TechnicianSubscribeService extends IService<TechnicianSubscribe> {
-
- /**
- * 查询用于指定门店的相关预约记录
- */
- List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId);
-
- List<TechnicianSubscribeVO> getTechnicianSubscribeByUser(Long userId, Integer status);
-
- void subscribe(TechnicianSubscribe technicianSubscribe, Long technicianId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipGoodService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipGoodService.java
deleted file mode 100644
index 3a3f6bb..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipGoodService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.VipGood;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface VipGoodService extends IService<VipGood> {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipSettingService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipSettingService.java
deleted file mode 100644
index e576300..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/VipSettingService.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ruoyi.other.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.other.api.domain.VipSetting;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-public interface VipSettingService extends IService<VipSetting> {
-
- VipSetting getVipSettingByUserId(Long userId);
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/AgreementServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/AgreementServiceImpl.java
deleted file mode 100644
index ec1ac50..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/AgreementServiceImpl.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.api.domain.Agreement;
-import com.ruoyi.other.mapper.AgreementMapper;
-import com.ruoyi.other.service.IAgreementService;
-import org.springframework.stereotype.Service;
-
-/**
- * @author zhibing.pu
- * @Date 2024/11/21 10:48
- */
-@Service
-public class AgreementServiceImpl extends ServiceImpl<AgreementMapper, Agreement> implements IAgreementService {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/BaseSettingServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/BaseSettingServiceImpl.java
deleted file mode 100644
index a6ade96..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/BaseSettingServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.BaseSettingMapper;
-import com.ruoyi.other.api.domain.BaseSetting;
-import com.ruoyi.other.service.BaseSettingService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class BaseSettingServiceImpl extends ServiceImpl<BaseSettingMapper, BaseSetting> implements BaseSettingService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAppUserServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAppUserServiceImpl.java
deleted file mode 100644
index ce23b9c..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAppUserServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.ruoyi.other.api.domain.GoodsAppUser;
-import com.ruoyi.other.service.GoodsAppUserService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.GoodsAppUserMapper;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsAppUserServiceImpl extends ServiceImpl<GoodsAppUserMapper, GoodsAppUser> implements GoodsAppUserService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAreaServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAreaServiceImpl.java
deleted file mode 100644
index 25d0a65..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsAreaServiceImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.api.domain.GoodsArea;
-import com.ruoyi.other.mapper.GoodsAreaMapper;
-import com.ruoyi.other.service.GoodsAreaService;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-
-@Service
-public class GoodsAreaServiceImpl extends ServiceImpl<GoodsAreaMapper, GoodsArea> implements GoodsAreaService {
- @Resource
- private GoodsAreaMapper goodsAreaMapper;
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java
deleted file mode 100644
index bf7bf04..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.GoodsBargainPriceMapper;
-import com.ruoyi.other.api.domain.GoodsBargainPrice;
-import com.ruoyi.other.service.GoodsBargainPriceService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsBargainPriceServiceImpl extends ServiceImpl<GoodsBargainPriceMapper, GoodsBargainPrice> implements GoodsBargainPriceService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java
deleted file mode 100644
index 04203e5..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.GoodsEvaluateMapper;
-import com.ruoyi.other.api.domain.GoodsEvaluate;
-import com.ruoyi.other.service.GoodsEvaluateService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsEvaluateServiceImpl extends ServiceImpl<GoodsEvaluateMapper, GoodsEvaluate> implements GoodsEvaluateService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsSeckillServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsSeckillServiceImpl.java
deleted file mode 100644
index 3a40097..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsSeckillServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.ruoyi.other.api.domain.GoodsSeckill;
-import com.ruoyi.other.mapper.GoodsSeckillMapper;
-import com.ruoyi.other.service.GoodsSeckillService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsSeckillServiceImpl extends ServiceImpl<GoodsSeckillMapper, GoodsSeckill> implements GoodsSeckillService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
deleted file mode 100644
index 4a4ff9d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import cn.hutool.json.JSONArray;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.account.api.feignClient.AppUserClient;
-import com.ruoyi.account.api.model.AppUser;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.bean.BeanUtils;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.GoodsArea;
-import com.ruoyi.other.api.domain.GoodsVip;
-import com.ruoyi.other.api.domain.VipSetting;
-import com.ruoyi.other.enums.GoodsStatus;
-import com.ruoyi.other.mapper.GoodsAreaMapper;
-import com.ruoyi.other.mapper.GoodsMapper;
-import com.ruoyi.other.service.GoodsService;
-import com.ruoyi.other.service.GoodsVipService;
-import com.ruoyi.other.service.VipSettingService;
-import com.ruoyi.other.vo.GoodsVO;
-import com.ruoyi.system.api.model.LoginUser;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
- @Resource
- private GoodsMapper goodsMapper;
- @Resource
- private TokenService tokenService;
- @Resource
- private VipSettingService vipSettingService;
- @Resource
- private GoodsAreaMapper goodsAreaMapper;
- @Resource
- private GoodsVipService goodsVipService;
- @Resource
- private AppUserClient appUserClient;
-
- @Override
- public List<GoodsVO> goodsList(Goods search) {
- List<Goods> goodsList = this.list(new LambdaQueryWrapper<Goods>()
- .eq(Goods::getStatus, GoodsStatus.UP)
- .eq(Objects.nonNull(search.getGoodsCategoryId()), Goods::getGoodsCategoryId, search.getGoodsCategoryId())
- .like(StringUtils.isNotEmpty(search.getName()), Goods::getName, search.getName()));
-
- List<GoodsVO> result = new ArrayList<>();
- for (Goods goods : goodsList) {
- GoodsVO goodsVO = new GoodsVO();
- BeanUtils.copyBeanProp(goodsVO, goods);
- result.add(goodsVO);
- }
- return result;
- }
-
- @Override
- public GoodsVO goodsDetail(Long goodsId) {
- if (goodsId == null || goodsId <= 0) {
- throw new NullPointerException("商品ID不能为空");
- }
-
- LoginUser loginUserApplet = tokenService.getLoginUserApplet();
- AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid());
- BigDecimal sellingPrice;
- Integer integral;
-
- GoodsArea goodsArea = goodsAreaMapper.selectOne(new LambdaQueryWrapper<GoodsArea>()
- .eq(GoodsArea::getGoodsId, goodsId)
- .eq(GoodsArea::getProvinceCode, appUser.getProvinceCode())
- .eq(StringUtils.isNotEmpty(appUser.getCityCode()), GoodsArea::getCityCode, appUser.getCityCode())
- .eq(StringUtils.isNotEmpty(appUser.getDistrictCode()), GoodsArea::getDistrictsCode, appUser.getDistrictCode()));
-
- if (Objects.nonNull(goodsArea)){
- sellingPrice = goodsArea.getSellingPrice();
- integral = goodsArea.getIntegral();
- }else {
- VipSetting vipSetting = vipSettingService.getVipSettingByUserId(loginUserApplet.getUserid());
- GoodsVip goodsVip = goodsVipService.getOne(new LambdaQueryWrapper<GoodsVip>()
- .eq(GoodsVip::getVip, vipSetting.getId())
- .eq(GoodsVip::getGoodsId, goodsId));
-
- sellingPrice = goodsVip.getSellingPrice();
- integral = goodsVip.getIntegral();
- }
-
- Goods goods = this.getById(goodsId);
- GoodsVO goodsVO = new GoodsVO();
- BeanUtils.copyBeanProp(goodsVO, goods);
- goodsVO.setSellingPrice(sellingPrice);
- goodsVO.setIntegral(integral);
- return goodsVO;
- }
-
-
- @Override
- public List<Goods> getGoodsListByShopId(Integer shopId) {
- LoginUser loginUserApplet = tokenService.getLoginUserApplet();
- VipSetting vipSetting = vipSettingService.getVipSettingByUserId(loginUserApplet.getUserid());
- return goodsMapper.selectListByShopId(shopId, vipSetting.getId());
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsShopServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsShopServiceImpl.java
deleted file mode 100644
index 19363c4..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsShopServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.GoodsShopMapper;
-import com.ruoyi.other.api.domain.GoodsShop;
-import com.ruoyi.other.service.GoodsShopService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsShopServiceImpl extends ServiceImpl<GoodsShopMapper, GoodsShop> implements GoodsShopService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsVipServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsVipServiceImpl.java
deleted file mode 100644
index 9ce8b0f..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsVipServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.GoodsVipMapper;
-import com.ruoyi.other.api.domain.GoodsVip;
-import com.ruoyi.other.service.GoodsVipService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class GoodsVipServiceImpl extends ServiceImpl<GoodsVipMapper, GoodsVip> implements GoodsVipService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/PhoneServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/PhoneServiceImpl.java
deleted file mode 100644
index d227797..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/PhoneServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.PhoneMapper;
-import com.ruoyi.other.api.domain.Phone;
-import com.ruoyi.other.service.PhoneService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class PhoneServiceImpl extends ServiceImpl<PhoneMapper, Phone> implements PhoneService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RechargeSetServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RechargeSetServiceImpl.java
deleted file mode 100644
index 2f6c32f..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RechargeSetServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.RechargeSetMapper;
-import com.ruoyi.other.api.domain.RechargeSet;
-import com.ruoyi.other.service.RechargeSetService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class RechargeSetServiceImpl extends ServiceImpl<RechargeSetMapper, RechargeSet> implements RechargeSetService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RedPackegeSetServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RedPackegeSetServiceImpl.java
deleted file mode 100644
index 669746d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/RedPackegeSetServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.RedPackegeSetMapper;
-import com.ruoyi.other.api.domain.RedPackegeSet;
-import com.ruoyi.other.service.RedPackegeSetService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class RedPackegeSetServiceImpl extends ServiceImpl<RedPackegeSetMapper, RedPackegeSet> implements RedPackegeSetService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
deleted file mode 100644
index 9a660fd..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.account.api.feignClient.AppUserClient;
-import com.ruoyi.account.api.model.AppUser;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.api.domain.GoodsShop;
-import com.ruoyi.other.api.domain.SeckillActivityInfo;
-import com.ruoyi.other.api.domain.Shop;
-import com.ruoyi.other.mapper.GoodsShopMapper;
-import com.ruoyi.other.mapper.SeckillActivityInfoMapper;
-import com.ruoyi.other.mapper.ShopMapper;
-import com.ruoyi.other.service.SeckillActivityInfoService;
-import com.ruoyi.other.vo.SeckillActivityDetailVO;
-import com.ruoyi.other.vo.SeckillActivityVO;
-import com.ruoyi.system.api.model.LoginUser;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class SeckillActivityInfoServiceImpl extends ServiceImpl<SeckillActivityInfoMapper, SeckillActivityInfo> implements SeckillActivityInfoService {
- @Resource
- private SeckillActivityInfoMapper seckillActivityInfoMapper;
- @Resource
- private GoodsShopMapper goodsShopMapper;
- @Resource
- private ShopMapper shopMapper;
- @Resource
- private TokenService tokenService;
- @Resource
- private AppUserClient appUserClient;
-
- @Override
- public List<SeckillActivityVO> listSeckillActivity(Goods goods) {
- LoginUser loginUserApplet = tokenService.getLoginUserApplet();
- AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid());
- goods.setVipId(appUser.getVipId());
- return seckillActivityInfoMapper.listSeckillActivity(goods);
- }
-
- @Override
- public SeckillActivityDetailVO detail(Integer seckillActivityId) {
- SeckillActivityDetailVO seckillActivityDetailVO = seckillActivityInfoMapper.selectDetail(seckillActivityId);
- Long goodsId = seckillActivityDetailVO.getGoodsId();
-
- List<Integer> shopIdList = goodsShopMapper.selectList(new LambdaQueryWrapper<GoodsShop>()
- .eq(GoodsShop::getGoodsId, goodsId)).stream().map(GoodsShop::getShopId).collect(Collectors.toList());
-
- List<String> shopNames = shopMapper.selectObjs(new LambdaQueryWrapper<Shop>()
- .select(Shop::getName)
- .in(Shop::getId, shopIdList))
- .stream()
- .map(Object::toString)
- .collect(Collectors.toList());
- seckillActivityDetailVO.setShopList(shopNames);
- return seckillActivityDetailVO;
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShareServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShareServiceImpl.java
deleted file mode 100644
index 44dcb61..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShareServiceImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.ShareMapper;
-import com.ruoyi.other.api.domain.Share;
-import com.ruoyi.other.service.ShareService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class ShareServiceImpl extends ServiceImpl<ShareMapper, Share> implements ShareService {
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
deleted file mode 100644
index f0139a2..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.ShopPointMapper;
-import com.ruoyi.other.api.domain.ShopPoint;
-import com.ruoyi.other.service.ShopPointService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class ShopPointServiceImpl extends ServiceImpl<ShopPointMapper, ShopPoint> implements ShopPointService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
deleted file mode 100644
index 41a9c34..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.utils.GeodesyUtil;
-import com.ruoyi.other.api.domain.Goods;
-import com.ruoyi.other.mapper.GoodsMapper;
-import com.ruoyi.other.mapper.ShopMapper;
-import com.ruoyi.other.api.domain.Shop;
-import com.ruoyi.other.service.ShopService;
-import com.ruoyi.other.vo.NearbyShopVO;
-import com.ruoyi.other.vo.ShopDetailVO;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements ShopService {
- @Resource
- private ShopMapper shopMapper;
-
- @Override
- public List<NearbyShopVO> nearbyShopList(String longitude, String latitude) {
- return shopMapper.selectNearbyShopList(longitude,latitude);
- }
-
- @Override
- public ShopDetailVO getShopDetail(Integer shopId, String longitude, String latitude) {
- // 查询店铺详情
- ShopDetailVO shopDetailVO = shopMapper.selectShopDetail(shopId);
- if (shopDetailVO == null) {
- throw new ServiceException("查询店铺不存在");
- }
-
- // 计算距离
- String shopLocation = String.format("%s,%s", shopDetailVO.getLongitude(), shopDetailVO.getLatitude());
- String userLocation = String.format("%s,%s", longitude, latitude);
- Map<String, Double> distanceMap = GeodesyUtil.getDistance(userLocation, shopLocation);
- Double wGs84 = distanceMap.get("WGs84");
- shopDetailVO.setDistance(wGs84);
- return shopDetailVO;
- }
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
deleted file mode 100644
index 519f02d..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.TechnicianMapper;
-import com.ruoyi.other.api.domain.Technician;
-import com.ruoyi.other.service.TechnicianService;
-import com.ruoyi.other.vo.TechnicianDetailVO;
-import com.ruoyi.other.vo.TechnicianVO;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class TechnicianServiceImpl extends ServiceImpl<TechnicianMapper, Technician> implements TechnicianService {
- @Resource
- private TechnicianMapper technicianMapper;
-
- @Override
- public List<TechnicianVO> getTechnicianListByShopId(Long shopId) {
- return technicianMapper.selectTechnicianListByShopId(shopId);
- }
-
- @Override
- public TechnicianDetailVO technicianDetail(Long technicianId) {
- return technicianMapper.selectTechnicianDetail(technicianId);
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
deleted file mode 100644
index 4c042e0..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.redis.annotation.DistributedLock;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.other.api.domain.TechnicianSubscribe;
-import com.ruoyi.other.enums.TechnicianErrorCode;
-import com.ruoyi.other.enums.TechnicianStatus;
-import com.ruoyi.other.mapper.TechnicianMapper;
-import com.ruoyi.other.mapper.TechnicianSubscribeMapper;
-import com.ruoyi.other.service.TechnicianSubscribeService;
-import com.ruoyi.other.vo.TechnicianSubscribeVO;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class TechnicianSubscribeServiceImpl extends ServiceImpl<TechnicianSubscribeMapper, TechnicianSubscribe> implements TechnicianSubscribeService {
- @Resource
- private TechnicianSubscribeMapper technicianSubscribeMapper;
- @Resource
- private TechnicianMapper technicianMapper;
-
- @Override
- public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId) {
- return technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(userId, shopId);
- }
- @Override
- public List<TechnicianSubscribeVO> getTechnicianSubscribeByUser(Long userId, Integer status) {
- return technicianSubscribeMapper.getTechnicianSubscribeByUser(userId, status);
- }
-
- @Override
- @DistributedLock(lockNamePre = "#technician_subscribe_lock", lockNamePost = "#technicianId")
- public void subscribe(TechnicianSubscribe subscribe, Long technicianId) {
- Long count = technicianSubscribeMapper.selectCount(new LambdaQueryWrapper<TechnicianSubscribe>()
- .eq(TechnicianSubscribe::getTechnicianId, technicianId)
- .eq(TechnicianSubscribe::getSubscribeTime, subscribe.getSubscribeTime())
- .eq(TechnicianSubscribe::getStatus, TechnicianStatus.UNSUBSCRIBE.getCode()));
- if (count > 0) {
- throw new ServiceException("当前时间段已被预约", TechnicianErrorCode.TECHNICIAN_ALREADY_SUBSCRIBED.getCode());
- }
- // 创建技师预约单
- Long userId = SecurityUtils.getUserId();
- subscribe.setAppUserId(userId);
- subscribe.setStatus(TechnicianStatus.UNSUBSCRIBE.getCode());
- subscribe.setDelFlag(0);
- subscribe.setCreateTime(LocalDateTime.now());
- technicianSubscribeMapper.insert(subscribe);
-
- }
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/VipGoodServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/VipGoodServiceImpl.java
deleted file mode 100644
index 807e7b0..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/VipGoodServiceImpl.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.ruoyi.other.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.other.mapper.VipGoodMapper;
-import com.ruoyi.other.api.domain.VipGood;
-import com.ruoyi.other.service.VipGoodService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
- */
-@Service
-public class VipGoodServiceImpl extends ServiceImpl<VipGoodMapper, VipGood> implements VipGoodService {
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
deleted file mode 100644
index 03308d7..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@ApiModel(value="商品热销对象", description="热门商品")
-@Data
-public class GoodsVO {
-
- @ApiModelProperty(value = "商品id")
- private Long goodsId;
-
- @ApiModelProperty(value = "商品名称")
- private String goodsName;
-
- @ApiModelProperty(value = "限购数量(-1不限购)")
- private Integer purchaseLimit;
-
- @ApiModelProperty(value = "类型(1=服务商品,2=单品商品)")
- private Integer type;
-
- @ApiModelProperty(value = "商品简介")
- private String introduction;
-
- @ApiModelProperty(value = "商品详情")
- private String detail;
-
- @ApiModelProperty(value = "封面图")
- private String homePagePicture;
-
- @ApiModelProperty(value = "详情图,多个逗号分隔")
- private String detailPicture;
-
- @ApiModelProperty(value = "积分支付(0=否,1=是)")
- private Integer pointPayment;
-
- @ApiModelProperty(value = "基础积分")
- @TableField("integral")
- private Integer integral;
-
- @ApiModelProperty(value = "划线价")
- private BigDecimal originalPrice;
-
- @ApiModelProperty(value = "基础售价")
- private BigDecimal sellingPrice;
-
- @ApiModelProperty(value = "已售数量")
- private Integer saleNum;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/Home.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/Home.java
deleted file mode 100644
index 7ccccea..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/Home.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.ruoyi.other.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@Data
-@ApiModel(value="首页用户信息", description="")
-public class Home {
- /**
- * 用户id
- */
- @ApiModelProperty(value = "用户id")
- private Long userId;
- /**
- * 头像
- */
- @ApiModelProperty(value = "头像")
- private String avatar;
- /**
- * 上级
- */
- @ApiModelProperty(value = "上级")
- private String parentName;
- /**
- * 绑定店铺
- */
- @ApiModelProperty(value = "绑定店铺")
- private String shopName;
-
- /**
- * 普通会员数量
- */
- @ApiModelProperty(value = "普通会员数量")
- private Integer ordinaryMemberNum;
-
- /**
- * 黄金会员数量
- */
- @ApiModelProperty(value = "黄金会员数量")
- private Integer goldenMemberNum;
-
- /**
- * 钻石会员数量
- */
- @ApiModelProperty(value = "钻石会员数量")
- private Integer diamondMemberNum;
-
- /**
- * 代理数量
- */
- @ApiModelProperty(value = "代理数量")
- private Integer agentNum;
-
- /**
- * 准代理数量
- */
- @ApiModelProperty(value = "准代理数量")
- private Integer proxyNum;
-
- /**
- * 总代理数量
- */
- @ApiModelProperty(value = "总代理数量")
- private Integer totalAgentNum;
-
- /**
- * 合伙人数量
- */
- @ApiModelProperty(value = "合伙人数量")
- private Integer partnerNum;
-
- /**
- * 营业时间
- */
- @ApiModelProperty(value = "营业星期")
- private String businessDate;
-
- /**
- * 评分
- */
- @ApiModelProperty(value = "评分")
- private BigDecimal score;
-
- /**
- * 经度
- */
- @ApiModelProperty(value = "经度")
- private String longitude;
-
- /**
- * 纬度
- */
- @ApiModelProperty(value = "纬度")
- private String latitude;
-
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java
deleted file mode 100644
index e041a4c..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@Data
-public class NearbyShopVO {
-
- @ApiModelProperty(value = "门店id")
- private Integer id;
-
- @ApiModelProperty(value = "封面图片")
- private String homePicture;
-
- @ApiModelProperty(value = "门店名称")
- private String name;
-
- @ApiModelProperty(value = "详细地址")
- private String address;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java
deleted file mode 100644
index 5511f3b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Data
-public class SeckillActivityDetailVO extends SeckillActivityVO{
-
- @ApiModelProperty(value = "产品id")
- private Long goodsId;
-
- @ApiModelProperty(value = "详情图,多个逗号分隔")
- private String detailPicture;
-
- @ApiModelProperty(value = "活动结束日期")
- private LocalDateTime endTime;
-
- @ApiModelProperty(value = "可用门店")
- private List<String> shopList;
-
- @ApiModelProperty(value = "商品详情")
- private String detail;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java
deleted file mode 100644
index bd8e336..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@Data
-public class SeckillActivityVO {
-
- @ApiModelProperty(value = "活动id")
- private Integer id;
-
- @ApiModelProperty(value = "商品名称")
- private String goodsName;
-
- @ApiModelProperty(value = "商品简介")
- private String introduction;
-
- @ApiModelProperty(value = "封面图")
- private String homePagePicture;
-
- @ApiModelProperty(value = "划线价")
- private BigDecimal originalPrice;
-
- @ApiModelProperty(value = "基础售价")
- private BigDecimal sellingPrice;
-
- @ApiModelProperty(value = "已售数量")
- private Integer saleNum;
-
- @ApiModelProperty(value = "开始时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Integer startTime;
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/ShopDetailVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/ShopDetailVO.java
deleted file mode 100644
index 96b1aa0..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/ShopDetailVO.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.ruoyi.other.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-@Data
-@ApiModel(value = "门店详情")
-public class ShopDetailVO {
-
- /**
- * 主键
- */
- @ApiModelProperty(value = "主键")
- private Integer id;
-
- /**
- * 门店名称
- */
- @ApiModelProperty(value = "门店名称")
- private String name;
-
- @ApiModelProperty(value = "详情图,多个逗号分隔")
- private String detailsPicture;
-
- @ApiModelProperty(value = "资质证书图片")
- private String certification;
-
- @ApiModelProperty(value = "营业星期(1,2,3,4,5,6,7)")
- private String businessDate;
-
- @ApiModelProperty(value = "开始时间(HH:mm)")
- private String startTime;
-
- @ApiModelProperty(value = "结束时间(HH:mm)")
- private String endTime;
-
- /**
- * 联系电话
- */
- @ApiModelProperty(value = "联系电话")
- private List<String> phones;
-
- /**
- * 评分
- */
- @ApiModelProperty(value = "评分")
- private BigDecimal score;
-
- /**
- * 地址
- */
- @ApiModelProperty(value = "地址")
- private String address;
-
- /**
- * 距离
- */
- @ApiModelProperty(value = "距离")
- private Double distance;
-
- @ApiModelProperty(value = "经度")
- private String longitude;
-
- @ApiModelProperty(value = "纬度")
- private String latitude;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianDetailVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianDetailVO.java
deleted file mode 100644
index e5bc269..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianDetailVO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.ruoyi.other.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@Data
-public class TechnicianDetailVO {
-
- /**
- * 主键
- */
- @ApiModelProperty(value = "主键")
- private Long id;
-
- /**
- * 技师姓名
- */
- @ApiModelProperty(value = "技师姓名")
- private String name;
-
- /**
- * 服务次数
- */
- @ApiModelProperty(value = "服务次数")
- private Integer serviceCount;
-
- /**
- * 评分
- */
- @ApiModelProperty(value = "评分")
- private BigDecimal score;
-
- /**
- * 简介
- */
- @ApiModelProperty(value = "简介")
- private String introduction;
-
- /**
- * 技师封面图
- */
- @ApiModelProperty(value = "技师封面图")
- private String homePicture;
-
- @ApiModelProperty(value = "技师详情图")
- private String infoPicture;
-
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
deleted file mode 100644
index 1ec6886..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.ruoyi.other.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Data
-@ApiModel(value="技师预约对象", description="")
-public class TechnicianSubscribeVO {
-
- /**
- * 门店名称
- */
- @ApiModelProperty(value = "门店名称")
- private String shopName;
-
- /**
- * 门店地址
- */
- @ApiModelProperty(value = "门店地址")
- private String shopAddress;
-
- /**
- * 用户地址
- */
- @ApiModelProperty(value = "用户地址")
- private String userAddress;
-
- /**
- * 技师名字
- */
- @ApiModelProperty(value = "技师名字")
- private String technicianName;
-
- /**
- * 预约时间
- */
- @ApiModelProperty(value = "预约时间")
- private LocalDateTime subscribeTime;
-
- /**
- * 服务方式:1=上门服务,2=到店服务
- */
- @ApiModelProperty(value = "服务方式:1=上门服务,2=到店服务")
- private Integer serviceMode;
-
- /**
- * 预约状态:0=待服务,1=已服务,2=已取消
- */
- @ApiModelProperty(value = "预约状态:0=待服务,1=已服务,2=已取消 4 已到期")
- private Integer status;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianVO.java
deleted file mode 100644
index 8b9c9ea..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianVO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@Data
-public class TechnicianVO {
- @ApiModelProperty(value = "主键")
- private Long id;
-
- @ApiModelProperty(value = "技师姓名")
- private String name;
-
- @ApiModelProperty(value = "简介")
- private String introduction;
-
- @ApiModelProperty(value = "服务次数")
- private Integer serviceCount;
-
- @ApiModelProperty(value = "技师封面图")
- private String homePicture;
-
- @ApiModelProperty(value = "评分")
- private BigDecimal score;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/VerifiableShopVo.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/VerifiableShopVo.java
deleted file mode 100644
index c55dc85..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/VerifiableShopVo.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.other.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author zhibing.pu
- * @Date 2024/11/25 12:08
- */
-@Data
-@ApiModel
-public class VerifiableShopVo {
- @ApiModelProperty("门店id")
- private Integer id;
- @ApiModelProperty("门店名称")
- private String name;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletChangeVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletChangeVO.java
deleted file mode 100644
index 61ea79b..0000000
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletChangeVO.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.ruoyi.other.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-@ApiModel(value="变更明细", description="")
-public class WalletChangeVO {
-
- @ApiModelProperty(value = "变更类型:1-充值 2-提现 3-红包 4-分佣 5商城购物")
- private Integer type;
-
- @ApiModelProperty(value = "变更时间")
- @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
- private Date changeTime;
-
- @ApiModelProperty(value = "分佣消费金额")
- private BigDecimal price;
-}
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
index 742f5e8..0703c40 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
@@ -15,9 +15,9 @@
FROM
t_seckill_activity_info tsai
LEFT JOIN t_goods tg ON tsai.good_id = tg.id
- LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id
+ LEFT JOIN t_goods_seckill tgs ON tgs.seckill_activity_info_id = tsai.id
WHERE tsai.end_time >= NOW()
- <if test="goodsName != null and goodsName != ''">
+ <if test="name != null and name != ''">
AND tg.`name` LIKE concat('%',#{goodsName},'%')
</if>
<if test="goodsCategoryId != null">
@@ -43,7 +43,7 @@
FROM
t_seckill_activity_info tsai
LEFT JOIN t_goods tg ON tsai.good_id = tg.id
- LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id
+ LEFT JOIN t_goods_seckill tgs ON tgs.seckill_activity_info_id = tsai.id
WHERE tsai.id = #{seckillActivityId}
</select>
</mapper>
\ No newline at end of file
diff --git a/ruoyi-service/ruoyi-other/src/test/java/com/ruoyi/other/RuoYiOtherApplicationTests.java b/ruoyi-service/ruoyi-other/src/test/java/com/ruoyi/other/RuoYiOtherApplicationTests.java
deleted file mode 100644
index 23a13de..0000000
--- a/ruoyi-service/ruoyi-other/src/test/java/com/ruoyi/other/RuoYiOtherApplicationTests.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.ruoyi.other;
-
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = RuoYiOtherApplication.class)
-public class RuoYiOtherApplicationTests {
-
-}
--
Gitblit v1.7.1