1.
phpcjl
2024-11-22 c7d752e4c2dab7aa8e3873a331861cf0ee25976a
1.
1 文件已重命名
28个文件已修改
1个文件已删除
21个文件已添加
1145 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderGoodsFallbackFactory.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderGoodsClient.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/model/OrderGood.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Technician.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithdrawalRequestsDTO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/BalanceChangeRecordMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WithdrawalRequestsService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/resources/mapping/BalanceChangeRecordMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderGoodController.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/PersonalCenterController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/WalletController.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/GoodsStatus.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAuditStatus.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShopStatus.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SeckillActivityInfoMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SeckillActivityInfoService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/Home.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/GoodsMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java
@@ -2,6 +2,7 @@
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
@@ -20,10 +21,16 @@
        return new AppUserClient() {
            @Override
            public AppUser getAppUserById(Long id) {
                log.error("根据id获取用户失败:" + cause.getMessage());
                log.error("根据id获取用户失败:{}", cause.getMessage());
                throw new RuntimeException("根据id获取用户失败");
            }
            @Override
            public R<Void> editAppUserById(AppUser appUser) {
                log.error("编辑用户信息失败:{}", cause.getMessage());
                throw new RuntimeException("编辑用户信息失败");
            }
        };
    }
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -3,6 +3,7 @@
import com.ruoyi.account.api.factory.AppUserClientFallbackFactory;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -13,7 +14,7 @@
 */
@FeignClient(contextId = "AppUserClient", value = ServiceNameConstants.ACCOUNT_SERVICE, fallbackFactory = AppUserClientFallbackFactory.class)
public interface AppUserClient {
    /**
     * 根据id获取用户
     * @param id
@@ -21,5 +22,10 @@
     */
    @PostMapping("/appUser/getAppUserById")
    AppUser getAppUserById(@RequestParam("id") Long id);
    /**
     * 根据id编辑用户
     */
    @PostMapping("/appUser/editAppUserById")
    R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser);
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -82,9 +82,9 @@
    @TableField("invite_user_id")
    private Long inviteUserId;
    @ApiModelProperty(value = "拥有门店id")
    @ApiModelProperty(value = "绑定门店id")
    @TableField("shop_id")
    private Integer shopId;
    private Long shopId;
    @ApiModelProperty(value = "合伙人积分数")
    @TableField("part_point")
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
New file
@@ -0,0 +1,50 @@
package com.ruoyi.account.api.model;
import com.baomidou.mybatisplus.annotation.IdType;
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;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_balance_change_record")
@ApiModel(value = "变更记录对象", description = "")
public class BalanceChangeRecord implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("用户id")
    private Long appUserId;
    @ApiModelProperty("订单id")
    private Long orderId;
    @ApiModelProperty("类型:1充值2提现3红包4分佣5商城购物")
    private Integer type;
    @ApiModelProperty("变更前金额")
    private BigDecimal beforeAmount;
    @ApiModelProperty("变更金额")
    private BigDecimal changeAmount;
    @ApiModelProperty("变更后金额")
    private BigDecimal afterAmount;
    @ApiModelProperty("删除(0=否,1=是")
    private Integer delFlag;
    @ApiModelProperty("添加时间")
    private LocalDateTime createTime;
}
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java
@@ -1,5 +1,7 @@
package factory;
import feignClient.RemoteOrderClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
@@ -7,5 +9,11 @@
 * @author luofl
 */
@Component
public class RemoteOrderFallbackFactory {
public class RemoteOrderFallbackFactory implements FallbackFactory<RemoteOrderClient> {
    @Override
    public RemoteOrderClient create(Throwable cause) {
        return new RemoteOrderClient() {
        };
    }
}
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderGoodsFallbackFactory.java
New file
@@ -0,0 +1,23 @@
package factory;
import com.ruoyi.common.core.domain.R;
import feignClient.RemoteOrderGoodsClient;
import lombok.extern.slf4j.Slf4j;
import model.OrderGood;
import org.springframework.cloud.openfeign.FallbackFactory;
import java.util.List;
@Slf4j
public class RemoteOrderGoodsFallbackFactory implements FallbackFactory<RemoteOrderGoodsClient> {
    @Override
    public RemoteOrderGoodsClient create(Throwable cause) {
        return new RemoteOrderGoodsClient(){
            @Override
            public R<List<OrderGood>> goodsOrder(List<Long> goodsIds) {
                log.error("编辑用户信息失败:{}", cause.getMessage());
                throw new RuntimeException("编辑用户信息失败");
            }
        };
    }
}
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java
@@ -5,6 +5,8 @@
import factory.RemoteOrderFallbackFactory;
import model.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * 订单远程调用接口
@@ -12,5 +14,4 @@
 */
@FeignClient(contextId = "RemoteOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class)
public interface RemoteOrderClient {
}
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderGoodsClient.java
New file
@@ -0,0 +1,24 @@
package feignClient;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import factory.RemoteOrderGoodsFallbackFactory;
import model.OrderGood;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@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);
}
ruoyi-api/ruoyi-api-order/src/main/java/model/OrderGood.java
@@ -28,6 +28,10 @@
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    private Long goodsId;
    @ApiModelProperty(value = "订单id")
    @TableField("order_id")
    private Integer orderId;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java
@@ -28,7 +28,7 @@
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Long id;
    @ApiModelProperty(value = "名称")
    @TableField("name")
@@ -98,6 +98,10 @@
    @TableField("integral")
    private Integer integral;
    @ApiModelProperty(value = "销量")
    @TableField("sale_num")
    private Integer saleNum;
    @ApiModelProperty(value = "商品权限JSON(0=全部,1=游客,2=普通会员,3=黄金会员,4=钻石会员,5=准代理,6=代理,7=总代,8=合伙人)")
    @TableField("commodity_authority")
    private Integer commodityAuthority;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java
@@ -60,7 +60,7 @@
    @ApiModelProperty(value = "店长用户id")
    @TableField("app_user_id")
    private Integer appUserId;
    private Long appUserId;
    @ApiModelProperty(value = "客户电话(同步到t_phone表)")
    @TableField("service_tel")
@@ -146,6 +146,14 @@
    @TableField("custom_order_number")
    private Integer customOrderNumber;
    @ApiModelProperty(value = "总评分")
    @TableField("score")
    private Integer score;
    @ApiModelProperty(value = "评分数量")
    @TableField("score_number")
    private Integer scoreNumber;
    @ApiModelProperty(value = "删除(0=否,1=是)")
    @TableField("del_flag")
    @TableLogic
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Technician.java
@@ -29,6 +29,10 @@
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "用户id")
    @TableField("app_user_id")
    private Long appUserId;
    @ApiModelProperty(value = "门店id")
    @TableField("shop_id")
    private Integer shopId;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
New file
@@ -0,0 +1,65 @@
package com.ruoyi.account.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.account.api.model.BalanceChangeRecord;
import com.ruoyi.account.service.BalanceChangeRecordService;
import com.ruoyi.account.vo.WalletVO;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
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.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.math.BigDecimal;
@Api("钱包")
@RestController
@RequestMapping("wallet")
public class WalletController extends BaseController {
    @Resource
    private BalanceChangeRecordService balanceChangeRecordService;
    /**
     * 钱包详情
     */
    @GetMapping("detail")
    @ApiOperation(value = "钱包详情", notes = "钱包详情")
    public AjaxResult detail() {
        Long userId = SecurityUtils.getUserId();
        // TODO 查询钱包详情
        WalletVO walletVO = new WalletVO();
        return AjaxResult.success(walletVO);
    }
    /**
     * 变更明细
     */
    @ApiOperation(value = "变更明细", notes = "变更明细")
    @GetMapping("change")
    public AjaxResult change() {
        Long userId = SecurityUtils.getUserId();
        return AjaxResult.success(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>()
                .eq(BalanceChangeRecord::getAppUserId, userId)));
    }
//    /**
//     * 充值
//     */
//    @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();
//    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java
@@ -1,8 +1,15 @@
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 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>
@@ -16,5 +23,17 @@
@RequestMapping("/withdrawal-requests")
public class WithdrawalRequestsController {
    @Resource
    private WithdrawalRequestsService withdrawalRequestsService;
    /**
     * 提现申请
     */
    @PostMapping("/withdrawalApply")
    public AjaxResult withdrawalApply(@RequestBody WithdrawalRequestsDTO params){
        withdrawalRequestsService.withdrawalApply(params);
        return AjaxResult.success();
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithdrawalRequestsDTO.java
New file
@@ -0,0 +1,24 @@
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;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/BalanceChangeRecordMapper.java
New file
@@ -0,0 +1,7 @@
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> {
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java
New file
@@ -0,0 +1,8 @@
package com.ruoyi.account.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.account.api.model.BalanceChangeRecord;
import com.ruoyi.account.api.model.UserAddress;
public interface BalanceChangeRecordService extends IService<BalanceChangeRecord> {
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/WithdrawalRequestsService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.account.api.model.WithdrawalRequests;
import com.ruoyi.account.dto.WithdrawalRequestsDTO;
/**
 * <p>
@@ -13,4 +14,8 @@
 */
public interface WithdrawalRequestsService extends IService<WithdrawalRequests> {
    /**
     * 提现申请
     */
    void withdrawalApply(WithdrawalRequestsDTO params);
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
New file
@@ -0,0 +1,11 @@
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 {
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/WithdrawalRequestsServiceImpl.java
@@ -1,9 +1,12 @@
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;
/**
@@ -17,4 +20,13 @@
@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);
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletVO.java
File was renamed from ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletVO.java
@@ -1,6 +1,5 @@
package com.ruoyi.other.vo;
package com.ruoyi.account.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
ruoyi-service/ruoyi-account/src/main/resources/mapping/BalanceChangeRecordMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.account.mapper.BalanceChangeRecordMapper">
</mapper>
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderGoodController.java
@@ -1,8 +1,15 @@
package com.ruoyi.order.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.order.service.OrderGoodService;
import model.OrderGood;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
 * <p>
@@ -14,7 +21,19 @@
 */
@RestController
@RequestMapping("/order-good")
public class OrderGoodController {
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);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderGoodService.java
@@ -1,6 +1,7 @@
package com.ruoyi.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import model.OrderGood;
import model.RefundPassOrderGood;
/**
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -1,6 +1,11 @@
package com.ruoyi.other.controller;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.other.service.GoodsCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -16,8 +21,16 @@
 */
@RestController
@RequestMapping("/goods-category")
@Api(tags = "商品分类")
public class GoodsCategoryController {
    @Resource
    private GoodsCategoryService goodsCategoryService;
    @GetMapping("/list")
    @ApiOperation(value = "商品分类列表")
    public AjaxResult list(){
        return AjaxResult.success(goodsCategoryService.list());
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -1,9 +1,19 @@
package com.ruoyi.other.controller;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.other.api.domain.Goods;
import com.ruoyi.other.service.GoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
@@ -15,7 +25,29 @@
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {
@Api("商品")
public class GoodsController extends BaseController {
    @Resource
    private GoodsService goodsService;
    /**
     * 商品列表
     */
    @GetMapping("/goodsList")
    @ApiOperation(value = "商品列表")
    public TableDataInfo goodsList(Goods goods){
        startPage();
        return getDataTable(goodsService.goodsList(goods));
    }
    /**
     * 商品详情
     */
    @GetMapping("/goodsDetail/{goodsId}")
    public AjaxResult goodsDetail(@PathVariable("goodsId") Integer goodsId){
        return success(goodsService.getById(goodsId));
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/PersonalCenterController.java
New file
@@ -0,0 +1,24 @@
package com.ruoyi.other.controller;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.vo.Home;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "个人中心")
@RestController
@RequestMapping("/personalCenter")
public class PersonalCenterController {
    @GetMapping("/getUserInfo")
    @ApiOperation(value = "获取用户信息")
    public AjaxResult getUserInfo(){
        Long userId = SecurityUtils.getUserId();
        Home home = new Home();
        return AjaxResult.success(home);
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
@@ -1,8 +1,18 @@
package com.ruoyi.other.controller;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.other.api.domain.Goods;
import com.ruoyi.other.service.SeckillActivityInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
@@ -12,9 +22,33 @@
 * @author luodangjia
 * @since 2024-11-20
 */
@Api(tags = "秒杀活动信息")
@RestController
@RequestMapping("/seckill-activity-info")
public class SeckillActivityInfoController {
public class SeckillActivityInfoController extends BaseController {
    @Resource
    private SeckillActivityInfoService seckillActivityInfoService;
    /**
     * 秒杀活动列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "秒杀活动列表")
    public AjaxResult list(Goods goods)
    {
        startPage();
        return AjaxResult.success(seckillActivityInfoService.listSeckillActivity(goods));
    }
    /**
     * 秒杀活动详情
     */
    @GetMapping("/detail/{id}")
    @ApiOperation(value = "秒杀活动详情")
    public AjaxResult detail(@PathVariable("id") Integer id)
    {
        return AjaxResult.success(seckillActivityInfoService.detail(id));
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.other.enums.ShareAddType;
import com.ruoyi.other.api.domain.Share;
import com.ruoyi.other.enums.ShareAuditStatus;
import com.ruoyi.other.service.ShareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -51,7 +52,9 @@
    @PostMapping
    public AjaxResult add(@RequestBody Share share){
        share.setAddType(ShareAddType.STORE.getCode());
        share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
        share.setDelFlag(0);
        share.setAppletShare(1);
        return toAjax(shareService.save(share));
    }
@@ -70,6 +73,7 @@
    @ApiOperation(value = "分享编辑", tags = {"分享"})
    @PutMapping
     public AjaxResult edit(@RequestBody Share share){
        share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
        return toAjax(shareService.updateById(share));
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -2,15 +2,26 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.enums.ShopStatus;
import com.ruoyi.other.service.ShopService;
import com.ruoyi.other.service.TechnicianService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.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.util.List;
/**
 * <p>
@@ -22,23 +33,52 @@
 */
@RestController
@RequestMapping("/shop")
@Api("门店")
public class ShopController extends BaseController {
    @Resource
    private TechnicianService technicianService;
    @Resource
    private ShopService shopService;
    @Resource
    private AppUserClient appUserClient;
    /**
     * 指定门店技师列表
     */
    @RequestMapping("/technicianList")
    public AjaxResult technicianList(@RequestParam String shopId){
    @GetMapping("/technicianList")
    @ApiOperation(value = "技师列表", tags = {"技师"})
    public AjaxResult technicianList(@ApiParam("门店id") @RequestParam String shopId){
        return success(technicianService.list(new LambdaQueryWrapper<Technician>()
                .eq(Technician::getShopId,shopId)
                .eq(Technician::getStatus,2)
                .eq(Technician::getSubscribeStatus,1)));
    }
    /**
     * 查询当前店长所属门店
     */
    @GetMapping("/shopByUser")
    @ApiOperation(value = "查询当前店长所属门店", tags = {"门店"})
    public AjaxResult shopByUser(){
        List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>()
                .eq(Shop::getAppUserId, SecurityUtils.getUserId())
                .eq(Shop::getStatus, ShopStatus.SHOP_STATUS_NORMAL.getCode()));
        return success(list);
    }
    /**
     * 绑定门店
     */
    @GetMapping("/bindShop")
    @ApiOperation(value = "绑定门店", tags = {"门店"})
    public AjaxResult bindShop(@ApiParam("门店id") @RequestParam Long shopId){
        AppUser appUser = appUserClient.getAppUserById(SecurityUtils.getUserId());
        appUser.setShopId(shopId);
        appUserClient.editAppUserById(appUser);
        return success();
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -1,8 +1,24 @@
package com.ruoyi.other.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.api.domain.TechnicianSubscribe;
import com.ruoyi.other.service.TechnicianSubscribeService;
import com.ruoyi.other.vo.TechnicianSubscribeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
 * <p>
@@ -12,9 +28,43 @@
 * @author luodangjia
 * @since 2024-11-20
 */
@Api(tags = "技师预约管理")
@RestController
@RequestMapping("/technician-subscribe")
public class TechnicianSubscribeController {
public class TechnicianSubscribeController extends BaseController {
    @Resource
    private TechnicianSubscribeService technicianSubscribeService;
    /**
     * 预约列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "预约列表", notes = "预约列表")
    public TableDataInfo list(@ApiParam(value = "状态") @RequestParam Integer status,
                              @ApiParam(value = "门店id") @RequestParam Long shopId){
        startPage();
        List<TechnicianSubscribeVO> list = technicianSubscribeService
                .getTechnicianSubscribeByUserAndShop(SecurityUtils.getUserId(),shopId);
        return getDataTable(list);
    }
    /**
     * 取消服务
     */
    @GetMapping("/cancel")
    @ApiOperation(value = "取消服务", notes = "取消服务")
    public AjaxResult cancel(@ApiParam(value = "预约id") @RequestParam Long id){
        TechnicianSubscribe subscribe = technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>()
                .eq(TechnicianSubscribe::getId, id)
                .eq(TechnicianSubscribe::getStatus, 0));
        if (null == subscribe){
            return error("不满足取消条件");
        }
        subscribe.setStatus(2);
        technicianSubscribeService.updateById(subscribe);
        return success();
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/WalletController.java
File was deleted
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/GoodsStatus.java
New file
@@ -0,0 +1,22 @@
package com.ruoyi.other.enums;
public enum GoodsStatus {
    DOWN(0, "下架"),
    UP(1, "上架");
    private Integer code;
    private String desc;
    GoodsStatus(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public Integer getCode() {
        return code;
    }
    public String getDesc() {
        return desc;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAuditStatus.java
New file
@@ -0,0 +1,23 @@
package com.ruoyi.other.enums;
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;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShopStatus.java
New file
@@ -0,0 +1,18 @@
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;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/SeckillActivityInfoMapper.java
@@ -1,7 +1,12 @@
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>
@@ -13,4 +18,7 @@
 */
public interface SeckillActivityInfoMapper extends BaseMapper<SeckillActivityInfo> {
    List<SeckillActivityVO> listSeckillActivity(Goods goods);
    SeckillActivityDetailVO selectDetail(Integer seckillActivityId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java
@@ -2,6 +2,10 @@
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>
@@ -13,4 +17,11 @@
 */
public interface TechnicianSubscribeMapper extends BaseMapper<TechnicianSubscribe> {
    /**
     * 查看用户预约记录
     * @param shopId
     * @return
     */
    public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(@Param("userId") Long userId,
                                                                           @Param("shopId") Long shopId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
@@ -2,6 +2,9 @@
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>
@@ -13,4 +16,7 @@
 */
public interface GoodsService extends IService<Goods> {
    List<GoodsVO> goodsList(Goods goods);
    GoodsVO goodsDetail(Long goodsId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/SeckillActivityInfoService.java
@@ -1,7 +1,12 @@
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>
@@ -13,4 +18,7 @@
 */
public interface SeckillActivityInfoService extends IService<SeckillActivityInfo> {
    List<SeckillActivityVO> listSeckillActivity(Goods goods);
    SeckillActivityDetailVO detail(Integer seckillActivityId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java
@@ -2,10 +2,13 @@
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
@@ -13,4 +16,9 @@
 */
public interface TechnicianSubscribeService extends IService<TechnicianSubscribe> {
    /**
     * 查询用于指定门店的相关预约记录
     */
    List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -1,14 +1,27 @@
package com.ruoyi.other.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.other.mapper.GoodsMapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.other.api.domain.Goods;
import com.ruoyi.other.enums.GoodsStatus;
import com.ruoyi.other.mapper.GoodsMapper;
import com.ruoyi.other.service.GoodsService;
import com.ruoyi.other.vo.GoodsVO;
import feignClient.RemoteOrderGoodsClient;
import model.OrderGood;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
 * <p>
 *  服务实现类
 * 服务实现类
 * </p>
 *
 * @author luodangjia
@@ -16,5 +29,32 @@
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
    @Resource
    private RemoteOrderGoodsClient orderGoodsClient;
    @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) {
        Goods goods = this.getById(goodsId);
        if (Objects.nonNull(goods)){
            GoodsVO goodsVO = new GoodsVO();
            BeanUtils.copyBeanProp(goodsVO, goods);
        }
        return new GoodsVO();
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
@@ -1,10 +1,22 @@
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.other.mapper.SeckillActivityInfoMapper;
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 org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * <p>
@@ -16,5 +28,33 @@
 */
@Service
public class SeckillActivityInfoServiceImpl extends ServiceImpl<SeckillActivityInfoMapper, SeckillActivityInfo> implements SeckillActivityInfoService {
    @Resource
    private SeckillActivityInfoMapper seckillActivityInfoMapper;
    @Resource
    private GoodsShopMapper goodsShopMapper;
    @Resource
    private ShopMapper shopMapper;
    @Override
    public List<SeckillActivityVO> listSeckillActivity(Goods goods) {
        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;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -4,7 +4,12 @@
import com.ruoyi.other.mapper.TechnicianSubscribeMapper;
import com.ruoyi.other.api.domain.TechnicianSubscribe;
import com.ruoyi.other.service.TechnicianSubscribeService;
import com.ruoyi.other.vo.TechnicianSubscribeVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
/**
 * <p>
@@ -16,5 +21,11 @@
 */
@Service
public class TechnicianSubscribeServiceImpl extends ServiceImpl<TechnicianSubscribeMapper, TechnicianSubscribe> implements TechnicianSubscribeService {
    @Resource
    private TechnicianSubscribeMapper technicianSubscribeMapper;
    @Override
    public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId) {
        return technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(userId, shopId);
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
New file
@@ -0,0 +1,43 @@
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=服务商品,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 = "划线价")
    private BigDecimal originalPrice;
    @ApiModelProperty(value = "基础售价")
    private BigDecimal sellingPrice;
    @ApiModelProperty(value = "已售数量")
    private Integer saleNum;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/Home.java
New file
@@ -0,0 +1,103 @@
package com.ruoyi.other.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@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 Integer score;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String longitude;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String latitude;
    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java
New file
@@ -0,0 +1,27 @@
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;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java
New file
@@ -0,0 +1,38 @@
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;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/TechnicianSubscribeVO.java
New file
@@ -0,0 +1,54 @@
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=已取消")
    private Integer status;
}
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/GoodsMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.other.mapper.GoodsMapper">
</mapper>
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
New file
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.other.mapper.SeckillActivityInfoMapper">
    <select id="listSeckillActivity" resultType="com.ruoyi.other.vo.SeckillActivityVO">
        SELECT
            tsai.id,
            tg.`name`,
            tg.introduction,
            tg.home_page_picture,
            tg.original_price,
            tgs.selling_price,
            tg.sale_num,
            tsai.start_time
        FROM
            t_seckill_activity_info tsai
                LEFT JOIN t_goods tg ON tsai.good_id = tg.id
                LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id
        WHERE tsai.end_time >= NOW()
        <if test="goodsName != null and goodsName != ''">
            AND tg.`name` LIKE concat('%',#{goodsName},'%')
        </if>
        <if test="goodsCategoryId != null">
            AND tg.goods_category_id = #{goodsCategoryId}
        </if>
    </select>
    <select id="selectDetail" resultType="com.ruoyi.other.vo.SeckillActivityDetailVO">
        SELECT
            tsai.id,
            tg.`name`,
            tg.introduction,
            tg.home_page_picture,
            tg.original_price,
            tgs.selling_price,
            tg.sale_num,
            tsai.start_time,
            tg.detail_picture,
            tsal.end_time,
            tg.detail
        FROM
            t_seckill_activity_info tsai
                LEFT JOIN t_goods tg ON tsai.good_id = tg.id
                LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id
        WHERE tsai.id = #{seckillActivityId}
    </select>
</mapper>
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
New file
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.other.mapper.TechnicianSubscribeMapper">
    <select id="getTechnicianSubscribeByUserAndShop"
            resultType="com.ruoyi.other.vo.TechnicianSubscribeVO">
        SELECT
            tts.user_address,
            ts.`name` shopName,
            ts.address shopAddress,
            tt.name technicianName,
            tts.subscribe_time,
            tts.service_mode,
            tts.status
        FROM
            t_technician_subscribe tts
                LEFT JOIN t_technician tt ON tts.technician_id = tt.id AND tt.del_flag = 0
                LEFT JOIN t_shop ts ON tt.shop_id = ts.id AND ts.del_flag = 0
        WHERE
           ( (ts.app_user_id = #{userId} AND ts.id = #{shopId})
           OR
            (tt.app_user_id = #{userId} AND ts.id = #{shopId}))
            AND tts.del_flag = 0
        ORDER BY tts.create_time DESC
    </select>
</mapper>