puzhibing
2024-12-26 9006b9705a222cce51daf973fa1bb989cbd2a873
合并代码
18个文件已修改
94 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -80,5 +80,5 @@
    @PostMapping("/app-user/getAppUserByPhone1")
    R<AppUser> getAppUserByPhone1(String phone);
    R<AppUser> getAppUserByPhone1(@RequestParam("phone") String phone);
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
@@ -90,5 +90,8 @@
    @TableField(exist = false)
    private VipSettingDto vipSettingDto;
    @TableField(exist = false)
    private String idStr;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
@@ -76,7 +76,7 @@
    
    @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)")
    @TableField("superior_type")
    private String superiorType;
    private Integer superiorType;
    @ApiModelProperty(value = "获取分佣金额上级类型(1=直推上级,2=直帮上级)")
    @TableField("superior_price_type")
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
@@ -56,7 +56,7 @@
    /**
     * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
     */
    private String superiorType;
    private Integer superiorType;
    /**
     * 核销门店可获得服务费
     */
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
@@ -41,7 +41,7 @@
    /**
     * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
     */
    private String superiorType;
    private Integer superiorType;
    /**
     * 核销门店可获得服务费
     */
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java
@@ -70,7 +70,7 @@
    @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)")
    @TableField("superior_type")
    private String  superiorType;
    private String superiorType;
    @ApiModelProperty(value = "获取分佣金额上级类型(1=直推上级,2=直帮上级)")
    @TableField("superior_price_type")
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
@@ -56,12 +56,12 @@
    @GetMapping("/detail")
    @ApiOperation(value = "会员申请详情", tags = {"会员中心-小程序"})
    public R<AgentApplication> detail(@RequestParam Long id) {
        R<VipSetting> vipSetting = vipSettingClient.getVipSetting(id.intValue());
        AgentApplication agentApplication = agentApplicationService.getById(id);
        R<VipSetting> vipSetting = vipSettingClient.getVipSetting(agentApplication.getApplicationVipId());
        VipSettingDto vipSettingDto = new VipSettingDto();
        BeanUtils.copyProperties(vipSetting.getData(),vipSettingDto);
        AgentApplication byId = agentApplicationService.getById(id);
        byId.setVipSettingDto(vipSettingDto);
        return R.ok(byId);
        agentApplication.setVipSettingDto(vipSettingDto);
        return R.ok(agentApplication);
    }
    @Resource
    private UserChangeLogService userChangeLogService;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -389,10 +389,10 @@
     */
    @GetMapping("/getAppuserPage")
    @ApiOperation(value = "用户列表", tags = {"管理后台"})
    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageCurr,
    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum,
                                            @ApiParam("每一页数据大小") Integer pageSize,
                                            AppUser appUser) {
        IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageCurr, pageSize, appUser);
        IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser);
        return R.ok(appuserPage);
    }
@@ -714,14 +714,14 @@
     * @return
     */
    @PostMapping("/upload")
    public R<String> upload(MultipartFile file){
    public String upload(MultipartFile file){
        String s = null;
        try {
            s = ObsUploadUtil.obsUpload(file);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return R.ok(s);
        return s;
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
@@ -6,10 +6,12 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.model.AgentApplication;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.AppUserShop;
import com.ruoyi.account.dto.AgentQuery;
import com.ruoyi.account.mapper.AgentApplicationMapper;
import com.ruoyi.account.service.AgentApplicationService;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.AppUserShopService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.Shop;
@@ -42,6 +44,11 @@
    @Resource
    private ShopClient shopClient;
    @Resource
    private AppUserShopService appUserShopService;
    @Override
    public void apply(AgentApplication agentApplication) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
@@ -66,9 +73,8 @@
        agentApplication.setDirectAgentNum(directAgentUserList.size());
        // 已绑定门店数量
        R<List<Shop>> R = shopClient.getShopByUserIds(Collections.singletonList(loginUserApplet.getUserid()));
        List<Shop> shopList = R.getData();
        agentApplication.setBindShopNum(shopList.size());
        long count = appUserShopService.count(new LambdaQueryWrapper<AppUserShop>().eq(AppUserShop::getAppUserId, loginUserApplet.getUserid()));
        agentApplication.setBindShopNum(Long.valueOf(count).intValue());
        agentApplicationMapper.insert(agentApplication);
    }
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
@@ -58,7 +58,7 @@
        VipSetting vipSetting = vipSettingService.getVipSettingById(4);
        // 获取通过消费积分达成会员等级的开关
        Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
        if (vipLevelUpShopRole == 1){
        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
            // 消费积分阈值
            Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
            // 返佣积分阈值
@@ -70,7 +70,7 @@
        }
        Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
        if (vipLevelUpNumRole == 1){
        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
            // 直推钻石用户数阈值
            Integer vipDirectNum = vipSetting.getVipDirectNum();
            // 获取用户直推钻石用户数量
@@ -115,7 +115,7 @@
        VipSetting vipSetting = vipSettingService.getVipSettingById(5);
        // 获取通过消费积分达成会员等级的开关
        Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
        if (vipLevelUpShopRole == 1){
        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
            // 消费积分阈值
            Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
            // 返佣积分阈值
@@ -127,7 +127,7 @@
        }
        Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
        if (vipLevelUpNumRole == 1){
        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
            // 直推钻石用户数阈值
            Integer vipDirectNum = vipSetting.getVipDirectNum();
            // 获取用户直推钻石用户数量
@@ -178,7 +178,7 @@
        Integer sharePoint = appUser.getSharePoint();
        // 获取通过消费积分达成会员等级的开关
        Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
        if (vipLevelUpShopRole == 1){
        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
            // 消费积分阈值
            Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
            // 返佣积分阈值
@@ -190,7 +190,7 @@
        }
        Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
        if (vipLevelUpNumRole == 1){
        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
            // 直推代理用户数阈值
            Integer vipDirectNum = vipSetting.getVipDirectNum();
            // 准代理用户数阈值
@@ -244,7 +244,7 @@
        VipSetting vipSetting = vipSettingService.getVipSettingById(7);
        // 获取通过消费积分达成会员等级的开关
        Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
        if (vipLevelUpShopRole == 1){
        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
            // 消费积分阈值
            Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
            // 返佣积分阈值
@@ -255,7 +255,7 @@
            }
            Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
            if (vipLevelUpNumRole == 1){
            if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
                // 直推代理用户数阈值
                Integer vipDirectNum = vipSetting.getVipDirectNum();
                // 准代理用户数阈值
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml
@@ -24,7 +24,11 @@
        id, app_user_id, application_vip_id, application_time, status, shop_point, share_point, direct_vip_num, direct_agent_num, bind_shop_num, remark, del_flag, create_time
    </sql>
    <select id="pageList" resultType="com.ruoyi.account.api.model.AgentApplication">
        select t1.*,t2.name as userName,t2.phone as userPhone
        select
        t1.*,
        t1.id as idStr,
        t2.name as userName,
        t2.phone as userPhone
        from t_agent_application t1
        left join t_app_user t2 on t1.app_user_id = t2.id
        <where>
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -230,7 +230,7 @@
    }
    @PostMapping("/byShopId")
    public R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId){
        return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).groupBy(Order::getAppUserId).list());
        return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).list());
    }
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -98,13 +98,13 @@
    
    
    @ResponseBody
    @PutMapping("/deliverGoodsRefundPass/{id}/{code}")
    @PostMapping("/deliverGoodsRefundPass")
    @ApiOperation(value = "售后已发货操作", tags = {"我的订单-个人中心-小程序"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"),
            @ApiImplicitParam(name = "code", value = "快递单号", required = true, dataType = "string"),
    })
    public R deliverGoodsRefundPass(@PathVariable("id") Long id, @PathVariable("code") String code){
    public R deliverGoodsRefundPass(@RequestParam("id") String id, @RequestParam("code") String code){
        RefundPass refundPass = refundPassService.getById(id);
        if(null == refundPass){
            return R.fail();
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
@@ -95,8 +95,8 @@
            for (OrderGood og : v) {// 累计分销金额
                // 直推上级分佣金额
                String superiorType = og.getSuperiorType();
                if (superiorType.contains("1") && inviteUser != null){
                Integer superiorType = og.getSuperiorType();
                if (superiorType == 1 && inviteUser != null){
                    // 分佣金额
                    BigDecimal superiorSubcommission = og.getSuperiorSubcommission();
                    BigDecimal totalDistributionAmount = inviteUser.getTotalDistributionAmount();
@@ -112,7 +112,7 @@
                    appUserClient.editAppUserById(inviteUser);
                }else
                    // 直帮上级分佣金额
                    if (superiorType.contains("2") && superiorLeader != null){
                    if (superiorType == 2 && superiorLeader != null){
                        // 分佣金额
                        BigDecimal superiorSubcommission = og.getSuperiorSubcommission();
                        BigDecimal totalDistributionAmount = superiorLeader.getTotalDistributionAmount();
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -258,7 +258,7 @@
            price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints());
            price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission());
            price.setSuperiorRebatePoints(goodsSeckill.getSuperiorRebatePoints());
            price.setSuperiorType(String.valueOf(goodsSeckill.getSuperiorType()));
            price.setSuperiorType(goodsSeckill.getSuperiorType());
            price.setServuceShopCharges(goodsSeckill.getServuceShopCharges());
            price.setServuceShopPoints(goodsSeckill.getServuceShopPoints());
            price.setTechnicianPoints(goodsSeckill.getTechnicianPoints());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -148,13 +148,13 @@
    @ApiOperation(value = "广告管理-分享管理-列表", tags = {"管理后台"})
    @GetMapping("/manage/list")
    public R<Page<Share>> managelist(String name, Integer addType, @RequestParam Integer pageNum, Integer pageSize) {
    public R<Page<Share>> managelist(String name, Integer addType, @RequestParam Integer pageCurr, Integer pageSize) {
        //判断当前登陆人是平台还是门店
        if (tokenService.getLoginUser().getSysUser().getRoleType()==1) {
            Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize));
            Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageCurr, pageSize));
            return R.ok(page);
        }else {
            Page<Share> page = shareService.lambdaQuery().eq(Share::getAddType,3).eq(Share::getObjectId, tokenService.getLoginUser().getSysUser().getObjectId()).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize));
            Page<Share> page = shareService.lambdaQuery().eq(Share::getAddType,3).eq(Share::getObjectId, tokenService.getLoginUser().getSysUser().getObjectId()).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageCurr, pageSize));
            return R.ok(page);
        }
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -71,6 +71,7 @@
        if (!shopService.cheUserByPhone(phone)) {
            return R.fail("该手机号未注册");
        }
        AppUser appUser = appUserClient.getAppUserByPhone1(phone).getData();
        shop.setShopAllPoint(0);
        shop.setShopPoint(0);
        shop.setSharePoint(0);
@@ -85,18 +86,15 @@
        shop.setOrderNumber(0);
        shop.setServerOrderNumber(0);
        shop.setCustomOrderNumber(0);
        shop.setAppUserId(appUser.getId());
        shopService.save(shop);
        LoginUser loginUserApplet = tokenService.getLoginUser();
        AppUserShop appUserShop = new AppUserShop();
        appUserShop.setAppUserId(loginUserApplet.getUserid());
        appUserShop.setAppUserId(appUser.getId());
        appUserShop.setShopId(shop.getId());
        R<Void> r = appUserClient.addAppUserShop(appUserShop);
        if (R.isError(r)){
            throw new RuntimeException("添加失败");
        }
        AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid());
        if (appUser == null){
            throw new RuntimeException("添加失败");
        }
        appUser.setUserType(2);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -221,6 +221,7 @@
            for (GoodsArea goodsArea : goodsAreaList) {
                List<GoodsArea> goodsAreaList1 = goodsArea.getGoodsAreaList();
                for (GoodsArea area : goodsAreaList1) {
                    area.setId(null);
                    area.setGoodsId(id);
                    area.setProvince(goodsArea.getProvince());
                    area.setCity(goodsArea.getCity());