| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.RSAUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "首页", notes = "首页") |
| | | @GetMapping(value = "/frist") |
| | | public AjaxResult frist() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | @GetMapping(value = "/frist/{suId}") |
| | | public AjaxResult frist(@PathVariable Long suId) { |
| | | SysUsers user = usersService.findById(suId); |
| | | LogUtil.info("首页 shopId={}", user.getShopId()); |
| | | // SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | PadOrderListDto orderListDto = new PadOrderListDto(); |
| | | orderListDto.setPageNum(1); |
| | | orderListDto.setPageSize(5); |
| | |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | if(ObjectUtil.isNotEmpty(user.getShopId())){ |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |