提交 bdfefbe9 编写于 作者: sq3536's avatar sq3536

action

上级 88d38a02
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<dependency> <dependency>
<groupId>net.ibizsys.model</groupId> <groupId>net.ibizsys.model</groupId>
<artifactId>ibiz-model</artifactId> <artifactId>ibiz-model</artifactId>
<version>0.2.1</version> <version>0.2.2</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>slf4j-simple</artifactId> <artifactId>slf4j-simple</artifactId>
......
...@@ -516,6 +516,8 @@ public class EntityModel extends BaseModel { ...@@ -516,6 +516,8 @@ public class EntityModel extends BaseModel {
if(relationshipModel!=null&&(!StringUtils.isEmpty(relationshipModel.getCodeName()))) { if(relationshipModel!=null&&(!StringUtils.isEmpty(relationshipModel.getCodeName()))) {
relationshipModel.addField(fieldModel); relationshipModel.addField(fieldModel);
fieldModel.setReference(relationshipModel); fieldModel.setReference(relationshipModel);
if("PICKUP".equalsIgnoreCase(defield.getDataType()))
relationshipModel.setFkField(fieldModel);
} }
} }
...@@ -529,33 +531,7 @@ public class EntityModel extends BaseModel { ...@@ -529,33 +531,7 @@ public class EntityModel extends BaseModel {
if(dataEntity.getAllPSDEDataQueries()!=null)
{
dataEntity.getAllPSDEDataQueries().forEach(dataQuery->{
try {
if(dataQuery.getAllPSDEDataQueryCodes()!=null)
{
dataQuery.getAllPSDEDataQueryCodes().forEach(dq->{
String code=TransUtils.getQueryCode(dq);
DataSetModel dsModel=new DataSetModel();
dsModel.setEntity(this);
dsModel.setName(dataQuery.getName());
dsModel.setDatasetId(this.getEntityName().toLowerCase()+"-dq-"+dataQuery.getCodeName()+"-"+dq.getDBType().toLowerCase().replace("mysql5","mysql"))
.setDatasetName(dataQuery.getLogicName()).setCodeName(dataQuery.getCodeName())
.setDsCode(code);
this.addDataSet(dsModel);
});
}
} catch (Exception exception) {
}
});
}
if(dataEntity.getAllPSDEDataSets()!=null) if(dataEntity.getAllPSDEDataSets()!=null)
{ {
...@@ -674,7 +650,7 @@ public class EntityModel extends BaseModel { ...@@ -674,7 +650,7 @@ public class EntityModel extends BaseModel {
DataSetModel dsModel=new DataSetModel(this,dataSet); DataSetModel dsModel=new DataSetModel(this,dataSet);
dsModel.setDatasetId(this.getEntityName().toLowerCase()+"-ds-"+dataSet.getCodeName()+"-"+entry.getKey().toLowerCase().replace("mysql5","mysql")) dsModel.setDatasetId(this.getEntityName().toLowerCase()+"-ds-"+dataSet.getCodeName()+"-"+entry.getKey().toLowerCase().replace("mysql5","mysql"))
.setDatasetName(dataSet.getLogicName()).setCodeName(dataSet.getCodeName()) .setDatasetName(dataSet.getLogicName()).setCodeName(dataSet.getCodeName())
.setDsCode(entry.getValue().toLowerCase().replace("mysql5","mysql")).setDsModel(sql); .setDsCode(entry.getValue()).setDsModel(sql);
this.addDataSet(dsModel); this.addDataSet(dsModel);
} }
......
...@@ -75,6 +75,8 @@ public class RelationshipModel extends BaseModel{ ...@@ -75,6 +75,8 @@ public class RelationshipModel extends BaseModel{
return this; return this;
} }
private FieldModel fkField;
private List<LookupModel> lookup; private List<LookupModel> lookup;
......
...@@ -64,4 +64,13 @@ public interface I{{entity.codeName}}Service extends IService<{{entity.codeName} ...@@ -64,4 +64,13 @@ public interface I{{entity.codeName}}Service extends IService<{{entity.codeName}
{{/entity.actions}} {{/entity.actions}}
{{#entity.dataSets}}
Page<{{entity.codeName}}> search{{codeName}}({{entity.codeName}}SearchContext context);
{{/entity.dataSets}}
{{#entity.references}}
List<{{entity.codeName}}> selectBy{{fkField.codeName.pascalCase}}({{fkField.type.java}} {{fkField.codeName.camelCase}});
{{/entity.references}}
} }
\ No newline at end of file
package {{packageName}}.core.{{entity.module}}.service.impl; package {{packageName}}.core.{{entity.module}}.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.util.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import {{packageName}}.util.errors.BadRequestAlertException;
<#system.enableGlobalTransaction>
import io.seata.spring.annotation.GlobalTransactional;
</system.enableGlobalTransaction>
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import {{packageName}}.core.{{entity.module}}.domain.{{entity.codeName}};
import {{packageName}}.core.{{entity.module}}.filter.{{entity.codeName}}SearchContext;
import {{packageName}}.core.{{entity.module}}.service.I{{entity.codeName}}Service; import {{packageName}}.core.{{entity.module}}.service.I{{entity.codeName}}Service;
import {{packageName}}.core.{{entity.module}}.mapper.${item.getCodeName()}Mapper;
import {{packageName}}.util.helper.CachedBeanCopier;
import {{packageName}}.util.helper.DEFieldCacheMap;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
public class {{entity.codeName}}ServiceImpl implements I{{entity.codeName}}Service public class {{entity.codeName}}ServiceImpl implements I{{entity.codeName}}Service
{ {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册