zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -14,6 +14,7 @@ import com.matrix.system.app.mapper.SysProjUseMapper; import com.matrix.system.app.vo.*; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.bean.SysBeauticianState; import com.matrix.system.hive.bean.SysProjServices; @@ -156,8 +157,11 @@ pageVo.setOffset(offset); pageVo.setLimit(limit); SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); orderListDto.setShopId(user.getShopId()); if (!DataAuthUtil.hasAllShopAuth()) { SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); orderListDto.setShopId(user.getShopId()); orderListDto.setUserId(user.getSuId()); } return AjaxResult.buildSuccessInstance(projServicesService.findApiServiceOrderListInPage(orderListDto, pageVo), projServicesService.findApiServiceOrderListTotal(orderListDto)); } zq-erp/src/main/java/com/matrix/system/app/dto/ServiceOrderListDto.java
@@ -19,6 +19,17 @@ @ApiModelProperty(hidden = true) private Long shopId; @ApiModelProperty(hidden = true) private Long userId; public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public Long getShopId() { return shopId; } zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java
@@ -47,7 +47,7 @@ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if ("dev".equals(evn)) { SysUsers sysUsers = sysUsersDao.selectById(1012L); SysUsers sysUsers = sysUsersDao.selectById(1037L); request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); return true; } zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -503,6 +503,9 @@ <if test="record.shopId != null"> and a.shop_id=#{record.shopId} </if> <if test="record.userId!=null"> and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId}) </if> </where> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> order by a.yy_time desc @@ -532,6 +535,9 @@ <if test="record.shopId != null"> and a.shop_id=#{record.shopId} </if> <if test="record.userId!=null"> and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId}) </if> </where> </select> </mapper>