1.完成个人中心-门店管理部分接口的定义
2.完成个人中心-我的钱包部分接口的定义
11个文件已修改
6个文件已添加
329 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 26 ●●●●● 补丁 | 查看 | 原始文档 | 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/ShareAddType.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShareService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShareServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletChangeVO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletVO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -110,5 +110,24 @@
    @TableField("last_shop_time")
    private LocalDateTime lastShopTime;
    @ApiModelProperty(value = "可提现金额")
    @TableField("withdrawable_amount")
    private BigDecimal withdrawal_amount;
    @ApiModelProperty(value = "已提现金额")
    @TableField("withdrawn_amount")
    private BigDecimal withdrawn_amount;
    @ApiModelProperty(value = "充值总金额")
    @TableField("total_recharge_amount")
    private BigDecimal total_recharge_amount;
    @ApiModelProperty(value = "红包总金额")
    @TableField("total_red_packet_amount")
    private BigDecimal total_red_packet_amount;
    @ApiModelProperty(value = "分销总金额")
    @TableField("total_distribution_amount")
    private BigDecimal total_distribution_amount;
}
ruoyi-api/ruoyi-api-order/src/main/java/factory/RemoteOrderFallbackFactory.java
New file
@@ -0,0 +1,11 @@
package factory;
import org.springframework.stereotype.Component;
/**
 * 订单服务降级处理
 * @author luofl
 */
@Component
public class RemoteOrderFallbackFactory {
}
ruoyi-api/ruoyi-api-order/src/main/java/feignClient/RemoteOrderClient.java
New file
@@ -0,0 +1,16 @@
package feignClient;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import factory.RemoteOrderFallbackFactory;
import model.Order;
import org.springframework.cloud.openfeign.FeignClient;
/**
 * 订单远程调用接口
 * @author luofl
 */
@FeignClient(contextId = "RemoteOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class)
public interface RemoteOrderClient {
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -16,5 +16,7 @@
@RequestMapping("/app-user")
public class AppUserController {
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -1,8 +1,18 @@
package com.ruoyi.order.controller;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.order.service.OrderService;
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.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,37 @@
 * @author luodangjia
 * @since 2024-11-21
 */
@Api("订单")
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderService orderService;
    /**
     * 扫码校验
     */
    @ApiOperation(value = "扫码校验", tags = {"订单核销"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "分享id", name = "shareId", required = true, dataType = "int"),
    })
    @GetMapping("/check/{orderId}/{shopId}")
    public AjaxResult check(@PathVariable("orderId") Integer orderId, @PathVariable("shopId") Integer shopId){
        return AjaxResult.success(orderService.check(orderId, shopId));
    }
    /**
     * 订单详情
     */
    @ApiOperation(value = "订单详情", tags = {"订单详情"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
    })
    @GetMapping("/detail/{orderId}")
    public AjaxResult detail(@PathVariable("orderId") Integer orderId){
        return AjaxResult.success(orderService.getById(orderId));
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
@@ -1,7 +1,7 @@
package com.ruoyi.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import model.RefundPassOrder;
import model.Order;
/**
 * <p>
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -1,7 +1,7 @@
package com.ruoyi.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import model.RefundPassOrder;
import model.Order;
/**
 * <p>
@@ -12,5 +12,5 @@
 * @since 2024-11-21
 */
public interface OrderService extends IService<Order> {
    boolean check(Integer orderId, Integer shopId);
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -1,9 +1,9 @@
package com.ruoyi.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.mapper.OrderMapper;
import model.RefundPassOrder;
import com.ruoyi.account.service.OrderService;
import com.ruoyi.order.mapper.OrderMapper;
import com.ruoyi.order.service.OrderService;
import model.Order;
import org.springframework.stereotype.Service;
/**
@@ -17,4 +17,8 @@
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Override
    public boolean check(Integer orderId, Integer shopId) {
        return false;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -1,9 +1,19 @@
package com.ruoyi.other.controller;
import org.springframework.web.bind.annotation.RequestMapping;
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.other.enums.ShareAddType;
import com.ruoyi.other.api.domain.Share;
import com.ruoyi.other.service.ShareService;
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 org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
@@ -13,9 +23,67 @@
 * @author luodangjia
 * @since 2024-11-20
 */
@Api("分享")
@RestController
@RequestMapping("/share")
public class ShareController {
public class ShareController extends BaseController {
    @Resource
    private ShareService shareService;
    /**
     * 分享列表
     */
    @ApiOperation(value = "分享列表", tags = {"分享"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "对象id(addType=1:平台添加,addType=2:推广人添加,addType=3:门店添加)", name = "objectId", required = true, dataType = "int"),
    })
    @GetMapping("/list")
    public AjaxResult list(@RequestParam Integer objectId){
        return AjaxResult.success(shareService.list(new LambdaQueryWrapper<Share>()
                .eq(Share::getObjectId, objectId)));
    }
    /**
     * 分享添加
     */
    @ApiOperation(value = "分享添加", tags = {"分享"})
    @PostMapping
    public AjaxResult add(@RequestBody Share share){
        share.setAddType(ShareAddType.STORE.getCode());
        share.setDelFlag(0);
        return toAjax(shareService.save(share));
    }
    /**
     * 分享删除
     */
    @ApiOperation(value = "分享删除", tags = {"分享"})
    @DeleteMapping
    public AjaxResult delete(@RequestBody Share share){
        return toAjax(shareService.removeById(share));
    }
    /**
     * 分享编辑
     */
    @ApiOperation(value = "分享编辑", tags = {"分享"})
    @PutMapping
     public AjaxResult edit(@RequestBody Share share){
        return toAjax(shareService.updateById(share));
    }
    /**
     * 分享详情
     */
    @ApiOperation(value = "分享详情", tags = {"分享"})
    @GetMapping("/detail/{id}")
    public AjaxResult detail(@PathVariable("id") Integer id){
        return AjaxResult.success(shareService.getById(id));
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -1,8 +1,16 @@
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.other.api.domain.Technician;
import com.ruoyi.other.service.TechnicianService;
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;
/**
 * <p>
@@ -14,7 +22,23 @@
 */
@RestController
@RequestMapping("/shop")
public class ShopController {
public class ShopController extends BaseController {
    @Resource
    private TechnicianService technicianService;
    /**
     * 指定门店技师列表
     */
    @RequestMapping("/technicianList")
    public AjaxResult technicianList(@RequestParam String shopId){
        return success(technicianService.list(new LambdaQueryWrapper<Technician>()
                .eq(Technician::getShopId,shopId)
                .eq(Technician::getStatus,2)
                .eq(Technician::getSubscribeStatus,1)));
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/WalletController.java
New file
@@ -0,0 +1,40 @@
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.security.utils.SecurityUtils;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("钱包")
@RestController
@RequestMapping("wallet")
public class WalletController extends BaseController {
    /**
     * 钱包详情
     */
    @GetMapping("detail")
    public AjaxResult detail() {
        Long userId = SecurityUtils.getUserId();
        // TODO 查询钱包详情
        return AjaxResult.success();
    }
    /**
     * 变更明细
     */
    @GetMapping("change")
    public AjaxResult change() {
        Long userId = SecurityUtils.getUserId();
        // TODO 查询变更明细
        return AjaxResult.success();
    }
    /**
     * 提现
     */
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/ShareAddType.java
New file
@@ -0,0 +1,19 @@
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;
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShareService.java
@@ -12,5 +12,4 @@
 * @since 2024-11-20
 */
public interface ShareService extends IService<Share> {
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShareServiceImpl.java
@@ -16,5 +16,4 @@
 */
@Service
public class ShareServiceImpl extends ServiceImpl<ShareMapper, Share> implements ShareService {
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletChangeVO.java
New file
@@ -0,0 +1,24 @@
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;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/WalletVO.java
New file
@@ -0,0 +1,34 @@
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;
@Data
@ApiModel(value="钱包对象", description="")
public class WalletVO {
    @ApiModelProperty(value = "可提现金额")
    private BigDecimal withdrawal_amount;
    @ApiModelProperty(value = "已提现金额")
    private BigDecimal withdrawn_amount;
    @ApiModelProperty(value = "最低提现门槛")
    private BigDecimal vipWithdrawalMinAmount;
    @ApiModelProperty(value = "提现审核中金额")
    private BigDecimal audit_amount;
    @ApiModelProperty(value = "充值总金额")
    private BigDecimal total_recharge_amount;
    @ApiModelProperty(value = "红包总金额")
    private BigDecimal total_red_packet_amount;
    @ApiModelProperty(value = "分销总金额")
    private BigDecimal total_distribution_amount;
}
ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml
@@ -23,7 +23,7 @@
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        server-addr: 192.168.110.169:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: cdf47c5f-2bf9-4dec-a616-a8dc653aceb9
@@ -31,7 +31,7 @@
        password: nacos
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        server-addr: 192.168.110.169:8848
        namespace: cdf47c5f-2bf9-4dec-a616-a8dc653aceb9
        group: DEFAULT_GROUP
        name: ${spring.application.name}
@@ -143,13 +143,13 @@
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        server-addr: 192.168.110.169:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        server-addr: 192.168.110.169:8848
        namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce
        group: DEFAULT_GROUP
        name: ${spring.application.name}