dev^2
itcast 1 year ago
parent 30459b43dd
commit 5c6a761b33
  1. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@ -24,7 +25,7 @@ import java.util.Map;
* @Version: V1.0
*/
@Transactional
@Service
public class FieldxServiceImpl extends ServiceImpl<FieldxMapper, Fieldx> implements IFieldxService {
@Autowired
@ -40,9 +41,11 @@ public class FieldxServiceImpl extends ServiceImpl<FieldxMapper, Fieldx> impleme
Thread.sleep(500L);
message.put("uploaded", String.valueOf(i + 1));
this.save(fieldxList.get(i));
Tablex tablex = tablexService.getById(fieldxList.get(i).getTableId());
tablexService.updateVersion(fieldxList.get(i).getTableId(), tablex.getVerison() + 1);
tablexService.updateSql(fieldxList.get(i).getTableId(), fieldxController.createSql(fieldxList.get(i).getTableId()));
if(fieldxList.get(i).getAssociateTable()==null&&fieldxList.get(i).getAssociateField()==null){
Tablex tablex = tablexService.getById(fieldxList.get(i).getTableId());
tablexService.updateVersion(fieldxList.get(i).getTableId(), tablex.getVerison() + 1);
tablexService.updateSql(fieldxList.get(i).getTableId(), fieldxController.createSql(fieldxList.get(i).getTableId()));
}
webSocketUtils.sendMessage(loginUser.getId(), message);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);

Loading…
Cancel
Save