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/controller/AppUserController.java
@@ -34,6 +34,7 @@ import javax.annotation.Resource; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -564,6 +565,32 @@ //消费总金额 return R.ok(byId); } @Resource private UserChangeLogService userChangeLogService; @GetMapping("/change/vip") @ApiOperation(value = "用户列表-修改会员等级", tags = {"管理后台"}) public R<Page<AppUser>> changevip(Long id,Integer vipId) { AppUser byId = appUserService.getById(id); UserChangeLog userChangeLog = new UserChangeLog(); userChangeLog.setCreateTime(LocalDateTime.now()); userChangeLog.setAppUserId(byId.getId()); userChangeLog.setBeforeVipId(byId.getVipId()); userChangeLog.setAfterVipId(vipId); if (userChangeLog.getBeforeVipId()>userChangeLog.getAfterVipId()) { userChangeLog.setChangeType(0); }else { userChangeLog.setChangeType(1); } userChangeLogService.save(userChangeLog); byId.setVipId(vipId); appUserService.updateById(byId); return R.ok(); } @GetMapping("/bottom") @ApiOperation(value = "用户列表-绑定下级列表", tags = {"管理后台"}) public R<Page<AppUser>> bottom(Long id,Integer pageNum,Integer pageSize) ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -8,6 +8,7 @@ import com.ruoyi.account.api.model.UserAddress; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.enums.OrderStatus; @@ -19,9 +20,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; @@ -223,17 +226,9 @@ @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){ @@ -241,14 +236,12 @@ } @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){ @@ -256,7 +249,6 @@ } @ResponseBody @GetMapping("/getOrderInfo/{orderId}") @ApiOperation(value = "查询订单详情", tags = {"管理后台-订单管理"}) public R<OrderInfoVo> getOrderInfo(@PathVariable("orderId") Long orderId){ @@ -265,6 +257,10 @@ } @GetMapping("/getOrderPageList") // @ApiOperation(value = "获取订单列表", tags = {"管理后台-订单管理", "门店后台-订单管理"}) public R<PageInfo<OrderPageListVo>> getOrderPageList(OrderPageList orderPageList){ return R.ok(orderService.getOrderPageList(orderPageList)); } } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -4,6 +4,7 @@ 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.common.core.web.page.PageInfo; import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.model.Order; @@ -130,10 +131,8 @@ @ResponseBody @GetMapping("/getOrderRefundPassList") @ApiOperation(value = "获取售后列表数据", tags = {"管理后台-售后管理", "门店后台-售后管理"}) public TableDataInfo<OrderRefundPassList> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo){ startPage(); List<OrderRefundPassList> orderRefundPassList = refundPassService.getOrderRefundPassList(refundPassListVo); return getDataTable(orderRefundPassList); public R<PageInfo<OrderRefundPassList>> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo){ return R.ok(refundPassService.getOrderRefundPassList(refundPassListVo)); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
@@ -1,6 +1,7 @@ package com.ruoyi.order.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.order.vo.OrderPageList; import com.ruoyi.order.vo.OrderPageListVo; import com.ruoyi.order.vo.OrderVO; @@ -29,5 +30,5 @@ * @param orderPageList * @return */ List<OrderPageListVo> getOrderPageList(@Param("item") OrderPageList orderPageList); List<OrderPageListVo> getOrderPageList(PageInfo<OrderPageListVo> pageInfo, @Param("item") OrderPageList orderPageList); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
@@ -1,6 +1,7 @@ package com.ruoyi.order.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.order.model.RefundPass; import com.ruoyi.order.vo.OrderRefundPassList; import org.apache.ibatis.annotations.Param; @@ -26,7 +27,7 @@ * @param status 售后状态 * @return */ List<OrderRefundPassList> getOrderRefundPassList(@Param("code") String code, @Param("appUserIds") List<Long> appUserIds, List<OrderRefundPassList> getOrderRefundPassList(PageInfo<OrderRefundPassList> pageInfo, @Param("code") String code, @Param("appUserIds") List<Long> appUserIds, @Param("shopId") Integer shopId, @Param("refundMethod") Integer refundMethod, @Param("status") Integer status); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.order.model.Order; import com.ruoyi.order.vo.*; import org.springframework.web.bind.annotation.PathVariable; @@ -31,7 +32,7 @@ * @param orderPageList * @return */ List<OrderPageListVo> getOrderPageList(OrderPageList orderPageList); PageInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList); /** ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.order.model.RefundPass; import com.ruoyi.order.vo.ApplyRefundPass; import com.ruoyi.order.vo.OrderRefundPassList; @@ -34,7 +35,7 @@ * 管理后台获取售后管理列表数据 * @return */ List<OrderRefundPassList> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo); PageInfo<OrderRefundPassList> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo); /** ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -12,6 +12,7 @@ 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.core.web.page.PageInfo; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.enums.OrderStatus; import com.ruoyi.order.mapper.OrderGoodMapper; @@ -262,7 +263,7 @@ * @return */ @Override public List<OrderPageListVo> getOrderPageList(OrderPageList orderPageList) { public PageInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList) { Long userid = tokenService.getLoginUser().getUserid(); SysUser sysUser = sysUserClient.getSysUser(userid).getData(); if(2 == sysUser.getRoleType()){ @@ -293,14 +294,16 @@ } } List<OrderPageListVo> list = this.baseMapper.getOrderPageList(orderPageList); PageInfo<OrderPageListVo> pageInfo = new PageInfo(orderPageList.getPageCurr(), orderPageList.getPageSize()); List<OrderPageListVo> list = this.baseMapper.getOrderPageList(pageInfo, orderPageList); for (OrderPageListVo orderPageListVo : list) { Long appUserId = orderPageListVo.getAppUserId(); AppUser appUser = appUserClient.getAppUserById(appUserId); orderPageListVo.setUserName(appUser.getName()); orderPageListVo.setPhone(appUser.getPhone()); } return list; return pageInfo.setRecords(list); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -9,6 +9,7 @@ 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.common.core.web.page.PageInfo; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.mapper.RefundPassMapper; import com.ruoyi.order.model.Order; @@ -107,7 +108,7 @@ * @return */ @Override public List<OrderRefundPassList> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo) { public PageInfo<OrderRefundPassList> getOrderRefundPassList(OrderRefundPassListVo refundPassListVo) { Long userid = tokenService.getLoginUser().getUserid(); SysUser sysUser = sysUserClient.getSysUser(userid).getData(); Integer shopId = null; @@ -127,13 +128,14 @@ List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList()); appUserIds.addAll(collect); } List<OrderRefundPassList> orderRefundPassList = this.baseMapper.getOrderRefundPassList(refundPassListVo.getCode(), appUserIds, shopId, refundPassListVo.getRefundMethod(), refundPassListVo.getStatus()); PageInfo<OrderRefundPassList> pageInfo = new PageInfo(refundPassListVo.getPageCurr(), refundPassListVo.getPageSize()); List<OrderRefundPassList> orderRefundPassList = this.baseMapper.getOrderRefundPassList(pageInfo, refundPassListVo.getCode(), appUserIds, shopId, refundPassListVo.getRefundMethod(), refundPassListVo.getStatus()); for (OrderRefundPassList refundPassList : orderRefundPassList) { AppUser appUser = appUserClient.getAppUserById(refundPassList.getAppUserId()); refundPassList.setUserName(appUser.getName()); refundPassList.setPhone(appUser.getPhone()); } return orderRefundPassList; return pageInfo.setRecords(orderRefundPassList); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java
@@ -101,6 +101,6 @@ @Override public IPage<GoodsBargainPrice> queryGoodsBargainPricePage(Page<GoodsBargainPrice> page, GoodsBargainPrice goodsBargainPrice) { return null; return this.baseMapper.queryGoodsBargainPricePage(page,goodsBargainPrice); } } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java
@@ -10,6 +10,7 @@ import com.ruoyi.other.service.ShopService; import com.ruoyi.other.vo.ShopCommissionStatisticsVO; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.List; ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/ShopCommissionStatisticsVO.java
@@ -16,25 +16,25 @@ * 总金额 */ @ApiModelProperty(value = "总金额") private BigDecimal totalAmount; private BigDecimal totalAmount = BigDecimal.ZERO; /** * 分佣总金额 */ @ApiModelProperty(value = "分佣总金额") private BigDecimal totalCommission; private BigDecimal totalCommission = BigDecimal.ZERO; /** * 服务费总计 */ @ApiModelProperty(value = "服务费总计") private BigDecimal totalServiceCharge; private BigDecimal totalServiceCharge = BigDecimal.ZERO; /** * 下级门店分佣总金额 */ @ApiModelProperty(value = "下级门店分佣总金额") private BigDecimal totalSubordinateCommission; private BigDecimal totalSubordinateCommission = BigDecimal.ZERO; private IPage<ShopBalanceStatement> statementIPage; } ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopBalanceStatementMapper.xml
@@ -29,6 +29,8 @@ FROM t_shop_balance_statement ) AS subquery WHERE rn = 1 </select> <select id="queryShopBalanceStatementPage" resultType="com.ruoyi.other.api.domain.ShopBalanceStatement"> SELECT