批量刷新评论部门数据定时器
This commit is contained in:
parent
3541ad4004
commit
94941dccec
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
package com.awspaas.user.apps.app20250109170254.job;
|
||||
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
||||
import com.actionsoft.bpms.schedule.IJob;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UpdateDepJob implements IJob {
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
|
||||
System.out.println("开始刷新评论数据");
|
||||
List<RowMap> maps = DBSql.getMaps("SELECT * FROM APP_ACT_PAL_DATA_REPLY");
|
||||
|
||||
int counts=1;
|
||||
for(RowMap one:maps){
|
||||
|
||||
String replyer=one.getString("REPLYER");
|
||||
|
||||
DepartmentModel departmentByUser = SDK.getORGAPI().getDepartmentByUser(replyer);
|
||||
|
||||
int count = DBSql.update("UPDATE APP_ACT_PAL_DATA_REPLY SET ORGID='" + departmentByUser.getId() + "' WHERE REPLYER ='" + replyer+ "'");
|
||||
|
||||
counts++;
|
||||
}
|
||||
|
||||
System.out.println("刷新数据结束,共有"+counts+"数据被刷新");
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user