修改mybatis更新策略配置,避免null的字段没法更新
| | |
| | |
|
| | | //清空原有的machine的plantId
|
| | | List<Long> oriMachineIds = this.parseMachineIdInGrid(oriGridSetting);
|
| | | logger.info("厂房原有机床id:{}",oriMachineIds);
|
| | | for(Long mid:oriMachineIds ) {
|
| | | Machine m = machineMapper.selectById(mid);
|
| | | if(m != null) {
|
| | | m.setPlantId(null);
|
| | | machineMapper.updateById(m);
|
| | | logger.info("清理机床id:{}",mid);
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | //新配置的机床,更新plantId
|
| | | List<Long> machineIds = this.parseMachineIdInGrid(plantDTO.getGridSetting());
|
| | |
|
| | |
| | | mapper-locations: classpath:mapper/*.xml
|
| | | type-aliases-package: com.qianwen.mdc.domain
|
| | |
|
| | | mybatis-plus:
|
| | | global-config:
|
| | | db-config:
|
| | | updateStrategy: 0
|
| | | |
| | | wfg:
|
| | | # 请一定注意! WorkerIdBitLength + SeqBitLength + DataCenterIdBitLength <= 22
|
| | | # 1表示雪花漂移算法,2表示传统雪花算法
|