pos首页前三个订单

This commit is contained in:
齐天大圣 2024-05-29 10:28:39 +08:00
parent d36c077bea
commit 39d6919db3

View File

@ -13,6 +13,7 @@ import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import com.fuint.system.dept.vo.SysDeptVo;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -51,6 +52,23 @@ public class AllOrderInfoController extends BaseController {
return getSuccessResult(list);
}
@GetMapping("getPageListByPosRecentThree")
public ResponseObject getPageListByPosRecentThree(AllOrderInfo allOrderInfo,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<AllOrderInfoVo> list = allOrderInfoService.getPageListByPos(page, allOrderInfo);
if (ObjectUtils.isNotEmpty(list)){
List<AllOrderInfoVo> records = list.getRecords();
if (ObjectUtils.isNotEmpty(records) && records.size()>2){
List<AllOrderInfoVo> allOrderInfoVos = records.subList(0, 3);
list.setRecords(allOrderInfoVos);
}
}
return getSuccessResult(list);
}
@GetMapping("sumPayMoney")