Browse Source

fix:修改分布式事物无法获取fegin接口数据问题

pull/31/head
pref_mail@163.com 9 months ago
parent
commit
f6c6eda12d
  1. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/BasicDataApplication.java
  2. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/TrunkLineApplication.java
  3. 24
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/BasicDataApplication.java

@ -4,13 +4,16 @@ package com.logpm.basicdata;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.launch.BladeApplication;
import org.springblade.core.transaction.annotation.SeataCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* Basic启动器
*
* @author lmy
*/
@BladeCloudApplication
@EnableFeignClients
@SeataCloudApplication
public class BasicDataApplication {
public static void main(String[] args) {

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/TrunkLineApplication.java

@ -20,13 +20,15 @@ import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.launch.BladeApplication;
import org.springblade.core.transaction.annotation.SeataCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* Demo启动器
*
* @author Chill
*/
@BladeCloudApplication
@EnableFeignClients
@SeataCloudApplication
public class TrunkLineApplication {
public static void main(String[] args) {

24
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -598,23 +598,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
String questNum = this.getQuestNum(myCurrentWarehouse.getWarehouseCode());
taskQuest.setQuestNum(questNum);
if (taskQuest.getList().size() == 0) {
if (taskQuest.getList().isEmpty()) {
taskQuest.setQuestType("2");
}
boolean save = this.save(taskQuest);
//存入子表
if (taskQuest.getList().size() > 0) {
List<TaskQuestChildEntity> list = taskQuest.getList();
for (TaskQuestChildEntity taskQuestChildEntity : list) {
taskQuestChildEntity.setWarehouseId(id);
taskQuestChildEntity.setQuestId(taskQuest.getId());
}
taskQuestChildService.saveBatch(list);
//添加包件信息
List<Long> collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList());
addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId());
if (!taskQuest.getList().isEmpty()) {
// List<TaskQuestChildEntity> list = taskQuest.getList();
// for (TaskQuestChildEntity taskQuestChildEntity : list) {
// taskQuestChildEntity.setWarehouseId(id);
// taskQuestChildEntity.setQuestId(taskQuest.getId());
//
// }
// taskQuestChildService.saveBatch(list);
// //添加包件信息
// List<Long> collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList());
// addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId());
} else {
addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId());
}

Loading…
Cancel
Save