feat:钱包权限
This commit is contained in:
1 parent
732ee6b6fd
commit
8d4c772ee8
36 files changed
+372
-65
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ public class WalletDataUtil {
|
||||
return v;
|
||||
}
|
||||
|
||||
public <T extends BaseWalletTypeInterface> List<T> convertWalletTYpeList(List<T> list, Map<Long, WalletTypeEntity> map) {
|
||||
public <T extends BaseWalletTypeInterface> List<T> convertWalletTypeList(List<T> list, Map<Long, WalletTypeEntity> map) {
|
||||
return CollectionUtils.convertList(list, v -> convertWalletType(v, map.get(v.getWalletTypeId())));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -23,5 +23,10 @@ public class WalletFreezeVo extends WalletFreezeEntity implements BaseUserInterf
|
||||
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 钱包相关
|
||||
*/
|
||||
private Long walletTypeId;
|
||||
|
||||
private String cardNumber;
|
||||
}
|
||||
+6
-3
@@ -3,20 +3,23 @@ package com.bsd.pjcloud.wallet.api.vo;
|
||||
import com.bsd.pjcloud.admin.api.vo.base.BaseDeptInterface;
|
||||
import com.bsd.pjcloud.admin.api.vo.base.BaseUserInterface;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.base.BaseWalletTypeInterface;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class WalletManageVo extends WalletManageEntity implements BaseUserInterface, BaseDeptInterface {
|
||||
public class WalletManageVo extends WalletManageEntity implements BaseUserInterface, BaseDeptInterface, BaseWalletTypeInterface {
|
||||
|
||||
/**
|
||||
* 钱包类型名
|
||||
* 钱包类型
|
||||
*/
|
||||
private Long walletTypeId;
|
||||
|
||||
private String walletTypeName;
|
||||
|
||||
private String walletTypeUniqueCode;
|
||||
|
||||
private String walletIcon;
|
||||
private String walletTypeIcon;
|
||||
|
||||
/**
|
||||
* 用户相关
|
||||
|
||||
+9
-2
@@ -3,14 +3,21 @@ package com.bsd.pjcloud.wallet.api.vo.recharge;
|
||||
import com.bsd.pjcloud.admin.api.vo.base.BaseDeptInterface;
|
||||
import com.bsd.pjcloud.admin.api.vo.base.BaseUserInterface;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.base.BaseWalletTypeInterface;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WalletRechargeApplyVo extends WalletRechargeApplyEntity implements BaseUserInterface, BaseDeptInterface {
|
||||
public class WalletRechargeApplyVo extends WalletRechargeApplyEntity implements BaseUserInterface, BaseDeptInterface, BaseWalletTypeInterface {
|
||||
/**
|
||||
* 钱包类型相关
|
||||
*/
|
||||
private Long walletTypeId;
|
||||
|
||||
private String walletTypeName;
|
||||
|
||||
private String uniqueCode;
|
||||
private String walletTypeUniqueCode;
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
/**
|
||||
* 用户相关
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ public class WalletActiveController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletActive_view')")
|
||||
public R getWalletActivePageJoin(@ParameterObject Page page, @ParameterObject WalletActiveDto dto) {
|
||||
return R.ok(walletActiveService.scopePage(page, dto));
|
||||
return R.ok(walletActiveService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class WalletForeignController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletForeign_view')")
|
||||
public R getWalletForeignPageJoin(@ParameterObject Page page, @ParameterObject WalletForeignDto dto) {
|
||||
return R.ok(walletForeignService.pageJoin(page, dto));
|
||||
return R.ok(walletForeignService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ public class WalletFreezeController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletFreeze_view')")
|
||||
public R getWalletFreezePage(@ParameterObject Page page, @ParameterObject WalletFreezeDto dto) {
|
||||
return R.ok(walletFreezeService.pageJoin(page, dto));
|
||||
return R.ok(walletFreezeService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+2
-2
@@ -95,7 +95,7 @@ public class WalletManageController {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
WalletManageDto dto = new WalletManageDto();
|
||||
dto.setUserId(user.getId());
|
||||
return walletManageService.pageJoin(page, dto);
|
||||
return R.ok(walletManageService.pageJoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
@@ -126,7 +126,7 @@ public class WalletManageController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletManage_view')")
|
||||
public R getWalletManagePageJoin(@ParameterObject Page page, @ParameterObject WalletManageDto dto) {
|
||||
return walletManageService.pageJoin(page, dto);
|
||||
return R.ok(walletManageService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class WalletStrideController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('admin_walletStride_view')")
|
||||
public R getWalletStrideJoin(@ParameterObject Page page, @ParameterObject WalletStrideDto dto) {
|
||||
return R.ok(walletStrideService.pageJoin(page, dto));
|
||||
return R.ok(walletStrideService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+5
-5
@@ -67,7 +67,7 @@ public class WalletTransactionController {
|
||||
public R appGetAll(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
dto.setUserId(user.getId());
|
||||
return R.ok(walletTransactionService.pageJoin(page, dto));
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto));
|
||||
}
|
||||
/* ************************************* end app end ************************************* */
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WalletTransactionController {
|
||||
@GetMapping("/page-cz")
|
||||
public R pageCz(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.RECHARGE.getCode()));
|
||||
return R.ok(walletTransactionService.pageJoin(page, dto));
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "后台消费分页", description = "后台消费分页")
|
||||
@@ -89,7 +89,7 @@ public class WalletTransactionController {
|
||||
public R pageXf(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.PAYMENT.getCode()));
|
||||
dto.setIsFindOrder(true);
|
||||
return R.ok(walletTransactionService.pageJoin(page, dto));
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "后台退款分页", description = "后台退款分页")
|
||||
@@ -97,14 +97,14 @@ public class WalletTransactionController {
|
||||
public R pageTk(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.REFUND.getCode()));
|
||||
dto.setIsFindOrder(true);
|
||||
return R.ok(walletTransactionService.pageJoin(page, dto));
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询复杂查询", description = "分页查询复杂查询")
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_view')")
|
||||
public R getWalletTransactionPageJoin(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
return R.ok(walletTransactionService.pageJoin(page, dto));
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class WalletRechargeApplyController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeApply_view')")
|
||||
public R getWalletRechargeApplyPage(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
|
||||
return R.ok(walletRechargeApplyService.pageJoin(page, dto));
|
||||
return R.ok(walletRechargeApplyService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class WalletRechargeController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletRecharge_view')")
|
||||
public R pageJoin(@ParameterObject Page page, @ParameterObject WalletRechargeDto dto) {
|
||||
return R.ok(walletRechargeService.pageJoin(page, dto));
|
||||
return R.ok(walletRechargeService.scopePageList(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public interface WalletActiveMapper extends PjcloudBaseMapper<WalletActiveEntity
|
||||
return selectJoinPage(page, WalletActiveVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<WalletActiveVo> scopePage(Page page, WalletActiveDto dto) {
|
||||
default Page<WalletActiveVo> scopePageList(Page page, WalletActiveDto dto) {
|
||||
LambdaQueryWrapper<WalletActiveEntity> wrapper = new LambdaQueryWrapper<WalletActiveEntity>()
|
||||
.like(ObjectUtil.isNotEmpty(dto.getCardNumber()), WalletActiveEntity::getCardNumber, dto.getCardNumber())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getIsActiveHardware()), WalletActiveEntity::getIsActiveHardware, dto.getIsActiveHardware())
|
||||
|
||||
+13
@@ -1,7 +1,10 @@
|
||||
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.WalletForeignDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletForeignEntity;
|
||||
@@ -27,4 +30,14 @@ public interface WalletForeignMapper extends PjcloudBaseMapper<WalletForeignEnti
|
||||
.eq(WalletForeignEntity::getId, id);
|
||||
return selectJoinOne(WalletForeignVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<WalletForeignVo> scopePageList(Page page, WalletForeignDto dto) {
|
||||
LambdaQueryWrapper<WalletForeignEntity> wrapper = new LambdaQueryWrapper<WalletForeignEntity>()
|
||||
.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());
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletForeignVo.class));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+7
@@ -1,7 +1,10 @@
|
||||
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;
|
||||
@@ -9,9 +12,11 @@ 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;
|
||||
|
||||
@Mapper
|
||||
public interface WalletFreezeMapper extends PjcloudBaseMapper<WalletFreezeEntity> {
|
||||
@@ -25,4 +30,6 @@ public interface WalletFreezeMapper extends PjcloudBaseMapper<WalletFreezeEntity
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletFreezeEntity::getId, dto.getUserIds());
|
||||
return selectJoinPage(page, WalletFreezeVo.class, wrapper);
|
||||
}
|
||||
|
||||
Page<WalletFreezeVo> scopePageList(Page page, @Param("dto") WalletFreezeDto dto, DataScope dataScope);
|
||||
}
|
||||
+18
-2
@@ -1,8 +1,11 @@
|
||||
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;
|
||||
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.WalletManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
@@ -61,7 +64,7 @@ public interface WalletManageMapper extends PjcloudBaseMapper<WalletManageEntity
|
||||
.selectAll(WalletManageEntity.class)
|
||||
.selectAs(WalletTypeEntity::getName, WalletManageVo::getWalletTypeName)
|
||||
.selectAs(WalletTypeEntity::getUniqueCode, WalletManageVo::getWalletTypeUniqueCode)
|
||||
.selectAs(WalletTypeEntity::getIcon, WalletManageVo::getWalletIcon)
|
||||
.selectAs(WalletTypeEntity::getIcon, WalletManageVo::getWalletTypeIcon)
|
||||
.leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletManageEntity::getWalletTypeId)
|
||||
.eqIfExists(WalletManageEntity::getUserId, dto.getUserId())
|
||||
.eqIfExists(WalletManageEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
@@ -86,9 +89,22 @@ public interface WalletManageMapper extends PjcloudBaseMapper<WalletManageEntity
|
||||
.selectAll(WalletManageEntity.class)
|
||||
.selectAs(WalletTypeEntity::getName, WalletManageVo::getWalletTypeName)
|
||||
.selectAs(WalletTypeEntity::getUniqueCode, WalletManageVo::getWalletTypeUniqueCode)
|
||||
.selectAs(WalletTypeEntity::getIcon, WalletManageVo::getWalletIcon)
|
||||
.selectAs(WalletTypeEntity::getIcon, WalletManageVo::getWalletTypeIcon)
|
||||
.leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletManageEntity::getWalletTypeId)
|
||||
.eqIfExists(WalletManageEntity::getId, id);
|
||||
return selectJoinOne(WalletManageVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<WalletManageVo> scopePageList(Page page, WalletManageDto dto) {
|
||||
LambdaQueryWrapper<WalletManageEntity> wrapper = new LambdaQueryWrapper<WalletManageEntity>()
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getUserId()), WalletManageEntity::getUserId, dto.getUserId())
|
||||
.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());
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletManageVo.class));
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
+13
@@ -1,7 +1,10 @@
|
||||
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.WalletStrideDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletStrideEntity;
|
||||
@@ -27,4 +30,14 @@ public interface WalletStrideMapper extends PjcloudBaseMapper<WalletStrideEntity
|
||||
.eq(WalletStrideEntity::getId, id);
|
||||
return selectJoinOne(WalletStrideVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<WalletStrideVo> scopePageList(Page page, WalletStrideDto dto) {
|
||||
LambdaQueryWrapper<WalletStrideEntity> wrapper = new LambdaQueryWrapper<WalletStrideEntity>()
|
||||
.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());
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletStrideVo.class));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+13
-1
@@ -1,7 +1,10 @@
|
||||
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;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
@@ -18,7 +21,7 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper<WalletRecha
|
||||
MPJLambdaWrapper<WalletRechargeApplyEntity> wrapper = new MPJLambdaWrapper<WalletRechargeApplyEntity>()
|
||||
.selectAll(WalletRechargeApplyEntity.class)
|
||||
.selectAs(WalletTypeEntity::getName, WalletRechargeApplyVo::getWalletTypeName)
|
||||
.selectAs(WalletTypeEntity::getUniqueCode, WalletRechargeApplyVo::getUniqueCode)
|
||||
.selectAs(WalletTypeEntity::getUniqueCode, WalletRechargeApplyVo::getWalletTypeUniqueCode)
|
||||
.leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletRechargeApplyEntity::getWalletTypeId)
|
||||
.eqIfExists(WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
|
||||
@@ -26,4 +29,13 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper<WalletRecha
|
||||
return selectJoinPage(page, 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())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletRechargeApplyEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeIds());
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletRechargeApplyVo.class));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -1,10 +1,12 @@
|
||||
package com.bsd.pjcloud.wallet.mapper.recharge;
|
||||
|
||||
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.recharge.WalletRechargeDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargePackageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -16,4 +18,11 @@ public interface WalletRechargeMapper extends PjcloudBaseMapper<WalletRechargeEn
|
||||
MPJLambdaWrapper<WalletRechargeEntity> wrapper = new MPJLambdaWrapper<WalletRechargeEntity>();
|
||||
return selectJoinPage(page, WalletRechargeVo.class, wrapper);
|
||||
}
|
||||
|
||||
default Page<WalletRechargeVo> scopePageList(Page page, WalletRechargeDto dto) {
|
||||
LambdaQueryWrapper<WalletRechargeEntity> wrapper = new LambdaQueryWrapper<WalletRechargeEntity>();
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
list.setRecords(BeanUtils.toBean(list.getRecords(), WalletRechargeVo.class));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -29,5 +29,5 @@ public interface WalletActiveService extends IService<WalletActiveEntity> {
|
||||
|
||||
Page<WalletActiveVo> pageJoin(Page page, WalletActiveDto dto);
|
||||
|
||||
Page<WalletActiveVo> scopePage(Page page, WalletActiveDto dto);
|
||||
Page<WalletActiveVo> scopePageList(Page page, WalletActiveDto dto);
|
||||
}
|
||||
+2
@@ -13,6 +13,8 @@ public interface WalletForeignService extends IService<WalletForeignEntity> {
|
||||
|
||||
Page<WalletForeignVo> pageJoin(Page page, WalletForeignDto dto);
|
||||
|
||||
Page<WalletForeignVo> scopePageList(Page page, WalletForeignDto dto);
|
||||
|
||||
WalletForeignVo join(Long id);
|
||||
|
||||
void applyCallback(ProcessNodeRecordAssignUserParamDto dto);
|
||||
|
||||
+2
@@ -11,6 +11,8 @@ public interface WalletFreezeService extends IService<WalletFreezeEntity> {
|
||||
|
||||
Page<WalletFreezeVo> pageJoin(Page page, WalletFreezeDto dto);
|
||||
|
||||
Page<WalletFreezeVo> scopePageList(Page page, WalletFreezeDto dto);
|
||||
|
||||
Long create(WalletFreezeDto dto);
|
||||
|
||||
void applyCallback(ProcessNodeRecordAssignUserParamDto dto);
|
||||
|
||||
+4
-1
@@ -78,12 +78,15 @@ public interface WalletManageService extends IService<WalletManageEntity> {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
R pageJoin(Page page, WalletManageDto dto);
|
||||
Page<WalletManageVo> pageJoin(Page page, WalletManageDto dto);
|
||||
|
||||
Page<WalletManageVo> scopePageList(Page page, WalletManageDto dto);
|
||||
|
||||
WalletManageVo join(Long id, Long walletId);
|
||||
|
||||
/**
|
||||
* 生成钱包二维码参数
|
||||
*
|
||||
* @param walletId 钱包id
|
||||
*/
|
||||
String getQrCode(Long walletId);
|
||||
|
||||
+2
@@ -18,6 +18,8 @@ public interface WalletRechargeApplyService extends IService<WalletRechargeApply
|
||||
|
||||
Page<WalletRechargeApplyVo> pageJoin(Page page, WalletRechargeApplyDto dto);
|
||||
|
||||
Page<WalletRechargeApplyVo> scopePageList(Page page, WalletRechargeApplyDto dto);
|
||||
|
||||
/**
|
||||
* 提交申请
|
||||
*
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ public interface WalletRechargeService extends IService<WalletRechargeEntity> {
|
||||
|
||||
Page<WalletRechargeVo> pageJoin(Page page, WalletRechargeDto dto);
|
||||
|
||||
Page<WalletRechargeVo> scopePageList(Page page, WalletRechargeDto dto);
|
||||
|
||||
/**
|
||||
* app充值
|
||||
*
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ public interface WalletStrideService extends IService<WalletStrideEntity> {
|
||||
|
||||
Page<WalletStrideVo> pageJoin(Page page, WalletStrideDto dto);
|
||||
|
||||
Page<WalletStrideVo> scopePageList(Page page, WalletStrideDto dto);
|
||||
|
||||
WalletStrideVo join(Long id);
|
||||
|
||||
Boolean apply(WalletStrideDto dto);
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ public interface WalletTransactionService extends IService<WalletTransactionEnti
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Page<WalletTransactionVo> pageJoin(Page page, WalletTransactionDto dto);
|
||||
Page<WalletTransactionVo> scopePageList(Page page, WalletTransactionDto dto);
|
||||
}
|
||||
+5
-6
@@ -2,7 +2,6 @@ package com.bsd.pjcloud.wallet.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.admin.api.entity.SysDept;
|
||||
@@ -51,11 +50,11 @@ import java.util.Map;
|
||||
@Service
|
||||
public class WalletActiveServiceImpl extends ServiceImpl<WalletActiveMapper, WalletActiveEntity> implements WalletActiveService {
|
||||
|
||||
private final WalletTypeMapper walletTypeMapper;
|
||||
|
||||
private final WalletTypeService walletTypeService;
|
||||
private final MchManageService mchManageService;
|
||||
|
||||
private final WalletTypeMapper walletTypeMapper;
|
||||
|
||||
private final RemoteUserService userService;
|
||||
private final RemoteDeptService deptService;
|
||||
|
||||
@@ -141,7 +140,7 @@ public class WalletActiveServiceImpl extends ServiceImpl<WalletActiveMapper, Wal
|
||||
walletTypeDto.setWalletTypeIds(walletTypeIds);
|
||||
List<WalletTypeEntity> walletTypeList = walletTypeMapper.list(walletTypeDto);
|
||||
if (ObjectUtil.isNotEmpty(walletTypeList)) {
|
||||
WalletDataUtil.convertWalletTYpeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
WalletDataUtil.convertWalletTypeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,8 +148,8 @@ public class WalletActiveServiceImpl extends ServiceImpl<WalletActiveMapper, Wal
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletActiveVo> scopePage(Page page, WalletActiveDto dto) {
|
||||
Page<WalletActiveVo> list = baseMapper.scopePage(page, dto);
|
||||
public Page<WalletActiveVo> scopePageList(Page page, WalletActiveDto dto) {
|
||||
Page<WalletActiveVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletActiveVo::getUserId).distinct().toList();
|
||||
|
||||
+34
-6
@@ -92,15 +92,43 @@ public class WalletForeignServiceImpl extends ServiceImpl<WalletForeignMapper, W
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletForeignVo::getUserId).distinct().toList();
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletForeignVo::getDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletForeignVo> scopePageList(Page page, WalletForeignDto dto) {
|
||||
Page<WalletForeignVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletForeignVo::getUserId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletForeignVo::getDeptId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
+38
-7
@@ -16,6 +16,7 @@ import com.bsd.pjcloud.admin.api.utils.DataUtil;
|
||||
import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum;
|
||||
import com.bsd.pjcloud.common.core.util.CollectionUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.flow.task.constant.NodeStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordAssignUserParamDto;
|
||||
@@ -67,15 +68,45 @@ public class WalletFreezeServiceImpl extends ServiceImpl<WalletFreezeMapper, Wal
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletFreezeVo::getUserId).distinct().toList();
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(page.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(page.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletFreezeVo::getDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(page.getRecords(), deptList.getData());
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(page.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletFreezeVo> scopePageList(Page page, WalletFreezeDto dto) {
|
||||
DataScope dataScope = new DataScope();
|
||||
dataScope.put("scopeDeptName", "a.dept_id");
|
||||
Page<WalletFreezeVo> list = baseMapper.scopePageList(page, dto, dataScope);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletFreezeVo::getUserId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(page.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletFreezeVo::getDeptId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(page.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
@@ -144,5 +175,5 @@ public class WalletFreezeServiceImpl extends ServiceImpl<WalletFreezeMapper, Wal
|
||||
);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+33
-2
@@ -25,8 +25,10 @@ import com.bsd.pjcloud.hard.api.dto.code.QRCodeDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.code.QRCodeExtraDto;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletTypeDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.utils.WalletDataUtil;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletManageVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletSettingVo;
|
||||
import com.bsd.pjcloud.wallet.mapper.WalletManageMapper;
|
||||
@@ -198,7 +200,7 @@ public class WalletManageServiceImpl extends ServiceImpl<WalletManageMapper, Wal
|
||||
}
|
||||
|
||||
@Override
|
||||
public R pageJoin(Page page, WalletManageDto dto) {
|
||||
public Page<WalletManageVo> pageJoin(Page page, WalletManageDto dto) {
|
||||
Page<WalletManageVo> list = baseMapper.pageJoin(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
@@ -214,7 +216,36 @@ public class WalletManageServiceImpl extends ServiceImpl<WalletManageMapper, Wal
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
return R.ok(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletManageVo> scopePageList(Page page, WalletManageDto dto) {
|
||||
Page<WalletManageVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletManageVo::getUserId).distinct().toList();
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletManageVo::getDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
// 饭卡类型
|
||||
List<Long> walletTypeId = list.getRecords().stream().map(WalletManageVo::getWalletTypeId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(walletTypeId)) {
|
||||
WalletTypeDto walletTypeDto = new WalletTypeDto();
|
||||
List<WalletTypeEntity> walletTypeList = walletTypeMapper.list(walletTypeDto);
|
||||
if (ObjectUtil.isNotEmpty(walletTypeList)) {
|
||||
WalletDataUtil.convertWalletTypeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+34
-6
@@ -103,15 +103,43 @@ public class WalletStrideServiceImpl extends ServiceImpl<WalletStrideMapper, Wal
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletStrideVo::getUserId).distinct().toList();
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletStrideVo::getDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletStrideVo> scopePageList(Page page, WalletStrideDto dto) {
|
||||
Page<WalletStrideVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletStrideVo::getUserId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletStrideVo::getDeptId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ public class WalletTransactionServiceImpl extends ServiceImpl<WalletTransactionM
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletTransactionVo> pageJoin(Page page, WalletTransactionDto dto) {
|
||||
public Page<WalletTransactionVo> scopePageList(Page page, WalletTransactionDto dto) {
|
||||
Page<WalletTransactionVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
@@ -185,7 +185,7 @@ public class WalletTransactionServiceImpl extends ServiceImpl<WalletTransactionM
|
||||
walletTypeDto.setWalletTypeIds(walletTypeIds);
|
||||
List<WalletTypeEntity> walletTypeList = walletTypeMapper.list(walletTypeDto);
|
||||
if (ObjectUtil.isNotEmpty(walletTypeList)) {
|
||||
WalletDataUtil.convertWalletTYpeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
WalletDataUtil.convertWalletTypeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
}
|
||||
}
|
||||
// 订单
|
||||
|
||||
+49
-6
@@ -27,14 +27,18 @@ import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordAssignUserParamDto;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletBizEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletBizRechargeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletTypeDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.excel.WalletRechargeExcelDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
|
||||
import com.bsd.pjcloud.wallet.api.utils.WalletDataUtil;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletActiveVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyVo;
|
||||
import com.bsd.pjcloud.wallet.mapper.WalletTransactionMapper;
|
||||
import com.bsd.pjcloud.wallet.mapper.WalletTypeMapper;
|
||||
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeApplyMapper;
|
||||
import com.bsd.pjcloud.wallet.service.WalletManageService;
|
||||
import com.bsd.pjcloud.wallet.service.WalletRechargeApplyService;
|
||||
@@ -72,6 +76,7 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl<WalletRechargeAp
|
||||
private final WalletTypeService walletTypeService;
|
||||
|
||||
private final WalletTransactionMapper walletTransactionMapper;
|
||||
private final WalletTypeMapper walletTypeMapper;
|
||||
|
||||
private final RemoteUserService userService;
|
||||
private final RemoteDeptService deptService;
|
||||
@@ -92,15 +97,53 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl<WalletRechargeAp
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletRechargeApplyVo::getUserId).distinct().toList();
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletRechargeApplyVo::getDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletRechargeApplyVo> scopePageList(Page page, WalletRechargeApplyDto dto) {
|
||||
Page<WalletRechargeApplyVo> list = baseMapper.scopePageList(page, dto);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(WalletRechargeApplyVo::getUserId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(userIds)) {
|
||||
R<List<SysUser>> userList = userService.getUserById(new ArrayList<>(userIds));
|
||||
if (ObjectUtil.isNotEmpty(userList.getData())) {
|
||||
DataUtil.convertUserList(list.getRecords(), CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.getRecords().stream().map(WalletRechargeApplyVo::getDeptId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(deptIds)) {
|
||||
R<Map<Long, SysDept>> deptList = deptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
DataUtil.convertDeptList(list.getRecords(), deptList.getData());
|
||||
}
|
||||
}
|
||||
// 饭卡类型
|
||||
List<Long> walletTypeIds = list.getRecords().stream().map(WalletRechargeApplyVo::getWalletTypeId).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(walletTypeIds)) {
|
||||
WalletTypeDto walletTypeDto = new WalletTypeDto();
|
||||
walletTypeDto.setWalletTypeIds(walletTypeIds);
|
||||
List<WalletTypeEntity> walletTypeList = walletTypeMapper.list(walletTypeDto);
|
||||
if (ObjectUtil.isNotEmpty(walletTypeList)) {
|
||||
WalletDataUtil.convertWalletTypeList(list.getRecords(), CollectionUtils.convertMap(walletTypeList, WalletTypeEntity::getId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
+6
@@ -52,6 +52,12 @@ public class WalletRechargeServiceImpl extends ServiceImpl<WalletRechargeMapper,
|
||||
return baseMapper.pageJoin(page, dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletRechargeVo> scopePageList(Page page, WalletRechargeDto dto) {
|
||||
Page<WalletRechargeVo> list = baseMapper.scopePageList(page, dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public WalletRechargeEntity createWalletRecharge(WalletAppRechargeDto dto) {
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.wallet.mapper.WalletFreezeMapper">
|
||||
|
||||
<resultMap id="walletFreezeMap" type="com.bsd.pjcloud.wallet.api.entity.WalletFreezeEntity">
|
||||
<resultMap id="walletFreezeMap" type="com.bsd.pjcloud.wallet.api.entity.WalletFreezeEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="processId" column="process_id"/>
|
||||
<result property="processStatus" column="process_status"/>
|
||||
<result property="walletId" column="wallet_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="freeStatus" column="free_status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
@@ -15,5 +17,46 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectA">
|
||||
select a.id,
|
||||
a.process_id,
|
||||
a.process_status,
|
||||
a.wallet_id,
|
||||
a.user_id,
|
||||
a.dept_id,
|
||||
a.free_status,
|
||||
a.remark,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.tenant_id,
|
||||
</sql>
|
||||
|
||||
<sql id="whereA">
|
||||
a.del_flag = 0
|
||||
<if test="dto.userIds">
|
||||
and a.user_id in
|
||||
<foreach collection="dto.userIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="scopePageList" resultType="com.bsd.pjcloud.wallet.api.vo.WalletFreezeVo">
|
||||
<include refid="selectA"/>
|
||||
w.wallet_type_id,
|
||||
w.card_number
|
||||
from wallet_freeze a
|
||||
left join wallet_manage w on w.id = a.wallet_id
|
||||
<where>
|
||||
<include refid="whereA"/>
|
||||
<if test="dto.userIds">
|
||||
and w.card_number like concat('%', #{dto.cardNumber}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user