浏览代码

添加查询模板接口

zhaoxian 4 年之前
父节点
当前提交
4f362962d2

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouTemplateController.java

@@ -59,9 +59,9 @@ public class KuaishouTemplateController {
     @AutoLog(value = "快手-定向模板-分页列表查询")
     @ApiOperation(value = "快手-定向模板-分页列表查询", notes = "快手-定向模板-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<List<JSONObject>> list(Long accountId) {
+    public Result<List<JSONObject>> list(Long accountId,Integer platformOs) {
         Result<List<JSONObject>> result = new Result<>();
-        List<JSONObject> list = kuaishouTemplateService.getJsonArrByAccountId(accountId);
+        List<JSONObject> list = kuaishouTemplateService.getJsonArrByAccountId(accountId,platformOs);
         result.setSuccess(true);
         result.setResult(list);
         return result;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaishouTemplateMapper.java

@@ -15,5 +15,5 @@ import java.util.List;
  * @cersion: V1.0
  */
 public interface KuaishouTemplateMapper extends BaseMapper<KuaishouTemplate> {
-    List<JSONObject> getJsonArrByAccountId(@Param("accountId") Long accountId);
+    List<JSONObject> getJsonArrByAccountId(@Param("accountId") Long accountId,@Param("platformOs") Integer platformOs);
 }

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouTemplateMapper.xml

@@ -14,6 +14,7 @@
                 LEFT JOIN ctop_kuaishou_template_target t2 ON t1.template_id = t2.template_id
         WHERE
             t1.account_id = #{accountId};
+            AND t2.platform_os = #{platformOs}
 
     </select>
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouTemplateService.java

@@ -20,5 +20,5 @@ public interface IKuaishouTemplateService extends IService<KuaishouTemplate> {
 
     JSONObject updateTemplate(Long accountId, String accessToken, JSONObject requestJson);
 
-    List<JSONObject> getJsonArrByAccountId(Long accountId);
+    List<JSONObject> getJsonArrByAccountId(Long accountId,Integer platformOs);
 }

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouTemplateServiceImpl.java

@@ -36,8 +36,8 @@ public class KuaishouTemplateServiceImpl extends ServiceImpl<KuaishouTemplateMap
     private KuaishouTemplateMapper templateMapper;
 
     @Override
-    public List<JSONObject> getJsonArrByAccountId(Long accountId) {
-        return templateMapper.getJsonArrByAccountId(accountId);
+    public List<JSONObject> getJsonArrByAccountId(Long accountId,Integer platformOs) {
+        return templateMapper.getJsonArrByAccountId(accountId,platformOs);
     }
     @Override
     public void getTemplateByAccountId(Long accountId, String accessToken, Integer page) {