ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
@@ -86,5 +86,9 @@ @ApiModelProperty(value = "用户电话") @TableField(exist = false) private String userPhone; @ApiModelProperty(value = "会员信息") @TableField(exist = false) private VipSettingDto vipSettingDto; } ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/VipSettingDto.java
New file @@ -0,0 +1,150 @@ package com.ruoyi.account.api.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; import java.math.BigDecimal; import java.util.List; /** * <p> * * </p> * * @author luodangjia * @since 2024-11-20 */ @Data @EqualsAndHashCode(callSuper = false) @TableName("t_vip_setting") @ApiModel(value="VipSetting对象", description="") public class VipSettingDto implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "1-7对应会员") @TableId("id") private Integer id; @ApiModelProperty(value = "会员名称") @TableField("vip_name") private String vipName; @ApiModelProperty(value = "会员专属权益") @TableField("vip_info") private String vipInfo; @ApiModelProperty(value = "1级会员专用 自动解绑推广人天数: 达到设置天数未成为黄金会员自动解绑推广人") @TableField("vip_cancel_day") private Integer vipCancelDay; @ApiModelProperty(value = "1级会员专用 可更换绑定人天数:用户在达到设置的天数未下单商品,可以更换绑定人") @TableField("vip_change_day") private Integer vipChangeDay; @ApiModelProperty(value = "钱包提现权限:1开0关") @TableField("vip_withdrawal_role") private Integer vipWithdrawalRole; @ApiModelProperty(value = "钱包提现权限:1开0关") @TableField("vip_agent_level_up_role") private Integer vipAgentLevelUpRole; @ApiModelProperty(value = "最低提现门槛") @TableField("vip_withdrawal_min_amount") private BigDecimal vipWithdrawalMinAmount; @ApiModelProperty(value = "提现手续费") @TableField("vip_withdrawal_fee") private BigDecimal vipWithdrawalFee; @ApiModelProperty(value = "积分转赠权限 1开0关") @TableField("vip_gift_role") private Integer vipGiftRole; @ApiModelProperty(value = "达成会员等级所需消费积分数量") @TableField("vip_level_up_shop") private Integer vipLevelUpShop; @ApiModelProperty(value = "通过消费积分达成会员等级的开关 1开0关") @TableField("vip_level_up_shop_role") private Integer vipLevelUpShopRole; @ApiModelProperty(value = "达成会员等级所需的返佣积分数量") @TableField("vip_level_up_share") private Integer vipLevelUpShare; @ApiModelProperty(value = "通过返佣积分达成会员等级的开关 1开0关") @TableField("vip_level_up_share_role") private Integer vipLevelUpShareRole; @ApiModelProperty(value = "达成会员等级所需的直推人数(包括钻石和代理)") @TableField("vip_direct_num") private Integer vipDirectNum; @ApiModelProperty(value = "达成会员等级所需的团队数量") @TableField("vip_team_num") private Integer vipTeamNum; @ApiModelProperty(value = "通过直推用户或团队数量的方式达成会员等级的开关 1开0关") @TableField("vip_level_up_num_role") private Integer vipLevelUpNumRole; @ApiModelProperty(value = "达成会员等级所需准代理数(达成总代和合伙人用到)") @TableField("vip_direct_vip_num") private Integer vipDirectVipNum; @ApiModelProperty(value = "达成会员等级所需总代数量(达成合伙人用到)") @TableField("vip_team_vip_num") private Integer vipTeamVipNum; @ApiModelProperty(value = "达成会员等级所需开店数量") @TableField("vip_open_shop_num") private Integer vipOpenShopNum; @ApiModelProperty(value = "消费积分保级周期(天)") @TableField("keep_buy_day") private Integer keepBuyDay; @ApiModelProperty(value = "消费积分保级的积分阈值(分))") @TableField("keep_buy_point") private Integer keepBuyPoint; @ApiModelProperty(value = "返佣积分保的周期(天)") @TableField("keep_share_day") private Integer keepShareDay; @ApiModelProperty(value = "返佣积分保级的积分阈值(分)") @TableField("keep_share_point") private Integer keepSharePoint; @ApiModelProperty(value = "门店业绩积分保级的周期(天)") @TableField("keep_shop_day") private Integer keepShopDay; @ApiModelProperty(value = "门店业绩积分保级的积分阈值(分)") @TableField("keep_shop_point") private Integer keepShopPoint; @ApiModelProperty(value = "会员等级是否必须达到代理: 0-否 1-是") @TableField("vip_level_up_proxy_role") private Integer vipLevelUpProxyRole; @ApiModelProperty(value = "指定会员升级商品") @TableField("good_ids") private String goodIds; } ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/VipSetting.java
@@ -150,4 +150,5 @@ private List<Goods> goodsList; } ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
@@ -3,17 +3,19 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.api.model.AgentApplication; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.account.api.model.UserChangeLog; import com.ruoyi.account.dto.AgentQuery; import com.ruoyi.account.api.model.VipSettingDto; import com.ruoyi.account.service.AgentApplicationService; import com.ruoyi.account.service.AppUserService; import com.ruoyi.account.service.UserChangeLogService; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.bean.BeanUtils; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.other.api.domain.VipSetting; import com.ruoyi.other.api.feignClient.VipSettingClient; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.*; @@ -49,11 +51,17 @@ return R.ok(agentApplicationService.pageList(agentQuery)); } @Resource private VipSettingClient vipSettingClient; @GetMapping("/detail") @ApiOperation(value = "会员申请详情", tags = {"会员中心-小程序"}) public R<AgentApplication> detail(@RequestParam Long id) { return R.ok(agentApplicationService.getById(id)); R<VipSetting> vipSetting = vipSettingClient.getVipSetting(id.intValue()); VipSettingDto vipSettingDto = new VipSettingDto(); BeanUtils.copyProperties(vipSetting.getData(),vipSettingDto); AgentApplication byId = agentApplicationService.getById(id); byId.setVipSettingDto(vipSettingDto); return R.ok(byId); } @Resource private UserChangeLogService userChangeLogService; ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -127,7 +127,9 @@ UserPoint userPoint = new UserPoint(); userPoint.setAppUserId(userid); List<UserPoint> userPointList = userPointMapper.findLatestChangeByType(userPoint); // List<UserPoint> userPointList = userPointMapper.indLatestChangeByType(userPoint); // TODO 完善 List<UserPoint> userPointList = new ArrayList<>(); Map<Integer, Integer> userBalanceMap = userPointList.stream() .collect(Collectors.toMap(UserPoint::getType, UserPoint::getBalance)); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -19,9 +19,11 @@ import com.ruoyi.other.api.feignClient.BaseSettingClient; import com.ruoyi.system.api.model.LoginUser; import io.swagger.annotations.*; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.constraints.NotBlank; import java.time.LocalDateTime; import java.util.List; @@ -54,7 +56,7 @@ */ @ApiOperation(value = "我的订单列表", tags = {"小程序-个人中心-我的订单"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单状态", name = "status", required = true, dataType = "int", paramType="query"), @ApiImplicitParam(value = "订单状态", name = "status", required = true, dataType = "int"), }) @GetMapping("/getMyOrderList") public TableDataInfo<OrderVO> getMyOrderList(@ApiParam("订单状态") Integer status){ @@ -76,7 +78,7 @@ */ @ApiOperation(value = "订单详情", tags = {"小程序-个人中心-我的订单-订单详情"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int", paramType="query"), @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), }) @GetMapping("/detail/{orderId}") public R<OrderDetailVO> detail(@PathVariable("orderId") Long orderId){ @@ -103,7 +105,7 @@ */ @ApiOperation(value = "订单核销", tags = {"小程序-个人中心-门店管理"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单号", name = "code", required = true, dataType = "String", paramType="query"), @ApiImplicitParam(value = "订单号", name = "code", required = true, dataType = "String"), }) @GetMapping("/writeOff/{code}/{shopId}") public R<Void> writeOff(@PathVariable("code") String code, @PathVariable("shopId") Integer shopId){ @@ -116,7 +118,7 @@ */ @ApiOperation(value = "取消订单", tags = {"小程序-个人中心-我的订单"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int", paramType="query"), @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), }) @GetMapping("/cancel/{orderId}") public R<Void> cancel(@PathVariable("orderId") Long orderId){ @@ -131,7 +133,7 @@ */ @ApiOperation(value = "确认收货", tags = {"小程序-个人中心-我的订单"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int", paramType="query"), @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), }) @GetMapping("/confirm/{orderId}") public R<Void> confirm(@PathVariable("orderId") Long orderId){ @@ -162,7 +164,7 @@ */ @ApiOperation(value = "更换收货地址", tags = {"小程序-个人中心-我的订单"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int", paramType="query"), @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), }) @GetMapping("/changeAddress") public R<Void> changeAddress(@RequestParam("orderId") Long orderId, @RequestParam("addressId") Long addressId){ @@ -182,6 +184,9 @@ * 更新订单状态 */ @ApiOperation(value = "更新订单状态", tags = {"后台-订单管理"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单对象", name = "order", required = true, dataType = "Order"), }) @PostMapping("/updateOrderStatus") public R<Void> updateOrderStatus(@RequestBody Order order){ Order order1 = orderService.getById(order.getId()); @@ -195,7 +200,7 @@ * 预约技师 */ @PostMapping("/subscribe") public R<Void> subscribe(@RequestParam("id") Long id ,@RequestParam("technicianId") Integer technicianId){ public R<Void> subscribe(@RequestParam(value = "id", required = false) Long id ,@RequestParam(value = "technicianId", required = false) Integer technicianId){ Order order = orderService.getById(id); order.setTechnicianId(technicianId); orderService.updateById(order); @@ -218,50 +223,49 @@ return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).groupBy(Order::getAppUserId).list()); } @ResponseBody @GetMapping("/getOrderPageList") @ApiOperation(value = "获取订单列表", tags = {"管理后台-订单管理", "门店后台-订单管理"}) public TableDataInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList){ startPage(); List<OrderPageListVo> list = orderService.getOrderPageList(orderPageList); return getDataTable(list); } @ResponseBody @PutMapping("/confirmDelivery/{orderId}") @ApiOperation(value = "已发货操作", tags = {"管理后台-订单管理"}) public R confirmDelivery(@PathVariable("orderId") String orderId, String code){ return orderService.confirmDelivery(orderId, code); } @ResponseBody @PutMapping("/cancelOrder/{orderId}") @ApiOperation(value = "取消订单操作", tags = {"管理后台-订单管理"}) public R cancelOrder(@PathVariable("orderId") Long orderId){ return orderService.cancelOrder(orderId); } @ResponseBody @PutMapping("/receivingOperation/{orderId}") @ApiOperation(value = "收货操作", tags = {"管理后台-订单管理"}) public R receivingOperation(@PathVariable("orderId") Long orderId){ return orderService.receivingOperation(orderId); } @ResponseBody @GetMapping("/getOrderInfo/{orderId}") @ApiOperation(value = "查询订单详情", tags = {"管理后台-订单管理"}) public R<OrderInfoVo> getOrderInfo(@PathVariable("orderId") Long orderId){ OrderInfoVo orderInfo = orderService.getOrderInfo(orderId); return R.ok(orderInfo); } @GetMapping("/getOrderPageList") @ApiOperation(value = "获取订单列表", tags = {"管理后台-订单管理", "门店后台-订单管理"}) @ApiImplicitParams({ }) public TableDataInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList){ startPage(); List<OrderPageListVo> list = orderService.getOrderPageList(orderPageList); return getDataTable(list); } } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -104,7 +104,7 @@ @ApiOperation(value = "售后已发货操作", tags = {"我的订单-个人中心-小程序"}) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"), @ApiImplicitParam(name = "code", value = "快递单号", required = true, dataType = "string") @ApiImplicitParam(name = "code", value = "快递单号", required = true, dataType = "string"), }) public R deliverGoodsRefundPass(@PathVariable("id") Long id, @PathVariable("code") String code){ RefundPass refundPass = refundPassService.getById(id); @@ -143,7 +143,7 @@ @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"), @ApiImplicitParam(name = "status", value = "审核状态(2=同意,3=拒绝)", required = true, dataType = "int"), @ApiImplicitParam(name = "passRemark", value = "审核备注", required = false, dataType = "string") @ApiImplicitParam(name = "passRemark", value = "审核备注", required = false, dataType = "string"), }) public R authPassStatus(@PathVariable("id") Long id, @PathVariable("status") Integer status, @RequestParam("passRemark") String passRemark){ return refundPassService.authPassStatus(id, status, passRemark); @@ -154,7 +154,7 @@ @PutMapping("/refundPassReceive/{id}") @ApiOperation(value = "售后确认收货操作", tags = {"管理后台-售后管理"}) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long") @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"), }) public R refundPassReceive(@PathVariable("id") Long id){ return refundPassService.refundPassReceive(id); @@ -166,7 +166,7 @@ @GetMapping("/getRefundPassInfo/{id}") @ApiOperation(value = "获取售后数据详情", tags = {"管理后台-售后管理", "门店后台-售后管理"}) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long") @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"), }) public R<RefundPassInfo> getRefundPassInfo(@PathVariable("id") Long id){ RefundPassInfo refundPassInfo = refundPassService.getRefundPassInfo(id);