Pu Zhibing
2025-01-15 68e7d31bc6d6c4a84ffb4b423c1ccd211f16f949
Merge remote-tracking branch 'origin/master'
18个文件已修改
129 ■■■■■ 已修改文件
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -23,6 +23,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.common.redis.annotation.DistributedLock;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.feignClient.OrderClient;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -22,6 +22,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.common.redis.annotation.DistributedLock;
import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.*;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -131,9 +131,9 @@
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"),
    })
    @GetMapping("/writeOff/{id}/{shopId}")
    public R<Void> writeOff(@PathVariable("id") String id, @PathVariable("shopId") Integer shopId, Integer technicianId){
        orderService.writeOff(id, shopId, technicianId);
    @GetMapping("/writeOff")
    public R<Void> writeOff(String code, Integer shopId, String technicianId){
        orderService.writeOff(code, shopId, technicianId);
        return R.ok();
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -83,6 +83,9 @@
        }
        RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderId)
                .eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
        if(null == one){
            return R.fail("无效的售后数据");
        }
        one.setIdStr(one.getId().toString());
        one.setAddressJson(order.getAddressJson());
        return R.ok(one);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -26,7 +26,7 @@
    boolean check(Order order, Integer shopId, Long userId);
    void writeOff(String id,Integer shopId, Integer technicianId);
    void writeOff(String id,Integer shopId, String technicianId);
    
    
    /**
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -251,7 +251,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void writeOff(String id,Integer shopId, Integer technicianId) {
    public void writeOff(String id, Integer shopId, String technicianId) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        Order order = orderMapper.selectById(id);
        boolean check = check(order, shopId, loginUserApplet.getUserid());
@@ -276,7 +276,9 @@
        order.setAfterSaleTime(LocalDateTime.now().plusDays(days));
        order.setEndTime(LocalDateTime.now());
        order.setCancellerAppUserId(loginUserApplet.getUserid());
        order.setTechnicianId(technicianId);
        if(StringUtils.isNotEmpty(technicianId) && !"null".equals(technicianId)){
            order.setTechnicianId(Integer.valueOf(technicianId));
        }
        orderMapper.updateById(order);
    }
    
@@ -596,6 +598,7 @@
            userPoint.setAppUserId(order.getAppUserId());
            userPoint.setObjectId(order.getId());
            userPointClient.saveUserPoint(userPoint);
            appUserClient.editAppUserById(appUser);
        }
        order.setRefundStatus(2);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -110,6 +110,7 @@
        refundPass.setPhone(jsonObject.getString("phone"));
        refundPass.setAddress(jsonObject.getString("address"));
        this.save(refundPass);
        order.setOldOrderStatus(order.getOrderStatus());
        order.setOrderStatus(7);
        orderService.updateById(order);
        return R.ok();
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
@@ -70,9 +70,13 @@
    @Resource
    private SysUserClient sysUserClient;
    @GetMapping("/getShopById")
    @ApiOperation("通过门店id获取账户信息回填")
    public R<Shop> getShopById(Integer id) {
        return R.ok(shopService.getById(id));
    }
    /**
     * 提现申请列表
@@ -90,7 +94,8 @@
            return R.ok(Page.of(pageNum, pageSize));
        }
        Page<ShopWithdraw> page = shopWithdrawService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<ShopWithdraw>()
                .in(collect1.size() > 0, ShopWithdraw::getShopId, collect1));
                .in(collect1.size() > 0, ShopWithdraw::getShopId, collect1)
        .orderByDesc(ShopWithdraw::getCreateTime));
        List<ShopWithdraw> records = page.getRecords();
        List<Integer> collect = records.stream().map(ShopWithdraw::getShopId).collect(Collectors.toList());
        List<Shop> shops = null;
@@ -137,6 +142,7 @@
        }else {
            byId.setWithdrawAuditMoney(BigDecimal.ZERO);
        }
        byId.setWithdrawMoney(byId.getWithdrawMoney().subtract(byId.getWithdrawAuditMoney()));
        return R.ok(byId);
    }
    
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
@@ -61,9 +61,10 @@
     */
    @GetMapping("/technicianListByShopId")
    @ApiOperation(value = "技师列表", tags = {"技师列表-小程序"})
    public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId,@ApiParam("技师姓名") String name) {
    public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId,@ApiParam("技师姓名") String name,@ApiParam("评分") Integer point) {
        //@ApiParam("评分") Integer point 1倒序 2正序
        startPage();
        List<TechnicianVO> technicianListByShopId = technicianService.getTechnicianListByShopId(shopId, name);
        List<TechnicianVO> technicianListByShopId = technicianService.getTechnicianListByShopId(shopId, name,point);
        TableDataInfo<TechnicianVO> dataTable = getDataTable(technicianListByShopId);
        return R.ok(dataTable);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -52,11 +52,11 @@
    @ApiOperation(value = "预约列表", tags = {"门店-预约列表"})
    public R<PageInfo<TechnicianSubscribeVO>> shoplist(@ApiParam(value = "状态") Integer status,
                                @ApiParam("电话")String phone,
                                @ApiParam("姓名")String name,
                                @ApiParam("姓名")String userName,
                                @ApiParam("服务方式:1=上门服务,2=到店服务")Integer serviceMode, Integer pageCurr, Integer pageSize) {
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = sysUserClient.getSysUser(userid).getData();
        PageInfo<TechnicianSubscribeVO> pageInfo = technicianSubscribeService.getTechnicianSubscribeByUserAndShop1(Long.valueOf(sysUser.getObjectId()), status, phone, name, serviceMode, pageCurr, pageSize);
        PageInfo<TechnicianSubscribeVO> pageInfo = technicianSubscribeService.getTechnicianSubscribeByUserAndShop1(Long.valueOf(sysUser.getObjectId()), status, phone, userName, serviceMode, pageCurr, pageSize);
        return R.ok(pageInfo);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
@@ -18,7 +18,7 @@
 */
public interface TechnicianMapper extends BaseMapper<Technician> {
    List<TechnicianVO> selectTechnicianListByShopId(@Param("shopId") Long shopId,@Param("name") String name);
    List<TechnicianVO> selectTechnicianListByShopId(@Param("shopId") Long shopId,@Param("name") String name,@Param("point")Integer point);
    TechnicianDetailVO selectTechnicianDetail(Long technicianId);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
@@ -4,6 +4,7 @@
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.vo.TechnicianDetailVO;
import com.ruoyi.other.vo.TechnicianVO;
import io.swagger.models.auth.In;
import java.util.List;
@@ -16,7 +17,7 @@
 * @since 2024-11-20
 */
public interface TechnicianService extends IService<Technician> {
    List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name);
    List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name, Integer point);
    TechnicianDetailVO technicianDetail(Long technicianId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -165,21 +165,33 @@
                });
            }
        }
        //手动处理分页
        // 手动处理分页
        PageInfo<GoodsVO> pageInfo = new PageInfo<>();
        pageInfo.setSize(search.getPageSize());
        pageInfo.setTotal(list.size());
        Integer pageSize = search.getPageSize();
        Integer pageNum = (search.getPageCurr() - 1) * pageSize;
        if(list.size() >= (pageNum + 1) * pageSize){
            list = list.subList(pageNum, pageNum + pageSize);
        }else if(pageNum < list.size() && list.size() < (pageNum + 1) * pageSize){
            list = list.subList(pageNum, list.size());
        }else{
            list = new ArrayList<>();
        int pageSize = search.getPageSize();
        int pageCurr = search.getPageCurr();
        // 计算起始索引
        int pageNum = (pageCurr - 1) * pageSize;
        // 检查 pageNum 是否合法
        if (pageNum < 0 || pageNum >= list.size()) {
            // 如果 pageNum 不合法,返回空列表
            pageInfo.setRecords(new ArrayList<>());
            return pageInfo;
        }
        return pageInfo.setRecords(list);
        // 计算结束索引
        int endIndex = Math.min(pageNum + pageSize, list.size());
        // 获取分页数据
        List<GoodsVO> pageList = list.subList(pageNum, endIndex);
        // 设置分页结果
        pageInfo.setRecords(pageList);
        return pageInfo;
    }
    @Override
@@ -394,9 +406,10 @@
                    area.setProvinceCode(goodsArea.getProvinceCode());
                    area.setCityCode(goodsArea.getCityCode());
                    area.setDistrictsCode(goodsArea.getDistrictsCode());
                    if(null != area.getSellingPrice() || null != area.getIntegral()){
                        goodsAreaList2.add(area);
                    }
//                    if(null != area.getSellingPrice() || null != area.getIntegral()){
//                        goodsAreaList2.add(area);
//                    }
                    goodsAreaList2.add(area);
                }
                goodsAreaService.saveBatch(goodsAreaList2);
            }
@@ -572,15 +585,15 @@
            if(null == bargainPriceDetail){
                //没有门店特价,判断地区价格配置
                LambdaQueryWrapper<GoodsArea> queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip);
                if(StringUtils.isNotEmpty(districtCode)){
                    queryWrapper.eq(GoodsArea::getDistrictsCode, districtCode);
                }
                if(StringUtils.isNotEmpty(cityCode)){
                    queryWrapper.eq(GoodsArea::getCityCode, cityCode);
                }
                if(StringUtils.isNotEmpty(provinceCode)){
                    queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode);
                }
                if(StringUtils.isNotEmpty(cityCode)){
                    queryWrapper.and(i -> i.eq(GoodsArea::getCityCode, cityCode).or().isNull(GoodsArea::getCityCode));
                }
                if(StringUtils.isNotEmpty(districtCode)){
                    queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode));
                }
                GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper);
                if(null == goodsArea){
                    //没有地区价格,则使用会员价格
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
@@ -50,18 +50,13 @@
    public ShopPointStatistics statistics(IPage<ShopPoint> page, ShopPoint shopPoint) {
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = sysUserClient.getSysUser(userid).getData();
        List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>()
                .eq(Shop::getAppUserId,sysUser.getObjectId()));
        Integer sPoint = 0;
        Integer shopCommissionPoint = 0;
        Integer subShopCommissionPoint = 0;
        for (Shop shop : shopList) {
            sPoint += shop.getServerPoint();
            shopCommissionPoint += shop.getSharePoint();
            subShopCommissionPoint += shop.getLowerLevelSharePoint();
        }
        Shop shop = shopService.getById(sysUser.getObjectId());
        sPoint += shop.getServerPoint();
        shopCommissionPoint += shop.getSharePoint();
        subShopCommissionPoint += shop.getLowerLevelSharePoint();
        ShopPointStatistics shopPointStatistics = new ShopPointStatistics();
        shopPointStatistics.setTotalPoint(sPoint + shopCommissionPoint + subShopCommissionPoint);
        shopPointStatistics.setShopPoint(sPoint);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
@@ -39,8 +39,8 @@
    private TechnicianScoreService technicianScoreService;
    @Override
    public List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name) {
        return technicianMapper.selectTechnicianListByShopId(shopId,name);
    public List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name,Integer point) {
        return technicianMapper.selectTechnicianListByShopId(shopId,name,point);
    }
    @Override
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityVO.java
@@ -68,4 +68,9 @@
    @ApiModelProperty(value = "展示状态:0下架中  1上架中")
    private Integer showStatus;
    public Integer getType(){
        return goodsType;
    }
}
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
@@ -13,6 +13,7 @@
            tgs.selling_price as sellingPrice,
            tgs.integral as integral,
            tg.sale_num as saleNum,
            tg.type goodsType,
            tsai.start_time as startTime,
            tsai.end_time as endTime
        FROM
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
@@ -25,6 +25,12 @@
            tt.`name`,
            tt.introduction,
            tt.home_picture
        <if test="point != null and point == 1">
        order by ttsc.score DESC
        </if>
        <if test="point != null and point == 2">
        order by ttsc.score
        </if>
    </select>
    <select id="selectTechnicianDetail" resultType="com.ruoyi.other.vo.TechnicianDetailVO">
        SELECT