.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package net.tccn.plat;
|
||||
|
||||
import net.tccn.base.JBean;
|
||||
import net.tccn.base.Kv;
|
||||
import net.tccn.base.PageBean;
|
||||
import net.tccn.service.BaseService;
|
||||
import org.redkale.net.http.RestMapping;
|
||||
@@ -9,8 +8,6 @@ import org.redkale.net.http.RestService;
|
||||
import org.redkale.source.Flipper;
|
||||
import org.redkale.util.Comment;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RestService(name = "plat", automapping = true, comment = "业务/数据平台")
|
||||
public class PlatService extends BaseService {
|
||||
|
||||
@@ -51,18 +48,15 @@ public class PlatService extends BaseService {
|
||||
}
|
||||
|
||||
@RestMapping(name = "db_save", comment = "数据源信息保存")
|
||||
public JBean dbSave(String plat) {
|
||||
Map map = gson.fromJson(plat, Map.class);
|
||||
DbPlat dbPlat = Kv.toBean(map, DbPlat.class);
|
||||
public JBean dbSave(DbPlat plat) {
|
||||
|
||||
// todo: Kv.toBean 的内部属性深度转换,
|
||||
/*if (dbPlat.getKey() == null) {
|
||||
dbPlat.save();
|
||||
if (plat.getKey() == null) {
|
||||
plat.save();
|
||||
} else {
|
||||
dbPlat.update();
|
||||
}*/
|
||||
plat.update();
|
||||
}
|
||||
|
||||
return new JBean().setBody(dbPlat);
|
||||
return new JBean();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user