Sfoglia il codice sorgente

调整绑定员工用户

yfh 1 settimana fa
parent
commit
4ac108a81c

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

@@ -309,7 +309,7 @@ public class FsUserCourseVideoController extends AppBaseController {
     /**
      * 获取跳转微信小程序的链接地址
      */
-    @Login
+//    @Login
     @GetMapping("/getGotoWxAppLink")
     @ApiOperation("获取跳转微信小程序的链接地址")
     public ResponseResult<String> getGotoWxAppLink(String linkStr,String appid) {

+ 13 - 11
fs-service/src/main/resources/mapper/company/CompanyFsUserMapper.xml

@@ -47,17 +47,19 @@
             fs_user u
                 LEFT JOIN fs_user_company_user fsu ON u.user_id = fsu.user_id
                 LEFT JOIN company_fs_user cfs on u.user_id=cfs.fs_user_id
-        WHERE
-            fsu.company_id =#{companyId}
-        <if test="phone != null and phone != ''">
-            and u.phone = #{phone}
-        </if>
-        <if test="nickName != null and nickName != ''">
-            and u.nick_name like concat('%',#{nickName},'%')
-        </if>
-        <if test="userId !=null and userId !=''">
-            and u.user_id=#{userId}
-        </if>
+        <where>
+            (fsu.company_id =#{companyId} or fsu.company_id is null)
+            <if test="phone != null and phone != ''">
+                and u.phone = #{phone}
+            </if>
+            <if test="nickName != null and nickName != ''">
+                and u.nick_name like concat('%',#{nickName},'%')
+            </if>
+            <if test="userId !=null and userId !=''">
+                and u.user_id=#{userId}
+            </if>
+        </where>
+
         GROUP BY
             u.user_id
     </select>