Просмотр исходного кода

贸易订单下单、修改时新增单位联系人id字段,详情返回联系人id

yzc 2 лет назад
Родитель
Сommit
ebc989ceb1

+ 3 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java

@@ -521,7 +521,7 @@ public class KwoTradeOrderService {
         List<KwoTradeOrderUnit> units = kwoTradeOrderUnitService.getByOrderId(id);
         if (CollectionUtils.isNotEmpty(units)) {
             List<UnitInfoDetailRes> unitInfos = new ArrayList<>(units.size());
-            units.forEach(e->{
+            units.forEach(e -> {
                 UnitInfoDetailRes unit = BeanUtils.copyProperties(e, UnitInfoDetailRes.class);
                 unit.setUnitTypeLabel(DictEnum.getLabel(DictTypeEnum.TORDER_UNIT_TYPE.getType(), unit.getUnitType()));
                 unitInfos.add(unit);
@@ -947,7 +947,8 @@ public class KwoTradeOrderService {
         }
         //排除草稿状态权限匹配
         List<Long> filterIds = list.stream().filter(e -> !(Objects.equals(e.getStatus(), 0))).map(KwoTradeOrder::getId).toList();
-        if (kwoTradeOrderUnitService.entBatchMatch(filterIds, LoginUserHolder.getEntId(), String.valueOf(param.getOrderType()))) {
+        if (CollectionUtils.isNotEmpty(filterIds) &&
+                kwoTradeOrderUnitService.entBatchMatch(filterIds, LoginUserHolder.getEntId(), String.valueOf(param.getOrderType()))) {
             throw new BusinessException("无订单操作权限!");
         }
         LambdaUpdateWrapper<KwoTradeOrder> updateWrapper = new LambdaUpdateWrapper<>();

+ 2 - 0
sckw-modules/sckw-order/src/main/resources/mapper/KwoTradeOrderUnitMapper.xml

@@ -12,6 +12,7 @@
             ent_id,
             top_ent_id,
             firm_name,
+            contacts_id,
             contacts,
             phone,
             remark,
@@ -32,6 +33,7 @@
                 #{item.entId,jdbcType=VARCHAR},
                 #{item.topEntId,jdbcType=VARCHAR},
                 #{item.firmName,jdbcType=VARCHAR},
+                #{item.contactsId,jdbcType=BIGINT},
                 #{item.contacts,jdbcType=VARCHAR},
                 #{item.phone,jdbcType=VARCHAR},
                 #{item.remark,jdbcType=VARCHAR},