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

修改bug

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