Pārlūkot izejas kodu

fix:pc订单技师数据权限

wrj 7 mēneši atpakaļ
vecāks
revīzija
8556532362

+ 7 - 0
nightFragrance-admin/src/main/java/com/ylx/web/controller/massage/BusinessDevelopmentController.java

@@ -68,6 +68,13 @@ public class BusinessDevelopmentController extends BaseController {
     public R selectOne(@PathVariable Serializable id) {
         return R.ok(this.businessDevelopmentService.getById(id));
     }
+    @GetMapping("getByOpenId")
+    @ApiOperation("通过OpenId查询单条数据")
+    public R<BusinessDevelopment> getByOpenId(String openId) {
+        LambdaQueryWrapper<BusinessDevelopment> businessDevelopmentQueryWrapper = new LambdaQueryWrapper<>();
+        businessDevelopmentQueryWrapper.eq(BusinessDevelopment::getOpenId,openId);
+        return R.ok(this.businessDevelopmentService.getOne(businessDevelopmentQueryWrapper));
+    }
 
     /**
      * 新增数据

+ 6 - 0
nightFragrance-admin/src/main/java/com/ylx/web/controller/massage/TJsController.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ylx.common.annotation.Log;
 import com.ylx.common.core.controller.BaseController;
 import com.ylx.common.core.domain.R;
+import com.ylx.common.core.domain.model.LoginUser;
 import com.ylx.common.core.domain.model.WxLoginUser;
 import com.ylx.common.enums.BusinessType;
 import com.ylx.common.exception.ServiceException;
@@ -199,6 +200,7 @@ public class TJsController extends BaseController {
     @RequestMapping(value = "/select", method = RequestMethod.GET)
     @ApiOperation("分页查询数据")
     public Page<TJs> selectSp(Page<TJs> page, TJs js) {
+        LoginUser loginUser = this.getLoginUser();
         LambdaQueryWrapper<TJs> mhCompanyLambdaQueryWrapper = new LambdaQueryWrapper<>();
         mhCompanyLambdaQueryWrapper.eq(null != js.getnTong(), TJs::getnTong, js.getnTong()).
                 like(StringUtils.isNotBlank(js.getcName()), TJs::getcName, js.getcName()).
@@ -208,6 +210,10 @@ public class TJsController extends BaseController {
                 eq(js.getnSex() != null, TJs::getnSex, js.getnSex()).
                 eq(js.getDeptId() != null, TJs::getDeptId, js.getDeptId()).
                 orderByDesc(TJs::getDtCreateTime);
+        //部门数据
+        if(loginUser.getDeptId() != 100){
+            mhCompanyLambdaQueryWrapper.eq(TJs::getDeptId,loginUser);
+        }
         if (js.getPageType() == 1) {
             mhCompanyLambdaQueryWrapper.eq(TJs::getnTong, JsStatusEnum.JS_PASS.getCode());
         } else {

+ 1 - 1
nightFragrance-massage/src/main/resources/mapper/massage/TOrderMapper.xml

@@ -188,7 +188,7 @@
             <if test="param.cJsId != null and param.cJsId != ''">
                 and t_order.c_js_id = #{ param.cJsId }
             </if>
-            <if test="param.deptId != null and param.deptId != ''">
+            <if test="param.deptId != null and param.deptId != '' and param.deptId !=100">
                 and t_order.dept_id = #{ param.deptId }
             </if>
             <if test="param.cOpenId != null and param.cOpenId != ''">