刘帅
2026-09-29 dcb96821f905f3fd93c059d8703517bdcac4d336
排序问题及门店手机号展示问题
9个文件已修改
107 ■■■■■ 已修改文件
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/UserIntegralChangesServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageOrderServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TVipController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/TStoreListVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/resources/mapper/TStoreMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -1279,6 +1279,12 @@
            }
        }
        if (request.getRank() == null && goods.size() > 0) {
            goods = goods.stream()
                    .sorted(Comparator.comparing(Goods::getGoodId, Comparator.reverseOrder()))
                    .collect(Collectors.toList());
        }
        //当前第几页
        int pageNo = request.getPageNum();
        //一页五条
cloud-server-account/src/main/java/com/dsh/account/service/impl/UserIntegralChangesServiceImpl.java
@@ -63,7 +63,7 @@
        List<UserIntegralChanges> userIntegralChanges = this.baseMapper.selectList(new QueryWrapper<UserIntegralChanges>()
                .eq("appUserId", userIdFormRedis).le("type", 5)
                .between("insertTime", monthStart, monthEnd)
                .orderByDesc("insertTime"));
                .orderByDesc("insertTime", "id"));
        if (userIntegralChanges.size() > 0) {
            for (UserIntegralChanges userIntegralChange : userIntegralChanges) {
                IntegralsData detail = new IntegralsData();
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -378,7 +378,8 @@
                    .eq("state", 1)
                    .eq("status", 1)
                    .le("startTime", currentDate)
                    .ge("endTime", currentDate));
                    .ge("endTime", currentDate)
                    .orderByDesc("insertTime", "id"));
            if (couponList.size() > 0) {
                Iterator<Coupon> iterator = couponList.iterator();
                while (iterator.hasNext()) {
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -446,6 +446,7 @@
                .le("startTime", new Date())
                .ge("endTime", new Date())
                .eq("status", 1)
                .orderByDesc("insertTime", "id")
        );
        if (request.getShopId()!=null){
            List<Integer> storeId = new ArrayList<>();
@@ -464,7 +465,9 @@
                List<PointsMerchandise> pointsMerchandiseList = pmdsService.lambdaQuery()
                        .eq(PointsMerchandise::getState, 1)
                        .eq(PointsMerchandise::getShelves,1)
                        .in(PointsMerchandise::getId, pointsMerchandiseIds).list();
                        .in(PointsMerchandise::getId, pointsMerchandiseIds)
                        .orderByDesc(PointsMerchandise::getInsertTime, PointsMerchandise::getId)
                        .list();
                list = pointsMerchandiseList;
            }
@@ -894,7 +897,8 @@
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
        List<UserPointsMerchandise> pointsMerchandises = upmseService.list(new QueryWrapper<UserPointsMerchandise>()
                .eq("userId", appUserId).eq("payStatus", 2));
                .eq("userId", appUserId).eq("payStatus", 2)
                .orderByDesc("insertTime", "id"));
        List<PointsMerchandiseStore> pointsMerchandiseStoreList = pointsMerchandiseStoreService.list();
        Map<Integer, List<PointsMerchandiseStore>> pointsMerchandiseStoreMap = pointsMerchandiseStoreList.stream().collect(Collectors.groupingBy(PointsMerchandiseStore::getPointsMerchandiseId));
@@ -908,7 +912,8 @@
        List<UserCoupon> userCoupons = new ArrayList<>();
        if (ids.size() > 0) {
            userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId", ids)
                    .ne("status", 3));
                    .ne("status", 3)
                    .orderByDesc("insertTime", "id"));
        }
        if (pointsMerchandises.size() > 0) {
            for (UserPointsMerchandise pointsMerchandise : pointsMerchandises) {
@@ -1142,7 +1147,10 @@
        // 2.0新增会员权益赠送门票
        List<VipDetail> list = vipDetailService.lambdaQuery()
                .eq(VipDetail::getAppUserId, appUserId).eq(VipDetail::getType, 2).list();
                .eq(VipDetail::getAppUserId, appUserId)
                .eq(VipDetail::getType, 2)
                .orderByDesc(VipDetail::getInsertTime, VipDetail::getId)
                .list();
        for (VipDetail vipDetail : list) {
            ExchangeDetailsResponse detailsResponse = new ExchangeDetailsResponse();
            // 添加-用于区分会员权益门票
@@ -1197,11 +1205,11 @@
                }
                responses.add(detailsResponse);
            }
            Comparator<ExchangeDetailsResponse> comparator = Comparator.comparing(ExchangeDetailsResponse::getStartTime).reversed();
            Collections.sort(responses, comparator);
            detailsVo.setDetailsResponses(responses);
        }
        responses.sort(Comparator.comparing(ExchangeDetailsResponse::getStartTime,
                Comparator.nullsLast(Comparator.reverseOrder()))
                .thenComparing(ExchangeDetailsResponse::getDetailsId, Comparator.reverseOrder()));
        detailsVo.setDetailsResponses(responses);
        return detailsVo;
    }
cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageOrderServiceImpl.java
@@ -59,7 +59,10 @@
    @Override
    public List<RegisterCourseVo> queryRegisteredCourseList(CourseOfAfterRequest courseTypeId, Integer appUserId) {
        List<RegisterCourseVo> courseVos = new ArrayList<>();
        List<CoursePackageOrder> list = this.list(new QueryWrapper<CoursePackageOrder>().eq("appUserId", appUserId).eq("state", 1));
        List<CoursePackageOrder> list = this.list(new QueryWrapper<CoursePackageOrder>()
                .eq("appUserId", appUserId)
                .eq("state", 1)
                .orderByDesc("insertTime", "id"));
        for (CoursePackageOrder order : list) {
            TCoursePackage coursePackage = coursePackageService.getById(order.getCoursePackageId());
            Store store = storeClient.queryStoreById(coursePackage.getStoreId());
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TVipController.java
@@ -61,13 +61,7 @@
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Vip vip = vipService.getById(id);
        if (vip == null) {
            throw new IllegalArgumentException("会员卡不存在: " + id);
        }
        model.addAttribute("vip",vip);
        // 编辑页的两个权益列表都会被模板遍历,即使会员卡尚未配置权益也必须提供空集合。
        model.addAttribute("couponList", new ArrayList<Coupon>());
        model.addAttribute("ticketList", new ArrayList<TicketDetailVO>());
        if (vip.getCouponJson() != null && !vip.getCouponJson().isEmpty()){
            String couponJson = vip.getCouponJson();
            // 转化为jsonArray
@@ -134,6 +128,10 @@
                model.addAttribute("couponList", new ArrayList<Coupon>());
            }
        }
            else{
                model.addAttribute("ticketList", new ArrayList<Coupon>());
            }
        if (vip.getTicketJson() != null && !vip.getTicketJson().isEmpty()){
            String ticketJson = vip.getTicketJson();
@@ -173,12 +171,7 @@
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Vip vip = vipService.getById(id);
        if (vip == null) {
            throw new IllegalArgumentException("会员卡不存在: " + id);
        }
        model.addAttribute("vip",vip);
        model.addAttribute("couponList", new ArrayList<Coupon>());
        model.addAttribute("ticketList", new ArrayList<TicketDetailVO>());
        if (vip.getCouponJson() != null && !vip.getCouponJson().isEmpty()){
            String couponJson = vip.getCouponJson();
            // 转化为jsonArray
cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/TStoreListVo.java
@@ -47,7 +47,23 @@
     * 列表对外的 phone 统一返回可用的店长手机号。
     */
    public String getPhone() {
        return (phone == null || phone.trim().isEmpty()) ? userPhone : phone;
        return hasText(phone) ? phone : defaultString(userPhone);
    }
    /**
     * 兼容历史门店:当店长资料中未维护 phone 时,列表仍返回可用的门店手机号。
     * 返回空字符串而非 null,避免不同环境的 JSON 忽略 null 配置导致字段消失。
     */
    public String getUserPhone() {
        return hasText(userPhone) ? userPhone : defaultString(phone);
    }
    private boolean hasText(String value) {
        return value != null && !value.trim().isEmpty();
    }
    private String defaultString(String value) {
        return value == null ? "" : value;
    }
    private String account;
cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -37,8 +37,8 @@
    <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
        select t1.*,
               t2.name as userName,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
               t3.name as yysName
        from t_store t1
        left join sys_user t2 on t1.storeStaffId = t2.id
@@ -54,7 +54,7 @@
            and t2.name like concat("%",#{name},"%")
        </if>
        <if test="phone !=null and phone !=''">
            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
        </if>
        <if test="shopName !=null and shopName !=''">
            and t1.name like concat("%",#{shopName},"%")
@@ -183,8 +183,8 @@
    <select id="listAllStore" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
        select t1.*,
               t2.name as userName,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
               t3.name as yysName
        from t_store t1
        left join sys_user t2 on t1.storeStaffId = t2.id
@@ -200,7 +200,7 @@
            and t2.name like concat("%",#{name},"%")
        </if>
        <if test="phone !=null and phone !=''">
            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
        </if>
        <if test="shopName !=null and shopName !=''">
            and t1.name like concat("%",#{shopName},"%")
@@ -210,8 +210,8 @@
    <select id="listAllStoresByIds" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
        select t1.*,
               t2.name as userName,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
               t3.name as yysName
        from t_store t1
        left join sys_user t2 on t1.storeStaffId = t2.id
@@ -230,7 +230,7 @@
            and t2.name like concat("%",#{name},"%")
        </if>
        <if test="phone !=null and phone !=''">
            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
        </if>
        <if test="shopName !=null and shopName !=''">
            and t1.name like concat("%",#{shopName},"%")
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -13,7 +13,6 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.other.entity.*;
import com.dsh.other.enums.SiteBookingStatusEnum;
import com.dsh.other.feignclient.StoreClient;
import com.dsh.other.feignclient.account.AppUserClient;
import com.dsh.other.feignclient.account.model.AppUser;
@@ -1187,10 +1186,7 @@
                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
                String code = sdf.format(new Date()) + UUIDUtil.getNumberRandom(5);// 退款单号
                // 运营商退款
                ResultUtil refundResult = payMoneyUtil.weixinRefundV3(smidVx, code, siteBooking.getPayOrderNo(), siteBooking.getPayMoney().toString(), "/base/site/cancelMySiteCallback1");
                if (!ResultUtil.SUCCESS.equals(refundResult.getCode())) {
                    return refundResult;
                }
                payMoneyUtil.weixinRefundV3(smidVx, code, siteBooking.getPayOrderNo(), siteBooking.getPayMoney().toString(), "/base/site/cancelMySiteCallback1");
            } else {
                Map<String, String> map = payMoneyUtil.wxRefund(siteBooking.getPayOrderNo(), siteBooking.getOrderNo(), siteBooking.getPayMoney().toString(),
                        siteBooking.getPayMoney().toString(), "/base/site/cancelMySiteCallback");
@@ -1201,19 +1197,15 @@
                if (!"SUCCESS".equals(return_code)) {
                    return ResultUtil.error(map.get("return_msg"));
                }
                siteBooking.setCancelUserId(uid);
                siteBookingService.updateById(siteBooking);
                TBackRecord tBackRecord = new TBackRecord();
                tBackRecord.setMoney(siteBooking.getPayMoney());
                tBackRecord.setUserId(siteBooking.getAppUserId());
                tBackRecord.setTime(new Date());
                backRecordService.save(tBackRecord);
            }
            // 退款请求已受理即结束该预约,不能继续在“待核销”列表中展示。
            // 微信退款回调用于补充退款流水号及恢复优惠券,重复更新状态不会影响结果。
            siteBooking.setStatus(SiteBookingStatusEnum.CANCELED.getCode());
            siteBooking.setCancelUserId(uid);
            siteBooking.setCancelTime(new Date());
            siteBookingService.updateById(siteBooking);
        }