修改手机端PC端接口分离
This commit is contained in:
+4
-4
@@ -241,10 +241,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
|
||||
target.setVersion(1); // 设置参数项初始版本为 1
|
||||
|
||||
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
target.setSdt("song.gao2.o");
|
||||
target.setDre("song.gao2.o");
|
||||
}
|
||||
// if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
//// target.setSdt("song.gao2.o");
|
||||
//// target.setDre("song.gao2.o");
|
||||
// }
|
||||
paramsCollectManifestEOList.add(target);
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -189,4 +189,12 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
|
||||
return this.problemKnowledgeBaseEOService.forward(json);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="知识分享更新ES", notes="知识分享更新ES")
|
||||
@PostMapping(value = "/updateEs")
|
||||
public Result<?> updateEs() {
|
||||
this.problemKnowledgeBaseEOService.updateEs();
|
||||
return Result.OK("更新成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -17,6 +17,13 @@ import java.util.List;
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledgeBaseEO> {
|
||||
|
||||
/**
|
||||
* 知识分享更新ES
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
void updateEs();
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
|
||||
+21
@@ -115,6 +115,27 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 知识分享更新ES
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void updateEs() {
|
||||
int index = 0;
|
||||
List<ProblemKnowledgeBaseEO> list = this.list();
|
||||
log.error("知识分享更新ES==开始==总数:" + list.size());
|
||||
for (ProblemKnowledgeBaseEO problemKnowledgeBaseEO : list) {
|
||||
if (StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())) {
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
log.error("知识分享更新ES==结束==更新数量:" + index);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
|
||||
+9
-1
@@ -190,4 +190,12 @@ public class LawsMonthlyReportManageEOController extends JeroController<LawsMont
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ApiOperation(value="法规月报更新ES", notes="法规月报更新ES")
|
||||
@PostMapping(value = "/updateES")
|
||||
public Result<?> updateES() {
|
||||
lawsMonthlyReportManageEOService.updateES();
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -72,6 +72,6 @@ public interface ILawsMonthlyReportManageEOService extends IService<LawsMonthlyR
|
||||
|
||||
void issue(LawsMonthlyReportManageEO lawsMonthlyReportManageEO);
|
||||
|
||||
|
||||
void updateES();
|
||||
|
||||
}
|
||||
|
||||
+22
@@ -24,6 +24,7 @@ import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -157,6 +158,27 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
syncElasticsearch(id, issueStatus, issueTime);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 法规月报更新ES
|
||||
*/
|
||||
@Override
|
||||
public void updateES() {
|
||||
int index = 0;
|
||||
List<LawsMonthlyReportManageEO> list = this.list();
|
||||
log.error("法规月报更新ES==开始==总数:" + list.size());
|
||||
for (LawsMonthlyReportManageEO lmr : list) {
|
||||
if (ObjectUtils.isNotEmpty(lmr) && "1".equals(lmr.getIssueStatus())) {
|
||||
syncElasticsearch(lmr.getId(),"2",lmr.getUpdateTime());
|
||||
syncElasticsearch(lmr.getId(),"1",lmr.getUpdateTime());
|
||||
index++;
|
||||
}
|
||||
}
|
||||
log.error("法规月报更新ES==结束==更新数量:" + index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
|
||||
LawsMonthlyReportManageEO monthlyReportManageEO = getById(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user