分页配置统一
This commit is contained in:
@@ -75,7 +75,7 @@ public class MemberService {
|
|||||||
|
|
||||||
public Result queryMember(String shopId, String phone, int page, int pageSize) {
|
public Result queryMember(String shopId, String phone, int page, int pageSize) {
|
||||||
|
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<TbShopUser> tbShopUsers = tbShopUserMapper.selectByShopId(shopId, phone);
|
List<TbShopUser> tbShopUsers = tbShopUserMapper.selectByShopId(shopId, phone);
|
||||||
PageInfo pageInfo = new PageInfo(tbShopUsers);
|
PageInfo pageInfo = new PageInfo(tbShopUsers);
|
||||||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||||
@@ -619,7 +619,7 @@ public class MemberService {
|
|||||||
if (ObjectUtil.isEmpty(memberId)) {
|
if (ObjectUtil.isEmpty(memberId)) {
|
||||||
return Result.fail(CodeEnum.PARAM);
|
return Result.fail(CodeEnum.PARAM);
|
||||||
}
|
}
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<Map<String, Object>> list = tbShopUserFlowMapper.selectByMemberAccountFlow(memberId);
|
List<Map<String, Object>> list = tbShopUserFlowMapper.selectByMemberAccountFlow(memberId);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||||
|
|||||||
@@ -755,7 +755,7 @@ public class OrderService {
|
|||||||
|
|
||||||
public Result findOrder(Integer shopId, String status, Integer page, Integer size, String orderNo) {
|
public Result findOrder(Integer shopId, String status, Integer page, Integer size, String orderNo) {
|
||||||
String day = DateUtils.getDay();
|
String day = DateUtils.getDay();
|
||||||
PageHelperUtil.startPage(page, size);
|
PageHelper.startPage(page, size);
|
||||||
String orderType = "";
|
String orderType = "";
|
||||||
if (StringUtils.isNotEmpty(status)) {
|
if (StringUtils.isNotEmpty(status)) {
|
||||||
if (status.equals("refund")) {
|
if (status.equals("refund")) {
|
||||||
@@ -1130,7 +1130,7 @@ public class OrderService {
|
|||||||
|
|
||||||
|
|
||||||
public Result getOutNumber(String shopId,Integer page,Integer pageSize){
|
public Result getOutNumber(String shopId,Integer page,Integer pageSize){
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<TbOrderOutNumber> list= tbOrderOutNumberMapper.selectAll(shopId);
|
List<TbOrderOutNumber> list= tbOrderOutNumberMapper.selectAll(shopId);
|
||||||
PageInfo pageInfo=new PageInfo(list);
|
PageInfo pageInfo=new PageInfo(list);
|
||||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||||
|
|||||||
@@ -1099,7 +1099,7 @@ public class PayService {
|
|||||||
|
|
||||||
String shopId = info.getString("shopId");
|
String shopId = info.getString("shopId");
|
||||||
String staffId = info.getString("staffId");
|
String staffId = info.getString("staffId");
|
||||||
PageHelperUtil.startPage(pageNo, pageSize);
|
PageHelper.startPage(pageNo, pageSize);
|
||||||
|
|
||||||
|
|
||||||
List<TbQuickPay> list = tbQuickPayMapper.selectByShopIdAndStaffId(Integer.valueOf(shopId), Integer.valueOf(staffId));
|
List<TbQuickPay> list = tbQuickPayMapper.selectByShopIdAndStaffId(Integer.valueOf(shopId), Integer.valueOf(staffId));
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.chaozhanggui.system.cashierservice.entity.vo.ShopCategoryVo;
|
|||||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||||
import com.chaozhanggui.system.cashierservice.util.PageHelperUtil;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -38,14 +38,14 @@ public class ProductService {
|
|||||||
|
|
||||||
|
|
||||||
public Result queryCategory(String shopId,Integer page,Integer pageSize){
|
public Result queryCategory(String shopId,Integer page,Integer pageSize){
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<TbShopCategory> list=tbShopCategoryMapper.selectByAll(shopId);
|
List<TbShopCategory> list=tbShopCategoryMapper.selectByAll(shopId);
|
||||||
PageInfo pageInfo=new PageInfo(list);
|
PageInfo pageInfo=new PageInfo(list);
|
||||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result queryAllCategory(String shopId,Integer page,Integer pageSize){
|
public Result queryAllCategory(String shopId,Integer page,Integer pageSize){
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<ShopCategoryVo> list=tbShopCategoryMapper.queryAllCategory(shopId);
|
List<ShopCategoryVo> list=tbShopCategoryMapper.queryAllCategory(shopId);
|
||||||
PageInfo pageInfo=new PageInfo(list);
|
PageInfo pageInfo=new PageInfo(list);
|
||||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||||
@@ -94,7 +94,8 @@ public class ProductService {
|
|||||||
|
|
||||||
public Result queryNewCommodityInfo(String shopId, String categoryId, String commdityName, int page, int pageSize, String masterId) {
|
public Result queryNewCommodityInfo(String shopId, String categoryId, String commdityName, int page, int pageSize, String masterId) {
|
||||||
List<TbProductWithBLOBs> tbProductWithBLOBs=null;
|
List<TbProductWithBLOBs> tbProductWithBLOBs=null;
|
||||||
PageHelperUtil.startPage(page,pageSize);
|
PageHelper.startPage(page,pageSize);
|
||||||
|
PageHelper.startPage(page,pageSize);
|
||||||
if(ObjectUtil.isEmpty(categoryId)){
|
if(ObjectUtil.isEmpty(categoryId)){
|
||||||
tbProductWithBLOBs=tbProductMapper.selectByShopId(shopId,commdityName);
|
tbProductWithBLOBs=tbProductMapper.selectByShopId(shopId,commdityName);
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import com.chaozhanggui.system.cashierservice.entity.*;
|
|||||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||||
import com.chaozhanggui.system.cashierservice.util.PageHelperUtil;
|
|
||||||
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
|
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@@ -45,7 +44,7 @@ public class ShopInfoService {
|
|||||||
return Result.fail(CodeEnum.PARAM);
|
return Result.fail(CodeEnum.PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<TbShopTable> shopTables=tbShopTableMapper.selectByShopIdAndStatus(shopId,areaId,status);
|
List<TbShopTable> shopTables=tbShopTableMapper.selectByShopIdAndStatus(shopId,areaId,status);
|
||||||
PageInfo pageInfo=new PageInfo(shopTables);
|
PageInfo pageInfo=new PageInfo(shopTables);
|
||||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||||
@@ -65,7 +64,7 @@ public class ShopInfoService {
|
|||||||
// ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByShopIdAndTrade(shopId,day);
|
// ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByShopIdAndTrade(shopId,day);
|
||||||
// List<String> list = shopUserDutyMapper.selectByShopIdAndTradeAll(shopId,day,tbToken.getId());
|
// List<String> list = shopUserDutyMapper.selectByShopIdAndTradeAll(shopId,day,tbToken.getId());
|
||||||
if (Objects.nonNull(shopUserDuty)){
|
if (Objects.nonNull(shopUserDuty)){
|
||||||
// PageHelperUtil.startPage(page, pageSize);
|
// PageHelper.startPage(page, pageSize);
|
||||||
List<ShopUserDutyDetail> shopTables=shopUserDutyDetailMapper.selectAllByDuctId(shopUserDuty.getId());
|
List<ShopUserDutyDetail> shopTables=shopUserDutyDetailMapper.selectAllByDuctId(shopUserDuty.getId());
|
||||||
// PageInfo pageInfo=new PageInfo(shopTables);
|
// PageInfo pageInfo=new PageInfo(shopTables);
|
||||||
shopUserDuty.setDetailList(shopTables);
|
shopUserDuty.setDetailList(shopTables);
|
||||||
@@ -83,7 +82,7 @@ public class ShopInfoService {
|
|||||||
public Result queryDutyFlow(String token, String shopId, int page, int pageSize) {
|
public Result queryDutyFlow(String token, String shopId, int page, int pageSize) {
|
||||||
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||||
// String userId = jsonObject.getString("accountId");
|
// String userId = jsonObject.getString("accountId");
|
||||||
PageHelperUtil.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
PageHelper.orderBy("login_out_time desc");
|
PageHelper.orderBy("login_out_time desc");
|
||||||
List<ShopUserDuty> list = shopUserDutyMapper.selectByShopId(shopId);
|
List<ShopUserDuty> list = shopUserDutyMapper.selectByShopId(shopId);
|
||||||
PageInfo pageInfo=new PageInfo(list);
|
PageInfo pageInfo=new PageInfo(list);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.chaozhanggui.system.cashierservice.entity.vo.ProductVo;
|
|||||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||||
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
|
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
|
||||||
import com.chaozhanggui.system.cashierservice.util.PageHelperUtil;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -109,7 +109,7 @@ public class TbGroupOrderInfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result queryByPage(GroupOrderDto param) {
|
public Result queryByPage(GroupOrderDto param) {
|
||||||
PageHelperUtil.startPage(param.getPage(), param.getSize());
|
PageHelper.startPage(param.getPage(), param.getSize());
|
||||||
return Result.success(CodeEnum.SUCCESS, new PageInfo(tbGroupOrderInfoMapper.queryList(param)));
|
return Result.success(CodeEnum.SUCCESS, new PageInfo(tbGroupOrderInfoMapper.queryList(param)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.chaozhanggui.system.cashierservice.entity.dto.PrintMachineDto;
|
|||||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||||
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
|
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
|
||||||
import com.chaozhanggui.system.cashierservice.util.PageHelperUtil;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
@@ -60,7 +60,7 @@ public class TbPrintPCMachineService {
|
|||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
public Result queryByPage(TbPrintPCMachine tbPrintMachine) {
|
public Result queryByPage(TbPrintPCMachine tbPrintMachine) {
|
||||||
PageHelperUtil.startPage(tbPrintMachine.getPage(), tbPrintMachine.getPageSize());
|
PageHelper.startPage(tbPrintMachine.getPage(), tbPrintMachine.getPageSize());
|
||||||
tbPrintMachine.setContentType("local");
|
tbPrintMachine.setContentType("local");
|
||||||
List<TbPrintPCMachine> tbPrintMachines = this.tbPrintMachineMapper.queryAll(tbPrintMachine);
|
List<TbPrintPCMachine> tbPrintMachines = this.tbPrintMachineMapper.queryAll(tbPrintMachine);
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.chaozhanggui.system.cashierservice.util;
|
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
|
|
||||||
public class PageHelperUtil {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 解决页数超限 仍返回数据问题
|
|
||||||
*/
|
|
||||||
public static void startPage(int page, int pageSize) {
|
|
||||||
PageHelper.startPage(page, pageSize, true, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -41,12 +41,7 @@ spring:
|
|||||||
port: 5672
|
port: 5672
|
||||||
username: admin
|
username: admin
|
||||||
password: Czg666888
|
password: Czg666888
|
||||||
#分页配置
|
|
||||||
pagehelper:
|
|
||||||
supportMethodsArguments: true
|
|
||||||
reasonable: true
|
|
||||||
helperDialect: mysql
|
|
||||||
params: count=countSql
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
|
|||||||
@@ -39,12 +39,6 @@ spring:
|
|||||||
port: 5672
|
port: 5672
|
||||||
username: admin
|
username: admin
|
||||||
password: Czg666888
|
password: Czg666888
|
||||||
#分页配置
|
|
||||||
pagehelper:
|
|
||||||
supportMethodsArguments: true
|
|
||||||
reasonable: true
|
|
||||||
helperDialect: mysql
|
|
||||||
params: count=countSql
|
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ spring:
|
|||||||
port: 5672
|
port: 5672
|
||||||
username: admin
|
username: admin
|
||||||
password: Czg666888
|
password: Czg666888
|
||||||
#分页配置
|
|
||||||
pagehelper:
|
|
||||||
supportMethodsArguments: true
|
|
||||||
reasonable: true
|
|
||||||
helperDialect: mysql
|
|
||||||
params: count=countSql
|
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ spring:
|
|||||||
port: 5672
|
port: 5672
|
||||||
username: admin
|
username: admin
|
||||||
password: Czg666888
|
password: Czg666888
|
||||||
#分页配置
|
|
||||||
pagehelper:
|
|
||||||
supportMethodsArguments: true
|
|
||||||
reasonable: true
|
|
||||||
helperDialect: mysql
|
|
||||||
params: count=countSql
|
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -39,12 +39,6 @@ spring:
|
|||||||
port: 5672
|
port: 5672
|
||||||
username: admin
|
username: admin
|
||||||
password: Czg666888
|
password: Czg666888
|
||||||
#分页配置
|
|
||||||
pagehelper:
|
|
||||||
supportMethodsArguments: true
|
|
||||||
reasonable: true
|
|
||||||
helperDialect: mysql
|
|
||||||
params: count=countSql
|
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ spring:
|
|||||||
server:
|
server:
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /cashier-client/
|
context-path: /cashier-client/
|
||||||
|
#分页配置
|
||||||
|
pagehelper:
|
||||||
|
supportMethodsArguments: true
|
||||||
|
reasonable: false
|
||||||
|
helperDialect: mysql
|
||||||
|
params: count=countSql
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
|||||||
Reference in New Issue
Block a user