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

修改说明

上级 4f8b0159
......@@ -123,6 +123,7 @@ public class EntityModel extends BaseModel {
return !ObjectUtils.isEmpty(references);
}
public boolean hasPhisicalLinkField=false;
private Map<String,RelationshipModel> refMaps;
......@@ -815,6 +816,10 @@ public class EntityModel extends BaseModel {
relationshipModel.setFkField(fieldModel);
relationshipModel.setFkFieldCodeName(fieldModel.getCodeName().toString());
}
else if(defield.isPhisicalDEField()||(!StringUtils.isEmpty(defield.getUnionKeyValue())))
{
hasPhisicalLinkField=true;
}
}
}
......
......@@ -325,5 +325,23 @@ public class VoFieldModel extends BaseModel {
return example;
}
private String columnName;
public String getColumnName() {
if(columnName==null) {
columnName = "";
if(getAppDEField()!=null) {
if(appDEField.isPhisicalDEField())
columnName="["+appDEField.getEntity().getTableName()+"."+appDEField.getColumnName().toUpperCase()+"]";
else if(appDEField.getDataEntityField().getDEFType()==5)
columnName="[TYYW_KG_XFJSDJZJB."+appDEField.getColumnName().toUpperCase()+"]";
else if(!ObjectUtils.isEmpty(appDEField.getRefFieldName()))
{
columnName="["+appDEField.getReference().getTableName()+"."+appDEField.getRefFieldName().toUpperCase()+"]";
}
}
}
return columnName;
}
}
......@@ -51,11 +51,11 @@ public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeNa
{{#if dict}}
@JsonFormat(shape = JsonFormat.Shape.{{#if singleSelect}}{{#eq type.java "String"}}STRING{{/eq}}{{#eq type.java "Integer"}}NUMBER{{/eq}}{{else}}STRING{{/if}})
{{/if}}
@JSONField(name = "{{lowerCase name}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
{{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class)
{{/eq}}
@ApiModelProperty(value = "{{logicName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
@ApiModelProperty(value = "{{logicName}}{{columnName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}} {{#if createDefaultValue}}= {{createDefaultValue}}{{/if}};
{{/if}}
......
......@@ -44,6 +44,9 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
/**
* {{logicName}}
*/
{{#if required}}
{{#eq javaType "String"}}@NotBlank{{else}}@NotNull{{/eq}}(message = "{{logicName}}[{{jsonName}}]不能为空")
{{/if}}
@JsonProperty("{{jsonName}}")
{{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
......@@ -52,11 +55,11 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
{{#if dict}}
@JsonFormat(shape = JsonFormat.Shape.{{#if singleSelect}}{{#eq type.java "String"}}STRING{{/eq}}{{#eq type.java "Integer"}}NUMBER{{/eq}}{{else}}STRING{{/if}})
{{/if}}
@JSONField(name = "{{lowerCase name}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
{{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class)
{{/eq}}
@ApiModelProperty(value = "{{logicName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
@ApiModelProperty(value = "{{logicName}}{{columnName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}};
{{#if dictList}}
public void set{{pascalCase codeName}}(String {{camelCase codeName}}) {
......
......@@ -43,6 +43,9 @@ public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}
/**
* {{logicName}}
*/
{{#if required}}
{{#eq javaType "String"}}@NotBlank{{else}}@NotNull{{/eq}}(message = "{{logicName}}[{{jsonName}}]不能为空")
{{/if}}
@JsonProperty("{{jsonName}}")
{{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
......@@ -51,11 +54,11 @@ public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}
{{#if dict}}
@JsonFormat(shape = JsonFormat.Shape.{{#if singleSelect}}{{#eq type.java "String"}}STRING{{/eq}}{{#eq type.java "Integer"}}NUMBER{{/eq}}{{else}}STRING{{/if}})
{{/if}}
@JSONField(name = "{{lowerCase name}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
{{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class)
{{/eq}}
@ApiModelProperty(value = "{{logicName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
@ApiModelProperty(value = "{{logicName}}{{columnName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}};
{{/if}}
......
......@@ -51,11 +51,11 @@ public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.cod
{{#if dict}}
@JsonFormat(shape = JsonFormat.Shape.{{#if singleSelect}}{{#eq type.java "String"}}STRING{{/eq}}{{#eq type.java "Integer"}}NUMBER{{/eq}}{{else}}STRING{{/if}})
{{/if}}
@JSONField(name = "{{lowerCase name}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
{{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class)
{{/eq}}
@ApiModelProperty(value = "{{logicName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
@ApiModelProperty(value = "{{logicName}}{{columnName}}{{#if userTag}}{{userTag}}{{/if}}{{#if dict}}{{#unless singleSelect}}多选{{/unless}}【字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}} {{#if updateDefaultValue}}= {{updateDefaultValue}}{{/if}};
{{/if}}
......
{{#eq apps "link"}}
package {{packageName}}.api.{{apps}}.dict;
import cn.ibizlab.edge.api.link.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -20,6 +22,16 @@ import java.util.List;
@ApiSupport(order = 99)
public class DictHtmlResource {
@Autowired
private DictService dictService;
@RequestMapping(method = RequestMethod.GET, value = "/sync")
public ResponseEntity<String> sync() {
dictService.syncDict();
return ResponseEntity.ok("同步完成");
}
private String html="<html lang=\"en\"><head><meta charset=\"UTF-8\"><title></title>" +
"<style>table.reference,table.tecspec {table-layout:fixed;word-break:break-all;border-collapse: collapse;width:100%%;margin: 4px} table.reference .fa {font-size: 24px;} table.reference td:nth-child(odd) {background-color: #f2f7f9} table.reference td:nth-child(even) {background-color: #fff} table.reference tr.fixzebra {background-color: #f6f4f0} table.reference th {line-height: 2em;min-width: 24px;color: #fff;background-color: #555;border: 1px solid #555;font-size: 12px;padding: 3px;vertical-align: top;text-align: left} table.reference td {line-height: 2em;min-width: 24px;border: 1px solid #d4d4d4;padding: 5px;padding-top: 7px;padding-bottom: 7px;font-size: 12px;vertical-align: top;color: #606266;} .captr{height:0px;border: 0px;margin:0px;padding:0px}" +
"</style></header><body>%s<br/></body></html>";
......
{{#eq apps "link"}}
package {{packageName}}.api.{{apps}}.service;
import cn.ibizlab.edge.core.common.domain.*;
import {{packageName}}.api.{{apps}}.dict.*;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import cn.ibizlab.edge.core.common.service.DictCatalogService;
@Slf4j
@Service("link-DictService")
public class DictService {
@Autowired
private DictCatalogService dictCatalogService;
public void syncDict() {
{{#each app.dicts}}
{
DictCatalog dict=new DictCatalog();
dict.setCode("{{pascalCase codeName}}Dict");
dict.setName("{{name}}");
dict.setId(dict.getCode());
List<DictOption> options=new ArrayList<>();
new {{pascalCase codeName}}Dict().getAllItems().forEach(item->{
DictOption option=new DictOption();
option.setCatalog(dict);
option.setCatalogId(dict.getId());
option.setCatalogName(dict.getName());
option.setValue(item.getValue());
option.setLabel(item.getLabel());
option.setParent(item.getParent());
option.setShoworder(options.size()+1);
options.add(option);
});
dict.setOptions(options);
dictCatalogService.save(dict);
}
{{/each}}
}
}
{{/eq}}
\ No newline at end of file
......@@ -79,17 +79,23 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
Assert.notNull(rt,"数据不存在,{{entity.logicName}}:"+et.get{{pascalCase entity.keyField.codeName}}());
BeanUtils.copyProperties(rt, et);
{{#entity.nesteds}}
{{#unless listCode}}
{{#if listCode}}
{{#unless columnName}}
//设置 [{{entityLogicName}}]
et.set{{pascalCase codeName}}({{camelCase entityCodeName}}Service.selectBy{{pascalCase fkField.codeName}}(et.get{{pascalCase entity.keyField.codeName}}()));
{{/unless}}
{{/unless}}
{{/if}}
{{/entity.nesteds}}
return et;
}
public List<{{entity.codeName}}> getByEntities(List<{{entity.codeName}}> entities) {
{{#if entity.unionKeyMode}}
list.forEach(et -> {
if(ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}()))
et.set{{pascalCase entity.keyField.codeName}}(({{entity.keyField.type.java}})et.getDefaultKey(true));
});
{{/if}}
return this.baseMapper.selectEntities(entities);
}
......@@ -120,16 +126,23 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
}
public Integer checkKey({{entity.codeName}} et) {
{{#entity.hasPhisicalLinkField}}
fillParentData(et);
{{/entity.hasPhisicalLinkField}}
{{#if entity.unionKeyMode}}
if(ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}()))
et.set{{pascalCase entity.keyField.codeName}}(({{entity.keyField.type.java}})et.getDefaultKey(true));
{{/if}}
return ( (!ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}())) && this.count(Wrappers.<{{entity.codeName}}>query(){{#each entity.keyFields as |field|}}.eq("{{lowerCase field.name}}", et.get{{pascalCase field.codeName}}()){{/each}})>0 )?1:0;
}
@Override
{{#eq entity.actions.create.transactionMode "GLOBAL"}}@GlobalTransactional{{/eq}}{{#eq entity.actions.create.transactionMode "DEFAULT"}}@Transactional{{/eq}}
public boolean create({{entity.codeName}} et) {
{{#entity.hasReferences}}
{{#entity.hasPhisicalLinkField}}
fillParentData(et);
{{/entity.hasReferences}}
{{#entity.isIndexSubDE}}
{{/entity.hasPhisicalLinkField}}
{{#if.isIndexSubDE}}
if(ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}()))
et.set{{pascalCase entity.keyField.codeName}}(({{entity.keyField.type.java}})et.getDefaultKey(true));
{{entity.indexRelation.entityCodeName}} {{camelCase entity.indexRelation.entityCodeName}} = {{camelCase entity.codeName}}InheritMapping.to{{pascalCase entity.indexRelation.entityCodeName}}(et);
......@@ -138,7 +151,12 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
{{/if}}
{{camelCase entity.indexRelation.entityCodeName}}Service.create({{camelCase entity.indexRelation.entityCodeName}});
{{/entity.isIndexSubDE}}
{{else}}
{{#if entity.unionKeyMode}}
if(ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}()))
et.set{{pascalCase entity.keyField.codeName}}(({{entity.keyField.type.java}})et.getDefaultKey(true));
{{/if}}
{{/if}}
{{#if entity.isLogicInheritDE}}
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("{{lowerCase entity.keyField.name}}", et.get{{pascalCase keyField.codeName}}())))
return false;
......@@ -147,11 +165,11 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
return false;
{{/if}}
{{#each entity.nesteds}}
{{#unless listCode}}
{{#if listCode}}
{{#unless columnName}}
{{camelCase entityCodeName}}Service.saveBy{{pascalCase fkField.codeName}}(et,et.get{{pascalCase codeName}}());
{{/unless}}
{{camelCase entityCodeName}}Service.saveBy{{pascalCase der.codeName}}(et,et.get{{pascalCase codeName}}());
{{/unless}}
{{/if}}
{{/each}}
get(et);
{{#if entity.hasPSDERsMapping}}
......@@ -163,21 +181,19 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
public boolean createBatch(List<{{entity.codeName}}> list) {
{{#if (or entity.actions.create.psDEActionLogics entity.isIndexSubDE)}}
for ({{entity.codeName}} et : list) {
{{#if entity.unionKeyMode}}
getSelf().save(et);
{{else}}
getSelf().create(et);
{{/if}}
}
{{else}}
{{#entity.hasReferences}}
{{#entity.hasPhisicalLinkField}}
list.forEach(et->fillParentData(et));
{{/entity.hasReferences}}
{{/entity.hasPhisicalLinkField}}
{{#if entity.unionKeyMode}}
this.saveOrUpdateBatch(list,batchSize);
{{else}}
this.saveBatch(list, batchSize);
list.forEach(et -> {
if(ObjectUtils.isEmpty(et.get{{pascalCase entity.keyField.codeName}}()))
et.set{{pascalCase entity.keyField.codeName}}(({{entity.keyField.type.java}})et.getDefaultKey(true));
});
{{/if}}
this.saveBatch(list, batchSize);
{{#if entity.hasPSDERsMapping}}
updateParentDataBatch(list);
{{/if}}
......@@ -187,9 +203,9 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
{{#eq entity.actions.update.transactionMode "GLOBAL"}}@GlobalTransactional{{/eq}}{{#eq entity.actions.update.transactionMode "DEFAULT"}}@Transactional{{/eq}}
public boolean update({{entity.codeName}} et) {
{{#entity.hasReferences}}
{{#entity.hasPhisicalLinkField}}
fillParentData(et);
{{/entity.hasReferences}}
{{/entity.hasPhisicalLinkField}}
{{#entity.isIndexSubDE}}
{{entity.indexRelation.entityCodeName}} {{camelCase entity.indexRelation.entityCodeName}} = {{camelCase entity.codeName}}InheritMapping.to{{pascalCase entity.indexRelation.entityCodeName}}(et);
{{#if entity.indexRelation.indexTypePSDEField}}
......@@ -206,11 +222,11 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
return false;
}
{{#each entity.nesteds}}
{{#unless listCode}}
{{#if listCode}}
{{#unless columnName}}
{{camelCase entityCodeName}}Service.saveBy{{pascalCase fkField.codeName}}(et,et.get{{pascalCase codeName}}());
{{/unless}}
{{camelCase entityCodeName}}Service.saveBy{{pascalCase der.codeName}}(et,et.get{{pascalCase codeName}}());
{{/unless}}
{{/if}}
{{/each}}
get(et);
{{#if entity.hasPSDERsMapping}}
......@@ -226,9 +242,9 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
getSelf().update(et);
}
{{else}}
{{#entity.hasReferences}}
{{#entity.hasPhisicalLinkField}}
list.forEach(et->fillParentData(et));
{{/entity.hasReferences}}
{{/entity.hasPhisicalLinkField}}
updateBatchById(list, batchSize);
{{#if entity.hasPSDERsMapping}}
updateParentDataBatch(list);
......@@ -278,7 +294,7 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
get(et);
{{/if}}
{{#entity.nesteds}}
{{#unless listCode}}
{{#if listCode}}
{{#unless columnName}}
{{#eq removeActionType 1}}
{{camelCase entityCodeName}}Service.removeBy{{pascalCase fkField.codeName}}(key);
......@@ -287,11 +303,11 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
{{camelCase entityCodeName}}Service.resetBy{{pascalCase fkField.codeName}}(key);
{{/eq}}
{{#eq removeActionType 3}}
if(!ObjectUtils.isEmpty({{camelCase entityCodeName}}Service.removeBy{{pascalCase fkField.codeName}}(key)))
if(!ObjectUtils.isEmpty({{camelCase entityCodeName}}Service.selectBy{{pascalCase fkField.codeName}}(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[{{camelCase entityCodeName}}]数据,无法删除!","","");
{{/eq}}
{{/unless}}
{{/unless}}
{{/if}}
{{/entity.nesteds}}
{{#entity.isIndexSubDE}}
{{camelCase entity.indexRelation.entityCodeName}}Service.remove({{camelCase entity.codeName}}InheritMapping.to{{pascalCase entity.indexRelation.entityCodeName}}(et));
......@@ -346,10 +362,10 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
if(!StringUtils.isEmpty(context.getSrfWF()))
fillWFParam(pages,businesskeys);
{{/if}}
return new PageImpl<{{entity.codeName}}>(com.alibaba.fastjson.JSON.parseArray(com.alibaba.fastjson.JSON.toJSONString(pages.getRecords()),{{entity.codeName}}.class), context.getPageable(), pages.getTotal());
return new PageImpl<{{entity.codeName}}>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
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);
return baseMapper.list{{pascalCase codeName}}(context,context.getSelectCond());
}
{{/entity.dataSets}}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册