Bladeren bron

1.企微客户绑定代码修改

jzp 1 week geleden
bovenliggende
commit
0d47f18fe2

+ 2 - 1
fs-company/src/main/java/com/fs/company/controller/fastGpt/FastGptRoleController.java

@@ -47,7 +47,8 @@ public class FastGptRoleController extends BaseController
         startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fastGptRole.setCompanyId(loginUser.getCompany().getCompanyId());
-        List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVO(fastGptRole);
+        //List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVO(fastGptRole);
+        List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVONew(fastGptRole);
         for (FastGptRoleVO fastGptRoleVO : list) {
             String reminderWords = fastGptRoleVO.getReminderWords();
             if (reminderWords!=null && reminderWords.length()>110) {

+ 17 - 1
fs-service/src/main/java/com/fs/fastGpt/mapper/FastGptRoleMapper.java

@@ -97,5 +97,21 @@ public interface FastGptRoleMapper
 
     List<FastgptEventLogTotalVo> selectFastGptRoleAppKeyList();
 
-
+    @Select("<script> " +
+            "select fr.*,qc.corp_name as corpName  from fastgpt_role fr left join qw_company qc on fr.bind_corp_id=qc.corp_id " +
+            "         <where>  \n" +
+            "            <if test=\"roleName != null  and roleName != ''\"> and role_name like concat('%', #{roleName}, '%')</if>\n" +
+            "            <if test=\"companyId != null \"> and company_id = #{companyId}</if>\n" +
+            "            <if test=\"roleType != null \"> and role_type = #{roleType}</if>\n" +
+            "            <if test=\"modeConfigJson != null  and modeConfigJson != ''\"> and mode_config_json = #{modeConfigJson}</if>\n" +
+            "            <if test=\"mode != null \"> and mode = #{mode}</if>\n" +
+            "            <if test=\"kfId != null  and kfId != ''\"> and kf_id = #{kfId}</if>\n" +
+            "            <if test=\"kfUrl != null  and kfUrl != ''\"> and kf_url = #{kfUrl}</if>\n" +
+            "            <if test=\"avatar != null  and avatar != ''\"> and avatar = #{avatar}</if>\n" +
+            "            <if test=\"kfMediaId != null  and kfMediaId != ''\"> and kf_media_id = #{kfMediaId}</if>\n" +
+            "            <if test=\"reminderWords != null  and reminderWords != ''\"> and reminder_words = #{reminderWords}</if>\n" +
+            "            <if test=\"bindCorpId != null  and bindCorpId != ''\"> and (bind_corp_id = #{bindCorpId} or bind_corp_id is null)</if>\n" +
+            "        </where>" +
+            "</script> ")
+    List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/fastGpt/service/IFastGptRoleService.java

@@ -81,4 +81,6 @@ public interface IFastGptRoleService
 
     List<FastGptRoleDataVO> selectFastGptRoleAppKeyList();
 
+    List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole);
+
 }

+ 5 - 0
fs-service/src/main/java/com/fs/fastGpt/service/impl/FastGptRoleServiceImpl.java

@@ -248,5 +248,10 @@ public class FastGptRoleServiceImpl implements IFastGptRoleService
         return roleDataList;
     }
 
+    @Override
+    public List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole) {
+        return fastGptRoleMapper.selectFastGptRoleListVONew(fastGptRole);
+    }
+
 
 }