提交 0ceb519d 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibz-data,web]

上级 9bfe1ae2
package cn.ibizlab.core.data.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* [数据源] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("数据源")
public class DSSetting extends EntityBase implements Serializable {
/**
* 标识
*/
@DEField(defaultValue = "dsname", defaultValueType = DEFieldDefaultValueType.PARAM, isKeyField = true)
@JSONField(name = "ds_id")
@JsonProperty("ds_id")
@ApiModelProperty("标识")
private String dsId;
/**
* 数据源名称
*/
@JSONField(name = "ds_name")
@JsonProperty("ds_name")
@ApiModelProperty("数据源名称")
private String dsName;
/**
* 类型
*/
@JSONField(name = "ds_type")
@JsonProperty("ds_type")
@ApiModelProperty("类型")
private String dsType;
/**
* 配置
*/
@JSONField(name = "ds_cfg")
@JsonProperty("ds_cfg")
@ApiModelProperty("配置")
private String dsCfg;
}
package cn.ibizlab.core.data.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.SearchContextBase;
/**
* ServiceApi数据实体[DSSetting] 查询条件对象
*/
@Slf4j
@Data
public class DSSettingSearchContext extends SearchContextBase {
private String n_dsname_like;//[数据源名称]
}
package cn.ibizlab.core.data.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.data.domain.DSSetting;
import cn.ibizlab.core.data.filter.DSSettingSearchContext;
/**
* 实体[DSSetting] 服务对象接口
*/
public interface IDSSettingService {
boolean create(DSSetting et);
void createBatch(List<DSSetting> list);
boolean update(DSSetting et);
void updateBatch(List<DSSetting> list);
boolean remove(String key);
void removeBatch(Collection<String> idList);
DSSetting get(String key);
DSSetting getDraft(DSSetting et);
boolean checkKey(DSSetting et);
boolean save(DSSetting et);
void saveBatch(List<DSSetting> list);
Page<DSSetting> searchDefault(DSSettingSearchContext context);
}
package cn.ibizlab.core.data.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.data.domain.DSSetting;
import cn.ibizlab.core.data.filter.DSSettingSearchContext;
import cn.ibizlab.core.data.service.IDSSettingService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
/**
* 实体[数据源] 无存储服务对象接口实现
*/
@Slf4j
@Service
public class DSSettingServiceImpl implements IDSSettingService {
@Override
public boolean create(DSSetting et) {
//代码实现
return true;
}
public void createBatch(List<DSSetting> list){
}
@Override
public boolean update(DSSetting et) {
//代码实现
return true;
}
public void updateBatch(List<DSSetting> list){
}
@Override
public boolean remove(String key) {
return true;
}
public void removeBatch(Collection<String> idList){
}
@Override
public DSSetting get(String key) {
DSSetting et = new DSSetting();
et.setDsId(key);
return et;
}
@Override
public DSSetting getDraft(DSSetting et) {
return et;
}
@Override
public boolean checkKey(DSSetting et) {
return false;
}
@Override
@Transactional
public boolean save(DSSetting et) {
//代码实现
return true;
}
@Override
public void saveBatch(List<DSSetting> list) {
}
/**
* 查询集合 数据集
*/
@Override
public Page<DSSetting> searchDefault(DSSettingSearchContext context) {
return new PageImpl<DSSetting>(new ArrayList(),context.getPageable(),0);
}
}
......@@ -6,7 +6,7 @@
"entity_name":"DOMODEL",
"logic_name":"业务实体",
"code_name":"DOModel",
"table_name":"T_DOMODEL",
"table_name":"IBZDOMODEL",
"system_id":"ibzdata",
"system_name":"ibzdata",
"module_id":"data",
......@@ -145,13 +145,86 @@
],
"parentEntitys":[
]
}
,
{
"entity_name":"DSSETTING",
"logic_name":"数据源",
"code_name":"DSSetting",
"table_name":"IBZDATASOURCE",
"system_id":"ibzdata",
"system_name":"ibzdata",
"module_id":"data",
"module_name":"data",
"fields":[
{
"fieldname":"DSID" ,
"codename":"Ds_id",
"field_logic_name":"标识",
"entity_name":"DSSETTING",
"field_type":"TEXT",
"nullable":0,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":1,
"show_order":1,
"major_field":0
},
{
"fieldname":"DSNAME" ,
"codename":"Ds_name",
"field_logic_name":"数据源名称",
"entity_name":"DSSETTING",
"field_type":"TEXT",
"nullable":0,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":2,
"major_field":1
},
{
"fieldname":"DSTYPE" ,
"codename":"Ds_type",
"field_logic_name":"类型",
"entity_name":"DSSETTING",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":3,
"major_field":0
},
{
"fieldname":"DSCFG" ,
"codename":"Ds_cfg",
"field_logic_name":"配置",
"entity_name":"DSSETTING",
"field_type":"LONGTEXT_1000",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":4000,
"key_field":0,
"show_order":4,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
]
}
,
{
"entity_name":"DTOMODEL",
"logic_name":"数据传输对象",
"code_name":"DTOModel",
"table_name":"T_DTOMODEL",
"table_name":"IBZDTOMODEL",
"system_id":"ibzdata",
"system_name":"ibzdata",
"module_id":"data",
......@@ -296,7 +369,7 @@
"entity_name":"POMODEL",
"logic_name":"持久化对象",
"code_name":"POModel",
"table_name":"T_POMODEL",
"table_name":"IBZPOMODEL",
"system_id":"ibzdata",
"system_name":"ibzdata",
"module_id":"data",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册