Procházet zdrojové kódy

cid新增了过滤销售公司查询列表

lmx před 2 dny
rodič
revize
cb783a8797

+ 2 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyVoiceDialogController.java

@@ -39,6 +39,8 @@ public class CompanyVoiceDialogController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CompanyVoiceDialog companyVoiceDialog)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyVoiceDialog.setCompanyId(loginUser.getCompany().getCompanyId());
         startPage();
         List<CompanyVoiceDialog> list = companyVoiceDialogService.selectCompanyVoiceDialogList(companyVoiceDialog);
         return getDataTable(list);

+ 6 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyVoiceRoboticController.java

@@ -62,6 +62,8 @@ public class CompanyVoiceRoboticController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:companyVoiceRobotic:list')")
     @GetMapping("/list")
     public TableDataInfo list(CompanyVoiceRobotic companyVoiceRobotic){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyVoiceRobotic.setCompanyId(loginUser.getCompany().getCompanyId());
         startPage();
         List<CompanyVoiceRobotic> list = companyVoiceRoboticService.selectCompanyVoiceRoboticListCompany(companyVoiceRobotic);
         return getDataTable(list);
@@ -72,6 +74,8 @@ public class CompanyVoiceRoboticController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:companyVoiceRobotic:list')")
     @GetMapping("/listAll")
     public R listAll(CompanyVoiceRobotic companyVoiceRobotic){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyVoiceRobotic.setCompanyId(loginUser.getCompany().getCompanyId());
         return R.ok().put("data", companyVoiceRoboticService.selectCompanyVoiceRoboticListCompany(companyVoiceRobotic));
     }
     @PreAuthorize("@ss.hasPermi('system:companyVoiceRobotic:list')")
@@ -98,6 +102,8 @@ public class CompanyVoiceRoboticController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(CompanyVoiceRobotic companyVoiceRobotic)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyVoiceRobotic.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyVoiceRobotic> list = companyVoiceRoboticService.selectCompanyVoiceRoboticListCompany(companyVoiceRobotic);
         ExcelUtil<CompanyVoiceRobotic> util = new ExcelUtil<CompanyVoiceRobotic>(CompanyVoiceRobotic.class);
         return util.exportExcel(list, "robotic");

+ 2 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyWorkflowController.java

@@ -41,6 +41,8 @@ public class CompanyWorkflowController extends BaseController {
      */
     @GetMapping("/list")
     public TableDataInfo list(CompanyWorkflow fsAiWorkflow) {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        fsAiWorkflow.setCompanyId(loginUser.getCompany().getCompanyId());
         startPage();
         List<CompanyWorkflow> list = companyWorkflowService.selectCompanyWorkflowList(fsAiWorkflow);
         return getDataTable(list);

+ 6 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyWxAccountController.java

@@ -42,6 +42,8 @@ public class CompanyWxAccountController extends BaseController
     public TableDataInfo list(CompanyWxAccount companyWxEnterpriseAccount)
     {
         startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxEnterpriseAccount.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxAccount> list = companyWxAccountService.selectCompanyWxAccountListCompany(companyWxEnterpriseAccount);
         return getDataTable(list);
     }
@@ -51,6 +53,8 @@ public class CompanyWxAccountController extends BaseController
     @PreAuthorize("@ss.hasPermi('company:companyWx:list')")
     @GetMapping("/listAll")
     public R listAll(CompanyWxAccount companyWxEnterpriseAccount){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxEnterpriseAccount.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxAccount> list = companyWxAccountService.selectCompanyWxAccountListCompany(companyWxEnterpriseAccount);
         return R.ok().put("data", list);
     }
@@ -63,6 +67,8 @@ public class CompanyWxAccountController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(CompanyWxAccount companyWxEnterpriseAccount)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxEnterpriseAccount.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxAccount> list = companyWxAccountService.selectCompanyWxAccountListCompany(companyWxEnterpriseAccount);
         ExcelUtil<CompanyWxAccount> util = new ExcelUtil<CompanyWxAccount>(CompanyWxAccount.class);
         return util.exportExcel(list, "companyAccount");

+ 12 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyWxClientController.java

@@ -6,11 +6,14 @@ import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.company.domain.CompanyWxClient;
 import com.fs.company.service.ICompanyVoiceRoboticService;
 import com.fs.company.service.ICompanyWxClientService;
 import com.fs.company.vo.AddWxClientVo;
+import com.fs.framework.security.LoginUser;
+import com.fs.framework.service.TokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
@@ -34,6 +37,9 @@ public class CompanyWxClientController extends BaseController
     @Autowired
     private ICompanyVoiceRoboticService companyVoiceRoboticService;
 
+    @Autowired
+    private TokenService tokenService;
+
     /**
      * 查询添加个微信账号列表
      */
@@ -41,6 +47,8 @@ public class CompanyWxClientController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CompanyWxClient companyWxClient){
         startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxClient.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxClient> list = companyWxClientService.selectCompanyWxClientListCompany(companyWxClient);
         return getDataTable(list);
     }
@@ -53,6 +61,8 @@ public class CompanyWxClientController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(CompanyWxClient companyWxClient)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxClient.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxClient> list = companyWxClientService.selectCompanyWxClientListCompany(companyWxClient);
         ExcelUtil<CompanyWxClient> util = new ExcelUtil<CompanyWxClient>(CompanyWxClient.class);
         return util.exportExcel(list, "companyClient");
@@ -110,6 +120,8 @@ public class CompanyWxClientController extends BaseController
     @GetMapping("/addWxStatistics")
     @Transactional
     public R addWxStatistics(CompanyWxClient companyWxClient){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxClient.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxClient> clients = companyWxClientService.selectCompanyWxClientListCompany(companyWxClient);
         LocalDate now = LocalDate.now();
         return R.ok()

+ 7 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyWxDialogController.java

@@ -40,6 +40,9 @@ public class CompanyWxDialogController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CompanyWxDialog companyWxDialog)
     {
+
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxDialog.setCompanyId(loginUser.getCompany().getCompanyId());
         startPage();
         List<CompanyWxDialog> list = companyWxDialogService.selectCompanyWxDialogList(companyWxDialog);
         return getDataTable(list);
@@ -48,6 +51,8 @@ public class CompanyWxDialogController extends BaseController
     @PreAuthorize("@ss.hasPermi('company:wxDialog:list')")
     @GetMapping("/listAll")
     public R listAll(CompanyWxDialog companyWxDialog){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxDialog.setCompanyId(loginUser.getCompany().getCompanyId());
         return R.ok().put("data", companyWxDialogService.selectCompanyWxDialogList(companyWxDialog));
     }
 
@@ -59,6 +64,8 @@ public class CompanyWxDialogController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(CompanyWxDialog companyWxDialog)
     {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxDialog.setCompanyId(loginUser.getCompany().getCompanyId());
         List<CompanyWxDialog> list = companyWxDialogService.selectCompanyWxDialogList(companyWxDialog);
         ExcelUtil<CompanyWxDialog> util = new ExcelUtil<CompanyWxDialog>(CompanyWxDialog.class);
         return util.exportExcel(list, "wxDialog");

+ 2 - 1
fs-service/src/main/resources/mapper/company/CompanyVoiceDialogMapper.xml

@@ -21,7 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCompanyVoiceDialogList" parameterType="CompanyVoiceDialog" resultMap="CompanyVoiceDialogResult">
         <include refid="selectCompanyVoiceDialogVo"/>
-        <where>  
+        <where>
+            <if test="companyId != null"> and company_id = #{companyId} </if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="resultName != null  and resultName != ''"> and result_name like concat('%', #{resultName}, '%')</if>
             <if test="resultId != null "> and result_id = #{resultId}</if>

+ 1 - 0
fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticMapper.xml

@@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         inner join company_user u on a.create_user = u.user_id
         inner join company_dept d on u.dept_id = d.dept_id
         <where>
+            <if test="companyId != null"> and a.company_id = #{companyId}</if>
             <if test="name != null  and name != ''"> and a.name like concat('%', #{name}, '%')</if>
             <if test="taskName != null  and taskName != ''"> and a.task_name like concat('%', #{taskName}, '%')</if>
             <if test="taskId != null "> and a.task_id = #{taskId}</if>

+ 1 - 0
fs-service/src/main/resources/mapper/company/CompanyWorkflowMapper.xml

@@ -53,6 +53,7 @@
             <if test="workflowType != null">and workflow_type = #{workflowType}</if>
             <if test="status != null">and status = #{status}</if>
             <if test="companyUserId != null">and company_user_id = #{companyUserId}</if>
+            <if test="companyId != null"> and company_id = #{companyId} </if>
         </where>
         order by create_time desc
     </select>

+ 1 - 0
fs-service/src/main/resources/mapper/company/CompanyWxAccountMapper.xml

@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         inner join company_user u on a.company_user_id = u.user_id
         inner join company_dept d on u.dept_id = d.dept_id
         <where>
+            <if test="companyId != null"> and a.company_id = #{companyId} </if>
             <if test="wxNickName != null  and wxNickName != ''"> and a.wx_nick_name like concat( #{wxNickName}, '%')</if>
             <if test="phone != null  and phone != ''"> and a.phone like concat( #{phone}, '%')</if>
             <if test="wxNo != null  and wxNo != ''"> and a.wx_no = #{wxNo}</if>

+ 1 - 0
fs-service/src/main/resources/mapper/company/CompanyWxClientMapper.xml

@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         inner join company_wx_dialog c on a.dialog_id = c.id
         inner join company_voice_robotic robotic on a.robotic_id = robotic.id
         <where>
+            <if test="companyId != null"> and b.company_id = #{companyId}</if>
             <if test="roboticId != null "> and a.robotic_id = #{roboticId}</if>
             <if test="roboticWxId != null "> and b.id = #{roboticWxId}</if>
             <if test="customerId != null "> and a.customer_id = #{customerId}</if>

+ 2 - 1
fs-service/src/main/resources/mapper/company/CompanyWxDialogMapper.xml

@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCompanyWxDialogList" parameterType="CompanyWxDialog" resultMap="CompanyWxDialogResult">
         <include refid="selectCompanyWxDialogVo"/>
-        <where>  
+        <where>
+            <if test="companyId != null"> and company_id = #{companyId}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="templateDetails != null  and templateDetails != ''"> and template_details = #{templateDetails}</if>
         </where>