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

修改bug

上级 fd3bc382
......@@ -35,6 +35,11 @@ public class ActionModel extends BaseModel{
private EntityModel entity;
public boolean isGetAction()
{
return codeName.toLowerCase().startsWith("get");
}
public Set<String> getLogics()
{
Set<String> validLogic=new HashSet<>();
......
......@@ -26,6 +26,11 @@
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibizlab-common</artifactId>
</dependency>
</dependencies>
</project>
......@@ -41,6 +41,7 @@ public class {{entity.codeName}}SearchContext extends QueryWrapperContext<{{enti
{{#each entity.fields as |field|}}
{{#each field.allPSDEFSearchModes as |formitem|}}
{{#unless formitem.valueFunc}}
{{#if (or (eq formitem.valueOP "IN") (eq formitem.valueOP "ISNULL") (eq formitem.valueOP "ISNOTNULL"))}}
@JsonProperty("{{lowerCase formitem.name}}")
@JSONField(name = "{{lowerCase formitem.name}}")
......@@ -144,6 +145,8 @@ public class {{entity.codeName}}SearchContext extends QueryWrapperContext<{{enti
}
return this;
}
{{/unless}}
{{/each}}
{{/each}}
......
......@@ -71,12 +71,17 @@ public interface I{{entity.codeName}}Service extends IService<{{entity.codeName}
{{#each entity.extActions}}
{{entity.codeName}} {{camelCase codeName}}({{entity.codeName}} et);
{{#if getAction}}
default {{entity.codeName}} {{camelCase codeName}}({{entity.keyField.type.java}} key) {
return {{camelCase codeName}}(new {{entity.codeName}}().set{{pascalCase entity.keyField.codeName}}(key));
}
{{/if}}
boolean {{camelCase codeName}}Batch(List<{{entity.codeName}}> list);
{{/each}}
{{#entity.dataSets}}
Page<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
List<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
Page<{{entity.codeName}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
List<{{entity.codeName}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
{{/entity.dataSets}}
{{#entity.references}}
......
......@@ -75,8 +75,8 @@ public interface I{{entity.codeName}}Service {
{{/each}}
{{#entity.dataSets}}
Page<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
List<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
Page<{{entity.codeName}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
List<{{entity.codeName}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context);
{{/entity.dataSets}}
{{#entity.references}}
......
......@@ -340,7 +340,7 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
{{/entity.extActions}}
{{#entity.dataSets}}
public Page<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
public Page<{{entity.codeName}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
{{#if entity.hasPSDEWF}}
Map<String,Map<String,Object>> businesskeys = fillWFTaskContext(context);
{{/if}}
......@@ -349,10 +349,10 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
if(!StringUtils.isEmpty(context.getSrfWF()))
fillWFParam(pages,businesskeys);
{{/if}}
return new PageImpl<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}>(pages.getRecords(), context.getPageable(), pages.getTotal());
return new PageImpl<{{entity.codeName}}>(com.alibaba.fastjson.JSON.parseArray(com.alibaba.fastjson.JSON.toJSONString(pages.getRecords()),{{entity.codeName}}.class), context.getPageable(), pages.getTotal());
}
public List<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
return baseMapper.list{{pascalCase codeName}}(context,context.getSelectCond());
public List<{{entity.codeName}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
return com.alibaba.fastjson.JSON.parseArray(com.alibaba.fastjson.JSON.toJSONString(baseMapper.list{{pascalCase codeName}}(context,context.getSelectCond())),{{entity.codeName}}.class);
}
{{/entity.dataSets}}
......
......@@ -175,10 +175,10 @@ public class {{entity.codeName}}ServiceImpl implements I{{entity.codeName}}Servi
{{/entity.extActions}}
{{#entity.dataSets}}
public Page<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
public Page<{{entity.codeName}}> search{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
return null;
}
public List<{{#if enableGroup}}Map{{else}}{{entity.codeName}}{{/if}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
public List<{{entity.codeName}}> list{{pascalCase codeName}}({{entity.codeName}}SearchContext context) {
return null;
}
......
......@@ -360,10 +360,6 @@
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibizlab-common</artifactId>
</dependency>
</dependencies>
</project>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册