فهرست منبع

操盘手业务,调试

zhaoxian 3 سال پیش
والد
کامیت
ffffbb418f

+ 17 - 6
ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveUserAccountController.java

@@ -51,13 +51,24 @@ public class KuaishouLiveUserAccountController extends BaseController {
     }
 
     /**
-     * 查询快手昵称/账户集合
+     * 查询快手昵称
      */
     @GetMapping("/queryNicknameList")
-    @ApiOperation(value = "查询快手昵称/账户集合")
-    public TableDataInfo queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+    @ApiOperation(value = "查询快手昵称集合")
+    public TableDataInfo queryNicknameList() {
         startPage();
-        List<JSONObject> list = kuaishouLiveUserAccountService.queryNicknameList(kuaishouLiveUserAccount);
+        List<JSONObject> list = kuaishouLiveUserAccountService.queryNicknameList();
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询快手账户集合
+     */
+    @GetMapping("/queryAccountListByKsId")
+    @ApiOperation(value = "查询快手账户集合")
+    public TableDataInfo queryAccountListByKsId(@ApiParam("快手ID") @RequestParam(value = "ksId", required = true) Long ksId) {
+        startPage();
+        List<JSONObject> list = kuaishouLiveUserAccountService.queryAccountListByKsId(ksId);
         return getDataTable(list);
     }
 
@@ -65,8 +76,8 @@ public class KuaishouLiveUserAccountController extends BaseController {
      * 查询运营/销售
      */
     @GetMapping("/queryRoles")
-    @ApiOperation(value = "查询(1-运营/2-销售)人员集")
-    public ResultResponse queryRoles(@ApiParam("类型:1-运营/2-销售") @RequestParam(value = "type", required = true) String type) {
+    @ApiOperation(value = "查询(1-运营/2-销售/3-设计)人员集")
+    public ResultResponse queryRoles(@ApiParam("类型:1-运营/2-销售/3-设计") @RequestParam(value = "type", required = false) String type) {
         return kuaishouLiveUserAccountService.queryRoles(type);
     }
 

+ 5 - 2
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveUserAccountMapper.java

@@ -61,7 +61,10 @@ public interface KuaishouLiveUserAccountMapper {
      */
     int deleteKuaishouLiveUserAccountByIds(String[] ids);
 
-    List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+    List<JSONObject> queryNicknameList();
+
+    List<JSONObject> queryAccountListByKsId(Long ksId);
+
+    KuaishouLiveUserAccount getOne(@Param("ksId") Long ksId, @Param("accountName") String accountName);
 
-    KuaishouLiveUserAccount getOne(@Param("ksId") Long ksId,@Param("accountName") String accountName);
 }

+ 4 - 1
ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveUserAccountService.java

@@ -62,7 +62,10 @@ public interface IKuaishouLiveUserAccountService {
      */
     public int deleteKuaishouLiveUserAccountById(String id);
 
-    List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+    List<JSONObject> queryNicknameList();
+
+    List<JSONObject> queryAccountListByKsId(Long ksId);
 
     ResultResponse queryRoles(String type);
+
 }

+ 7 - 2
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountServiceImpl.java

@@ -148,8 +148,13 @@ public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAcco
     }
 
     @Override
-    public List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
-        return kuaishouLiveUserAccountMapper.queryNicknameList(kuaishouLiveUserAccount);
+    public List<JSONObject> queryNicknameList() {
+        return kuaishouLiveUserAccountMapper.queryNicknameList();
+    }
+
+    @Override
+    public List<JSONObject> queryAccountListByKsId(Long ksId) {
+        return kuaishouLiveUserAccountMapper.queryAccountListByKsId(ksId);
     }
 
     @Override

+ 10 - 16
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveUserAccountMapper.xml

@@ -58,7 +58,7 @@
         put_type,
         IFNULL(t2.count,0) as 'count'
         from kuaishou_live_user_account t1
-        left join  (
+        left join (
         SELECT ks_id as ksId,account_name as accountName, sum(1) as 'count' FROM kuaishou_live_user_account_part
         GROUP BY ks_id,account_name
         ) t2 ON t2.accountName = t1.account_name AND t2.ksId = t1.ks_id
@@ -99,22 +99,16 @@
         where id = #{id}
     </select>
 
-    <select id="queryNicknameList" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount"
-            resultType="com.alibaba.fastjson.JSONObject">
-        select
-        ks_id as 'ksId',
-        ks_name as 'ksName',
-        account_id as 'accountId',
-        account_name as 'accountName'
+    <select id="queryNicknameList" resultType="com.alibaba.fastjson.JSONObject">
+        select ks_id as 'ksId', ks_name as 'ksName'
         from kuaishou_live_user_account
-        <where>
-            <if test="ksId != null ">and ks_id = #{ksId}</if>
-            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
-            <if test="accountId != null ">and account_id = #{accountId}</if>
-            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
-                '%')
-            </if>
-        </where>
+        GROUP BY ks_id
+    </select>
+
+    <select id="queryAccountListByKsId" parameterType="Long" resultType="com.alibaba.fastjson.JSONObject">
+        select ks_id as 'ksId', ks_name as 'ksName', account_id as 'accountId', account_name as 'accountName'
+        from kuaishou_live_user_account
+        where ks_id = #{ksId}
     </select>
 
 

+ 7 - 0
ruixuan-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -295,6 +295,13 @@
             )
             )
         </if>
+        <if test="type == 3 ">
+            AND t2.role_id in (
+            SELECT role_id FROM sys_role WHERE role_key in (
+            'sheji'
+            )
+            )
+        </if>
     </select>
 
     <select id="queryUserByIds" parameterType="String" resultType="com.alibaba.fastjson.JSONObject">