提交 91733830 编写于 作者: zhouweidong's avatar zhouweidong

代码规范检查

上级 699b696e
......@@ -30,33 +30,33 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
<#if item.getAllPSDEDataSets()??>
<#list item.getAllPSDEDataSets() as dedataset>
Page<<#if dedataset.isEnableGroup()>HashMap<#else>${item.getCodeName()}</#if>> search${dedataset.getCodeName()}(IPage page, @Param("srf") ${de.codeName}SearchContext context, @Param("ew") Wrapper<${item.getCodeName()}> wrapper) ;
Page<<#if dedataset.isEnableGroup()>HashMap<#else>${item.getCodeName()}</#if>> search${dedataset.getCodeName()}(IPage page, @Param("srf") ${de.codeName}SearchContext context, @Param("ew") Wrapper<${item.getCodeName()}> wrapper);
</#list>
</#if>
<#assign keyfieldCodeName=item.getKeyPSDEField().codeName?lower_case>
@Override
<#if item.isEnableEntityCache()==true>
@Cacheable(value="${item.codeName?lower_case}",key = "'row:'+#p0")
@Cacheable(value ="${item.codeName?lower_case}", key = "'row:'+#p0")
</#if>
${item.getCodeName()} selectById(Serializable id);
@Override
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",key = "'row:'+#p0.${keyfieldCodeName}")
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0.${keyfieldCodeName}")
</#if>
int insert(${item.getCodeName()} entity);
@Override
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",key = "'row:'+#p0.${keyfieldCodeName}")
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0.${keyfieldCodeName}")
</#if>
int updateById(@Param(Constants.ENTITY) ${item.getCodeName()} entity);
@Override
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",key = "'row:'+#p0.${keyfieldCodeName}")
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0.${keyfieldCodeName}")
</#if>
int update(@Param(Constants.ENTITY) ${item.getCodeName()} entity, @Param("ew") Wrapper<${item.codeName}> updateWrapper);
@Override
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",key = "'row:'+#p0")
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0")
</#if>
int deleteById(Serializable id);
/**
......@@ -104,7 +104,7 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
<#if de.getDefaultPSDEDataSet()??>
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(@Param("${MajorkeyField.codeName?lower_case}") Serializable ${MajorkeyField.codeName?lower_case}) ;
List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(@Param("${MajorkeyField.codeName?lower_case}") Serializable ${MajorkeyField.codeName?lower_case});
</#if>
</#if>
......
......@@ -63,8 +63,8 @@ public interface I${item.codeName}Service extends IService<${item.codeName}> {
boolean execute(String sql, Map param);
<#if hasDEPrefield>
List<${de.codeName}> get${deCodeNameCamel}ByIds(List<${srfr7javatype(keyfield.stdDataType)}> ids) ;
List<${de.codeName}> get${deCodeNameCamel}ByEntities(List<${de.codeName}> entities) ;
List<${de.codeName}> get${deCodeNameCamel}ByIds(List<${srfr7javatype(keyfield.stdDataType)}> ids);
List<${de.codeName}> get${deCodeNameCamel}ByEntities(List<${de.codeName}> entities);
</#if>
}
<#comment>NoSQL存储-MongoDB</#comment>
......@@ -73,13 +73,13 @@ public interface I${item.codeName}Service extends IService<${item.codeName}> {
/**
* 实体[${item.codeName}] 服务对象接口
*/
public interface I${item.codeName}Service{
public interface I${item.codeName}Service {
<@addIDESerivceBody />
<#if hasDEPrefield>
List<${de.codeName}> get${deCodeNameCamel}ByIds(List<${srfr7javatype(keyfield.stdDataType)}> ids) ;
List<${de.codeName}> get${deCodeNameCamel}ByEntities(List<${de.codeName}> entities) ;
List<${de.codeName}> get${deCodeNameCamel}ByIds(List<${srfr7javatype(keyfield.stdDataType)}> ids);
List<${de.codeName}> get${deCodeNameCamel}ByEntities(List<${de.codeName}> entities);
</#if>
}
......@@ -88,7 +88,7 @@ public interface I${item.codeName}Service{
/**
* 实体[${item.codeName}] 服务对象接口
*/
public interface I${item.codeName}Service{
public interface I${item.codeName}Service {
<@addIDESerivceBody />
......@@ -99,7 +99,7 @@ public interface I${item.codeName}Service{
/**
* 实体[${item.codeName}] 服务对象接口
*/
public interface I${item.codeName}Service{
public interface I${item.codeName}Service {
<@addIDESerivceBody />
......@@ -122,25 +122,25 @@ public interface I${item.codeName}Service{
<#elseif deaction.codeName?lower_case == "create">
boolean create(${item.codeName} et) ;
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void createBatch(List<${item.codeName}> list) ;
<#elseif deaction.codeName?lower_case == "update">
boolean update(${item.codeName} et) ;
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void updateBatch(List<${item.codeName}> list) ;
<#elseif deaction.codeName?lower_case == "remove">
boolean remove(${srfr7javatype(keyfield.stdDataType)} key) ;
boolean remove(${srfr7javatype(keyfield.stdDataType)} key);
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void removeBatch(Collection<${srfr7javatype(keyfield.stdDataType)}> idList) ;
void removeBatch(Collection<${srfr7javatype(keyfield.stdDataType)}> idList);
<#elseif deaction.codeName?lower_case == "save">
boolean save(${item.codeName} et) ;
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}",allEntries = true)
</#if>
void saveBatch(List<${item.codeName}> list) ;
<#elseif deaction.codeName?lower_case == "getdraft">
......@@ -152,7 +152,7 @@ public interface I${item.codeName}Service{
<#elseif deaction.codeName?lower_case == "updatebatch">
<#elseif deaction.codeName?lower_case == "removebatch">
<#else>
${item.codeName} ${srfmethodname(deaction.getCodeName())}(${item.codeName} et) ;
${item.codeName} ${srfmethodname(deaction.getCodeName())}(${item.codeName} et);
</#if>
<@outputTestActionDetail deaction />
</#if>
......@@ -160,7 +160,7 @@ public interface I${item.codeName}Service{
</#if>
<#if item.getAllPSDEDataSets()??>
<#list item.getAllPSDEDataSets() as dedataset>
Page<<#if dedataset.isEnableGroup()>HashMap<#else>${item.getCodeName()}</#if>> search${dedataset.getCodeName()}(${item.codeName}SearchContext context) ;
Page<<#if dedataset.isEnableGroup()>HashMap<#else>${item.getCodeName()}</#if>> search${dedataset.getCodeName()}(${item.codeName}SearchContext context);
</#list>
</#if>
<#comment>1N关系中,在子实体中创建父实体的实例对象</#comment>
......@@ -186,13 +186,13 @@ public interface I${item.codeName}Service{
void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
<#elseif MinorPSDER.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
</#if>
</#if>
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
<#assign nested=MinorPSDER.isNestedRS()>
......@@ -205,9 +205,9 @@ public interface I${item.codeName}Service{
</#if>
<#if nested>
<#if item.isEnableEntityCache()==true>
@CacheEvict(value="${item.codeName?lower_case}",allEntries=true)
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) ;
void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}, List<${item.getCodeName()}> list) ;
</#if>
</#if>
</#if>
......@@ -219,10 +219,10 @@ public interface I${item.codeName}Service{
</#if>
<#comment>实体数据导入</#comment>
<#if hasDEImport>
JSONObject importData(List<${de.codeName}> entities,int batchSize,boolean isIgnoreError);
JSONObject importData(List<${de.codeName}> entities, int batchSize, boolean isIgnoreError);
@Async("asyncExecutor")
void asyncImportData(List<${de.codeName}> entities,int batchSize,boolean isIgnoreError);
void asyncImportData(List<${de.codeName}> entities, int batchSize, boolean isIgnoreError);
</#if>
</#macro>
......
......@@ -91,14 +91,14 @@ public class PermissionSyncJob implements ApplicationRunner {
public void run(ApplicationArguments args) {
try {
Thread.sleep(10000);
InputStream permission= this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力
InputStream permission = this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力
String permissionResult = IOUtils.toString(permission,"UTF-8");
JSONObject system= new JSONObject();
system.put("pssystemid",systemId);
system.put("pssystemname",systemName);
system.put("sysstructure",JSONObject.parseObject(permissionResult));
system.put("md5check",DigestUtils.md5DigestAsHex(permissionResult.getBytes()));
if(client.syncSysAuthority(system)){
if(client.syncSysAuthority(system)) {
log.info("向[UAA]同步系统资源成功");
}else{
log.error("向[UAA]同步系统资源失败");
......@@ -109,9 +109,9 @@ public class PermissionSyncJob implements ApplicationRunner {
}
try {
InputStream sysModel= this.getClass().getResourceAsStream("/sysmodel/${sys.codeName}.json"); //获取当前系统所有实体资源能力
InputStream sysModel = this.getClass().getResourceAsStream("/sysmodel/${sys.codeName}.json"); //获取当前系统所有实体资源能力
String strSysModel = IOUtils.toString(sysModel,"UTF-8");
if(liteFeignClient.syncSysModel(JSONObject.parseObject(strSysModel))){
if(liteFeignClient.syncSysModel(JSONObject.parseObject(strSysModel))) {
log.info("向[lite]同步系统模型成功");
}else{
log.error("向[lite]同步系统模型失败");
......@@ -123,7 +123,7 @@ public class PermissionSyncJob implements ApplicationRunner {
<#if hasWF>
try{
List<Map<String,Object>> bpmnfiles=new ArrayList();
List<Map<String,Object>> bpmnfiles = new ArrayList();
<#list sys.getAllPSWorkflows() as wf>
<#if wf.getPSWFVersions()??>
<#list wf.getPSWFVersions() as wfvs>
......@@ -131,23 +131,23 @@ public class PermissionSyncJob implements ApplicationRunner {
</#list>
</#if>
</#list>
if(client2.deployBpmnFile(bpmnfiles)){
if(client2.deployBpmnFile(bpmnfiles)) {
log.info("部署流程成功");
}else{
log.error("部署流程失败");
}
}catch(Exception ex){
}catch(Exception ex) {
log.error(String.format("部署流程失败,请检查[WF]服务是否正常! [%s]",ex));
}
</#if>
<#if hasMsgTemplate>
try {
InputStream msgTemplate= this.getClass().getResourceAsStream("/msgtempl/systemMsgTempl.json"); //获取当前系统所有实体资源能力
InputStream msgTemplate = this.getClass().getResourceAsStream("/msgtempl/systemMsgTempl.json"); //获取当前系统所有实体资源能力
String strMsgTemplate = IOUtils.toString(msgTemplate,"UTF-8");
JSONObject template= new JSONObject();
template.put("template",JSONArray.parseArray(strMsgTemplate));
if(notifyFeignClient.createMsgTemplate(template)){
JSONObject template = new JSONObject();
template.put("template", JSONArray.parseArray(strMsgTemplate));
if(notifyFeignClient.createMsgTemplate(template)) {
log.info("推送消息模板成功");
}else{
log.error("推送消息模板失败");
......@@ -159,9 +159,9 @@ public class PermissionSyncJob implements ApplicationRunner {
<#if hasPredefinedCodeList>
try {
InputStream runtimeDict= this.getClass().getResourceAsStream("/sysmodel/RuntimeDict.json"); //获取当前系统所有实体资源能力
InputStream runtimeDict = this.getClass().getResourceAsStream("/sysmodel/RuntimeDict.json"); //获取当前系统所有实体资源能力
String strRuntimeDict = IOUtils.toString(runtimeDict,"UTF-8");
if(dictFeignClient.syncRuntimeDict(JSONArray.parseArray(strRuntimeDict))){
if(dictFeignClient.syncRuntimeDict(JSONArray.parseArray(strRuntimeDict))) {
log.info("推送系统预置代码表成功");
}else{
log.error("推送系统预置代码表失败");
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册