1;table分页

This commit is contained in:
wangshuai 2024-07-20 14:25:35 +08:00
parent 1b6d5a768a
commit b3f2735a29
5 changed files with 45 additions and 33 deletions

View File

@ -70,7 +70,7 @@ public class BusAgentInfoController extends BaseController {
busAgentInfo.setSuperiorAgentCode(user.getUserId()); busAgentInfo.setSuperiorAgentCode(user.getUserId());
} }
List<BusAgentInfo> list = busAgentInfoService.selectBusAgentInfoList(busAgentInfo); List<BusAgentInfo> list = busAgentInfoService.selectBusAgentInfoList(busAgentInfo);
List<BusAgentInfo> listData = list.stream().map(bean -> { list = list.stream().map(bean -> {
BusStoreInfo busStoreInfo = new BusStoreInfo(); BusStoreInfo busStoreInfo = new BusStoreInfo();
busStoreInfo.setBindUser(bean.getAgentAccount()); busStoreInfo.setBindUser(bean.getAgentAccount());
List<BusStoreInfo> ll = iBusStoreInfoService.selectBusStoreInfoList(busStoreInfo); List<BusStoreInfo> ll = iBusStoreInfoService.selectBusStoreInfoList(busStoreInfo);
@ -101,7 +101,7 @@ public class BusAgentInfoController extends BaseController {
bean.setLoginNum(llll.size()); bean.setLoginNum(llll.size());
return bean; return bean;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return getDataTable(listData); return getDataTable(list);
} }
/** /**

View File

@ -60,8 +60,7 @@ public class BusSaleInfoController extends BaseController
busSaleInfo.setCreateId(SecurityUtils.getUserId()); busSaleInfo.setCreateId(SecurityUtils.getUserId());
} }
List<BusSaleInfo> list = busSaleInfoService.selectBusSaleInfoList(busSaleInfo); List<BusSaleInfo> list = busSaleInfoService.selectBusSaleInfoList(busSaleInfo);
List<BusSaleInfo> tableList = list.stream() list = list.stream().map(info -> {
.map(info -> {
BusStoreInfo busStoreInfo = new BusStoreInfo(); BusStoreInfo busStoreInfo = new BusStoreInfo();
busStoreInfo.setSaleBindId(info.getId()); busStoreInfo.setSaleBindId(info.getId());
int lastFiveNum = 0; int lastFiveNum = 0;
@ -83,10 +82,9 @@ public class BusSaleInfoController extends BaseController
info.setFiveStarReviewsNum(lastFiveNum); info.setFiveStarReviewsNum(lastFiveNum);
info.setReturnVisitNum(lastReturnVisitNum); info.setReturnVisitNum(lastReturnVisitNum);
return info; return info;
}) }).collect(Collectors.toList());
.collect(Collectors.toList());
// tableList.forEach(System.out::println); // tableList.forEach(System.out::println);
return getDataTable(tableList); return getDataTable(list);
// return getDataTable(list); // return getDataTable(list);
} }

View File

@ -117,6 +117,7 @@ public class BusStoreInfoController extends BaseController {
busStoreInfo.setBindUser(user.getUsername()); busStoreInfo.setBindUser(user.getUsername());
} }
List<BusStoreInfo> list = busStoreInfoService.selectBusStoreInfoList(busStoreInfo); List<BusStoreInfo> list = busStoreInfoService.selectBusStoreInfoList(busStoreInfo);
TableDataInfo rspData = getDataTable(list);
List<RespBusStoreInfo> tableList = list.stream() List<RespBusStoreInfo> tableList = list.stream()
.map(busStoreInfo1 -> { .map(busStoreInfo1 -> {
RespBusStoreInfo info = new RespBusStoreInfo(busStoreInfo1); RespBusStoreInfo info = new RespBusStoreInfo(busStoreInfo1);
@ -151,7 +152,8 @@ public class BusStoreInfoController extends BaseController {
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
// tableList.forEach(System.out::println); // tableList.forEach(System.out::println);
return getDataTable(tableList); rspData.setRows(tableList);
return rspData;
} }
@ApiOperation("查询店铺信息列表") @ApiOperation("查询店铺信息列表")

View File

@ -156,7 +156,7 @@ public class AiServiceImpl implements IAiService {
} }
@Override @Override
@Transactional @Transactional(rollbackFor = RuntimeException.class)
public void queryAiTask() { public void queryAiTask() {
String url = "https://ai002.ciopaas.com/api/login"; String url = "https://ai002.ciopaas.com/api/login";
String userName = "zw982210"; String userName = "zw982210";
@ -210,6 +210,7 @@ public class AiServiceImpl implements IAiService {
// } // }
} catch (Exception e) { } catch (Exception e) {
System.out.println(id + "duplicate"); System.out.println(id + "duplicate");
throw new RuntimeException();
} }
} }
} else { } else {
@ -316,12 +317,24 @@ public class AiServiceImpl implements IAiService {
LocalTime time3 = LocalTime.of(14, 00, 00); LocalTime time3 = LocalTime.of(14, 00, 00);
LocalTime time4 = LocalTime.of(17, 00, 00); LocalTime time4 = LocalTime.of(17, 00, 00);
if (time1.isBefore(orderTime) && orderTime.isBefore(time2)) { if (time1.isBefore(orderTime) && orderTime.isBefore(time2)) {
if(busStoreConfigInfo.getContent1()==null){
continue;
}
content = busStoreConfigInfo.getContent1(); content = busStoreConfigInfo.getContent1();
} else if (time2.isBefore(orderTime) && orderTime.isBefore(time3)) { } else if (time2.isBefore(orderTime) && orderTime.isBefore(time3)) {
if(busStoreConfigInfo.getContent2()==null){
continue;
}
content = busStoreConfigInfo.getContent2(); content = busStoreConfigInfo.getContent2();
} else if (time3.isBefore(orderTime) && orderTime.isBefore(time4)) { } else if (time3.isBefore(orderTime) && orderTime.isBefore(time4)) {
if(busStoreConfigInfo.getContent3()==null){
continue;
}
content = busStoreConfigInfo.getContent3(); content = busStoreConfigInfo.getContent3();
} else { } else {
if(busStoreConfigInfo.getContent4()==null){
continue;
}
content = busStoreConfigInfo.getContent4(); content = busStoreConfigInfo.getContent4();
} }
@ -352,7 +365,6 @@ public class AiServiceImpl implements IAiService {
int a = 1; int a = 1;
int reduce = busAgentInfo.getAiDurationBalance() - a; int reduce = busAgentInfo.getAiDurationBalance() - a;
busAgentInfo.setAiDurationBalance(reduce); busAgentInfo.setAiDurationBalance(reduce);
busAgentInfo.setAiRealTimeNum(0);
agentInfoService.updateBusAgentInfo(busAgentInfo); agentInfoService.updateBusAgentInfo(busAgentInfo);
BusIntegralRecord record = new BusIntegralRecord(); BusIntegralRecord record = new BusIntegralRecord();

View File

@ -19,7 +19,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="仅当前账号" prop="isUser"> <!-- <el-form-item label="仅当前账号" prop="isUser">
<el-select <el-select
v-model="queryParams.isUser" v-model="queryParams.isUser"
placeholder="请选择" placeholder="请选择"
@ -34,7 +34,7 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="订单完成时间" prop="time"> <el-form-item label="订单完成时间" prop="time">
<el-date-picker <el-date-picker