Commit 00068a31 authored by lisong's avatar lisong

修改bug

parent 95813634
......@@ -427,7 +427,7 @@ public class ElevatorController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/init", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "电梯信息放入es", notes = "电梯信息放入es")
public void init(@RequestParam(value = "num",required = false) Integer num) {
public ResponseModel<String> init(@RequestParam(value = "num",required = false) Integer num) {
Integer count = iElevatorService.selectUseInfoCount();
Integer times = 0;
if (ValidationUtil.isEmpty(num) && count != 0) {
......@@ -441,13 +441,16 @@ public class ElevatorController extends BaseController {
}
for(int i = 0; i <= times ; i ++ ) {
List<Map<String,Object>> mapList = iElevatorService.selectElevatorEsList(1,1000);
esElevatorService.saveEsElevator2ES(mapList);
List<Map<String,Object>> mapList = iElevatorService.selectElevatorEsList(0,1000);
if (!ObjectUtils.isEmpty(mapList)){
esElevatorService.saveEsElevator2ES(mapList);
}
// for (Elevator el:elevatorPage.getRecords()
// ) {
// esElevatorService.saveEsElevatorToES(el);
// }
}
return ResponseHelper.buildResponse("success");
}
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper">
<update id="updateRecordBatch">
UPDATE idx_biz_jg_use_info SET "IS_NOT_ELEV" = 1 WHERE "RECORD" IN
UPDATE idx_biz_jg_use_info SET "IS_NOT_ES" = 1 WHERE "RECORD" IN
<foreach collection="recordList" separator="," item="record" open="(" close=")">
#{record}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment