批量刷新角色图名称
This commit is contained in:
parent
634bbf559b
commit
033567c81b
Binary file not shown.
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<awsScheduleModel>
|
||||||
|
<id>abe20d3b-8676-455c-85ef-ddca6df6d3dc</id>
|
||||||
|
<createUser>admin</createUser>
|
||||||
|
<createTime>2022-09-27 09:57:57</createTime>
|
||||||
|
<updateUser></updateUser>
|
||||||
|
<updateTime>2022-09-27 09:57:57</updateTime>
|
||||||
|
<signature>tGOmxiTgjT/77UoYpSlq8Vc+hHPRoJWHdZexXc7zEpYuMNdhvSICeJnlc/RzRHGrXYDcQ3vjSCX525YHJ5i11Y+CW7gLf2xbPMoSjpbxybTqe9Os6YpDkCprypEz45ep</signature>
|
||||||
|
<managed>false</managed>
|
||||||
|
<name>刷新角色图模型</name>
|
||||||
|
<group>DEFAULT</group>
|
||||||
|
<desc></desc>
|
||||||
|
<disabled>false</disabled>
|
||||||
|
<system>false</system>
|
||||||
|
<classz>com.actionsoft.apps.coe.pal.pal.repository.job.SynRoleNameJob</classz>
|
||||||
|
<createDate>2022-09-27T09:57:57+08:00</createDate>
|
||||||
|
<triggerRule>0:1:1</triggerRule>
|
||||||
|
<userParam></userParam>
|
||||||
|
<lastToken></lastToken>
|
||||||
|
<concurrent>false</concurrent>
|
||||||
|
<categoryName>未分类</categoryName>
|
||||||
|
<stateful>false</stateful>
|
||||||
|
<notificationEvent></notificationEvent>
|
||||||
|
<notificationList></notificationList>
|
||||||
|
<notificationTemplate></notificationTemplate>
|
||||||
|
</awsScheduleModel>
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.pal.repository.job;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
|
import com.actionsoft.bpms.schedule.IJob;
|
||||||
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
|
import org.quartz.JobExecutionContext;
|
||||||
|
import org.quartz.JobExecutionException;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SynRoleNameJob implements IJob {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
|
|
||||||
|
Connection open = DBSql.open();
|
||||||
|
String sql = "SELECT PLNAME,ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLMETHODID='org.role'";
|
||||||
|
List<RowMap> roleNameList = DBSql.getMaps(open, sql);
|
||||||
|
|
||||||
|
System.out.println("进入方法===============");
|
||||||
|
int k = 0;
|
||||||
|
for(int i=0;i<roleNameList.size();i++){
|
||||||
|
|
||||||
|
if(!roleNameList.get(i).getString("PLNAME").contains("角色图")){
|
||||||
|
System.out.println("名称不包含角色图名称"+roleNameList.get(i).getString("PLNAME"));
|
||||||
|
System.out.println("名称不包含角色图id"+roleNameList.get(i).getString("ID"));
|
||||||
|
String finalRoleName=roleNameList.get(i).getString("PLNAME")+"角色图";
|
||||||
|
|
||||||
|
String id=roleNameList.get(i).getString("ID");
|
||||||
|
k++;
|
||||||
|
int r = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set PLNAME=? where ID=? and PLMETHODID='org.role'", new Object[] { finalRoleName, id });
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (k > 0) {
|
||||||
|
PALRepositoryCache.getCache().reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user