Merge remote-tracking branch 'origin/master'

This commit is contained in:
zjf committed 2025-03-24 17:59:59 +08:00
commit ab33a29662
16 files changed
+317 -225

No files matched your search

@@ -0,0 +1,25 @@
package com.bsd.pjcloud.hard.api.constant;
import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* 商品性质
*/
@AllArgsConstructor
@Getter
public enum HardProductNatureEnum {
DEFAULT("1", "普通商品按数量"),
WEIGHT("2", "电子称称重商品"),
;
private final String type;
private final String description;
public static HardProductNatureEnum valueOfByType(String type) {
if (ObjectUtil.isEmpty(type)) return null;
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
}
}
@@ -1,5 +1,6 @@
package com.bsd.pjcloud.hard.api.dto.order;
import com.bsd.pjcloud.hard.api.constant.HardProductNatureEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -13,6 +14,9 @@ public class HardCreateCarDto {
@Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1034")
private Long productId;
@Schema(description = "食堂性质", requiredMode = Schema.RequiredMode.REQUIRED, example = "20798")
private HardProductNatureEnum productNature;
// TODO 食堂特有
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20798")
private Integer productCount;
@@ -8,7 +8,7 @@ import java.util.List;
@Data
public class HardOrderSumAndCountDto {
private List<Long> deptIds;
private List<Long> userDeptIds;
private List<String> orderStatusCodes;
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -25,100 +26,108 @@ import java.time.LocalDateTime;
public class HardCarEntity extends Model<HardCarEntity> {
/**
* 编号
*/
/**
* 编号
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description="编号")
@Schema(description = "编号")
private Long id;
/**
* 父购物车id
*/
@Schema(description="父购物车id")
/**
* 父购物车id
*/
@Schema(description = "父购物车id")
private Long parentCarId;
/**
* 商品id
*/
@Schema(description="商品id")
/**
* 商品id
*/
@Schema(description = "商品id")
private Long productId;
/**
* 商品名
*/
@Schema(description="商品名")
/**
* 商品名
*/
@Schema(description = "商品名")
private String productName;
/**
* 商品图片
*/
@Schema(description="商品图片")
/**
* 商品图片
*/
@Schema(description = "商品图片")
private String productPic;
/**
* 商品价格
*/
@Schema(description="商品价格")
/**
* 商品价格
*/
@Schema(description = "商品价格")
private Integer productPrice;
/**
* 数量
*/
@Schema(description="数量")
/**
* 商品性质
*
* @see com.bsd.pjcloud.hard.api.constant.HardProductNatureEnum
*/
@Schema(description = "商品性质")
private String productNature;
/**
* 数量
*/
@Schema(description = "数量")
private Integer productCount;
/**
* 重量
*/
@Schema(description="重量")
/**
* 重量
*/
@Schema(description = "重量")
private BigDecimal productWeight;
/**
* 总价(分)
*/
@Schema(description="总价(分)")
/**
* 总价(分)
*/
@Schema(description = "总价(分)")
private Long totalPrice;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建人")
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建时间")
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改人")
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改人")
private String updateBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改时间")
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description="删除标记")
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记")
private String delFlag;
/**
* 租户ID
*/
@Schema(description="租户ID")
/**
* 租户ID
*/
@Schema(description = "租户ID")
private Long tenantId;
}
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
/**
@@ -24,208 +25,214 @@ import java.time.LocalDateTime;
public class HardOrderEntity extends Model<HardOrderEntity> {
/**
* 编号
*/
/**
* 编号
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description="编号")
@Schema(description = "编号")
private Long id;
/**
* 订单编号
*/
@Schema(description="订单编号 目前正元正在使用")
private String orderNo;
/**
* 订单编号
*/
@Schema(description = "订单编号 目前正元正在使用")
private String orderNo;
/**
* 用户id
*/
@Schema(description="用户id")
/**
* 用户id
*/
@Schema(description = "用户id")
private Long userId;
/**
* 商户id
*/
@Schema(description="商户id")
/**
* 用户部门id
*/
@Schema(description = "用户部门id")
private Long userDeptId;
/**
* 商户id
*/
@Schema(description = "商户id")
private Long merchantId;
/**
* 设备id
*/
@Schema(description="设备id")
/**
* 设备id
*/
@Schema(description = "设备id")
private Long hardId;
/**
* 部门id
*/
@Schema(description="部门id")
/**
* 部门id
*/
@Schema(description = "部门id")
private Long deptId;
/**
* 钱包id
*/
@Schema(description="钱包id")
/**
* 钱包id
*/
@Schema(description = "钱包id")
private Long walletId;
/**
* 购物车父id
*/
@Schema(description="购物车父id")
/**
* 购物车父id
*/
@Schema(description = "购物车父id")
private Long parentCarId;
/**
* 订单类型渠道id
*/
@Schema(description="订单类型渠道id")
/**
* 订单类型渠道id
*/
@Schema(description = "订单类型渠道id")
private Long orderSourceTypeId;
/**
* 订单类型
*/
@Schema(description="订单类型")
/**
* 订单类型
*/
@Schema(description = "订单类型")
private String orderType;
/**
* 订单状态
*/
@Schema(description="订单状态")
/**
* 订单状态
*/
@Schema(description = "订单状态")
private String orderStatus;
/**
* 支付方式
*/
@Schema(description="支付方式")
/**
* 支付方式
*/
@Schema(description = "支付方式")
private String payType;
/**
* 用餐类型
*/
@Schema(description="用餐类型")
/**
* 用餐类型
*/
@Schema(description = "用餐类型")
private String hourType;
/**
* 订单设备类型
*/
@Schema(description="订单设备类型")
/**
* 订单设备类型
*/
@Schema(description = "订单设备类型")
private String sysType;
/**
* 总价(分)
*/
@Schema(description="总价(分)")
/**
* 总价(分)
*/
@Schema(description = "总价(分)")
private Integer totalPrice;
/**
* 额外价格(分)
*/
@Schema(description="额外价格(分)")
/**
* 额外价格(分)
*/
@Schema(description = "额外价格(分)")
private Integer extraPrice;
/**
* 支付金额(分)
*/
@Schema(description="支付金额(分)")
/**
* 支付金额(分)
*/
@Schema(description = "支付金额(分)")
private Integer payPrice;
/**
* 支付时间
*/
@Schema(description="支付时间")
/**
* 支付时间
*/
@Schema(description = "支付时间")
private LocalDateTime payTime;
/**
* 支付退款单号
*/
@Schema(description="支付退款单号")
/**
* 支付退款单号
*/
@Schema(description = "支付退款单号")
private Long payRefundId;
/**
* 退款金额,单位:分
*/
@Schema(description="退款金额,单位:分")
/**
* 退款金额,单位:分
*/
@Schema(description = "退款金额,单位:分")
private Integer refundPrice;
/**
* 退款完成时间
*/
@Schema(description="退款完成时间")
/**
* 退款完成时间
*/
@Schema(description = "退款完成时间")
private LocalDateTime refundTime;
/**
* 退款状态
*/
@Schema(description="退款状态")
/**
* 退款状态
*/
@Schema(description = "退款状态")
private String refundStatus;
/**
* 订单取消时间
*/
@Schema(description="订单取消时间")
/**
* 订单取消时间
*/
@Schema(description = "订单取消时间")
private LocalDateTime applyCancelTime;
/**
* 设备上的唯一订单号
*/
@Schema(description="设备上的唯一订单号")
/**
* 设备上的唯一订单号
*/
@Schema(description = "设备上的唯一订单号")
private String androidOrderCode;
/**
* 是否为离线订单
*/
@Schema(description="是否为离线订单")
/**
* 是否为离线订单
*/
@Schema(description = "是否为离线订单")
private String isOfflineOrder;
/**
* 商品描述
*/
@Schema(description="商品描述")
/**
* 商品描述
*/
@Schema(description = "商品描述")
private String productDesc;
/**
* 离线自动支付是否成功
*/
@Schema(description="离线自动支付是否成功")
/**
* 离线自动支付是否成功
*/
@Schema(description = "离线自动支付是否成功")
private String offlinePaySuccess;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建人")
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建时间")
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改人")
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改人")
private String updateBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改时间")
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description="删除标记")
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记")
private String delFlag;
/**
* 租户ID
*/
@Schema(description="租户ID")
/**
* 租户ID
*/
@Schema(description = "租户ID")
private Long tenantId;
}
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@@ -48,7 +49,8 @@ public class HardOrderCsVo implements BaseMchInterface, BaseHardInterface {
@Schema(description = "总盈利次数")
private BigDecimal totalProfitCount;
private LocalDateTime day;
@Schema(description = "日期")
private String day;
/**
* 导出相关
@@ -64,6 +64,7 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
.selectAs(HardManagerEntity::getName, HardOrderVo::getHardName)
.selectAs(HardManagerEntity::getType, HardOrderVo::getHardType)
.leftJoin(HardManagerEntity.class, HardManagerEntity::getId, HardOrderEntity::getHardId)
.eqIfExists(HardOrderEntity::getMerchantId, dto.getMerchantId())
.eqIfExists(HardOrderEntity::getUserId, dto.getUserId())
.eqIfExists(HardOrderEntity::getDeptId, dto.getDeptId())
.eqIfExists(HardOrderEntity::getOrderType, dto.getOrderType())
@@ -97,7 +98,7 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
List<HardOrderCsVo> listCs(@Param("dto") HardOrderDto dto);
List<HardOrderCsVo> listCsByDay(HardOrderDto totalDto);
List<HardOrderCsVo> listCsByDay(@Param("dto") HardOrderDto totalDto);
List<HardOrderPayTypeVo> listOrerPayType(@Param("dto") HardOrderDto dto);
@@ -59,6 +59,8 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -170,19 +172,27 @@ public class HardInvoiceServiceImpl extends ServiceImpl<HardInvoiceMapper, HardI
drawing.drawingRowText("商品", "数量", "总价");
carList.forEach(v -> {
String name = v.getProductName();
String count = v.getProductCount().toString();
if (count.length() > 4) {
count = count.substring(0, 4) + "...";
if (name.length() > 5) name = name.substring(0, 5) + "...";
// 判断是重量还是数量
String count = "0";
if (ObjectUtil.isNotEmpty(v.getProductCount()) && !ObjectUtil.equals(v.getProductCount(), 0)) {
// 按数量
count = v.getProductCount().toString();
} else if (ObjectUtil.isNotEmpty(v.getProductWeight()) && v.getProductWeight().compareTo(BigDecimal.valueOf(0)) != 0) {
// 按重量
count = v.getProductWeight() + "/kg";
}
String totalPrice = String.valueOf((v.getTotalPrice() / 100));
drawing.drawingRowText(name, count, totalPrice);
BigDecimal totalPrice = BigDecimal.valueOf(v.getTotalPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
drawing.drawingRowText(name, count, String.valueOf(totalPrice.doubleValue()));
});
String totalPrice = String.valueOf(order.getTotalPrice() / 100);
String amountMealPrice = String.valueOf(order.getExtraPrice() / 100);
BigDecimal totalPrice = BigDecimal.valueOf(order.getTotalPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
BigDecimal amountMealPrice = BigDecimal.valueOf(order.getExtraPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
if (ObjectUtil.isNotEmpty(order.getExtraPrice()) && ObjectUtil.notEqual(order.getExtraPrice(), 0)) {
drawing.drawingRowText("额外支付金额", amountMealPrice);
drawing.drawingRowText("额外支付金额", String.valueOf(amountMealPrice.doubleValue()));
}
drawing.drawingRowText("小记", totalPrice).drawingDottedLine();
drawing.drawingRowText("小记", String.valueOf(totalPrice.doubleValue())).drawingDottedLine();
}
String currentTime = LocalDateTimeUtil.format(LocalDateTimeUtil.now(), DatePattern.NORM_DATETIME_PATTERN);
drawing.drawingRowText("打印时间", currentTime).drawingDottedLine();
@@ -240,7 +250,7 @@ public class HardInvoiceServiceImpl extends ServiceImpl<HardInvoiceMapper, HardI
}
@Override
@Transactional(rollbackFor = Exception.class)
// @Transactional(rollbackFor = Exception.class)
public Boolean printByOrder(HardOrderEntity order) {
// 查询商户
MchManageVo mch = remoteMchService.getById(order.getMerchantId()).getData();
@@ -60,6 +60,9 @@ public class HardThirdSelfZyServiceImpl implements HardThirdSelfZyService {
@Transactional(rollbackFor = Exception.class)
public HardCallbackPayVo pay(HardCallbackPayDto dto) {
try {
// 查询用户
UserInfo userDetail = remoteUserService.getByUserId(dto.getUserId()).getData();
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
// 钱包
WalletManageEntity wallet = remoteWalletService.getWallet(dto.getUserId(), WalletTypeEnum.EAT).getData();
if (ObjectUtil.isEmpty(wallet)) throw new RuntimeException("用户钱包不存在");
@@ -78,6 +81,7 @@ public class HardThirdSelfZyServiceImpl implements HardThirdSelfZyService {
HardOrderEntity orderObj = HardOrderEntity.builder()
.orderNo(dto.getOrderNo())
.userId(dto.getUserId())
.userDeptId(userDetail.getSysUser().getDeptId())
.parentCarId(null)
.sysType(null)
.orderStatus(HardOrderStatusEnum.CREATE.getType())
@@ -149,7 +153,7 @@ public class HardThirdSelfZyServiceImpl implements HardThirdSelfZyService {
.build();
hardAfterSaleLogMapper.insert(saveLogObj);
// 执行退款
hardAfterSaleService.refund(saveObj.getId(),"zy");
hardAfterSaleService.refund(saveObj.getId(), "zy");
// 退库存
hardOrderService.fastenerInventory(order, YesNoEnum.NO);
HardCallbackRefundVo result = new HardCallbackRefundVo();
@@ -167,9 +167,11 @@ public class HardCarServiceImpl extends ServiceImpl<HardCarMapper, HardCarEntity
supList.stream().filter(i -> ObjectUtil.equals(i.getId(), v.getProductId())).findFirst().ifPresent(spu -> {
Integer price = getSupermarket(spu);
if (ObjectUtil.isNotEmpty(v.getProductCount()) && !ObjectUtil.equals(v.getProductCount(), 0)) {
// 按数量
int itemTotalPrice = v.getProductCount() * price;
supermarketTotalPrice.addAndGet(itemTotalPrice);
} else if (ObjectUtil.isNotEmpty(v.getProductWeight()) && v.getProductWeight().compareTo(BigDecimal.valueOf(0)) != 0) {
// 按重量
// 向上取整
int itemTotalPrice = v.getProductWeight().multiply(BigDecimal.valueOf(price)).setScale(0, RoundingMode.CEILING).intValue();
supermarketTotalPrice.addAndGet(itemTotalPrice);
@@ -210,6 +212,7 @@ public class HardCarServiceImpl extends ServiceImpl<HardCarMapper, HardCarEntity
item.setProductPrice(spu.getPrice());
item.setProductPic(spu.getPicUrl());
item.setTotalPrice((long) totalPrice);
// item.setProductNature(v.getProductNature().getType());
item.setProductCount(v.getProductCount());
item.setProductWeight(new BigDecimal(0));
carObjectList.add(item);
@@ -228,6 +231,7 @@ public class HardCarServiceImpl extends ServiceImpl<HardCarMapper, HardCarEntity
item.setProductPrice(spu.getPrice());
item.setProductPic(spu.getPicUrl());
item.setTotalPrice((long) totalPrice);
// item.setProductNature(v.getProductNature().getType());
item.setProductCount(v.getProductCount());
item.setProductWeight(new BigDecimal(0));
carObjectList.add(item);
@@ -245,12 +249,21 @@ public class HardCarServiceImpl extends ServiceImpl<HardCarMapper, HardCarEntity
HardCarEntity item = HardCarEntity.builder().parentCarId(parentCarId).build();
supList.stream().filter(i -> ObjectUtil.equals(i.getId(), v.getProductId())).findFirst().ifPresent(spu -> {
Integer price = getSupermarket(spu);
int totalPrice = v.getProductCount() * price;
int totalPrice = 0;
// 按重量
if (ObjectUtil.isNotEmpty(v.getProductCount()) && !ObjectUtil.equals(v.getProductCount(), 0)) {
// 按数量
totalPrice = v.getProductCount() * price;
} else if (ObjectUtil.isNotEmpty(v.getProductWeight()) && v.getProductWeight().compareTo(BigDecimal.valueOf(0)) != 0) {
// 按重量
totalPrice = v.getProductWeight().multiply(BigDecimal.valueOf(price)).setScale(0, RoundingMode.CEILING).intValue();
}
item.setProductId(spu.getId());
item.setProductName(spu.getProductName());
item.setProductPrice(price);
item.setProductPic(spu.getPicUrl());
item.setTotalPrice((long) totalPrice);
// item.setProductNature(v.getProductNature().getType());
item.setProductCount(v.getProductCount());
item.setProductWeight(v.getProductWeight());
carObjectList.add(item);
@@ -230,6 +230,9 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
public Long createOrder(HardCreateOrderDto dto) {
MchManageVo mch = validateCreateOrderDto(dto);
if (ObjectUtil.isEmpty(mch)) throw new RuntimeException("机器绑定的商户不存在");
// 查询用户
UserInfo userDetail = userService.getByUserId(dto.getUserId()).getData();
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
// 是否需要支付
boolean isPay = isPay(dto.getOrderType(), dto.getOrderPayType());
// 是否需要支付额外金额
@@ -266,6 +269,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
HardOrderEntity orderObj = HardOrderEntity.builder()
.androidOrderCode(dto.getAndroidOrderCode())
.userId(dto.getUserId())
.userDeptId(userDetail.getSysUser().getDeptId())
.sysType(dto.getSysType().getType())
.hourType(String.valueOf(dto.getHourType()))
.parentCarId(parentCarId)
@@ -297,6 +301,9 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
// @GlobalTransactional
@Transactional(rollbackFor = Exception.class)
public Long appCreateOrder(@Valid HardAppCreateOrderDto dto) {
// 查询用户
UserInfo userDetail = userService.getByUserId(dto.getUserId()).getData();
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
// 钱包
WalletManageEntity wallet = remoteWalletService.getWallet(dto.getUserId(), dto.getWalletType()).getData();
if (ObjectUtil.isEmpty(wallet)) throw new RuntimeException("用户钱包不存在");
@@ -327,6 +334,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
// 添加硬件订单
HardOrderEntity orderObj = HardOrderEntity.builder()
.userId(dto.getUserId())
.userDeptId(userDetail.getSysUser().getDeptId())
.parentCarId(dto.getCarParentId())
.sysType(dto.getHardType().getType())
.orderStatus(HardOrderStatusEnum.CREATE.getType())
@@ -359,6 +367,9 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
if (ObjectUtil.isEmpty(mch)) {
throw new RuntimeException("商户不存在");
}
// 查询用户
UserInfo userDetail = userService.getByUserId(dto.getUserId()).getData();
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
// 钱包
WalletManageEntity wallet = remoteWalletService.getWallet(dto.getUserId(), dto.getWalletType()).getData();
if (ObjectUtil.isEmpty(wallet)) throw new RuntimeException("用户钱包不存在");
@@ -371,6 +382,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
// 添加硬件订单
HardOrderEntity orderObj = HardOrderEntity.builder()
.userId(dto.getUserId())
.userDeptId(userDetail.getSysUser().getDeptId())
.merchantId(mch.getId())
.parentCarId(dto.getCarParentId())
.sysType(dto.getHardType().getType())
@@ -321,7 +321,7 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
// 查询订单支付流水
CompletableFuture<List<HardOrderSumAndCountVo>> payFuture = CompletableFuture.supplyAsync(() -> {
HardOrderSumAndCountDto payDto = new HardOrderSumAndCountDto();
payDto.setDeptIds(deptIds);
payDto.setUserDeptIds(deptIds);
payDto.setOrderStatusCodes(HardOrderStatusEnum.getPayPrice());
if (ObjectUtil.isNotEmpty(dto.getCreateTimeList())) {
payDto.setCreateTimeList(dto.getCreateTimeList());
@@ -334,7 +334,7 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
// 查询订单退款流水
CompletableFuture<List<HardOrderSumAndCountVo>> refundFuture = CompletableFuture.supplyAsync(() -> {
HardOrderSumAndCountDto refundDto = new HardOrderSumAndCountDto();
refundDto.setDeptIds(deptIds);
refundDto.setUserDeptIds(deptIds);
refundDto.setOrderStatusCodes(HardOrderStatusEnum.getPayErrorCodes());
if (ObjectUtil.isNotEmpty(dto.getCreateTimeList())) {
refundDto.setCreateTimeList(dto.getCreateTimeList());
@@ -347,7 +347,7 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
// 查看盈利流水
CompletableFuture<List<HardOrderSumAndCountVo>> profitFuture = CompletableFuture.supplyAsync(() -> {
HardOrderSumAndCountDto refundDto = new HardOrderSumAndCountDto();
refundDto.setDeptIds(deptIds);
refundDto.setUserDeptIds(deptIds);
refundDto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes());
if (ObjectUtil.isNotEmpty(dto.getCreateTimeList())) {
refundDto.setCreateTimeList(dto.getCreateTimeList());
@@ -6,6 +6,7 @@
<id property="id" column="id"/>
<result property="orderNo" column="order_no"/>
<result property="userId" column="user_id"/>
<result property="userDeptId" column="user_dept_id"/>
<result property="merchantId" column="merchant_id"/>
<result property="hardId" column="hard_id"/>
<result property="deptId" column="dept_id"/>
@@ -42,6 +43,7 @@
select a.id,
a.order_no,
a.user_id,
a.user_dept_id,
a.merchant_id,
a.hard_id,
a.dept_id,
@@ -217,9 +219,9 @@
#{v}
</foreach>
</if>
<if test="dto.deptIds != null and dto.deptIds.size() != 0">
and a.dept_id in
<foreach collection="dto.deptIds" item="v" open="(" close=")" separator=",">
<if test="dto.setUserDeptIds != null and dto.setUserDeptIds.size() != 0">
and a.user_dept_id in
<foreach collection="dto.setUserDeptIds" item="v" open="(" close=")" separator=",">
#{v}
</foreach>
</if>
@@ -5,7 +5,7 @@ import lombok.Data;
import java.util.List;
@Data
public class DeptAllListDto {
public class DeptAllListDto {
private Long deptId;
@@ -21,6 +21,8 @@ public class WalletTransactionSumAndCountDto {
private List<Long> deptIds;
private List<Long> userDeptIds;
private List<String> bizTypes;
private LocalDateTime[] createTimeList;
@@ -23,6 +23,7 @@ public interface MchManageMapper extends PjcloudBaseMapper<MchManageEntity> {
default Page<MchManageVo> pageJoin(Page page, MchManageDto dto) {
MPJLambdaQueryWrapper<MchManageEntity> wrapper = new MPJLambdaQueryWrapper<MchManageEntity>()
.selectAll(MchManageEntity.class)
.eqIfExists(MchManageEntity::getVisibleMobile, dto.getVisibleMobile())
.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())