Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1b8da11b29
7 files changed
+36
-46
No files matched your search
+4
-1
@@ -380,12 +380,13 @@ public class HardOrderTotalController {
|
||||
// 单次扣减
|
||||
if (ObjectUtil.isNotEmpty(v.getWalletOnceReducePrice())) {
|
||||
walletOnceReducePriceSum = walletOnceReducePriceSum.add(BigDecimal.valueOf(v.getWalletOnceReducePrice()));
|
||||
v.setWalletOncePrice(BigDecimal.valueOf(v.getWalletOnceReducePrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
v.setWalletOnceReducePrice(BigDecimal.valueOf(v.getWalletOnceReducePrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(v.getWalletOnceReduceCount())) {
|
||||
walletOnceReduceCountSum = walletOnceReduceCountSum.add(BigDecimal.valueOf(v.getWalletOnceReduceCount()));
|
||||
v.setWalletOnceReduceCount(BigDecimal.valueOf(v.getWalletOnceReduceCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
}
|
||||
//
|
||||
if (ObjectUtil.isNotEmpty(v.getOrderPayPrice())) {
|
||||
orderPayPriceSum = orderPayPriceSum.add(BigDecimal.valueOf(v.getOrderPayPrice()));
|
||||
v.setOrderPayPrice(BigDecimal.valueOf(v.getOrderPayPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
@@ -394,6 +395,7 @@ public class HardOrderTotalController {
|
||||
orderPayCountSum = orderPayCountSum.add(BigDecimal.valueOf(v.getOrderPayCount()));
|
||||
v.setOrderPayCount(BigDecimal.valueOf(v.getOrderPayCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
}
|
||||
//
|
||||
if (ObjectUtil.isNotEmpty(v.getOrderRefundPrice())) {
|
||||
orderRefundPriceSum = orderRefundPriceSum.add(BigDecimal.valueOf(v.getOrderRefundPrice()));
|
||||
v.setOrderRefundPrice(BigDecimal.valueOf(v.getOrderRefundPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
@@ -402,6 +404,7 @@ public class HardOrderTotalController {
|
||||
orderRefundContSum = orderRefundContSum.add(BigDecimal.valueOf(v.getOrderRefundCont()));
|
||||
v.setOrderRefundCont(BigDecimal.valueOf(v.getOrderRefundCont()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
}
|
||||
//
|
||||
if (ObjectUtil.isNotEmpty(v.getOrderProfitPrice())) {
|
||||
orderProfitPriceSum = orderProfitPriceSum.add(BigDecimal.valueOf(v.getOrderProfitPrice()));
|
||||
v.setOrderProfitPrice(BigDecimal.valueOf(v.getOrderProfitPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public interface HardManagerMapper extends PjcloudBaseMapper<HardManagerEntity>
|
||||
.like(ObjectUtil.isNotEmpty(dto.getName()), HardManagerEntity::getName, dto.getName())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getDeptId()), HardManagerEntity::getDeptId, dto.getDeptId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getType()), HardManagerEntity::getType, dto.getType())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getType()), HardManagerEntity::getMerchantId, dto.getMerchantId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getMerchantId()), 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)
|
||||
|
||||
+11
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.wallet.api.dto.recharge;
|
||||
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -12,6 +13,16 @@ public class WalletRechargeApplyDto extends WalletRechargeApplyEntity {
|
||||
|
||||
private List<Long> walletTypeIds;
|
||||
|
||||
/**
|
||||
* 创建时间搜索
|
||||
*/
|
||||
private LocalDateTime[] createTimeList;
|
||||
|
||||
/**
|
||||
* 审批时间搜索
|
||||
*/
|
||||
private LocalDateTime[] processTimeList;
|
||||
|
||||
/**
|
||||
* 审批相关
|
||||
*/
|
||||
|
||||
+20
-17
@@ -29,34 +29,37 @@ 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())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeIds())
|
||||
.between(
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()),
|
||||
WalletRechargeApplyEntity::getCreateTime,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
|
||||
)
|
||||
.between(
|
||||
ObjectUtil.isNotEmpty(dto.getProcessTimeList()),
|
||||
WalletRechargeApplyEntity::getProcessTime,
|
||||
ObjectUtil.isNotEmpty(dto.getProcessTimeList()) ? dto.getProcessTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getProcessTimeList()) ? dto.getProcessTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getId);
|
||||
return selectJoinPage(page, WalletRechargeApplyVo.class, wrapper);
|
||||
}
|
||||
|
||||
default List<WalletRechargeApplyVo> listJoin(WalletRechargeApplyDto dto) {
|
||||
MPJLambdaWrapper<WalletRechargeApplyEntity> wrapper = new MPJLambdaWrapper<WalletRechargeApplyEntity>()
|
||||
.selectAll(WalletRechargeApplyEntity.class)
|
||||
.selectAs(WalletTypeEntity::getName, WalletRechargeApplyVo::getWalletTypeName)
|
||||
.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())
|
||||
.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.getBizType()), WalletRechargeApplyEntity::getBizType, dto.getBizType())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getWalletTypeId()), WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getProcessStatus()), WalletRechargeApplyEntity::getProcessStatus, dto.getProcessStatus())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletRechargeApplyEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeIds())
|
||||
.between(
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()),
|
||||
WalletRechargeApplyEntity::getCreateTime,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
|
||||
ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
|
||||
)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getCreateTime)
|
||||
.orderByDesc(WalletRechargeApplyEntity::getId);
|
||||
Page list = selectPageByScope(page, wrapper, DataScope.of());
|
||||
|
||||
-2
@@ -22,8 +22,6 @@ public interface WalletRechargeApplyService extends IService<WalletRechargeApply
|
||||
|
||||
Page<WalletRechargeApplyVo> pageJoin(Page page, WalletRechargeApplyDto dto);
|
||||
|
||||
List<WalletRechargeApplyVo> listJoin(WalletRechargeApplyDto dto);
|
||||
|
||||
Page<WalletRechargeApplyVo> scopePageList(Page page, WalletRechargeApplyDto dto);
|
||||
|
||||
/**
|
||||
|
||||
-23
@@ -140,29 +140,6 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl<WalletRechargeAp
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WalletRechargeApplyVo> listJoin(WalletRechargeApplyDto dto) {
|
||||
List<WalletRechargeApplyVo> list = baseMapper.listJoin(dto);
|
||||
if (ObjectUtil.isNotEmpty(list)) {
|
||||
// 用户
|
||||
List<Long> userIds = list.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, CollectionUtils.convertMap(userList.getData(), SysUser::getUserId));
|
||||
}
|
||||
}
|
||||
// 部门
|
||||
List<Long> deptIds = list.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, deptList.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WalletRechargeApplyVo> scopePageList(Page page, WalletRechargeApplyDto dto) {
|
||||
|
||||
-2
@@ -3,9 +3,7 @@ package com.bsd.pjcloud.wallet.service.impl.thrid;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSON;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.admin.api.dto.UserDTO;
|
||||
import com.bsd.pjcloud.admin.api.entity.SysDept;
|
||||
|
||||
Reference in new issue
Block a user