Jelajahi Sumber

渠道号。。。修改bug

zhaoxian 3 tahun lalu
induk
melakukan
27f82894cb

+ 0 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -336,7 +336,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             }
             //3、在“上新”计划中新增广告组,一个素材搭配n张封面,组成一个广告组
             for (KuaiShouVideoGet videoItem : newVideos) {
-
                 Boolean unitOverrun = getUnitOverrun(accountId);
                 if (unitOverrun) {
                     log.error("组创建超限,accountId:{}", accountId);

+ 7 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/channel/controller/KuaishouChannelItemsController.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.kuaishou.modules.channel.controller;
 
+import cn.com.ctop.common.module.service.ISysRoleExtService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.ExportExcelUtils;
 import cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems;
@@ -59,6 +60,8 @@ import java.util.Map;
 public class KuaishouChannelItemsController {
     @Autowired
     private IKuaishouChannelItemsService kuaishouChannelItemsService;
+    @Autowired
+    private ISysRoleExtService sysRoleService;
 
     /**
      * 查询单品列表
@@ -66,6 +69,10 @@ public class KuaishouChannelItemsController {
     @GetMapping(value = "/queryChannelItemList")
     public Result<Object> queryChannelItemList(KuaishouChannelItems kuaishouChannelItems, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
         try {
+            String roleCode = sysRoleService.getRoleCodeByUserId(kuaishouChannelItems.getUserId());
+            if ("admin".equals(roleCode) || "sale".contains(roleCode) || "meidaManager".equals(roleCode)) {
+                kuaishouChannelItems.setUserId(null);
+            }
             PageHelper.startPage(pageNo, pageSize);
             return kuaishouChannelItemsService.queryChannelItemList(kuaishouChannelItems);
         } catch (Exception e) {

+ 12 - 10
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/channel/mapper/xml/KuaishouChannelItemsMapper.xml

@@ -52,18 +52,21 @@
             <if test="state != null">
                 AND state = #{state}
             </if>
+            <if test="user_id != null">
+                AND user_id = #{userId}
+            </if>
         </where>
         ORDER BY create_time DESC
     </select>
 
-    <select id="queryAllChannelItemByProjectId" resultType="cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems">
-        SELECT
-        id,
-        item_name,
-        keyword
+    <select id="queryAllChannelItemByProjectId"
+            resultType="cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems">
+        SELECT id,
+               item_name,
+               keyword
         FROM ctop_kuaishou_channel_items
         WHERE project_id = #{projectId}
-        AND state = 1
+          AND state = 1
         ORDER BY create_time DESC
     </select>
 
@@ -71,15 +74,14 @@
         SELECT item_name
         FROM ctop_kuaishou_channel_items
         WHERE project_id = #{projectId}
-        AND item_name = #{itemName}
-        limit 1
+          AND item_name = #{itemName} limit 1
     </select>
 
     <select id="queryItemsByChannelCode" resultType="cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems">
-        SELECT item_name,project_id,project_name,state,keyword
+        SELECT item_name, project_id, project_name, state, keyword
         FROM ctop_kuaishou_channel_items
         WHERE project_id = #{projectId}
-        AND channel_code = #{channelCode}
+          AND channel_code = #{channelCode}
     </select>