Commit 6b7f07198826c79b19d343c080e0c50ed72e1521
1 parent
26628913
Review代码修改
Showing
8 changed files
with
83 additions
and
55 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/AppCouponController.java
| 1 | 1 | package cn.iocoder.yudao.module.promotion.controller.app.coupon; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | -import cn.hutool.core.map.MapUtil; | |
| 5 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 6 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; |
| ... | ... | @@ -50,9 +49,7 @@ public class AppCouponController { |
| 50 | 49 | CouponTemplateDO couponTemplate = couponTemplateService.getCouponTemplate(reqVO.getTemplateId()); |
| 51 | 50 | boolean canTakeAgain = true; |
| 52 | 51 | if (couponTemplate.getTakeLimitCount() != null && couponTemplate.getTakeLimitCount() > 0) { |
| 53 | - // TODO @疯狂:要不要搞个 getTakeCount 方法? | |
| 54 | - Integer takeCount = MapUtil.getInt(couponService.getTakeCountMapByTemplateIds( | |
| 55 | - Collections.singleton(reqVO.getTemplateId()), userId), reqVO.getTemplateId(), 0); | |
| 52 | + Integer takeCount = couponService.getTakeCount(reqVO.getTemplateId(), userId); | |
| 56 | 53 | canTakeAgain = takeCount < couponTemplate.getTakeLimitCount(); |
| 57 | 54 | } |
| 58 | 55 | return success(canTakeAgain); | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponService.java
| ... | ... | @@ -8,10 +8,7 @@ import cn.iocoder.yudao.module.promotion.dal.dataobject.coupon.CouponDO; |
| 8 | 8 | import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTakeTypeEnum; |
| 9 | 9 | import cn.iocoder.yudao.module.promotion.service.coupon.bo.CouponTakeCountBO; |
| 10 | 10 | |
| 11 | -import java.util.Collection; | |
| 12 | -import java.util.List; | |
| 13 | -import java.util.Map; | |
| 14 | -import java.util.Set; | |
| 11 | +import java.util.*; | |
| 15 | 12 | |
| 16 | 13 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; |
| 17 | 14 | |
| ... | ... | @@ -130,6 +127,21 @@ public interface CouponService { |
| 130 | 127 | } |
| 131 | 128 | |
| 132 | 129 | /** |
| 130 | + * 获取会员领取指定优惠券的数量 | |
| 131 | + * | |
| 132 | + * @param templateId 优惠券模板编号 | |
| 133 | + * @param userId 用户编号 | |
| 134 | + * @return 领取优惠券的数量 | |
| 135 | + */ | |
| 136 | + default Integer getTakeCount(Long templateId, Long userId) { | |
| 137 | + return CollUtil.emptyIfNull(getTakeCountListByTemplateIds(Collections.singleton(templateId), userId)) | |
| 138 | + .stream() | |
| 139 | + .findFirst() | |
| 140 | + .map(CouponTakeCountBO::getCount) | |
| 141 | + .orElse(0); | |
| 142 | + } | |
| 143 | + | |
| 144 | + /** | |
| 133 | 145 | * 统计会员领取优惠券的数量 |
| 134 | 146 | * |
| 135 | 147 | * @param templateIds 优惠券模板编号列表 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/brokerage/BrokerageUserConvert.java
| ... | ... | @@ -5,11 +5,13 @@ import cn.hutool.core.util.ObjUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; |
| 7 | 7 | import cn.iocoder.yudao.module.trade.controller.admin.brokerage.vo.user.BrokerageUserRespVO; |
| 8 | +import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO; | |
| 8 | 9 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserMySummaryRespVO; |
| 9 | 10 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByUserCountRespVO; |
| 10 | 11 | import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; |
| 11 | -import cn.iocoder.yudao.module.trade.service.brokerage.bo.UserBrokerageSummaryRespBO; | |
| 12 | 12 | import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageWithdrawSummaryRespBO; |
| 13 | +import cn.iocoder.yudao.module.trade.service.brokerage.bo.UserBrokerageSummaryRespBO; | |
| 14 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
| 13 | 15 | import org.mapstruct.Mapper; |
| 14 | 16 | import org.mapstruct.MappingTarget; |
| 15 | 17 | import org.mapstruct.factory.Mappers; |
| ... | ... | @@ -85,4 +87,11 @@ public interface BrokerageUserConvert { |
| 85 | 87 | .ifPresent(user -> respVO.setBrokeragePrice(user.getBrokeragePrice()).setFrozenPrice(user.getFrozenPrice())); |
| 86 | 88 | return respVO; |
| 87 | 89 | } |
| 90 | + | |
| 91 | + default void copyTo(IPage<AppBrokerageUserChildSummaryRespVO> pageResult, Map<Long, MemberUserRespDTO> userMap) { | |
| 92 | + for (AppBrokerageUserChildSummaryRespVO vo : pageResult.getRecords()) { | |
| 93 | + Optional.ofNullable(userMap.get(vo.getId())).ifPresent(user -> | |
| 94 | + vo.setNickname(user.getNickname()).setAvatar(user.getAvatar())); | |
| 95 | + } | |
| 96 | + } | |
| 88 | 97 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageUserMapper.java
| ... | ... | @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.trade.dal.mysql.brokerage; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.lang.Assert; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.SortingField; | |
| 5 | 6 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 6 | 7 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 7 | 8 | import cn.iocoder.yudao.module.trade.controller.admin.brokerage.vo.user.BrokerageUserPageReqVO; |
| 8 | -import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryPageReqVO; | |
| 9 | 9 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO; |
| 10 | 10 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByUserCountRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; |
| ... | ... | @@ -139,8 +139,11 @@ public interface BrokerageUserMapper extends BaseMapperX<BrokerageUserDO> { |
| 139 | 139 | @Param("endTime") LocalDateTime endTime); |
| 140 | 140 | |
| 141 | 141 | IPage<AppBrokerageUserChildSummaryRespVO> selectSummaryPageByUserId(Page<?> page, |
| 142 | - @Param("param") AppBrokerageUserChildSummaryPageReqVO param, | |
| 143 | - @Param("userId") Long userId); | |
| 142 | + @Param("ids") List<Long> ids, | |
| 143 | + @Param("bizType") Integer bizType, | |
| 144 | + @Param("status") Integer status, | |
| 145 | + @Param("bindUserIds") List<Long> bindUserIds, | |
| 146 | + @Param("sortingField") SortingField sortingField); | |
| 144 | 147 | |
| 145 | 148 | default List<BrokerageUserDO> selectListByBindUserId(Long bindUserId) { |
| 146 | 149 | return selectList(BrokerageUserDO::getBindUserId, bindUserId); | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java
| ... | ... | @@ -232,7 +232,7 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
| 235 | - * 激动单条佣金记录 | |
| 235 | + * 解冻单条佣金记录 | |
| 236 | 236 | * |
| 237 | 237 | * @param record 佣金记录 |
| 238 | 238 | * @return 解冻是否成功 |
| ... | ... | @@ -258,9 +258,9 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { |
| 258 | 258 | @Override |
| 259 | 259 | public List<UserBrokerageSummaryRespBO> getUserBrokerageSummaryListByUserId(Collection<Long> userIds, |
| 260 | 260 | Integer bizType, Integer status) { |
| 261 | - if (CollUtil.isEmpty(userIds)) { | |
| 262 | - return Collections.emptyList(); | |
| 263 | - } | |
| 261 | + if (CollUtil.isEmpty(userIds)) { | |
| 262 | + return Collections.emptyList(); | |
| 263 | + } | |
| 264 | 264 | return brokerageRecordMapper.selectCountAndSumPriceByUserIdInAndBizTypeAndStatus(userIds, bizType, status); |
| 265 | 265 | } |
| 266 | 266 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.lang.Assert; |
| 5 | 5 | import cn.hutool.core.util.ArrayUtil; |
| 6 | 6 | import cn.hutool.core.util.BooleanUtil; |
| 7 | +import cn.hutool.core.util.StrUtil; | |
| 7 | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | 9 | import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; |
| 9 | 10 | import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils; |
| ... | ... | @@ -14,11 +15,14 @@ import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokera |
| 14 | 15 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO; |
| 15 | 16 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByUserCountRespVO; |
| 16 | 17 | import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankPageReqVO; |
| 18 | +import cn.iocoder.yudao.module.trade.convert.brokerage.BrokerageUserConvert; | |
| 17 | 19 | import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageUserDO; |
| 18 | 20 | import cn.iocoder.yudao.module.trade.dal.dataobject.config.TradeConfigDO; |
| 19 | 21 | import cn.iocoder.yudao.module.trade.dal.mysql.brokerage.BrokerageUserMapper; |
| 20 | 22 | import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageBindModeEnum; |
| 21 | 23 | import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageEnabledConditionEnum; |
| 24 | +import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum; | |
| 25 | +import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum; | |
| 22 | 26 | import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; |
| 23 | 27 | import com.baomidou.mybatisplus.core.metadata.IPage; |
| 24 | 28 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -221,7 +225,21 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { |
| 221 | 225 | |
| 222 | 226 | @Override |
| 223 | 227 | public PageResult<AppBrokerageUserChildSummaryRespVO> getBrokerageUserChildSummaryPage(AppBrokerageUserChildSummaryPageReqVO pageReqVO, Long userId) { |
| 224 | - IPage<AppBrokerageUserChildSummaryRespVO> pageResult = brokerageUserMapper.selectSummaryPageByUserId(MyBatisUtils.buildPage(pageReqVO), pageReqVO, userId); | |
| 228 | + // 1.1 根据昵称过滤用户 | |
| 229 | + List<Long> ids = StrUtil.isBlank(pageReqVO.getNickname()) | |
| 230 | + ? Collections.emptyList() | |
| 231 | + : convertList(memberUserApi.getUserListByNickname(pageReqVO.getNickname()), MemberUserRespDTO::getId); | |
| 232 | + // 1.2 生成推广员编号列表 | |
| 233 | + List<Long> bindUserIds = buildBindUserIdsByLevel(userId, pageReqVO.getLevel()); | |
| 234 | + // 2. 分页查询 | |
| 235 | + IPage<AppBrokerageUserChildSummaryRespVO> pageResult = brokerageUserMapper.selectSummaryPageByUserId( | |
| 236 | + MyBatisUtils.buildPage(pageReqVO), ids, BrokerageRecordBizTypeEnum.ORDER.getType(), | |
| 237 | + BrokerageRecordStatusEnum.SETTLEMENT.getStatus(), bindUserIds, pageReqVO.getSortingField() | |
| 238 | + ); | |
| 239 | + // 3. 拼接数据并返回 | |
| 240 | + List<Long> userIds = convertList(pageResult.getRecords(), AppBrokerageUserChildSummaryRespVO::getId); | |
| 241 | + Map<Long, MemberUserRespDTO> userMap = memberUserApi.getUserMap(userIds); | |
| 242 | + BrokerageUserConvert.INSTANCE.copyTo(pageResult, userMap); | |
| 225 | 243 | return new PageResult<>(pageResult.getRecords(), pageResult.getTotal()); |
| 226 | 244 | } |
| 227 | 245 | |
| ... | ... | @@ -253,9 +271,9 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { |
| 253 | 271 | |
| 254 | 272 | /** |
| 255 | 273 | * 判断是否为新用户 |
| 256 | - * | |
| 274 | + * <p> | |
| 257 | 275 | * 标准:注册时间在 30 秒内的,都算新用户 |
| 258 | - * | |
| 276 | + * <p> | |
| 259 | 277 | * 疑问:为什么通过这样的方式实现? |
| 260 | 278 | * 回答:因为注册在 member 模块,希望它和 trade 模块解耦,所以只能用这种约定的逻辑。 |
| 261 | 279 | * | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java
| ... | ... | @@ -5,7 +5,6 @@ import cn.hutool.core.lang.Assert; |
| 5 | 5 | import cn.hutool.core.map.MapUtil; |
| 6 | 6 | import cn.hutool.core.util.ObjectUtil; |
| 7 | 7 | import cn.hutool.core.util.RandomUtil; |
| 8 | -import cn.hutool.core.util.StrUtil; | |
| 9 | 8 | import cn.hutool.extra.spring.SpringUtil; |
| 10 | 9 | import cn.iocoder.yudao.framework.common.core.KeyValue; |
| 11 | 10 | import cn.iocoder.yudao.framework.common.enums.TerminalEnum; |
| ... | ... | @@ -667,7 +666,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { |
| 667 | 666 | * 如果金额全部被退款,则取消订单 |
| 668 | 667 | * 如果还有未被退款的金额,则无需取消订单 |
| 669 | 668 | * |
| 670 | - * @param order 订单 | |
| 669 | + * @param order 订单 | |
| 671 | 670 | * @param refundPrice 退款金额 |
| 672 | 671 | */ |
| 673 | 672 | @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_CANCEL_AFTER_SALE) |
| ... | ... | @@ -774,11 +773,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { |
| 774 | 773 | |
| 775 | 774 | @Override |
| 776 | 775 | public void updateOrderItemWhenAfterSaleCreate(Long id, Long afterSaleId) { |
| 777 | - // TODO @疯狂:这个可以直接在接口上,写 @Null 参数校验; | |
| 778 | - if (afterSaleId == null) { | |
| 779 | - throw new IllegalArgumentException(StrUtil.format("id({}) 退款发起,售后单编号不能为空", id)); | |
| 780 | - } | |
| 781 | - | |
| 782 | 776 | // 更新订单项 |
| 783 | 777 | updateOrderItemAfterSaleStatus(id, TradeOrderItemAfterSaleStatusEnum.NONE.getStatus(), |
| 784 | 778 | TradeOrderItemAfterSaleStatusEnum.APPLY.getStatus(), afterSaleId); |
| ... | ... | @@ -787,11 +781,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { |
| 787 | 781 | @Override |
| 788 | 782 | @Transactional(rollbackFor = Exception.class) |
| 789 | 783 | public void updateOrderItemWhenAfterSaleSuccess(Long id, Integer refundPrice) { |
| 790 | - // TODO @疯狂:这个可以直接在接口上,写 @Null 参数校验; | |
| 791 | - if (refundPrice == null) { | |
| 792 | - throw new IllegalArgumentException(StrUtil.format("id({}) 退款成功,退款金额不能为空", id)); | |
| 793 | - } | |
| 794 | - | |
| 795 | 784 | // 1. 更新订单项 |
| 796 | 785 | updateOrderItemAfterSaleStatus(id, TradeOrderItemAfterSaleStatusEnum.APPLY.getStatus(), |
| 797 | 786 | TradeOrderItemAfterSaleStatusEnum.SUCCESS.getStatus(), null); |
| ... | ... | @@ -821,8 +810,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { |
| 821 | 810 | addUserPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.AFTER_SALE_REFUND_USED, orderItem.getAfterSaleId()); |
| 822 | 811 | |
| 823 | 812 | // 5. 回滚经验:扣减用户经验 |
| 824 | - // TODO @疯狂:orderRefundPrice 是不是改成 refundPrice?应该只退这个售后对应的经验 | |
| 825 | - getSelf().reduceUserExperienceAsync(order.getUserId(), orderRefundPrice, orderItem.getAfterSaleId()); | |
| 813 | + getSelf().reduceUserExperienceAsync(order.getUserId(), refundPrice, orderItem.getAfterSaleId()); | |
| 826 | 814 | |
| 827 | 815 | // 6. 回滚佣金:更新分佣记录为已失效 |
| 828 | 816 | getSelf().cancelBrokerageAsync(order.getUserId(), id); | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/resources/mapper/brokerage/BrokerageUserMapper.xml
| ... | ... | @@ -4,37 +4,38 @@ |
| 4 | 4 | |
| 5 | 5 | <select id="selectSummaryPageByUserId" |
| 6 | 6 | resultType="cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO"> |
| 7 | - SELECT bu.id, bu.bind_user_time AS brokerageTime, u.nickname, u.avatar, | |
| 8 | - <!-- TODO @疯狂:biz_type、status 可以通过参数传入哇? --> | |
| 7 | + SELECT bu.id, bu.bind_user_time AS brokerageTime, | |
| 9 | 8 | (SELECT SUM(price) FROM trade_brokerage_record r |
| 10 | - WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokeragePrice, | |
| 9 | + WHERE r.user_id = bu.id AND biz_type = #{bizType} AND r.status = #{status} AND r.deleted = FALSE) AS brokeragePrice, | |
| 11 | 10 | (SELECT COUNT(1) FROM trade_brokerage_record r |
| 12 | - WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokerageOrderCount, | |
| 11 | + WHERE r.user_id = bu.id AND biz_type = #{bizType} AND r.status = #{status} AND r.deleted = FALSE) AS brokerageOrderCount, | |
| 13 | 12 | (SELECT COUNT(1) FROM trade_brokerage_user c |
| 14 | - WHERE c.bind_user_id = u.id AND c.deleted = FALSE) AS brokerageUserCount | |
| 15 | - FROM member_user AS u | |
| 16 | - JOIN trade_brokerage_user AS bu ON bu.id = u.id | |
| 17 | - <!-- TODO @疯狂:1)bind_user_id 是不是可以先改成内存查询出 userId 的集合,然后去 in 哈?2)nickname 是不是可以基于查询出来的 userId 对应的 nickname 在内存里过滤,主要是避免和 member_user 链表 --> | |
| 18 | - <where> | |
| 19 | - <if test="param.nickname != null and param.nickname != ''"> | |
| 20 | - AND u.nickname LIKE concat('', #{param.nickname}, '') | |
| 13 | + WHERE c.bind_user_id = bu.id AND c.deleted = FALSE) AS brokerageUserCount | |
| 14 | + FROM trade_brokerage_user AS bu | |
| 15 | + <where> | |
| 16 | + bu.deleted = false | |
| 17 | + <if test="ids != null and ids.size() > 0"> | |
| 18 | + and bu.id in | |
| 19 | + <foreach collection="ids" open="(" item="id" separator="," close=")"> | |
| 20 | + #{id} | |
| 21 | + </foreach> | |
| 21 | 22 | </if> |
| 22 | - <if test="param.level == 1"> | |
| 23 | - AND bu.bind_user_id = #{userId} | |
| 24 | - </if> | |
| 25 | - <if test="param.level == 2"> | |
| 26 | - AND bu.bind_user_id IN (SELECT id FROM trade_brokerage_user c WHERE c.bind_user_id = #{userId}) | |
| 23 | + <if test="bindUserIds != null and bindUserIds.size() > 0"> | |
| 24 | + and bu.bind_user_id in | |
| 25 | + <foreach collection="bindUserIds" open="(" item="bindUserId" separator="," close=")"> | |
| 26 | + #{bindUserId} | |
| 27 | + </foreach> | |
| 27 | 28 | </if> |
| 28 | 29 | </where> |
| 29 | 30 | <choose> |
| 30 | - <when test="param.sortingField.field == 'userCount'"> | |
| 31 | - ORDER BY brokerageUserCount ${param.sortingField.order} | |
| 31 | + <when test="sortingField.field == 'userCount'"> | |
| 32 | + ORDER BY brokerageUserCount ${sortingField.order} | |
| 32 | 33 | </when> |
| 33 | - <when test="param.sortingField.field == 'orderCount'"> | |
| 34 | - ORDER BY brokerageOrderCount ${param.sortingField.order} | |
| 34 | + <when test="sortingField.field == 'orderCount'"> | |
| 35 | + ORDER BY brokerageOrderCount ${sortingField.order} | |
| 35 | 36 | </when> |
| 36 | - <when test="param.sortingField.field == 'price'"> | |
| 37 | - ORDER BY brokeragePrice ${param.sortingField.order} | |
| 37 | + <when test="sortingField.field == 'price'"> | |
| 38 | + ORDER BY brokeragePrice ${sortingField.order} | |
| 38 | 39 | </when> |
| 39 | 40 | <otherwise> |
| 40 | 41 | ORDER BY bu.bind_user_time DESC | ... | ... |