From f736797c7f82270619f6ca146558ed65dad030c7 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 04 十二月 2024 14:34:17 +0800 Subject: [PATCH] 修改启动异常 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java | 4 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java | 0 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java | 76 ++++++ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java | 109 ++++---- ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java | 62 +++++ ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java | 30 ++ ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/ShoppingCartMapper.java | 2 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java | 170 ++++++++++++++ /dev/null | 8 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 | 110 +++++++++ ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java | 32 ++ ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java | 4 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java | 2 ruoyi-api/ruoyi-api-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | 1 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java | 2 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java | 2 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java | 2 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java | 0 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java | 29 ++ 20 files changed, 601 insertions(+), 75 deletions(-) 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 8d5b424..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,7 +25,7 @@ * @param id * @return */ - @PostMapping("/appUser/getAppUserById") + @PostMapping("/app-user/getAppUserById") AppUser getAppUserById(@RequestParam("id") Long id); /** diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/factory/RemoteOrderGoodsFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/factory/RemoteOrderGoodsFallbackFactory.java deleted file mode 100644 index 1ab6b03..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/factory/RemoteOrderGoodsFallbackFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.ruoyi.factory; - -import com.ruoyi.common.core.domain.R; -import com.ruoyi.feignClient.RemoteOrderGoodsClient; -import lombok.extern.slf4j.Slf4j; -import com.ruoyi.model.Order; -import com.ruoyi.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/feignClient/RemoteOrderGoodsClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/feignClient/RemoteOrderGoodsClient.java deleted file mode 100644 index 4aff37f..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/feignClient/RemoteOrderGoodsClient.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.ruoyi.feignClient; - - -import com.ruoyi.common.core.constant.ServiceNameConstants; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.factory.RemoteOrderGoodsFallbackFactory; -import com.ruoyi.model.Order; -import com.ruoyi.model.OrderGood; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; - -import java.util.List; - -@FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderGoodsFallbackFactory.class) -public interface RemoteOrderGoodsClient { - - /** - * 查询指定商品订单 - */ - @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/com/ruoyi/model/Order.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/Order.java deleted file mode 100644 index c71039e..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/Order.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.ruoyi.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * <p> - * - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("t_order") -@ApiModel(value="Order对象", description="") -public class Order implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId("id") - private Long id; - - @ApiModelProperty(value = "用户id") - @TableField("app_user_id") - private Long appUserId; - - @ApiModelProperty(value = "订单类型1服务单2商品") - @TableField("order_type") - private Integer orderType; - - @ApiModelProperty(value = "1待发货2待收货3待使用4已完成5已取消6已退款7售后中") - @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; - - @ApiModelProperty(value = "订单编号") - @TableField("order_number") - private String orderNumber; - - @ApiModelProperty(value = "商品数量") - @TableField("num") - private Integer num; - - @ApiModelProperty(value = "商品封面(多张逗号隔开,最多三张))") - @TableField("good_pics") - private String goodPics; - - @ApiModelProperty(value = "商品名称(多个名称逗号隔开))") - @TableField("good_name") - private String goodName; - - @ApiModelProperty(value = "订单总金额") - @TableField("total_amount") - private BigDecimal totalAmount; - - @ApiModelProperty(value = "满减金额") - @TableField("full_reduction_amount") - private BigDecimal fullReductionAmount; - - @ApiModelProperty(value = "代金券抵扣金额") - @TableField("money_amount") - private BigDecimal moneyAmount; - - @ApiModelProperty(value = "折扣券抵扣金额") - @TableField("discount_amount") - private BigDecimal discountAmount; - - @ApiModelProperty(value = "商品券抵扣总金额") - @TableField("good_amount") - private BigDecimal goodAmount; - - @ApiModelProperty(value = "活动优惠金额") - @TableField("activity_amount") - private BigDecimal activityAmount; - - @ApiModelProperty(value = "优惠总金额") - @TableField("discount_total_amount") - private BigDecimal discountTotalAmount; - - - @ApiModelProperty(value = "实际支付价格") - @TableField("payment_amount") - private BigDecimal paymentAmount; - - @ApiModelProperty(value = "使用积分") - @TableField("point") - private Integer point; - - @ApiModelProperty(value = "1wx2积分") - @TableField("pay_method") - private Integer payMethod; - - @ApiModelProperty(value = "使用的优惠劵json") - @TableField("coupon_json") - private String couponJson; - - @ApiModelProperty(value = "订单优惠活动的json快照") - @TableField("activity_json") - private String activityJson; - - @ApiModelProperty(value = "运费") - @TableField("express_amount") - private BigDecimal expressAmount; - - @ApiModelProperty(value = "第三方快递信息") - @TableField("express_json") - private String expressJson; - - @ApiModelProperty(value = "收货地址信息") - @TableField("address_json") - private String addressJson; - - @ApiModelProperty(value = "平台分佣") - @TableField("share_amount") - private BigDecimal shareAmount; - - @ApiModelProperty(value = "本单获取的积分") - @TableField("get_point") - private Integer getPoint; - - @ApiModelProperty(value = "微信支付号") - @TableField("serial_number") - private String serialNumber; - - @ApiModelProperty(value = "1待支付2已支付") - @TableField("pay_status") - private Integer payStatus; - - @ApiModelProperty(value = "对应门店id") - @TableField("shop_id") - private Integer shopId; - - @ApiModelProperty(value = "删除标志(0=否,1=是)") - @TableField("del_flag") - @TableLogic - private Integer delFlag; - - @ApiModelProperty(value = "添加时间") - @TableField("create_time") - private LocalDateTime createTime; - - -} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/OrderGood.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/OrderGood.java deleted file mode 100644 index 0d128cb..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/OrderGood.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.ruoyi.model; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * <p> - * - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("t_order_good") -@ApiModel(value="OrderGood对象", description="") -public class OrderGood implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "商品id") - @TableField("goods_id") - private Integer goodsId; - - @ApiModelProperty(value = "订单id") - @TableField("order_id") - private Long orderId; - - @ApiModelProperty(value = "商品券优惠金额") - @TableField("good_amount") - private BigDecimal goodsCouponAmount; - - @ApiModelProperty(value = "购买商品的json快照") - @TableField("good_json") - private String goodJson; - - @ApiModelProperty(value = "秒杀活动json快照") - @TableField("seckill_json") - private String seckillJson; - - @ApiModelProperty(value = "数量") - @TableField("num") - private Integer num; - - @ApiModelProperty(value = "删除标志(0=否,1=是)") - @TableField("del_flag") - @TableLogic - private Integer delFlag; - - @ApiModelProperty(value = "添加时间") - @TableField("create_time") - private LocalDateTime createTime; - - @ApiModelProperty(value = "可获得消费积分") - @TableField("earn_spending_points") - private Integer earnSpendingPoints; - - @ApiModelProperty(value = "上级获得分佣金额") - @TableField("superior_subcommission") - private BigDecimal superiorSubcommission; - - @ApiModelProperty(value = "上级获得返佣积分") - @TableField("superior_rebate_points") - private Integer superiorRebatePoints; - - @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)") - @TableField("superior_type") - private Integer superiorType; - - @ApiModelProperty(value = "核销门店可获得服务费") - @TableField("servuce_shop_charges") - private BigDecimal servuceShopCharges; - - @ApiModelProperty(value = "核销门店可获得服务积分") - @TableField("servuce_shop_points") - private Integer servuceShopPoints; - - @ApiModelProperty(value = "技师可获得服务积分") - @TableField("technician_points") - private Integer technicianPoints; - - @ApiModelProperty(value = "绑定门店可获得分佣金额") - @TableField("bound_shop_charges") - private BigDecimal boundShopCharges; - - @ApiModelProperty(value = "绑定门店可获得返佣积分") - @TableField("bound_shop_points") - private Integer boundShopPoints; - - @ApiModelProperty(value = "绑定门店上级门店可获得分佣金额") - @TableField("bound_shop_superiors_charges") - private BigDecimal boundShopSuperiorsCharges; - - @ApiModelProperty(value = "绑定门店上级门店可获得返佣积分") - @TableField("bound_shop_superiors_points") - private Integer boundShopSuperiorsPoints; - - -} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/RefundPass.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/RefundPass.java deleted file mode 100644 index 4190c14..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/RefundPass.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.ruoyi.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * <p> - * - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("t_refund_pass") -@ApiModel(value="RefundPass对象", description="") -public class RefundPass implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId("id") - private Long id; - - @ApiModelProperty(value = "订单id") - @TableField("order_id") - private Long orderId; - - @ApiModelProperty(value = "1待审核2已完成3已拒绝4待退货5待平台收货") - @TableField("status") - private Integer status; - - @ApiModelProperty(value = "1退货退款2仅退款") - @TableField("refund_method") - private Integer refundMethod; - - @ApiModelProperty(value = "用户申请原因") - @TableField("refund_reason") - private String refundReason; - - @ApiModelProperty(value = "用户申请备注") - @TableField("user_remark") - private String userRemark; - - @ApiModelProperty(value = "申请图片") - @TableField("pics") - private String pics; - - @ApiModelProperty(value = "1待审核2同意3拒绝") - @TableField("pass_status") - private Integer passStatus; - - @ApiModelProperty(value = "后台审核备注") - @TableField("pass_remark") - private String passRemark; - - @ApiModelProperty(value = "删除标志(0=否,1=是)") - @TableField("del_flag") - @TableLogic - private Integer delFlag; - - @ApiModelProperty(value = "添加时间") - @TableField("create_time") - private LocalDateTime createTime; - - -} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/ShoppingCart.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/ShoppingCart.java deleted file mode 100644 index 3894844..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/model/ShoppingCart.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ruoyi.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; - -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("t_shopping_cart") -@ApiModel(value = "购物车对象", description = "") -public class ShoppingCart implements Serializable { - private static final long serialVersionUID = 1L; - @ApiModelProperty("主键") - @TableId - private Long id; - @ApiModelProperty("用户id") - @TableField("app_user_id") - private Long appUserId; - @ApiModelProperty("商品id") - @TableField("goods_id") - private Integer goodsId; - @ApiModelProperty("数量") - private Integer number; -} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/factory/RemoteOrderFallbackFactory.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java similarity index 100% rename from ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/factory/RemoteOrderFallbackFactory.java rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderFallbackFactory.java 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/feignClient/RemoteOrderClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java similarity index 100% rename from ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/feignClient/RemoteOrderClient.java rename to ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderClient.java diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java new file mode 100644 index 0000000..2a5b441 --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java @@ -0,0 +1,29 @@ +package com.ruoyi.order.feignClient; + + +import com.ruoyi.common.core.constant.ServiceNameConstants; +import com.ruoyi.common.core.domain.R; +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; + +import java.util.List; + +@FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderGoodsFallbackFactory.class) +public interface RemoteOrderGoodsClient { + + /** + * 查询指定商品订单 + */ + @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/com/ruoyi/order/model/Order.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java new file mode 100644 index 0000000..2f29822 --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java @@ -0,0 +1,170 @@ +package com.ruoyi.order.model; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * <p> + * + * </p> + * + * @author luodangjia + * @since 2024-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("t_order") +@ApiModel(value="Order对象", description="") +public class Order implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId("id") + private Long id; + + @ApiModelProperty(value = "用户id") + @TableField("app_user_id") + private Long appUserId; + + @ApiModelProperty(value = "订单类型1服务单2商品") + @TableField("order_type") + private Integer orderType; + + @ApiModelProperty(value = "1待发货2待收货3待使用4已完成5已取消6已退款7售后中") + @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; + + @ApiModelProperty(value = "订单编号") + @TableField("order_number") + private String orderNumber; + + @ApiModelProperty(value = "商品数量") + @TableField("num") + private Integer num; + + @ApiModelProperty(value = "商品封面(多张逗号隔开,最多三张))") + @TableField("good_pics") + private String goodPics; + + @ApiModelProperty(value = "商品名称(多个名称逗号隔开))") + @TableField("good_name") + private String goodName; + + @ApiModelProperty(value = "订单总金额") + @TableField("total_amount") + private BigDecimal totalAmount; + + @ApiModelProperty(value = "满减金额") + @TableField("full_reduction_amount") + private BigDecimal fullReductionAmount; + + @ApiModelProperty(value = "代金券抵扣金额") + @TableField("money_amount") + private BigDecimal moneyAmount; + + @ApiModelProperty(value = "折扣券抵扣金额") + @TableField("discount_amount") + private BigDecimal discountAmount; + + @ApiModelProperty(value = "商品券抵扣总金额") + @TableField("good_amount") + private BigDecimal goodAmount; + + @ApiModelProperty(value = "活动优惠金额") + @TableField("activity_amount") + private BigDecimal activityAmount; + + @ApiModelProperty(value = "优惠总金额") + @TableField("discount_total_amount") + private BigDecimal discountTotalAmount; + + + @ApiModelProperty(value = "实际支付价格") + @TableField("payment_amount") + private BigDecimal paymentAmount; + + @ApiModelProperty(value = "使用积分") + @TableField("point") + private Integer point; + + @ApiModelProperty(value = "1wx2积分") + @TableField("pay_method") + private Integer payMethod; + + @ApiModelProperty(value = "使用的优惠劵json") + @TableField("coupon_json") + private String couponJson; + + @ApiModelProperty(value = "订单优惠活动的json快照") + @TableField("activity_json") + private String activityJson; + + @ApiModelProperty(value = "运费") + @TableField("express_amount") + private BigDecimal expressAmount; + + @ApiModelProperty(value = "第三方快递信息") + @TableField("express_json") + private String expressJson; + + @ApiModelProperty(value = "收货地址信息") + @TableField("address_json") + private String addressJson; + + @ApiModelProperty(value = "平台分佣") + @TableField("share_amount") + private BigDecimal shareAmount; + + @ApiModelProperty(value = "本单获取的积分") + @TableField("get_point") + private Integer getPoint; + + @ApiModelProperty(value = "微信支付号") + @TableField("serial_number") + private String serialNumber; + + @ApiModelProperty(value = "1待支付2已支付") + @TableField("pay_status") + private Integer payStatus; + + @ApiModelProperty(value = "对应门店id") + @TableField("shop_id") + private Integer shopId; + + @ApiModelProperty(value = "删除标志(0=否,1=是)") + @TableField("del_flag") + @TableLogic + private Integer delFlag; + + @ApiModelProperty(value = "添加时间") + @TableField("create_time") + private LocalDateTime createTime; + + +} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java new file mode 100644 index 0000000..6379aa0 --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java @@ -0,0 +1,110 @@ +package com.ruoyi.order.model; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * <p> + * + * </p> + * + * @author luodangjia + * @since 2024-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("t_order_good") +@ApiModel(value="OrderGood对象", description="") +public class OrderGood implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "商品id") + @TableField("goods_id") + private Integer goodsId; + + @ApiModelProperty(value = "订单id") + @TableField("order_id") + private Long orderId; + + @ApiModelProperty(value = "商品券优惠金额") + @TableField("good_amount") + private BigDecimal goodsCouponAmount; + + @ApiModelProperty(value = "购买商品的json快照") + @TableField("good_json") + private String goodJson; + + @ApiModelProperty(value = "秒杀活动json快照") + @TableField("seckill_json") + private String seckillJson; + + @ApiModelProperty(value = "数量") + @TableField("num") + private Integer num; + + @ApiModelProperty(value = "删除标志(0=否,1=是)") + @TableField("del_flag") + @TableLogic + private Integer delFlag; + + @ApiModelProperty(value = "添加时间") + @TableField("create_time") + private LocalDateTime createTime; + + @ApiModelProperty(value = "可获得消费积分") + @TableField("earn_spending_points") + private Integer earnSpendingPoints; + + @ApiModelProperty(value = "上级获得分佣金额") + @TableField("superior_subcommission") + private BigDecimal superiorSubcommission; + + @ApiModelProperty(value = "上级获得返佣积分") + @TableField("superior_rebate_points") + private Integer superiorRebatePoints; + + @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)") + @TableField("superior_type") + private Integer superiorType; + + @ApiModelProperty(value = "核销门店可获得服务费") + @TableField("servuce_shop_charges") + private BigDecimal servuceShopCharges; + + @ApiModelProperty(value = "核销门店可获得服务积分") + @TableField("servuce_shop_points") + private Integer servuceShopPoints; + + @ApiModelProperty(value = "技师可获得服务积分") + @TableField("technician_points") + private Integer technicianPoints; + + @ApiModelProperty(value = "绑定门店可获得分佣金额") + @TableField("bound_shop_charges") + private BigDecimal boundShopCharges; + + @ApiModelProperty(value = "绑定门店可获得返佣积分") + @TableField("bound_shop_points") + private Integer boundShopPoints; + + @ApiModelProperty(value = "绑定门店上级门店可获得分佣金额") + @TableField("bound_shop_superiors_charges") + private BigDecimal boundShopSuperiorsCharges; + + @ApiModelProperty(value = "绑定门店上级门店可获得返佣积分") + @TableField("bound_shop_superiors_points") + private Integer boundShopSuperiorsPoints; + + +} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java new file mode 100644 index 0000000..9f9db3d --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java @@ -0,0 +1,76 @@ +package com.ruoyi.order.model; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * <p> + * + * </p> + * + * @author luodangjia + * @since 2024-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("t_refund_pass") +@ApiModel(value="RefundPass对象", description="") +public class RefundPass implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId("id") + private Long id; + + @ApiModelProperty(value = "订单id") + @TableField("order_id") + private Long orderId; + + @ApiModelProperty(value = "1待审核2已完成3已拒绝4待退货5待平台收货") + @TableField("status") + private Integer status; + + @ApiModelProperty(value = "1退货退款2仅退款") + @TableField("refund_method") + private Integer refundMethod; + + @ApiModelProperty(value = "用户申请原因") + @TableField("refund_reason") + private String refundReason; + + @ApiModelProperty(value = "用户申请备注") + @TableField("user_remark") + private String userRemark; + + @ApiModelProperty(value = "申请图片") + @TableField("pics") + private String pics; + + @ApiModelProperty(value = "1待审核2同意3拒绝") + @TableField("pass_status") + private Integer passStatus; + + @ApiModelProperty(value = "后台审核备注") + @TableField("pass_remark") + private String passRemark; + + @ApiModelProperty(value = "删除标志(0=否,1=是)") + @TableField("del_flag") + @TableLogic + private Integer delFlag; + + @ApiModelProperty(value = "添加时间") + @TableField("create_time") + private LocalDateTime createTime; + + +} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java new file mode 100644 index 0000000..11b064f --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/ShoppingCart.java @@ -0,0 +1,30 @@ +package com.ruoyi.order.model; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("t_shopping_cart") +@ApiModel(value = "购物车对象", description = "") +public class ShoppingCart implements Serializable { + private static final long serialVersionUID = 1L; + @ApiModelProperty("主键") + @TableId + private Long id; + @ApiModelProperty("用户id") + @TableField("app_user_id") + private Long appUserId; + @ApiModelProperty("商品id") + @TableField("goods_id") + private Integer goodsId; + @ApiModelProperty("数量") + private Integer number; +} diff --git a/ruoyi-api/ruoyi-api-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 new file mode 100644 index 0000000..bf677d3 --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java @@ -0,0 +1,62 @@ +package com.ruoyi.order.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +@Data +@ApiModel(value = "订单明细") +public class OrderDetailVO { + @ApiModelProperty(value = "订单id") + private Long id; + + @ApiModelProperty(value = "订单商品") + private List<OrderGoodsVO> goodsList; + + @ApiModelProperty(value = "使用积分") + private Integer point; + + @ApiModelProperty(value = "收货地址id") + private Long addressId; + + @ApiModelProperty(value = "收货联系人") + private String recieveName; + + @ApiModelProperty(value = "收货联系电话") + private String recievePhone; + + @ApiModelProperty(value = "收货地址") + private String recieveAddress; + + @ApiModelProperty(value = "订单编号") + private String orderNumber; + + @ApiModelProperty("下单时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "订单总金额") + private BigDecimal totalAmount; + + @ApiModelProperty(value = "优惠券名称") + private String couponName; + + @ApiModelProperty(value = "参与活动名称") + private String activityName; + + @ApiModelProperty(value = "抵扣金额") + private BigDecimal couponAmount; + + @ApiModelProperty(value = "快递费") + private BigDecimal expressAmount; + + @ApiModelProperty(value = "可获得积分") + private Integer pointAmount; + + @ApiModelProperty(value = "实际支付价格") + private BigDecimal paymentAmount; + +} diff --git a/ruoyi-api/ruoyi-api-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 new file mode 100644 index 0000000..f733df3 --- /dev/null +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderGoodsVO.java @@ -0,0 +1,32 @@ +package com.ruoyi.order.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +@ApiModel(value = "订单商品") +public class OrderGoodsVO { + @ApiModelProperty(value = "商品id") + private Integer goodsId; + + @ApiModelProperty(value = "商品名称") + private String goodsName; + + @ApiModelProperty(value = "类型(1=服务商品,2=单品商品)") + private Integer type; + + @ApiModelProperty(value = "数量") + private Integer num; + + @ApiModelProperty(value = "商品图片") + private String goodsPic; + + @ApiModelProperty(value = "基础售价") + private BigDecimal sellingPrice; + + @ApiModelProperty(value = "划线价") + private BigDecimal originalPrice; +} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderDetailVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderDetailVO.java deleted file mode 100644 index 263cf79..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderDetailVO.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; - -@Data -@ApiModel(value = "订单明细") -public class OrderDetailVO { - @ApiModelProperty(value = "订单id") - private Long id; - - @ApiModelProperty(value = "订单商品") - private List<OrderGoodsVO> goodsList; - - @ApiModelProperty(value = "使用积分") - private Integer point; - - @ApiModelProperty(value = "收货地址id") - private Long addressId; - - @ApiModelProperty(value = "收货联系人") - private String recieveName; - - @ApiModelProperty(value = "收货联系电话") - private String recievePhone; - - @ApiModelProperty(value = "收货地址") - private String recieveAddress; - - @ApiModelProperty(value = "订单编号") - private String orderNumber; - - @ApiModelProperty("下单时间") - private LocalDateTime createTime; - - @ApiModelProperty(value = "订单总金额") - private BigDecimal totalAmount; - - @ApiModelProperty(value = "优惠券名称") - private String couponName; - - @ApiModelProperty(value = "参与活动名称") - private String activityName; - - @ApiModelProperty(value = "抵扣金额") - private BigDecimal couponAmount; - - @ApiModelProperty(value = "快递费") - private BigDecimal expressAmount; - - @ApiModelProperty(value = "可获得积分") - private Integer pointAmount; - - @ApiModelProperty(value = "实际支付价格") - private BigDecimal paymentAmount; - -} diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderGoodsVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderGoodsVO.java deleted file mode 100644 index 6509d71..0000000 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/vo/OrderGoodsVO.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.ruoyi.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -@Data -@ApiModel(value = "订单商品") -public class OrderGoodsVO { - @ApiModelProperty(value = "商品id") - private Integer goodsId; - - @ApiModelProperty(value = "商品名称") - private String goodsName; - - @ApiModelProperty(value = "类型(1=服务商品,2=单品商品)") - private Integer type; - - @ApiModelProperty(value = "数量") - private Integer num; - - @ApiModelProperty(value = "商品图片") - private String goodsPic; - - @ApiModelProperty(value = "基础售价") - private BigDecimal sellingPrice; - - @ApiModelProperty(value = "划线价") - private BigDecimal originalPrice; -} 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/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/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-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-service/ruoyi-account/src/main/java/com/ruoyi/account/RuoYiAccountApplication.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/RuoYiAccountApplication.java deleted file mode 100644 index 29b5337..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/RuoYiAccountApplication.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ruoyi.account; - -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.account.mapper"}) -@EnableCustomSwagger2 -@EnableRyFeignClients -@SpringBootApplication -@EnableScheduling//开启定时任务 -@ServletComponentScan -@EnableTransactionManagement//开启事务 -public class RuoYiAccountApplication { - public static void main(String[] args) { - SpringApplication.run(RuoYiAccountApplication.class, args); - System.out.println("(♥◠‿◠)ノ゙ 账户模块启动成功 ლ(´ڡ`ლ)゙ \n" + - " .-------. ____ __ \n" + - " | _ _ \\ \\ \\ / / \n" + - " | ( ' ) | \\ _. / ' \n" + - " |(_ o _) / _( )_ .' \n" + - " | (_,_).' __ ___(_ o _)' \n" + - " | |\\ \\ | || |(_,_)' \n" + - " | | \\ `' /| `-' / \n" + - " | | \\ / \\ / \n" + - " ''-' `'-' `-..-' "); - } -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/DataUpdateHandlerConfig.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/DataUpdateHandlerConfig.java deleted file mode 100644 index 9fc9817..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/DataUpdateHandlerConfig.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.ruoyi.account.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.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); - // 获取登录信息 -// LoginUser loginUser = tokenService.getLoginUser(); -// String userName = loginUser.getUsername(); -// if (StringUtils.hasLength(userName)) { -// this.setFieldValByName("createBy", userName, metaObject); -// this.setFieldValByName("createTime", new Date(), metaObject); -// this.setFieldValByName("updateBy", userName, metaObject); -// this.setFieldValByName("updateTime", new Date(), metaObject); -// } else { -// this.setFieldValByName("createBy", "", metaObject); -// this.setFieldValByName("updateBy", "", metaObject); -// this.setFieldValByName("createTime", "", metaObject); -// this.setFieldValByName("updateTime", "", metaObject); -// } - } - - /** - * 修改数据执行 - * - * @param metaObject - */ - @Override - public void updateFill(MetaObject metaObject) { -// this.setFieldValByName("createTime", new Date(), metaObject); - this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); - // 获取登录信息 -// LoginUser loginUser = tokenService.getLoginUser(); -// System.err.println(loginUser); -// String userName = loginUser.getUsername(); -// if (StringUtils.hasLength(userName)) { -// this.setFieldValByName("createBy", userName, metaObject); -// this.setFieldValByName("createTime", new Date(), metaObject); -// this.setFieldValByName("updateBy", userName, metaObject); -// this.setFieldValByName("updateTime", new Date(), metaObject); -// } else { -// this.setFieldValByName("createBy", "", metaObject); -// this.setFieldValByName("updateBy", "", metaObject); -// this.setFieldValByName("createTime", "", metaObject); -// this.setFieldValByName("updateTime", "", metaObject); -// } - } -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/FileUploadConfig.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/FileUploadConfig.java deleted file mode 100644 index 5975453..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/FileUploadConfig.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.ruoyi.account.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * <p>文件上传配置</p> - * - * @author mouseyCat - * @date 2020/10/13 16:10 - */ -@Data -@Component -@ConfigurationProperties(prefix = "file.upload") -public class FileUploadConfig { - private String accessPath; - private String allowExt; - private String location; - private String qrLocation; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/HttpConfig.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/HttpConfig.java deleted file mode 100644 index 349c766..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/HttpConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.ruoyi.account.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-account/src/main/java/com/ruoyi/account/config/MybatisPlusConfig.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/MybatisPlusConfig.java deleted file mode 100644 index f83ce34..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/config/MybatisPlusConfig.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.ruoyi.account.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-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java deleted file mode 100644 index 4c8c7d4..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/agent-application") -public class AgentApplicationController { - -} - 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 deleted file mode 100644 index 50bce9b..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserBankController.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.ruoyi.account.controller; - -import com.ruoyi.account.api.model.AppUserBank; -import com.ruoyi.common.core.web.domain.AjaxResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; - -/** - * @author zhibing.pu - * @Date 2024/11/25 15:07 - */ -@Api(tags = {"个人中心-我的银行卡-小程序"}) -@RestController -@RequestMapping("/appUserBank") -public class AppUserBankController { - - - - - - @ResponseBody - @PostMapping("/saveAppUserBank") - @ApiOperation(value = "保存银行卡") - public AjaxResult saveAppUserBank(@RequestBody AppUserBank appUserBank){ - return AjaxResult.success(); - } - - - @ResponseBody - @GetMapping("/getAppUserBank") - @ApiOperation(value = "获取银行卡信息") - public AjaxResult<AppUserBank> getAppUserBank(){ - return AjaxResult.success(); - } - -} 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 deleted file mode 100644 index fb71383..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java +++ /dev/null @@ -1,245 +0,0 @@ -package com.ruoyi.account.controller; -import java.time.LocalDateTime; - - -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; -import com.ruoyi.other.api.feignClient.StoreClient; -import org.junit.Test; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; - -import javax.annotation.Resource; -import java.util.List; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.service.AppUserService; -import com.ruoyi.account.vo.*; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.web.controller.BaseController; -import com.ruoyi.common.core.web.page.TableDataInfo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Api(tags = {"登录注册-小程序"}) -@RestController -@RequestMapping("/app-user") -public class AppUserController extends BaseController { - - - - @Resource - private TokenService tokenService; - @Resource - private AppUserService appUserService; - @Resource - private StoreClient storeClient; - @Resource - private UserCouponService userCouponService; - - - @ResponseBody - @PostMapping("/mobileLogin") - @ApiOperation(value = "手机号登录") - public AjaxResult<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ - return appUserService.mobileLogin(mobileLogin); - } - - @PostMapping("getAppUserById") - AppUser getAppUserById(@RequestParam("id") Long id){ - return appUserService.getById(id); - } - - - - - @ResponseBody - @PostMapping("/appletLogin") - @ApiOperation(value = "小程序一键登录") - public R<LoginVo> appletLogin(@RequestBody AppletLogin appletLogin){ - return appUserService.appletLogin(appletLogin); - } - - - @ResponseBody - @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(); - @PostMapping("/mobileLogin") - @ApiOperation(value = "手机号登录") - public R<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ - return appUserService.mobileLogin(mobileLogin); - } - - @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 ){ - appUserService.lambdaQuery().eq(AppUser::getInviteUserId, userId).eq(AppUser::getVipId, vipId).count() - return R.ok(count); - } - - - - - @ResponseBody - @PostMapping("/getSMSCode") - @ApiOperation(value = "获取短信验证码") - public R getSMSCode(@RequestBody SMSCode smsCode){ - return appUserService.getSMSCode(smsCode); - } - - - - @ResponseBody - @PostMapping("/registerAccount") - @ApiOperation(value = "注册新账号") - public R<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount){ - return appUserService.registerAccount(registerAccount); - } - - - @ResponseBody - @GetMapping("/getReferrer/{id}") - @ApiOperation(value = "获取推荐人信息") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "推荐人id", required = true, dataType = "long") - }) - public R<String> getReferrer(@PathVariable("id") Long id){ - AppUser appUser = appUserService.getById(id); - String phone = appUser.getPhone(); - phone = phone.substring(0, 3) + "****" + phone.substring(7); - return R.ok(appUser.getName() + "-" + phone); - } - - - - @ResponseBody - @GetMapping("/getNearbyReferrer") - @ApiOperation(value = "获取附近推荐人列表") - public TableDataInfo<NearbyReferrerVo> getNearbyReferrer(NearbyReferrer nearbyReferrer){ - startPage(); - List<NearbyReferrerVo> list = appUserService.getNearbyReferrer(nearbyReferrer); - return getDataTable(list); - } - - - @ResponseBody - @PostMapping("/info") - @ApiOperation(value = "我的资料", tags = {"小程序-个人中心首页-我的资料"}) - public R<AppUser> info(){ - Long userId = tokenService.getLoginUserApplet().getUserid(); - AppUser user = appUserService.getById(userId); - return R.ok(user); - } - @Resource - private UserCancellationLogService userCancellationLogService; - - @ResponseBody - @PostMapping("/unregis") - @ApiOperation(value = "注销", tags = {"小程序-个人中心首页-我的资料"}) - public R unregis(){ - Long userId = tokenService.getLoginUserApplet().getUserid(); - AppUser user = appUserService.getById(userId); - - //添加注销记录 - UserCancellationLog userCancellationLog = new UserCancellationLog(); - userCancellationLog.setAppUserId(user.getId()); - userCancellationLog.setVipId(user.getVipId()); - userCancellationLogService.save(userCancellationLog); - - - return R.ok(); - } - - - - - @PostMapping("/index") - @ApiOperation(value = "个人中心首页", tags = {"小程序-个人中心首页"}) - public R<AppUser> index(){ - System.err.println("=-===="); - Long userId = tokenService.getLoginUserApplet().getUserid(); - //当前用户信息 - AppUser user = appUserService.getById(userId); - //当前用户的推荐人信息 - if (user.getInviteUserId()!=null){ - AppUser inviteUser = appUserService.getById(user.getInviteUserId()); - user.setInviteUserName(inviteUser.getName()); - } - //当前绑定门店的店铺信息 - if (user.getShopId()!=null){ - R<Shop> storeById = storeClient.getStoreById(user.getShopId()); - if (storeById.getData()!=null){ - user.setShopName(storeById.getData().getName()); - } - } - Long count1 = appUserService.lambdaQuery().eq(AppUser::getVipId, 1).eq(AppUser::getTopInviteId, 1).count(); - Long count2 = appUserService.lambdaQuery().eq(AppUser::getVipId, 2).eq(AppUser::getTopInviteId, userId).count(); - Long count3 = appUserService.lambdaQuery().eq(AppUser::getVipId, 3).eq(AppUser::getTopInviteId, userId).count(); - Long count4 = appUserService.lambdaQuery().eq(AppUser::getVipId, 4).eq(AppUser::getTopInviteId, userId).count(); - Long count5 = appUserService.lambdaQuery().eq(AppUser::getVipId, 5).eq(AppUser::getTopInviteId, userId).count(); - Long count6 = appUserService.lambdaQuery().eq(AppUser::getVipId, 6).eq(AppUser::getTopInviteId, userId).count(); - Long count7 = appUserService.lambdaQuery().eq(AppUser::getVipId, 7).eq(AppUser::getTopInviteId, userId).count(); - user.setCount1(count1); - user.setCount2(count2); - user.setCount3(count3); - user.setCount4(count4); - user.setCount5(count5); - user.setCount6(count6); - user.setCount7(count7); - return R.ok(user); - - - } - - /** - * 获取用户的祖籍列表 - */ - @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/UserAddressController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserAddressController.java deleted file mode 100644 index 73091a9..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserAddressController.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.ruoyi.account.controller; - - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.ruoyi.account.api.model.UserAddress; -import com.ruoyi.account.service.UserAddressService; -import com.ruoyi.common.core.domain.R; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.api.model.UserAddress; -import com.ruoyi.account.service.UserAddressService; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.security.service.TokenService; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-address") -public class UserAddressController { - - @Resource - private UserAddressService userAddressService; - - @Resource - private TokenService tokenService; - - - /** - * 获取用户默认地址 - * @param userId - * @return - */ - @ResponseBody - @PostMapping("/getDefaultUserAddress") - public R<UserAddress> getDefaultUserAddress(@RequestParam("userId") Long userId){ - List<UserAddress> list = userAddressService.list(new LambdaQueryWrapper<UserAddress>().eq(UserAddress::getAppUserId, userId).eq(UserAddress::getDelFlag, 0)); - if(list.size() == 0){ - return R.ok(); - } - UserAddress userAddress = list.stream().filter(s -> s.getIsDefault() == 1).findFirst().get(); - if(null == userAddress){ - userAddress = list.get(0); - } - return R.ok(userAddress); - } - - - @ResponseBody - @PostMapping("/add") - @ApiOperation(value = "添加", tags = {"小程序-个人中心首页-我的地址"}) - public R add(@RequestBody UserAddress userAddress){ - Long userId = tokenService.getLoginUserApplet().getUserid(); - userAddress.setAppUserId(userId); - userAddressService.save(userAddress); - return R.ok(); - } - @ResponseBody - @PostMapping("/edit") - @ApiOperation(value = "编辑", tags = {"小程序-个人中心首页-我的地址"}) - public R edit(@RequestBody UserAddress userAddress){ - userAddressService.updateById(userAddress); - return R.ok(); - } - @ResponseBody - @PostMapping("/delete") - @ApiOperation(value = "删除", tags = {"小程序-个人中心首页-我的地址"}) - public R edit(@RequestParam Integer id){ - userAddressService.removeById(id); - return R.ok(); - } - - @ResponseBody - @PostMapping("/set") - @ApiOperation(value = "设为默认", tags = {"小程序-个人中心首页-我的地址"}) - public R set(@RequestParam Integer id){ - Long userId = tokenService.getLoginUserApplet().getUserid(); - List<UserAddress> list = userAddressService.lambdaQuery().eq(UserAddress::getAppUserId, userId).list(); - for (UserAddress userAddress : list) { - userAddress.setIsDefault(0); - } - userAddressService.updateBatchById(list); - - UserAddress byId = userAddressService.getById(id); - byId.setIsDefault(1); - userAddressService.updateById(byId); - return R.ok(); - } - - /** - * 根据id获取用户地址信息 - * @param id - * @return - */ - @ResponseBody - @PostMapping("/getUserAddressById") - public R<UserAddress> getUserAddressById(@RequestParam("id") Integer id){ - UserAddress userAddress = userAddressService.getById(id); - return R.ok(userAddress); - } - -} - diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCancellationLogController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCancellationLogController.java deleted file mode 100644 index ffbcbf7..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCancellationLogController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-cancellation-log") -public class UserCancellationLogController { - -} - diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserChangeLogController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserChangeLogController.java deleted file mode 100644 index 068f6a3..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserChangeLogController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-change-log") -public class UserChangeLogController { - -} - diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserClickLogController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserClickLogController.java deleted file mode 100644 index 573ad60..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserClickLogController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-click-log") -public class UserClickLogController { - -} - 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 deleted file mode 100644 index dd50fd1..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.ruoyi.account.controller; -import java.math.BigDecimal; - - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.api.model.UserCoupon; -import com.ruoyi.account.api.model.UserPoint; -import com.ruoyi.account.api.vo.CouponInfoVo; -import com.ruoyi.account.api.vo.PaymentUserCouponVo; -import com.ruoyi.account.service.AppUserService; -import com.ruoyi.account.service.UserCouponService; -import com.ruoyi.account.service.UserPointService; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.utils.bean.BeanUtils; -import com.ruoyi.account.api.vo.CouponInfoVo; -import com.ruoyi.account.api.vo.PaymentUserCoupon; -import com.ruoyi.account.service.UserCouponService; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.web.domain.AjaxResult; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; -import com.ruoyi.common.security.service.TokenService; -import com.ruoyi.other.api.domain.Banner; -import com.ruoyi.other.api.domain.CouponInfo; -import com.ruoyi.other.api.feignClient.CouponClient; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.time.LocalDateTime; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-coupon") -public class UserCouponController { - @Resource - private UserCouponService userCouponService; - @Resource - private TokenService tokenService; - - @Resource - private CouponClient couponClient; - @Resource - private AppUserService appUserService; - - @Resource - private UserPointService userPointService; - - - - - @PostMapping("/mine/list") - @ApiOperation(value = "已领取列表", tags = {"小程序-个人中心-优惠劵"}) - public R<Page<UserCoupon>> minelist(@RequestParam Integer pageNum, @RequestParam Integer pageSize, @ApiParam("1未使用2已使用3已过期") Integer status) { - Long userid = tokenService.getLoginUserApplet().getUserid(); - Page<UserCoupon> page = userCouponService.lambdaQuery() - .isNull(status!=null&&(status==1||status==3),UserCoupon::getUseTime) - .isNotNull(status!=null&&status==2,UserCoupon::getUseTime) - .lt(status!=null&&status==3,UserCoupon::getEndTime, LocalDateTime.now()) - .eq(UserCoupon::getAppUserId, userid).page(Page.of(pageNum, pageSize)); - for (UserCoupon record : page.getRecords()) { - CouponInfo data = couponClient.detail(record.getCouponId()).getData(); - CouponInfoVo vo = new CouponInfoVo(); - BeanUtils.copyProperties(data,vo); - record.setCouponInfoVo(vo); - if (record.getUseTime()==null){ - record.setStatus(1); - if (record.getEndTime().isBefore(LocalDateTime.now())){ - record.setStatus(3); - } - }else { - record.setStatus(2); - } - } - return R.ok(page); - } - - - @PostMapping("/get") - @ApiOperation(value = "领取或者兑换优惠券", tags = {"小程序-个人中心-优惠劵"}) - public R<Page<UserCoupon>> get(@RequestParam Integer couponId) { - - Long userid = tokenService.getLoginUserApplet().getUserid(); - AppUser byId = appUserService.getById(userid); - - CouponInfo data = couponClient.detail(couponId).getData(); - //检验当前优惠券是否存在 - if (data==null){ - return R.fail("当前优惠券不存在,请刷新后重试"); - } - if (data.getSendType()!=1&&byId.getLavePoint().compareTo(data.getNeedPoint().intValue())==-1){ - return R.fail("当前积分不足,兑换失败"); - } - //检验发放时间 - LocalDateTime now = LocalDateTime.now(); - if (now.isBefore(data.getSendStartTime())||now.isAfter(data.getSendEndTime())){ - return R.fail("领取失败,不在发放有效期"); - } - //如果是积分兑换,增加积分的历史记录 - if (data.getSendType()!=1){ - UserPoint userPoint = new UserPoint(); - userPoint.setType(4); - userPoint.setHistoricalPoint(byId.getLavePoint()); - userPoint.setVariablePoint(data.getNeedPoint().intValue()); - userPoint.setAppUserId(userid); - userPoint.setObjectId(Long.valueOf(data.getId())); - userPointService.save(userPoint); - //扣除积分 - byId.setLavePoint(byId.getLavePoint() - userPoint.getVariablePoint()); - appUserService.updateById(byId); - } - //增加优惠券记录,根据时间类型设置开始结束时间 - UserCoupon userCoupon = new UserCoupon(); - userCoupon.setAppUserId(userid); - if (data.getPeriodType()==1) { - userCoupon.setStartTime(data.getPeriodStartTime()); - userCoupon.setEndTime(data.getPeriodEndTime()); - }else { - userCoupon.setStartTime(now); - userCoupon.setEndTime(now.plusDays(data.getPeriodDays())); - } - userCoupon.setCouponId(data.getId()); - userCouponService.save(userCoupon); - return R.ok(); - - - } - - - - /** - * 获取支付页面用户优惠券列表数据 - * @param paymentUserCoupon - * @return - */ - @ResponseBody - @PostMapping("/getPaymentUserCoupon") - public R<List<PaymentUserCouponVo>> getPaymentUserCoupon(@RequestBody PaymentUserCoupon paymentUserCoupon){ - List<PaymentUserCouponVo> userCoupon = userCouponService.getUserCoupon(paymentUserCoupon.getUserId(), paymentUserCoupon.getType()); - return R.ok(userCoupon); - } - - - /** - * 根据用户优惠券id获取优惠券详情 - * @param userCouponId - * @return - */ - @ResponseBody - @PostMapping("/getCouponInfo") - public R<CouponInfoVo> getCouponInfo(@RequestParam("userCouponId") Long userCouponId){ - UserCoupon userCoupon = userCouponService.getById(userCouponId); - CouponInfo data = couponClient.detail(userCoupon.getCouponId()).getData(); - CouponInfoVo couponInfoVo = new CouponInfoVo(); - BeanUtils.copyProperties(data, couponInfoVo); - return R.ok(couponInfoVo); - } -} - 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 deleted file mode 100644 index 780c330..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.ruoyi.account.controller; - - -import com.ruoyi.account.api.model.UserPoint; -import com.ruoyi.account.service.UserPointService; -import com.ruoyi.account.vo.UserPointDetailVO; -import com.ruoyi.account.vo.UserPointVO; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.web.controller.BaseController; -import com.ruoyi.common.core.web.page.TableDataInfo; -import com.ruoyi.common.security.utils.SecurityUtils; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-point") -@Api(tags = "个人积分") -public class UserPointController extends BaseController { - @Resource - private UserPointService userPointService; - - - /** - * 获取个人积分 - */ - @GetMapping("/getUserPoint") - @ApiOperation("获取个人积分") - public R<UserPointVO> getUserPoint(){ - return R.ok(userPointService.getUserPoint(SecurityUtils.getUserId())); - } - - /** - * 获取变更明细 - */ - @GetMapping("/getUserPointDetail") - @ApiOperation("获取变更明细") - public TableDataInfo getUserPointDetail(@ApiParam("指定日期") LocalDateTime date, - @ApiParam("变动类型(1=消费积分,2=返佣积分,3=拉新人积分,4=兑换商品 " + - "5 = 门店业绩积分 6 =门店返佣积分7=技师业绩积分8 =转赠积分 9 =做工积分 " + - "10 =注册积分)") Integer type){ - startPage(); - List<UserPointDetailVO> list = userPointService.getUserPointDetail(SecurityUtils.getUserId(), date, type); - return getDataTable(list); - } - - /** - * 转赠积分 - */ - @PostMapping("/transferPoint") - @ApiOperation("转赠积分") - public R<Void> transferPoint(@ApiParam("积分") BigDecimal point, @ApiParam("手机号") Long phone){ - return R.ok(); - } - - - /** - * 保存积分流水记录 - * @param userPoint - * @return - */ - @PostMapping("/saveUserPoint") - public R saveUserPoint(@RequestBody UserPoint userPoint){ - userPointService.save(userPoint); - return R.ok(); - } -} - diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java deleted file mode 100644 index eca25ea..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/user-sign-record") -public class UserSignRecordController { - -} - 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 deleted file mode 100644 index 4f06dcc..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java +++ /dev/null @@ -1,120 +0,0 @@ -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.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.system.api.model.LoginUser; -import com.ruoyi.feignClient.RemoteOrderGoodsClient; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import com.ruoyi.model.Order; -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.*; -import java.util.List; -import java.util.stream.Collectors; - -@Api(tags = "小程序-个人中心-我的钱包") -@RestController -@RequestMapping("wallet") -public class WalletController extends BaseController { - @Resource - private BalanceChangeRecordService balanceChangeRecordService; - @Resource - private TokenService tokenService; - @Resource - private WalletService walletService; - @Resource - private RemoteOrderGoodsClient remoteOrderGoodsClient; - @Resource - private AppUserService appUserService; - - /** - * 钱包详情 - */ - @GetMapping("detail") - @ApiOperation(value = "钱包详情", notes = "钱包详情") - public R<WalletVO> detail() { - LoginUser loginUserApplet = tokenService.getLoginUserApplet(); - WalletVO walletVO = walletService.getWalletByUserId(loginUserApplet.getUserid()); - return R.ok(walletVO); - } - - /** - * 变更明细 - */ - @ApiOperation(value = "变更明细", notes = "变更明细") - @GetMapping("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(); - - 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); - } - -// /** -// * 充值 -// */ -// @GetMapping("recharge") -// @ApiOperation(value = "充值", notes = "钱包充值") -// public AjaxResult recharge(@ApiParam(value = "充值金额", required = true) @RequestParam BigDecimal amount) { -// Long userId = SecurityUtils.getUserId(); -// String openId; -// // 商户号 -// String partnerTradeNo; -// // TODO 充值 -// return AjaxResult.success(); -// } - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java deleted file mode 100644 index 10b48d1..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.ruoyi.account.controller; - - -import com.ruoyi.account.dto.WithdrawalRequestsDTO; -import com.ruoyi.account.service.WithdrawalRequestsService; -import com.ruoyi.common.core.web.domain.AjaxResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; - -/** - * <p> - * 前端控制器 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@RestController -@RequestMapping("/withdrawal-requests") -@Api(tags = "提现申请") -public class WithdrawalRequestsController { - - @Resource - private WithdrawalRequestsService withdrawalRequestsService; - - /** - * 提现申请 - */ - @PostMapping("/withdrawalApply") - @ApiOperation(value = "提现申请", tags = {"提现申请-小程序"}) - public AjaxResult withdrawalApply(@RequestBody WithdrawalRequestsDTO params){ - withdrawalRequestsService.withdrawalApply(params); - return AjaxResult.success(); - } - -} - diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithdrawalRequestsDTO.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithdrawalRequestsDTO.java deleted file mode 100644 index d5103e3..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithdrawalRequestsDTO.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ruoyi.account.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -@ApiModel(value="提现申请对象", description="") -@Data -public class WithdrawalRequestsDTO { - - @ApiModelProperty(value = "提现金额") - private BigDecimal withdrawalAmount; - - @ApiModelProperty(value = "1微信2银行卡") - private Integer withdrawalMethod; - - @ApiModelProperty(value = "开户人") - private String accountHolder; - - @ApiModelProperty(value = "银行卡号") - private String bankCardNumber; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java deleted file mode 100644 index 16cddbe..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.ruoyi.account.filter; - -import com.alibaba.fastjson.JSON; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.service.AppUserService; -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 AppUserService appUserService; - - @Lazy - @Resource - private SysUserClient sysUserClient; - - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - } - - @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(request, response); - 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 = appUserService.getById(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(request, response); - } - - @Override - public void destroy() { - - } - - - 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-account/src/main/java/com/ruoyi/account/mapper/AgentApplicationMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AgentApplicationMapper.java deleted file mode 100644 index 780fa4e..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AgentApplicationMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.AgentApplication; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface AgentApplicationMapper extends BaseMapper<AgentApplication> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserMapper.java deleted file mode 100644 index 030983c..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/AppUserMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.vo.NearbyReferrer; -import com.ruoyi.account.vo.NearbyReferrerVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface AppUserMapper extends BaseMapper<AppUser> { - - - /** - * 获取附件推广人 - * @param cityCode - * @return - */ - List<NearbyReferrerVo> getNearbyReferrer(@Param("cityCode") String cityCode, @Param("nearbyReferrer") NearbyReferrer nearbyReferrer); - - - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/BalanceChangeRecordMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/BalanceChangeRecordMapper.java deleted file mode 100644 index 50b4149..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/BalanceChangeRecordMapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.BalanceChangeRecord; - -public interface BalanceChangeRecordMapper extends BaseMapper<BalanceChangeRecord> { -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserAddressMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserAddressMapper.java deleted file mode 100644 index f844d73..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserAddressMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserAddress; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserAddressMapper extends BaseMapper<UserAddress> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCancellationLogMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCancellationLogMapper.java deleted file mode 100644 index c19aedc..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCancellationLogMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserCancellationLog; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserCancellationLogMapper extends BaseMapper<UserCancellationLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserChangeLogMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserChangeLogMapper.java deleted file mode 100644 index 536d2c1..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserChangeLogMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserChangeLog; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserChangeLogMapper extends BaseMapper<UserChangeLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserClickLogMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserClickLogMapper.java deleted file mode 100644 index 6709c3e..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserClickLogMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserClickLog; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserClickLogMapper extends BaseMapper<UserClickLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCouponMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCouponMapper.java deleted file mode 100644 index 2b8de86..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserCouponMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserCoupon; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserCouponMapper extends BaseMapper<UserCoupon> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserPointMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserPointMapper.java deleted file mode 100644 index 65af734..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserPointMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserPoint; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserPointMapper extends BaseMapper<UserPoint> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserSignRecordMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserSignRecordMapper.java deleted file mode 100644 index b1e77f4..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserSignRecordMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.UserSignRecord; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserSignRecordMapper extends BaseMapper<UserSignRecord> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/WithdrawalRequestsMapper.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/WithdrawalRequestsMapper.java deleted file mode 100644 index bf8d9b9..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/WithdrawalRequestsMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.account.api.model.WithdrawalRequests; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface WithdrawalRequestsMapper extends BaseMapper<WithdrawalRequests> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AgentApplicationService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AgentApplicationService.java deleted file mode 100644 index 5b5427a..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AgentApplicationService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.AgentApplication; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface AgentApplicationService extends IService<AgentApplication> { - -} 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 deleted file mode 100644 index a313542..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.vo.*; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.web.domain.AjaxResult; - -import java.util.List; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface AppUserService extends IService<AppUser> { - - - /** - * 小程序一键登录 - * @param appletLogin - * @return - */ - R appletLogin(AppletLogin appletLogin); - - - /** - * 手机号码登录 - * @param mobileLogin - * @return - */ - R<LoginVo> mobileLogin(MobileLogin mobileLogin); - - - /** - * 获取短信验证码 - * @param smsCode - * @return - */ - R getSMSCode(SMSCode smsCode); - - - /** - * 注册账号 - * @param registerAccount - * @return - */ - R<LoginVo> registerAccount(RegisterAccount registerAccount); - - - /** - * 获取附近的推广人 - * @param nearbyReferrer - * @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/BalanceChangeRecordService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java deleted file mode 100644 index d5e6f2a..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.BalanceChangeRecord; - -public interface BalanceChangeRecordService extends IService<BalanceChangeRecord> { -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserAddressService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserAddressService.java deleted file mode 100644 index ef004c4..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserAddressService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserAddress; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserAddressService extends IService<UserAddress> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCancellationLogService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCancellationLogService.java deleted file mode 100644 index 20045b8..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCancellationLogService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserCancellationLog; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserCancellationLogService extends IService<UserCancellationLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserChangeLogService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserChangeLogService.java deleted file mode 100644 index 9eeec5a..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserChangeLogService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserChangeLog; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserChangeLogService extends IService<UserChangeLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserClickLogService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserClickLogService.java deleted file mode 100644 index 2547e12..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserClickLogService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserClickLog; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserClickLogService extends IService<UserClickLog> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCouponService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCouponService.java deleted file mode 100644 index 9edcda4..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserCouponService.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserCoupon; -import com.ruoyi.account.api.vo.CouponInfoVo; -import com.ruoyi.account.api.vo.PaymentUserCouponVo; -import org.springframework.web.bind.annotation.RequestParam; - -import java.math.BigDecimal; -import java.util.List; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserCouponService extends IService<UserCoupon> { - - /** - * 获取用户支付页面的优惠券列表 - * @param userId - * @return - */ - List<PaymentUserCouponVo> getUserCoupon(Long userId, Integer type); -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserPointService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserPointService.java deleted file mode 100644 index 4092f6f..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserPointService.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserPoint; -import com.ruoyi.account.vo.UserPointDetailVO; -import com.ruoyi.account.vo.UserPointVO; - -import java.time.LocalDateTime; -import java.util.List; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserPointService extends IService<UserPoint> { - - UserPointVO getUserPoint(Long userId); - - - List<UserPointDetailVO> getUserPointDetail(Long userId, LocalDateTime date, Integer type); -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserSignRecordService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserSignRecordService.java deleted file mode 100644 index 221accd..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserSignRecordService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.UserSignRecord; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface UserSignRecordService extends IService<UserSignRecord> { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WalletService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WalletService.java deleted file mode 100644 index 088e35a..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WalletService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.account.service; - -import com.ruoyi.account.vo.WalletVO; - -public interface WalletService { - - WalletVO getWalletByUserId(Long userId); -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WithdrawalRequestsService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WithdrawalRequestsService.java deleted file mode 100644 index c0d5daf..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WithdrawalRequestsService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.ruoyi.account.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.account.api.model.WithdrawalRequests; -import com.ruoyi.account.dto.WithdrawalRequestsDTO; - -/** - * <p> - * 服务类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -public interface WithdrawalRequestsService extends IService<WithdrawalRequests> { - - /** - * 提现申请 - */ - void withdrawalApply(WithdrawalRequestsDTO params); -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java deleted file mode 100644 index bc7f87e..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.api.model.AgentApplication; -import com.ruoyi.account.mapper.AgentApplicationMapper; -import com.ruoyi.account.service.AgentApplicationService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class AgentApplicationServiceImpl extends ServiceImpl<AgentApplicationMapper, AgentApplication> implements AgentApplicationService { - -} 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 deleted file mode 100644 index da54600..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java +++ /dev/null @@ -1,366 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.api.model.AppUserShop; -import com.ruoyi.account.mapper.AppUserMapper; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.service.AppUserService; -import com.ruoyi.account.service.AppUserShopService; -import com.ruoyi.account.util.weChat.WeChatUtil; -import com.ruoyi.account.vo.*; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.web.domain.AjaxResult; -import com.ruoyi.common.redis.service.RedisService; -import com.ruoyi.common.security.service.TokenService; -import com.ruoyi.other.api.domain.Shop; -import com.ruoyi.other.api.feignClient.ShopClient; -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.*; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> implements AppUserService { - - @Resource - private WeChatUtil weChatUtil; - - @Resource - private TokenService tokenService; - - @Resource - private RedisService redisService; - - @Resource - private ShopClient shopClient; - - @Resource - private AppUserShopService appUserShopService; - - @Resource - private SysUserClient sysUserClient; - - - - - - - - /** - * 小程序一键登录 - * @param appletLogin - * @return - */ - @Override - public R appletLogin(AppletLogin appletLogin) { - //使用jscode获取微信openid - Map<String, Object> map = weChatUtil.code2Session(appletLogin.getJscode()); - Integer errcode = Integer.valueOf(map.get("errcode").toString()); - if(0 != errcode){ - return R.fail(map.get("msg").toString()); - } - String openid = map.get("openid").toString(); - //查询用户是否注册,没有注册则跳转到注册页面 - AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getWxOpenid, openid).ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); - if(null == appUser){ - LoginVo loginVo = new LoginVo(); - loginVo.setSkipPage(2); - return R.ok(loginVo); - } - //账户被冻结,给出提示 - if(2 == appUser.getStatus()){ - return R.fail("账户已被冻结,请联系管理员!"); - } - LoginVo loginVo = new LoginVo(); - loginVo.setSkipPage(1); - loginVo.setFirstTime(false); - loginVo.setPhone(appUser.getPhone()); - //构建token - LoginUser loginUser = new LoginUser(); - loginUser.setUserid(appUser.getId()); - loginUser.setUsername(appUser.getName()); - Map<String, Object> tokenApplet = tokenService.createTokenApplet(loginUser); - loginVo.setToken(tokenApplet.get("access_token").toString()); - loginVo.setFailureTime(Long.valueOf(tokenApplet.get("expires_in").toString())); - return R.ok(loginVo); - } - - - /** - * 手机号码登录 - * @param mobileLogin - * @return - */ - @Override - public R<LoginVo> mobileLogin(MobileLogin mobileLogin) { - //校验验证码 TODO 待完善 -// String code = redisService.getCacheObject(mobileLogin.getPhone()); -// if(null == code || !code.equals(mobileLogin.getCode())){ -// return R.fail("验证码错误"); -// } - - //查询用户是否注册,没有注册则跳转到注册页面 - AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, mobileLogin.getPhone()).ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); - if(null == appUser){ - LoginVo loginVo = new LoginVo(); - loginVo.setSkipPage(2); - return R.ok(loginVo); - } - //账户被冻结,给出提示 - if(2 == appUser.getStatus()){ - return R.fail("账户已被冻结,请联系管理员!"); - } - LoginVo loginVo = new LoginVo(); - loginVo.setSkipPage(1); - loginVo.setFirstTime(false); - loginVo.setPhone(appUser.getPhone()); - //构建token - LoginUser loginUser = new LoginUser(); - loginUser.setUserid(appUser.getId()); - loginUser.setUsername(appUser.getName()); - Map<String, Object> tokenApplet = tokenService.createTokenApplet(loginUser); - loginVo.setToken(tokenApplet.get("access_token").toString()); - loginVo.setFailureTime(Long.valueOf(tokenApplet.get("expires_in").toString())); - return R.ok(loginVo); - } - - - /** - * 获取短信验证码 - * @param smsCode - * @return - */ - @Override - public R getSMSCode(SMSCode smsCode) { - //校验验证码获取评率(1分钟5次) - String key = smsCode.getType() + "&" + smsCode.getPhone(); - Map<String, Object> cacheMap = redisService.getCacheMap(key); - if(null != cacheMap){ - Integer number = Integer.valueOf(cacheMap.get("number").toString()) + 1; - Long startTime = Long.valueOf(cacheMap.get("startTime").toString()); - if(number > 5 && (System.currentTimeMillis() - startTime) < 60000){ - return R.fail("获取验证码太频繁,请稍后重试!"); - } - if(number <= 5){ - cacheMap.put("number", number); - }else{ - cacheMap.put("number", 1); - cacheMap.put("startTime", System.currentTimeMillis()); - } - }else{ - cacheMap = new HashMap<>(); - cacheMap.put("number", 1); - cacheMap.put("startTime", System.currentTimeMillis()); - } - //存储计数器到缓存中,5分钟有效期 - redisService.setCacheMap(key, cacheMap, 300); - - //开始构建验证码内容 - String code = ""; - for (int i = 0; i < 6; i++) { - code += Double.valueOf(Math.random() * 10).intValue(); - } - //发送短信 todo 待对接短信 - return R.ok(); - } - - - /** - * 注册账号 - * @param registerAccount - * @return - */ - @Override - public R<LoginVo> registerAccount(RegisterAccount registerAccount) { - // TODO 待完善 - //校验验证码 -// String code = redisService.getCacheObject(registerAccount.getPhone()); -// if(null == code || !code.equals(registerAccount.getCode())){ -// return R.fail("验证码错误"); -// } - //使用jscode获取微信openid -// Map<String, Object> map = weChatUtil.code2Session(registerAccount.getJscode()); -// Integer errcode = Integer.valueOf(map.get("errcode").toString()); -// if(0 != errcode){ -// return R.fail(map.get("msg").toString()); -// } -// String openid = map.get("openid").toString(); -// //查询用户是否注册 -// AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getWxOpenid, openid).ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); -// if(null != appUser){ -// return R.fail("此微信号已注册,请直接登录!"); -// } - AppUser appUser = null; - AppUser appUser1 = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, registerAccount.getPhone()).ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); - if(null != appUser1){ - return R.fail("手机号已注册,请直接登录!"); - } - if(null == appUser){ - appUser = new AppUser(); - appUser.setName(registerAccount.getName()); - appUser.setPhone(registerAccount.getPhone()); -// appUser.setWxOpenid(openid); - //注册默认为普通会员 - appUser.setVipId(1); - appUser.setStatus(1); - appUser.setCreateTime(LocalDateTime.now()); - appUser.setDelFlag(false); - appUser.setFirstAdd(1); - appUser.setLastLoginTime(LocalDateTime.now()); - //顶级推广人 - AppUser topAppUser = getTopAppUser(registerAccount.getPromoter()); - appUser.setTopInviteId(topAppUser.getId()); - //绑定门店为推荐人绑定的门店 - AppUser appUser2 = this.getById(registerAccount.getPromoter()); - appUser.setInviteUserId(registerAccount.getPromoter()); - appUser.setShopId(appUser2.getShopId()); - appUser.setPartPoint(0); - appUser.setPartGrowPoint(0); - appUser.setShopPoint(0); - appUser.setSharePoint(0); - appUser.setShopAmount(BigDecimal.ZERO); - appUser.setWithdrawableAmount(BigDecimal.ZERO); - appUser.setWithdrawnAmount(BigDecimal.ZERO); - appUser.setTotalRechargeAmount(BigDecimal.ZERO); - appUser.setTotalRedPacketAmount(BigDecimal.ZERO); - appUser.setTotalDistributionAmount(BigDecimal.ZERO); - appUser.setBalance(BigDecimal.ZERO); - appUser.setLavePoint(0); - //根据平台的配置未达标,则标注为可修改推广人 - appUser.setChangePromoter(0); - appUser.setLongitude(registerAccount.getLongitude()); - appUser.setLatitude(registerAccount.getLatitude()); - //调用地图获取省市区数据 TODO 待完善 -// appUser.setProvince(); -// appUser.setProvinceCode(); -// appUser.setCity(); -// appUser.setCityCode(); -// appUser.setDistrict(); -// appUser.setDistrictCode(); - this.save(appUser); - - //查询当前注册的手机号是都和门店管理员手机号相同 - Shop shop = shopClient.getShopByPhone(registerAccount.getPhone()).getData(); - if(null != shop){ - //添加门店用户关系数据 - AppUserShop appUserShop = appUserShopService.getOne(new LambdaQueryWrapper<AppUserShop>().eq(AppUserShop::getAppUserId, appUser.getId()).eq(AppUserShop::getShopId, shop.getId())); - if(null == appUserShop){ - appUserShop = new AppUserShop(); - appUserShop.setShopId(shop.getId()); - appUserShop.setAppUserId(appUser.getId()); - appUserShopService.save(appUserShop); - //添加管理后台账号 - SysUser user = new SysUser(); - user.setDeptId(1L); - user.setUserName(appUser.getName()); - user.setNickName(appUser.getName()); - user.setPhonenumber(appUser.getPhone()); - user.setAvatar(appUser.getAvatar()); - user.setStatus("0"); - user.setDelFlag("0"); - user.setRoleType(2); - user.setObjectId(shop.getId()); - user.setAppUserId(appUser.getId()); - sysUserClient.saveShopUser(user); - } - } - - } - LoginVo loginVo = new LoginVo(); - loginVo.setSkipPage(1); - loginVo.setFirstTime(false); - loginVo.setPhone(appUser.getPhone()); - //构建token - LoginUser loginUser = new LoginUser(); - loginUser.setUserid(appUser.getId()); - loginUser.setUsername(appUser.getName()); - Map<String, Object> tokenApplet = tokenService.createTokenApplet(loginUser); - loginVo.setToken(tokenApplet.get("access_token").toString()); - loginVo.setFailureTime(Long.valueOf(tokenApplet.get("expires_in").toString())); - return R.ok(loginVo); - } - - - /** - * 递归查询顶级推广人 - * @param id - * @return - */ - public AppUser getTopAppUser(Long id){ - List<AppUser> list = this.list(new LambdaQueryWrapper<AppUser>().eq(AppUser::getDelFlag, 0)); - return getTopAppUser(list, id); - } - - public AppUser getTopAppUser(List<AppUser> list, Long id){ - AppUser appUser = list.stream().filter(s -> s.getId().equals(id)).findFirst().get(); - if(null == appUser.getInviteUserId()){ - return appUser; - } - return getTopAppUser(list, appUser.getInviteUserId()); - } - - - /** - * 获取附近推广人 - * @param nearbyReferrer - * @return - */ - @Override - public List<NearbyReferrerVo> getNearbyReferrer(NearbyReferrer nearbyReferrer) { - //使用地图获取省市区数据 - String longitude = nearbyReferrer.getLongitude(); - String latitude = nearbyReferrer.getLatitude(); - String cityCode = ""; // TODO 待完善 - 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/BalanceChangeRecordServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java deleted file mode 100644 index b59c292..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.api.model.BalanceChangeRecord; -import com.ruoyi.account.mapper.BalanceChangeRecordMapper; -import com.ruoyi.account.service.BalanceChangeRecordService; -import org.springframework.stereotype.Service; - -@Service -public class BalanceChangeRecordServiceImpl extends ServiceImpl<BalanceChangeRecordMapper, BalanceChangeRecord> implements BalanceChangeRecordService { -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserAddressServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserAddressServiceImpl.java deleted file mode 100644 index 28cf3b0..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserAddressServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.mapper.UserAddressMapper; -import com.ruoyi.account.api.model.UserAddress; -import com.ruoyi.account.service.UserAddressService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserAddressServiceImpl extends ServiceImpl<UserAddressMapper, UserAddress> implements UserAddressService { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCancellationLogServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCancellationLogServiceImpl.java deleted file mode 100644 index 3c163fb..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCancellationLogServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.mapper.UserCancellationLogMapper; -import com.ruoyi.account.api.model.UserCancellationLog; -import com.ruoyi.account.service.UserCancellationLogService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserCancellationLogServiceImpl extends ServiceImpl<UserCancellationLogMapper, UserCancellationLog> implements UserCancellationLogService { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserChangeLogServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserChangeLogServiceImpl.java deleted file mode 100644 index c0b4c02..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserChangeLogServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.mapper.UserChangeLogMapper; -import com.ruoyi.account.api.model.UserChangeLog; -import com.ruoyi.account.service.UserChangeLogService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserChangeLogServiceImpl extends ServiceImpl<UserChangeLogMapper, UserChangeLog> implements UserChangeLogService { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserClickLogServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserClickLogServiceImpl.java deleted file mode 100644 index 8260111..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserClickLogServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.mapper.UserClickLogMapper; -import com.ruoyi.account.api.model.UserClickLog; -import com.ruoyi.account.service.UserClickLogService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserClickLogServiceImpl extends ServiceImpl<UserClickLogMapper, UserClickLog> implements UserClickLogService { - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java deleted file mode 100644 index b1c2894..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.alibaba.fastjson2.JSON; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.api.vo.CouponInfoVo; -import com.ruoyi.account.api.vo.PaymentUserCouponVo; -import com.ruoyi.account.mapper.UserCouponMapper; -import com.ruoyi.account.api.model.UserCoupon; -import com.ruoyi.account.service.UserCouponService; -import com.ruoyi.other.api.domain.CouponInfo; -import com.ruoyi.other.api.feignClient.CouponInfoClient; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.math.BigDecimal; -import java.time.Instant; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCoupon> implements UserCouponService { - - @Resource - private CouponInfoClient couponInfoClient; - - - - /** - * 获取支付页面的优惠券列表数据 - * @param userId - * @param orderMoney - * @return - */ - @Override - public List<PaymentUserCouponVo> getUserCoupon(Long userId, Integer type) { - List<UserCoupon> list = this.list(new LambdaQueryWrapper<UserCoupon>().eq(UserCoupon::getAppUserId, userId).eq(UserCoupon::getDelFlag, 0) - .last(" and now() between start_time and end_time")); - List<Integer> couponIds = list.stream().map(UserCoupon::getCouponId).collect(Collectors.toList()); - if(couponIds.size() == 0){ - return null; - } - List<CouponInfo> couponInfoList = couponInfoClient.getCouponInfoList(couponIds).getData(); - //构建返回数据 - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - List<PaymentUserCouponVo> infoVoList = new ArrayList<>(); - for (UserCoupon userCoupon : list) { - CouponInfo couponInfo = couponInfoList.stream().filter(s -> s.getId().equals(userCoupon.getCouponId())).findFirst().get(); - //排除商品券(商品券线下领取) - if(4 == couponInfo.getCouponType()){ - continue; - } - PaymentUserCouponVo couponInfoVo = new PaymentUserCouponVo(); - couponInfoVo.setId(userCoupon.getId()); - couponInfoVo.setName(couponInfo.getCouponName()); - couponInfoVo.setCouponType(couponInfo.getCouponType()); - couponInfoVo.setConditionAmount(couponInfo.getConditionAmount()); - couponInfoVo.setDiscountAmount(couponInfo.getDiscountAmount()); - couponInfoVo.setMoneyAmount(couponInfo.getMoneyAmount()); - couponInfoVo.setDiscount(couponInfo.getDiscount()); - couponInfoVo.setPeriodEndTime(couponInfo.getPeriodStartTime().format(formatter)); - couponInfoVo.setPeriodEndTime(couponInfo.getPeriodEndTime().format(formatter)); - String forGoodIds = couponInfo.getForGoodIds(); - Integer instant = JSON.parseArray(forGoodIds).getInteger(0); - if(-1 == instant){ - couponInfoVo.setForGoodIds(null); - }else{ - couponInfoVo.setForGoodIds(JSON.parseArray(forGoodIds, Integer.class)); - } - couponInfoVo.setAvailable(false); - infoVoList.add(couponInfoVo); - } - return infoVoList; - } -} 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 deleted file mode 100644 index 1cedad4..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.ruoyi.account.service.impl; - -import cn.hutool.core.collection.CollectionUtil; -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.account.api.model.UserPoint; -import com.ruoyi.account.enums.PointChangeType; -import com.ruoyi.account.mapper.UserPointMapper; -import com.ruoyi.account.service.UserPointService; -import com.ruoyi.account.vo.UserPointDetailVO; -import com.ruoyi.account.vo.UserPointVO; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserPointServiceImpl extends ServiceImpl<UserPointMapper, UserPoint> implements UserPointService { - @Resource - private AppUserClient appUserClient; - - @Override - public UserPointVO getUserPoint(Long userId) { - AppUser appUser = appUserClient.getAppUserById(userId); - List<UserPoint> userPointList = list(new LambdaQueryWrapper<UserPoint>() - .eq(UserPoint::getAppUserId, userId)); - - Map<Integer, Integer> userBalanceMap = userPointList.stream() - .collect(Collectors.toMap(UserPoint::getType, UserPoint::getBalance)); - - Integer lavePoint = appUser.getLavePoint(); - UserPointVO userPointVO = new UserPointVO(); - userPointVO.setTotalPoint(lavePoint); - userPointVO.setShopPoint(userBalanceMap.get(PointChangeType.CONSUME.getCode())); - userPointVO.setSharePoint(userBalanceMap.get(PointChangeType.COMMISSION_RETURN.getCode())); - userPointVO.setPullNewPoint(userBalanceMap.get(PointChangeType.NEW_USER_REFERRAL.getCode())); - userPointVO.setShopAchievementPoint(userBalanceMap.get(PointChangeType.STORE_PERFORMANCE.getCode())); - userPointVO.setShopSharePoint(userBalanceMap.get(PointChangeType.STORE_COMMISSION_RETURN.getCode())); - return userPointVO; - } - - @Override - public List<UserPointDetailVO> getUserPointDetail(Long userId, LocalDateTime date, Integer type) { - List<UserPoint> userPointList = list(new LambdaQueryWrapper<UserPoint>() - .eq(UserPoint::getAppUserId, userId)); - if (CollectionUtil.isNotEmpty(userPointList)) { - return userPointList.stream().map(p -> { - UserPointDetailVO userPointDetailVO = new UserPointDetailVO(); - userPointDetailVO.setType(p.getType()); - userPointDetailVO.setVariablePoint(p.getVariablePoint()); - userPointDetailVO.setCreateTime(p.getCreateTime()); - return userPointDetailVO; - }).collect(Collectors.toList()); - } - return Collections.emptyList(); - } -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserSignRecordServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserSignRecordServiceImpl.java deleted file mode 100644 index a869479..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserSignRecordServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.mapper.UserSignRecordMapper; -import com.ruoyi.account.api.model.UserSignRecord; -import com.ruoyi.account.service.UserSignRecordService; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class UserSignRecordServiceImpl extends ServiceImpl<UserSignRecordMapper, UserSignRecord> implements UserSignRecordService { - -} 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 deleted file mode 100644 index 0d4f040..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WalletServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.ruoyi.account.enums.WithdrawalAuditStatus; -import com.ruoyi.account.api.model.AppUser; -import com.ruoyi.account.api.model.WithdrawalRequests; -import com.ruoyi.account.service.AppUserService; -import com.ruoyi.account.service.WalletService; -import com.ruoyi.account.service.WithdrawalRequestsService; -import com.ruoyi.account.vo.WalletVO; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.other.api.domain.VipSetting; -import com.ruoyi.other.api.feignClient.RemoteVipSettingClient; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.math.BigDecimal; -import java.util.List; - -@Service -public class WalletServiceImpl implements WalletService { - @Resource - private AppUserService appUserService; - @Resource - private RemoteVipSettingClient remoteVipSettingClient; - @Resource - private WithdrawalRequestsService withdrawalRequestsService; - - @Override - public WalletVO getWalletByUserId(Long userId) { - AppUser appUser = appUserService.getById(userId); - if (appUser == null) { - throw new RuntimeException("用户不存在"); - } - Integer vipId = appUser.getVipId(); - R<VipSetting> r = remoteVipSettingClient.getVipSettingById(vipId); - VipSetting data = r.getData(); - if (data == null) { - throw new RuntimeException("会员设置信息为空"); - } - - // 获取提现审核中的金额 - List<WithdrawalRequests> waitAuditList = withdrawalRequestsService.list(new LambdaQueryWrapper<WithdrawalRequests>() - .eq(WithdrawalRequests::getAppUserId, userId) - .eq(WithdrawalRequests::getAuditStatus, WithdrawalAuditStatus.WAIT_AUDIT)); - - WalletVO walletVO = new WalletVO(); - walletVO.setWithdrawalAmount(appUser.getWithdrawableAmount()); - walletVO.setWithdrawnAmount(appUser.getWithdrawnAmount()); - walletVO.setVipWithdrawalMinAmount(data.getVipWithdrawalMinAmount()); - walletVO.setTotalRechargeAmount(appUser.getTotalRechargeAmount()); - walletVO.setTotalRedPacketAmount(appUser.getTotalRedPacketAmount()); - walletVO.setTotalDistributionAmount(appUser.getTotalDistributionAmount()); - walletVO.setAuditAmount(waitAuditList.stream() - .map(WithdrawalRequests::getWithdrawalAmount) - .reduce(BigDecimal.ZERO, BigDecimal::add)); - - return walletVO; - } - -} 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 deleted file mode 100644 index d17cb72..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.ruoyi.account.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.account.dto.WithdrawalRequestsDTO; -import com.ruoyi.account.mapper.WithdrawalRequestsMapper; -import com.ruoyi.account.api.model.WithdrawalRequests; -import com.ruoyi.account.service.WithdrawalRequestsService; -import com.ruoyi.common.core.utils.bean.BeanUtils; -import com.ruoyi.common.security.utils.SecurityUtils; -import org.springframework.stereotype.Service; - -/** - * <p> - * 服务实现类 - * </p> - * - * @author luodangjia - * @since 2024-11-21 - */ -@Service -public class WithdrawalRequestsServiceImpl extends ServiceImpl<WithdrawalRequestsMapper, WithdrawalRequests> implements WithdrawalRequestsService { - - @Override - public void withdrawalApply(WithdrawalRequestsDTO params) { - WithdrawalRequests withdrawalRequests = new WithdrawalRequests(); - BeanUtils.copyBeanProp(withdrawalRequests, params); - withdrawalRequests.setDelFlag(0); - withdrawalRequests.setAppUserId(SecurityUtils.getUserId()); - 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/TaskUtil.java deleted file mode 100644 index 7f028bc..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.ruoyi.account.util; - - -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - - - -/** - * 定时任务工具类 - */ -@Component -public class TaskUtil { - - - /** - * 每隔一分钟去处理的定时任务 - */ - @Scheduled(fixedRate = 1000 * 60) - public void sendVipCoupon(){ - - } - - @Scheduled(fixedRate = 1000 * 60) - public void changeVipId(){ - - - } - - -} 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/AES.java deleted file mode 100644 index ecfd2f0..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/AES.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.ruoyi.account.util.weChat; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import javax.crypto.BadPaddingException; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import java.security.*; - -/** -* AES加密 -* @author pzb -* @Date 2021/12/3 15:43 -*/ -public class AES { - - public static boolean initialized = false; - - /** - * AES解密 - * - * @param content - * 密文 - * @return - * @throws InvalidAlgorithmParameterException - * @throws NoSuchProviderException - */ - public byte[] decrypt(byte[] content, byte[] keyByte, byte[] ivByte) throws InvalidAlgorithmParameterException { - initialize(); - try { - Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding"); - Key sKeySpec = new SecretKeySpec(keyByte, "AES"); - cipher.init(Cipher.DECRYPT_MODE, sKeySpec, generateIV(ivByte));// 初始化 - byte[] result = cipher.doFinal(content); - return result; - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } catch (NoSuchPaddingException e) { - e.printStackTrace(); - } catch (InvalidKeyException e) { - e.printStackTrace(); - } catch (IllegalBlockSizeException e) { - e.printStackTrace(); - } catch (BadPaddingException e) { - e.printStackTrace(); - } catch (NoSuchProviderException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return null; - } - - public static void initialize() { - if (initialized) - return; - Security.addProvider(new BouncyCastleProvider()); - initialized = true; - } - - // 生成iv - public static AlgorithmParameters generateIV(byte[] iv) throws Exception { - AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); - params.init(new IvParameterSpec(iv)); - return params; - } -} 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/WXCore.java deleted file mode 100644 index 3b1dc3c..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WXCore.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.ruoyi.account.util.weChat; - -import org.apache.commons.codec.binary.Base64; -import org.springframework.beans.factory.annotation.Value; - -public class WXCore { - - private static final String WATERMARK = "watermark"; - - @Value("${wx.appletsAppid}") - private static String appid ; - - - - /** - * 解密数据 - * @return - * @throws Exception - */ - public static String decrypt(String encryptedData, String sessionKey, String iv){ - String result = ""; - try { - AES aes = new AES(); - byte[] resultByte = aes.decrypt(Base64.decodeBase64(encryptedData), Base64.decodeBase64(sessionKey), Base64.decodeBase64(iv)); - if(null != resultByte && resultByte.length > 0){ - result = new String(WxPKCS7Encoder.decode(resultByte), "UTF-8"); -// JSONObject jsonObject = JSON.parseObject(result); -// String decryptAppid = jsonObject.getJSONObject(WATERMARK).getString("appid"); -// if(!appid.equals(decryptAppid)){ -// result = ""; -// } - } - } catch (Exception e) { - result = ""; - e.printStackTrace(); - } - return result; - } - - - public static void main(String[] args) throws Exception{ - String appId = "wx4f4bc4dec97d474b"; - String encryptedData = "CiyLU1Aw2KjvrjMdj8YKliAjtP4gsMZMQmRzooG2xrDcvSnxIMXFufNstNGTyaGS9uT5geRa0W4oTOb1WT7fJlAC+oNPdbB+3hVbJSRgv+4lGOETKUQz6OYStslQ142dNCuabNPGBzlooOmB231qMM85d2/fV6ChevvXvQP8Hkue1poOFtnEtpyxVLW1zAo6/1Xx1COxFvrc2d7UL/lmHInNlxuacJXwu0fjpXfz/YqYzBIBzD6WUfTIF9GRHpOn/Hz7saL8xz+W//FRAUid1OksQaQx4CMs8LOddcQhULW4ucetDf96JcR3g0gfRK4PC7E/r7Z6xNrXd2UIeorGj5Ef7b1pJAYB6Y5anaHqZ9J6nKEBvB4DnNLIVWSgARns/8wR2SiRS7MNACwTyrGvt9ts8p12PKFdlqYTopNHR1Vf7XjfhQlVsAJdNiKdYmYVoKlaRv85IfVunYzO0IKXsyl7JCUjCpoG20f0a04COwfneQAGGwd5oa+T8yO5hzuyDb/XcxxmK01EpqOyuxINew=="; - String sessionKey = "tiihtNczf5v6AKRyjwEUhQ=="; - String iv = "r7BXXKkLb8qrSNn05n0qiA=="; - System.out.println(decrypt(encryptedData, sessionKey, iv)); - } -} 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/WeChatUtil.java deleted file mode 100644 index 31b295c..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WeChatUtil.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.ruoyi.account.util.weChat; - -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import java.util.HashMap; -import java.util.Map; - -/** - * 微信工具类 - */ -@Slf4j -@Component -public class WeChatUtil { - - @Value("${wx.appletsAppid}") - private String wxAppletsAppid; - - @Value("${wx.appletsAppSecret}") - private String wxAppletsAppSecret; - -// @Value("${wx.appid}") - private String webAppId; - -// @Value("${wx.appSecret}") - private String webAppSecret; - - - /** - * 小程序使用jscode获取openid - * @param jscode - * @return - */ - public Map<String, Object> code2Session(String jscode) { - String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxAppletsAppid + "&secret=" + wxAppletsAppSecret - + "&js_code=" + jscode + "&grant_type=authorization_code"; - HttpRequest get = HttpUtil.createGet(url); - HttpResponse response = get.execute(); - int status = response.getStatus(); - if(200 != status){ - throw new RuntimeException(response.body()); - } - JSONObject jsonObject = JSON.parseObject(response.body()); - int errcode = jsonObject.getIntValue("errcode"); - Map<String, Object> map = new HashMap<>(); - map.put("errcode", errcode); - if(errcode == 0){//成功 - map.put("openid", jsonObject.getString("openid")); - map.put("sessionKey", jsonObject.getString("session_key")); - map.put("unionid", jsonObject.getString("unionid")); - return map; - } - if(errcode == -1){//系统繁忙,此时请开发者稍候再试 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 40029){//code 无效 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 45011){//频率限制,每个用户每分钟100次 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - return null; - } - - - /** - * 获取微信小程序token - * @return - */ - public String getWxAppletsAccessToken() throws Exception{ - String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wxAppletsAppid + "&secret=" + wxAppletsAppSecret; - HttpRequest get = HttpUtil.createGet(url); - HttpResponse response = get.execute(); - if(response.getStatus() != 200){ - return ""; - } - JSONObject jsonObject = JSON.parseObject(response.body()); - return jsonObject.getString("access_token"); - } - - - /** - * 网站应用登录 - * @param code - * @return - */ - public Map<String, String> webAccessToken(String code) throws Exception{ - String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + webAppId + "&secret=" + webAppSecret + "&code=" + code + "&grant_type=authorization_code"; - HttpRequest get = HttpUtil.createGet(url); - HttpResponse response = get.execute(); - if(response.getStatus() != 200){ - return null; - } - JSONObject jsonObject = JSON.parseObject(response.body()); - int errcode = jsonObject.getIntValue("errcode"); - Map<String, String> map = new HashMap<>(); - if(errcode == 0){//成功 - map.put("access_token", jsonObject.getString("access_token")); - map.put("openid", jsonObject.getString("openid")); - map.put("refresh_token", jsonObject.getString("refresh_token")); - map.put("unionid", jsonObject.getString("unionid")); - return map; - } - if(errcode == -1){//系统繁忙,此时请开发者稍候再试 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 40029){//code 无效 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 45011){//频率限制,每个用户每分钟100次 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - return map; - } - - - /** - * 获取微信个人信息 - * @param access_token - * @param openid - * @return - */ - public Map<String, Object> getUserInfo(String access_token, String openid) throws Exception{ - String url = "https://api.weixin.qq.com/sns/userinfo?access_token=" + access_token + "&openid=" + openid; - HttpRequest get = HttpUtil.createGet(url); - HttpResponse response = get.execute(); - if(response.getStatus() != 200){ - return null; - } - JSONObject jsonObject = JSON.parseObject(response.body()); - int errcode = jsonObject.getIntValue("errcode"); - Map<String, Object> map = new HashMap<>(); - if(errcode == 0){//成功 - map.put("nickname", jsonObject.getString("nickname")); - map.put("openid", jsonObject.getString("openid")); - map.put("sex", jsonObject.getString("sex")); - map.put("headimgurl", jsonObject.getString("headimgurl")); - return map; - } - if(errcode == -1){//系统繁忙,此时请开发者稍候再试 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 40029){//code 无效 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - if(errcode == 45011){//频率限制,每个用户每分钟100次 - map.put("msg", jsonObject.getString("errmsg")); - return map; - } - return map; - } - - - - -// /** -// * 获取小程序二维码 -// * @param page 跳转页 例如 pages/index/index -// * @param scene 参数 a=1&b=2 -// */ -// public InputStream getwxacodeunlimit(String page, String scene){ -// try { -// String token = getWxAppletsAccessToken(); -// if(StringUtils.isEmpty(token)){ -// System.err.println("获取接口调用凭证失败"); -// } -// String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + token; -// Map<String, Object> param = new HashMap<>(); -// param.put("scene", scene); -// param.put("page", page); -// HttpHeaders httpHeaders = new HttpHeaders(); -// MediaType type=MediaType.parseMediaType("application/json;charset=UTF-8"); -// httpHeaders.setContentType(type); -// HttpEntity<Map<String, Object>> requestEntity = new HttpEntity<>(param, httpHeaders); -// ResponseEntity<String> exchange = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class, new Object[0]); -// String body1 = exchange.getBody(); -//// System.err.println(body1); -// ResponseEntity<byte[]> entity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); -// byte[] body = entity.getBody(); -//// System.err.println(Base64.encodeBase64String(body)); -// return new ByteArrayInputStream(body); -// }catch (Exception e){ -// e.printStackTrace(); -// } -// return null; -// } -} 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/WxPKCS7Encoder.java deleted file mode 100644 index 3788ff8..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WxPKCS7Encoder.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.account.util.weChat; - -import java.nio.charset.Charset; -import java.util.Arrays; - -/** -* 微信小程序加解密 -* @author pzb -* @Date 2021/12/3 15:43 -*/ -public class WxPKCS7Encoder { - private static final Charset CHARSET = Charset.forName("utf-8"); - private static final int BLOCK_SIZE = 32; - - /** - * 获得对明文进行补位填充的字节. - * - * @param count - * 需要进行填充补位操作的明文字节个数 - * @return 补齐用的字节数组 - */ - public static byte[] encode(int count) { - // 计算需要填充的位数 - int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE); - if (amountToPad == 0) { - amountToPad = BLOCK_SIZE; - } - // 获得补位所用的字符 - char padChr = chr(amountToPad); - String tmp = new String(); - for (int index = 0; index < amountToPad; index++) { - tmp += padChr; - } - return tmp.getBytes(CHARSET); - } - - /** - * 删除解密后明文的补位字符 - * - * @param decrypted - * 解密后的明文 - * @return 删除补位字符后的明文 - */ - public static byte[] decode(byte[] decrypted) { - int pad = decrypted[decrypted.length - 1]; - if (pad < 1 || pad > 32) { - pad = 0; - } - return Arrays.copyOfRange(decrypted, 0, decrypted.length - pad); - } - - /** - * 将数字转化成ASCII码对应的字符,用于对明文进行补码 - * - * @param a - * 需要转化的数字 - * @return 转化得到的字符 - */ - public static char chr(int a) { - byte target = (byte) (a & 0xFF); - return (char) target; - } -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/AppletLogin.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/AppletLogin.java deleted file mode 100644 index 0c53922..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/AppletLogin.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/21 11:40 - */ -@Data -@ApiModel -public class AppletLogin { - @ApiModelProperty(value = "微信jscode", required = true) - private String jscode; - @ApiModelProperty(value = "手机号加密数据", required = true) - private String encryptedData_phone; - @ApiModelProperty(value = "加密算法的初始向量", required = true) - private String iv_phone; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/LoginVo.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/LoginVo.java deleted file mode 100644 index 1e239de..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/LoginVo.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/25 9:39 - */ -@Data -@ApiModel("登录结果") -public class LoginVo { - @ApiModelProperty("token") - private String token; - @ApiModelProperty("失效时间(秒)") - private Long failureTime; - @ApiModelProperty("跳转页面(1=首页,2=注册页)") - private Integer skipPage; - @ApiModelProperty("微信解密的手机号") - private String phone; - @ApiModelProperty("是否首次登录") - private Boolean firstTime; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/MobileLogin.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/MobileLogin.java deleted file mode 100644 index 51fb446..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/MobileLogin.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/25 9:48 - */ -@Data -@ApiModel -public class MobileLogin { - @ApiModelProperty("手机号") - private String phone; - @ApiModelProperty("短信验证码") - private String code; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrer.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrer.java deleted file mode 100644 index 2349be2..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrer.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.ruoyi.account.vo; - -import com.ruoyi.common.core.web.page.BasePage; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/25 10:36 - */ -@Data -@ApiModel -public class NearbyReferrer extends BasePage { - @ApiModelProperty(value = "经度", required = true) - private String longitude; - @ApiModelProperty(value = "纬度", required = true) - private String latitude; - @ApiModelProperty(value = "搜索内容", required = false) - private String name; - -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrerVo.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrerVo.java deleted file mode 100644 index e598dfa..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/NearbyReferrerVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * @author zhibing.pu - * @Date 2024/11/25 10:42 - */ -@Data -@ApiModel("附近推荐人") -public class NearbyReferrerVo { - @ApiModelProperty("id") - private String id; - @ApiModelProperty("头像") - private String avatar; - @ApiModelProperty("姓名") - private String name; - @ApiModelProperty("会员类型名称") - private String vip; - @ApiModelProperty("距离(m)") - private BigDecimal distance; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/RegisterAccount.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/RegisterAccount.java deleted file mode 100644 index 41e9cb7..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/RegisterAccount.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/25 10:03 - */ -@Data -@ApiModel -public class RegisterAccount { - @ApiModelProperty(value = "微信jscode", required = true) - private String jscode; - @ApiModelProperty(value = "推广人id", required = true) - private Long promoter; - @ApiModelProperty(value = "头像", required = true) - private String avatar; - @ApiModelProperty(value = "姓名", required = true) - private String name; - @ApiModelProperty(value = "手机号", required = true) - private String phone; - @ApiModelProperty(value = "短信验证码", required = true) - private String code; - @ApiModelProperty(value = "经度", required = true) - private String longitude; - @ApiModelProperty(value = "纬度", required = true) - private String latitude; -} diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/SMSCode.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/SMSCode.java deleted file mode 100644 index 42b193c..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/SMSCode.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author zhibing.pu - * @Date 2024/11/25 9:53 - */ -@Data -@ApiModel -public class SMSCode { - @ApiModelProperty("类型(1=登录注册)") - private Integer type; - @ApiModelProperty("手机号") - private String phone; -} 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 deleted file mode 100644 index bab1ff6..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java +++ /dev/null @@ -1,23 +0,0 @@ -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; -import java.time.LocalDateTime; - -@Data -@ApiModel(value="UserPointDetail对象", description="") -public class UserPointDetailVO { - - @ApiModelProperty(value = "变动类型(1=消费积分,2=返佣积分,3=拉新人积分,4=兑换商品 5 = 门店业绩积分 6 =门店返佣积分7=技师业绩积分8 =转赠积分 9 =做工积分 10 =注册积分)") - private Integer type; - - @ApiModelProperty(value = "变动金额") - 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 deleted file mode 100644 index 01f5b32..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointVO.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@Data -@ApiModel(value="UserPoint对象", description="") -public class UserPointVO { - - @ApiModelProperty(value = "总积分") - private Integer totalPoint; - - @ApiModelProperty(value = "消费积分数") - private Integer shopPoint; - - @ApiModelProperty(value = "返佣积分数") - private Integer sharePoint; - - @ApiModelProperty(value = "拉新积分") - private Integer pullNewPoint; - - @ApiModelProperty(value = "门店业绩积分") - private Integer shopAchievementPoint; - - @ApiModelProperty(value = "门店返佣积分") - 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 deleted file mode 100644 index 4e0bd10..0000000 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.ruoyi.account.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -@Data -@ApiModel(value="钱包对象", description="") -public class WalletVO { - - @ApiModelProperty(value = "账户余额") - private BigDecimal balance; - - @ApiModelProperty(value = "可提现金额") - private BigDecimal withdrawalAmount; - - @ApiModelProperty(value = "已提现金额") - private BigDecimal withdrawnAmount; - - @ApiModelProperty(value = "最低提现门槛") - private BigDecimal vipWithdrawalMinAmount; - - @ApiModelProperty(value = "提现审核中金额") - private BigDecimal auditAmount; - - @ApiModelProperty(value = "充值总金额") - private BigDecimal totalRechargeAmount; - - @ApiModelProperty(value = "红包总金额") - private BigDecimal totalRedPacketAmount; - - @ApiModelProperty(value = "分销总金额") - private BigDecimal totalDistributionAmount; -} 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/account/RuoYiAccountApplicationTests.java deleted file mode 100644 index 5d28046..0000000 --- a/ruoyi-service/ruoyi-account/src/test/java/com/ruoyi/account/RuoYiAccountApplicationTests.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.account; - -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = RuoYiAccountApplication.class) -public class RuoYiAccountApplicationTests { - -} 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 1cb232e..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 @@ -6,14 +6,14 @@ import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.service.OrderService; import org.springframework.web.bind.annotation.*; -import com.ruoyi.vo.OrderDetailVO; +import com.ruoyi.order.vo.OrderDetailVO; import com.ruoyi.order.vo.OrderVO; import com.ruoyi.system.api.model.LoginUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import com.ruoyi.model.Order; +import com.ruoyi.order.model.Order; import javax.annotation.Resource; import java.util.List; 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 bfc843d..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 com.ruoyi.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 9f04e77..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 @@ -10,7 +10,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import com.ruoyi.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 13ae6e8..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 com.ruoyi.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 cbc68f7..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 com.ruoyi.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 8535182..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 com.ruoyi.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 35a0b80..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 com.ruoyi.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/OrderGoodService.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java deleted file mode 100644 index b7dc631..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 com.ruoyi.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 ba22a6d..0000000 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi.order.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.vo.OrderDetailVO; -import com.ruoyi.order.vo.OrderVO; -import com.ruoyi.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); - - void commission(Long orderId); -} 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 2e00db1..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 com.ruoyi.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 7de8229..0000000 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.ruoyi.order.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.core.domain.R; -import com.ruoyi.order.vo.*; -import com.ruoyi.model.ShoppingCart; - -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 index 0ff30d2..2efa1cb 100644 --- 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 @@ -9,8 +9,8 @@ import com.ruoyi.order.service.OrderService; import com.ruoyi.other.api.domain.Shop; import com.ruoyi.other.api.feignClient.ShopClient; -import com.ruoyi.model.Order; -import com.ruoyi.model.OrderGood; +import com.ruoyi.order.model.Order; +import com.ruoyi.order.model.OrderGood; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; 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 788112c..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 com.ruoyi.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 3826d19..0000000 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java +++ /dev/null @@ -1,195 +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.vo.OrderDetailVO; -import com.ruoyi.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 com.ruoyi.model.Order; -import com.ruoyi.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("修改技师状态失败"); - } - } - } - - - - @Override - public void commission(Long orderId) { - - } -} 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 4bccf3d..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 com.ruoyi.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 b20d3cd..0000000 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java +++ /dev/null @@ -1,972 +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.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.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 lombok.Data; -import com.ruoyi.model.Order; -import com.ruoyi.model.OrderGood; -import com.ruoyi.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/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/VipSettingController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java index 2f20fc2..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 @@ -45,73 +45,66 @@ 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(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") @RequestParam 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 be480ad..0000000 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java +++ /dev/null @@ -1,25 +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 org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * <p> - * Mapper 接口 - * </p> - * - * @author luodangjia - * @since 2024-11-20 - */ -public interface ShopMapper extends BaseMapper<Shop> { - - List<NearbyShopVO> selectNearbyShopList(@Param("longitude") String longitude,@Param("latitude") 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 710c44d..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/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