Commit 484a8d17 by 陶光胜

配置表

parent 93157098
......@@ -21,10 +21,7 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
@Service("customSettingApiService")
public class CustomSettingApiServiceImpl implements CustomSettingApiService {
......@@ -75,14 +72,18 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
}
}
log.info("params:{}", JSON.toJSONString(map));
Date date = new Date();
if(map.get(PRIMARYKEY) != null){
//更新
map.put("update_time", date);
MongoUpdateDTO mongoUpdateDTO = new MongoUpdateDTO();
mongoUpdateDTO.setDataBaseAndCollectionName(DATABASENAME, tableName);
mongoUpdateDTO.setData(map);
ServiceResponse<Integer> update = mongoOperApiService.update(mongoUpdateDTO);
log.info("update:{}", JSON.toJSONString(update));
} else {
map.put("update_time", date);
map.put("create_time", date);
MongoSaveDTO mongoSaveDTO = new MongoSaveDTO();
mongoSaveDTO.setDataBaseAndCollectionName(DATABASENAME, tableName);
mongoSaveDTO.setData(map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment