feat:排序混乱修改
This commit is contained in:
1 parent
423275f0eb
commit
ac87c2baf5
17 files changed
+121
-65
No files matched your search
+8
-3
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.hard.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -10,6 +11,7 @@ import com.bsd.pjcloud.hard.api.dto.HardGroupDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.HardGroupEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.HardGroupVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -20,14 +22,16 @@ public interface HardGroupMapper extends PjcloudBaseMapper<HardGroupEntity> {
|
||||
default Page<HardGroupVo> pageJoin(Page page, HardGroupDto dto) {
|
||||
MPJLambdaWrapper<HardGroupEntity> wrapper = new MPJLambdaWrapper<HardGroupEntity>()
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), HardGroupEntity::getName, dto.getName())
|
||||
.orderByDesc(HardGroupEntity::getCreateTime);
|
||||
.orderByDesc(HardGroupEntity::getCreateTime)
|
||||
.orderByDesc(HardGroupEntity::getDeptId);
|
||||
return selectJoinPage(page, HardGroupVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<HardGroupVo> scopePageList(Page page, HardGroupDto dto) {
|
||||
LambdaQueryWrapper<HardGroupEntity> wrapper = new LambdaQueryWrapper<HardGroupEntity>()
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), HardGroupEntity::getName, dto.getName())
|
||||
.orderByDesc(HardGroupEntity::getCreateTime);
|
||||
.orderByDesc(HardGroupEntity::getCreateTime)
|
||||
.orderByDesc(HardGroupEntity::getDeptId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), HardGroupVo.class));
|
||||
return list;
|
||||
@@ -37,7 +41,8 @@ public interface HardGroupMapper extends PjcloudBaseMapper<HardGroupEntity> {
|
||||
LambdaQueryWrapper<HardGroupEntity> wrapper = new LambdaQueryWrapper<HardGroupEntity>()
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), HardGroupEntity::getName, dto.getName())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getIds()), HardGroupEntity::getId, dto.getIds())
|
||||
.orderByDesc(HardGroupEntity::getCreateTime);
|
||||
.orderByDesc(HardGroupEntity::getCreateTime)
|
||||
.orderByDesc(HardGroupEntity::getDeptId);
|
||||
return selectList(wrapper);
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -18,7 +18,8 @@ public interface HardInvoiceMapper extends PjcloudBaseMapper<HardInvoiceEntity>
|
||||
.selectAll(HardInvoiceEntity.class)
|
||||
.eqIfExists(HardInvoiceEntity::getHardId, dto.getHardId())
|
||||
.eqIfExists(HardInvoiceEntity::getOrderId, dto.getOrderId())
|
||||
.orderByDesc(HardInvoiceEntity::getCreateTime);
|
||||
.orderByDesc(HardInvoiceEntity::getCreateTime)
|
||||
.orderByDesc(HardInvoiceEntity::getId);
|
||||
return selectJoinPage(page, HardInvoiceVo.class, wrapper);
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.hard.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -10,6 +11,7 @@ import com.bsd.pjcloud.hard.api.dto.HardManagerDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.HardManagerEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.HardManagerVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -26,7 +28,8 @@ public interface HardManagerMapper extends PjcloudBaseMapper<HardManagerEntity>
|
||||
.eqIfExists(HardManagerEntity::getMerchantId, dto.getMerchantId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), HardManagerEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getMerchantIds()), HardManagerEntity::getMerchantId, dto.getMerchantIds())
|
||||
.orderByDesc(HardManagerEntity::getCreateTime);
|
||||
.orderByDesc(HardManagerEntity::getCreateTime)
|
||||
.orderByAsc(HardManagerEntity::getId);
|
||||
return selectJoinPage(page, HardManagerVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -45,7 +48,8 @@ public interface HardManagerMapper extends PjcloudBaseMapper<HardManagerEntity>
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getType()), HardManagerEntity::getMerchantId, dto.getMerchantId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), HardManagerEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getMerchantIds()), HardManagerEntity::getMerchantId, dto.getMerchantIds())
|
||||
.orderByDesc(HardManagerEntity::getCreateTime);
|
||||
.orderByDesc(HardManagerEntity::getCreateTime)
|
||||
.orderByAsc(HardManagerEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), HardManagerVo.class));
|
||||
return list;
|
||||
|
||||
+3
-1
@@ -8,6 +8,7 @@ import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -17,7 +18,8 @@ public interface HardAfterSaleMapper extends PjcloudBaseMapper<HardAfterSaleEnti
|
||||
default Page<HardAfterSaleVo> pageJoin(Page page, HardAfterSaleDto dto) {
|
||||
MPJLambdaWrapper<HardAfterSaleEntity> wrapper = new MPJLambdaWrapper<HardAfterSaleEntity>()
|
||||
.selectAll(HardAfterSaleEntity.class)
|
||||
.orderByDesc(HardAfterSaleEntity::getCreateTime);
|
||||
.orderByDesc(HardAfterSaleEntity::getCreateTime)
|
||||
.orderByDesc(HardAfterSaleEntity::getId);
|
||||
return selectJoinPage(page, HardAfterSaleVo.class, wrapper);
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.hard.mapper.order;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -12,6 +13,7 @@ import com.bsd.pjcloud.hard.api.entity.HardManagerEntity;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.*;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -45,7 +47,8 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
|
||||
ObjectUtil.isNotEmpty(dto.getPayTimeList()) ? dto.getPayTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getPayTimeList()) ? dto.getPayTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(HardOrderEntity::getCreateTime);
|
||||
.orderByDesc(HardOrderEntity::getCreateTime)
|
||||
.orderByDesc(HardOrderEntity::getUserId);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -67,7 +70,8 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
|
||||
.eqIfExists(HardOrderEntity::getPayType, dto.getPayType())
|
||||
.eqIfExists(HardOrderEntity::getOrderStatus, dto.getOrderStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), HardOrderEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(HardOrderEntity::getCreateTime);
|
||||
.orderByDesc(HardOrderEntity::getCreateTime)
|
||||
.orderByDesc(HardOrderEntity::getUserId);
|
||||
return selectJoinPage(page, HardOrderVo.class, wrapper);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -82,6 +82,6 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
order by a.create_time desc, a.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
+1
-1
@@ -93,6 +93,6 @@
|
||||
<where>
|
||||
<include refid="whereA"/>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
order by a.create_time desc,a.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -212,9 +212,8 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
<if test="_databaseId != 'mssql'">
|
||||
ORDER BY u.create_time DESC
|
||||
ORDER BY u.create_time DESC, u.user_id DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
+10
-5
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -11,6 +12,7 @@ import com.bsd.pjcloud.wallet.api.entity.MchManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.MchManageVo;
|
||||
import com.github.yulichang.query.MPJLambdaQueryWrapper;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -18,14 +20,14 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface MchManageMapper extends PjcloudBaseMapper<MchManageEntity> {
|
||||
|
||||
|
||||
default Page<MchManageVo> pageJoin(Page page, MchManageDto dto) {
|
||||
MPJLambdaQueryWrapper<MchManageEntity> wrapper = new MPJLambdaQueryWrapper<MchManageEntity>()
|
||||
.selectAll(MchManageEntity.class)
|
||||
.likeIfExists(MchManageEntity::getName, dto.getName())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), MchManageEntity::getDeptId, dto.getDeptIds())
|
||||
.apply(ObjectUtil.isNotEmpty(dto.getType()), "FIND_IN_SET({0}, types)", dto.getType())
|
||||
.orderByDesc(MchManageEntity::getCreateTime);
|
||||
.orderByDesc(MchManageEntity::getCreateTime)
|
||||
.orderByDesc(MchManageEntity::getId);
|
||||
return selectJoinPage(page, MchManageVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -44,7 +46,8 @@ public interface MchManageMapper extends PjcloudBaseMapper<MchManageEntity> {
|
||||
.likeIfExists(MchManageEntity::getName, dto.getName())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), MchManageEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getIds()), MchManageEntity::getId, dto.getIds())
|
||||
.orderByDesc(MchManageEntity::getCreateTime);
|
||||
.orderByDesc(MchManageEntity::getCreateTime)
|
||||
.orderByDesc(MchManageEntity::getId);
|
||||
return selectJoinList(MchManageVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -53,7 +56,8 @@ public interface MchManageMapper extends PjcloudBaseMapper<MchManageEntity> {
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), MchManageEntity::getName, dto.getName())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), MchManageEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getIds()), MchManageEntity::getId, dto.getIds())
|
||||
.orderByDesc(MchManageEntity::getCreateTime);
|
||||
.orderByDesc(MchManageEntity::getCreateTime)
|
||||
.orderByDesc(MchManageEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), MchManageVo.class));
|
||||
return list;
|
||||
@@ -64,7 +68,8 @@ public interface MchManageMapper extends PjcloudBaseMapper<MchManageEntity> {
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), MchManageEntity::getName, dto.getName())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), MchManageEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getIds()), MchManageEntity::getId, dto.getIds())
|
||||
.orderByDesc(MchManageEntity::getCreateTime);
|
||||
.orderByDesc(MchManageEntity::getCreateTime)
|
||||
.orderByDesc(MchManageEntity::getId);
|
||||
return selectListByScope(wrapper, DataScope.of());
|
||||
}
|
||||
}
|
||||
+4
-6
@@ -1,22 +1,19 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletCodeUseDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletActiveEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletCodeUseEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletCodeUseVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletManageVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface WalletCodeUseMapper extends PjcloudBaseMapper<WalletCodeUseEntity> {
|
||||
|
||||
|
||||
default Page<WalletCodeUseVo> pageJoin(Page page, WalletCodeUseDto dto) {
|
||||
MPJLambdaWrapper<WalletCodeUseEntity> wrapper = new MPJLambdaWrapper<WalletCodeUseEntity>()
|
||||
.selectAll(WalletCodeUseEntity.class)
|
||||
@@ -25,7 +22,8 @@ public interface WalletCodeUseMapper extends PjcloudBaseMapper<WalletCodeUseEnti
|
||||
.eqIfExists(WalletCodeUseEntity::getBizType, dto.getBizType())
|
||||
.eqIfExists(WalletCodeUseEntity::getStatus, dto.getStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletCodeUseEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletCodeUseEntity::getCreateTime);
|
||||
.orderByDesc(WalletCodeUseEntity::getCreateTime)
|
||||
.orderByDesc(WalletCodeUseEntity::getId);
|
||||
return selectJoinPage(page, WalletCodeUseVo.class, wrapper);
|
||||
}
|
||||
}
|
||||
+8
-3
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -10,6 +11,7 @@ import com.bsd.pjcloud.wallet.api.dto.WalletForeignDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletForeignEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletForeignVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
@@ -21,7 +23,8 @@ public interface WalletForeignMapper extends PjcloudBaseMapper<WalletForeignEnti
|
||||
.eqIfExists(WalletForeignEntity::getProcessStatus, dto.getProcessStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletForeignEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletForeignEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletForeignEntity::getCreateTime);
|
||||
.orderByDesc(WalletForeignEntity::getCreateTime)
|
||||
.orderByDesc(WalletForeignEntity::getId);
|
||||
return selectJoinPage(page, WalletForeignVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -34,10 +37,12 @@ public interface WalletForeignMapper extends PjcloudBaseMapper<WalletForeignEnti
|
||||
|
||||
default Page<WalletForeignVo> scopePageList(Page page, WalletForeignDto dto) {
|
||||
LambdaQueryWrapper<WalletForeignEntity> wrapper = new LambdaQueryWrapper<WalletForeignEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getProcessStatus()), WalletForeignEntity::getProcessStatus, dto.getProcessStatus())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getProcessStatus()), WalletForeignEntity::getProcessStatus,
|
||||
dto.getProcessStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletForeignEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletForeignEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletForeignEntity::getCreateTime);
|
||||
.orderByDesc(WalletForeignEntity::getCreateTime)
|
||||
.orderByDesc(WalletForeignEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletForeignVo.class));
|
||||
return list;
|
||||
|
||||
+5
-7
@@ -1,20 +1,16 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletFreezeDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletActiveEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletFreezeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletActiveVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletFreezeVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletManageVo;
|
||||
import com.github.yulichang.query.MPJLambdaQueryWrapper;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -27,7 +23,9 @@ public interface WalletFreezeMapper extends PjcloudBaseMapper<WalletFreezeEntity
|
||||
.selectAs(WalletManageEntity::getCardNumber, WalletFreezeDto::getCardNumber)
|
||||
.leftJoin(WalletManageEntity.class, WalletManageEntity::getId, WalletFreezeEntity::getWalletId)
|
||||
.eqIfExists(WalletManageEntity::getCardNumber, dto.getCardNumber())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletFreezeEntity::getId, dto.getUserIds());
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletFreezeEntity::getId, dto.getUserIds())
|
||||
.orderByDesc(WalletManageEntity::getCreateTime)
|
||||
.orderByDesc(WalletManageEntity::getId);
|
||||
return selectJoinPage(page, WalletFreezeVo.class, wrapper);
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -14,6 +15,7 @@ import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletManageBalanceVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletManageVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -26,7 +28,8 @@ public interface WalletManageMapper extends PjcloudBaseMapper<WalletManageEntity
|
||||
LambdaQueryWrapper<WalletManageEntity> wrapper = new LambdaQueryWrapper<WalletManageEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getUserId()), WalletManageEntity::getUserId, dto.getUserId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getDeptId()), WalletManageEntity::getDeptId, dto.getDeptId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletManageEntity::getWalletTypeId,
|
||||
dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getIsFreeze()), WalletManageEntity::getIsFreeze, dto.getIsFreeze())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletIds()), WalletManageEntity::getId, dto.getWalletIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
|
||||
@@ -109,18 +112,23 @@ public interface WalletManageMapper extends PjcloudBaseMapper<WalletManageEntity
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(WalletManageEntity::getCreateTime);
|
||||
.orderByDesc(WalletManageEntity::getCreateTime)
|
||||
.orderByDesc(WalletManageEntity::getUserId)
|
||||
.orderByDesc(WalletManageEntity::getWalletTypeId);
|
||||
return selectJoinList(WalletManageVo.class, wrapper);
|
||||
}
|
||||
|
||||
default List<WalletManageEntity> list(WalletManageDto dto) {
|
||||
LambdaUpdateWrapper<WalletManageEntity> wrapper = new LambdaUpdateWrapper<WalletManageEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getUserId()), WalletManageEntity::getUserId, dto.getUserId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletManageEntity::getWalletTypeId,
|
||||
dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getIsFreeze()), WalletManageEntity::getIsFreeze, dto.getIsFreeze())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletIds()), WalletManageEntity::getId, dto.getWalletIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletManageEntity::getCreateTime);
|
||||
.orderByDesc(WalletManageEntity::getCreateTime)
|
||||
.orderByDesc(WalletManageEntity::getUserId)
|
||||
.orderByDesc(WalletManageEntity::getWalletTypeId);
|
||||
return selectList(wrapper);
|
||||
}
|
||||
|
||||
|
||||
+8
-3
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -10,6 +11,7 @@ import com.bsd.pjcloud.wallet.api.dto.WalletStrideDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletStrideEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletStrideVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
@@ -21,7 +23,8 @@ public interface WalletStrideMapper extends PjcloudBaseMapper<WalletStrideEntity
|
||||
.eqIfExists(WalletStrideEntity::getProcessStatus, dto.getProcessStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletStrideEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletStrideEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletStrideEntity::getCreateTime);
|
||||
.orderByDesc(WalletStrideEntity::getCreateTime)
|
||||
.orderByDesc(WalletStrideEntity::getId);
|
||||
return selectJoinPage(page, WalletStrideVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -34,10 +37,12 @@ public interface WalletStrideMapper extends PjcloudBaseMapper<WalletStrideEntity
|
||||
|
||||
default Page<WalletStrideVo> scopePageList(Page page, WalletStrideDto dto) {
|
||||
LambdaQueryWrapper<WalletStrideEntity> wrapper = new LambdaQueryWrapper<WalletStrideEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getProcessStatus()), WalletStrideEntity::getProcessStatus, dto.getProcessStatus())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getProcessStatus()), WalletStrideEntity::getProcessStatus,
|
||||
dto.getProcessStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletStrideEntity::getDeptId, dto.getDeptIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletStrideEntity::getUserId, dto.getUserIds())
|
||||
.orderByDesc(WalletStrideEntity::getCreateTime);
|
||||
.orderByDesc(WalletStrideEntity::getCreateTime)
|
||||
.orderByDesc(WalletStrideEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletStrideVo.class));
|
||||
return list;
|
||||
|
||||
+23
-13
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -15,6 +16,7 @@ import com.bsd.pjcloud.wallet.api.vo.WalletTransactionSumAndCountVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplySelectCompareVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.transaction.WalletTransactionVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -38,12 +40,15 @@ public interface WalletTransactionMapper extends PjcloudBaseMapper<WalletTransac
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(WalletTransactionEntity::getCreateTime);
|
||||
.orderByDesc(WalletTransactionEntity::getCreateTime)
|
||||
.orderByDesc(WalletTransactionEntity::getUserId);
|
||||
if (ObjectUtil.isNotEmpty(dto.getIsInclude())) {
|
||||
if(dto.getIsInclude()){
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
}else{
|
||||
wrapper.notIn(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
if (dto.getIsInclude()) {
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId,
|
||||
dto.getDeptIds());
|
||||
} else {
|
||||
wrapper.notIn(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId,
|
||||
dto.getDeptIds());
|
||||
}
|
||||
} else {
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
@@ -72,12 +77,15 @@ public interface WalletTransactionMapper extends PjcloudBaseMapper<WalletTransac
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(WalletTransactionEntity::getCreateTime);
|
||||
.orderByDesc(WalletTransactionEntity::getCreateTime)
|
||||
.orderByDesc(WalletTransactionEntity::getUserId);
|
||||
if (ObjectUtil.isNotEmpty(dto.getIsInclude())) {
|
||||
if(dto.getIsInclude()){
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
}else{
|
||||
wrapper.notIn(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
if (dto.getIsInclude()) {
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId,
|
||||
dto.getDeptIds());
|
||||
} else {
|
||||
wrapper.notIn(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId,
|
||||
dto.getDeptIds());
|
||||
}
|
||||
} else {
|
||||
wrapper.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds());
|
||||
@@ -91,10 +99,12 @@ public interface WalletTransactionMapper extends PjcloudBaseMapper<WalletTransac
|
||||
return BeanUtils.toBean(list, WalletTransactionVo.class);
|
||||
}
|
||||
|
||||
Integer getTransactionPriceCount(@Param("month") String importTimeStr, @Param("walletId") Long walletId,
|
||||
@Param("bizType") String bizType);
|
||||
|
||||
Integer getTransactionPriceCount(@Param("month") String importTimeStr, @Param("walletId") Long walletId, @Param("bizType") String bizType);
|
||||
|
||||
List<WalletRechargeApplySelectCompareVo> selectCompare(@Param("bizType") String bizType, @Param("dateTime") String monthTimeStr, @Param("userIdList") List<Long> userIdList);
|
||||
List<WalletRechargeApplySelectCompareVo> selectCompare(@Param("bizType") String bizType,
|
||||
@Param("dateTime") String monthTimeStr,
|
||||
@Param("userIdList") List<Long> userIdList);
|
||||
|
||||
List<WalletTransactionSumAndCountVo> sumAndCount(@Param("dto") WalletTransactionSumAndCountDto dto);
|
||||
}
|
||||
+16
-8
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.mapper.recharge;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -13,6 +14,7 @@ import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,8 +30,10 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper<WalletRecha
|
||||
.leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletRechargeApplyEntity::getWalletTypeId)
|
||||
.eqIfExists(WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime);
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId,
|
||||
dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getId);
|
||||
return selectJoinPage(page, WalletRechargeApplyVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -41,18 +45,22 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper<WalletRecha
|
||||
.leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletRechargeApplyEntity::getWalletTypeId)
|
||||
.eqIfExists(WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime);
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId,
|
||||
dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getId);
|
||||
return selectJoinList(WalletRechargeApplyVo.class, wrapper);
|
||||
}
|
||||
|
||||
|
||||
default Page<WalletRechargeApplyVo> scopePageList(Page page, WalletRechargeApplyDto dto) {
|
||||
LambdaQueryWrapper<WalletRechargeApplyEntity> wrapper = new LambdaQueryWrapper<WalletRechargeApplyEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletRechargeApplyEntity::getWalletTypeId,
|
||||
dto.getWalletTypeId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletRechargeApplyEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime);
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletRechargeApplyEntity::getWalletTypeId,
|
||||
dto.getWalletTypeIds())
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletRechargeApplyVo.class));
|
||||
return list;
|
||||
|
||||
+7
-3
@@ -7,6 +7,7 @@ import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeImportDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeImportVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -15,7 +16,8 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface WalletRechargeImportMapper extends PjcloudBaseMapper<WalletRechargeImportEntity> {
|
||||
|
||||
Page<WalletRechargeImportVo> scopePageList(Page page, @Param("dto") WalletRechargeImportDto dto, DataScope dataScope);
|
||||
Page<WalletRechargeImportVo> scopePageList(Page page, @Param("dto") WalletRechargeImportDto dto,
|
||||
DataScope dataScope);
|
||||
|
||||
List<WalletRechargeImportVo> scopeList(@Param("dto") WalletRechargeImportDto dto, DataScope dataScope);
|
||||
|
||||
@@ -23,7 +25,8 @@ public interface WalletRechargeImportMapper extends PjcloudBaseMapper<WalletRech
|
||||
MPJLambdaWrapper<WalletRechargeImportEntity> wrapper = new MPJLambdaWrapper<WalletRechargeImportEntity>()
|
||||
.eqIfExists(WalletRechargeImportEntity::getId, dto.getId())
|
||||
.eqIfExists(WalletRechargeImportEntity::getApplyId, dto.getApplyId())
|
||||
.orderByDesc(WalletRechargeImportEntity::getCreateTime);
|
||||
.orderByDesc(WalletRechargeImportEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeImportEntity::getUserId);
|
||||
return selectJoinPage(page, WalletRechargeImportVo.class, wrapper);
|
||||
}
|
||||
|
||||
@@ -31,7 +34,8 @@ public interface WalletRechargeImportMapper extends PjcloudBaseMapper<WalletRech
|
||||
MPJLambdaWrapper<WalletRechargeImportEntity> wrapper = new MPJLambdaWrapper<WalletRechargeImportEntity>()
|
||||
.eqIfExists(WalletRechargeImportEntity::getId, dto.getId())
|
||||
.eqIfExists(WalletRechargeImportEntity::getApplyId, dto.getApplyId())
|
||||
.orderByDesc(WalletRechargeImportEntity::getCreateTime);
|
||||
.orderByDesc(WalletRechargeImportEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeImportEntity::getUserId);
|
||||
return selectJoinList(WalletRechargeImportVo.class, wrapper);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user