Explorar o código

Merge branch 'V2.0.1' into test

zhaoxian %!s(int64=3) %!d(string=hai) anos
pai
achega
10089e3f98

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAccountAutoTargetController.java

@@ -65,13 +65,13 @@ public class AiKuaishouAccountAutoTargetController {
      */
     @ApiOperation(value = "自动投放重构-本地定向表-分页列表查询", notes = "自动投放重构-本地定向表-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<Object> queryPageList(Long accountId, String targetName, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+    public Result<Object> queryPageList(Long accountId, String targetName,Integer platformOs, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
         try {
-            if (Check.isNull(accountId)) {
-                return Result.error("请选择账户");
+            if (Check.isNull(accountId)||Check.isNull(platformOs)) {
+                return Result.error("缺少参数");
             }
-            return aiKuaishouAccountAutoTargetService.queryPageList(accountId, targetName, pageNo, pageSize);
+            return aiKuaishouAccountAutoTargetService.queryPageList(accountId, targetName,platformOs, pageNo, pageSize);
         } catch (Exception e) {
             log.error("查询异常,", e.getMessage());
             e.printStackTrace();

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/AiKuaishouAccountAutoTargetMapper.java

@@ -15,7 +15,7 @@ import java.util.List;
  */
 public interface AiKuaishouAccountAutoTargetMapper extends BaseMapper<AiKuaishouAccountAutoTarget> {
 
-    List<AiKuaishouAccountAutoTarget> queryPageList(@Param("accountId") Long accountId, @Param("targetName") String targetName);
+    List<AiKuaishouAccountAutoTarget> queryPageList(@Param("accountId") Long accountId, @Param("targetName") String targetName,@Param("platformOs") Integer platformOs);
 
     List<AiKuaishouAccountAutoTarget> getAutoTargetByIds(@Param("ids") List<String> list);
 }

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/AiKuaishouAccountAutoTargetMapper.xml

@@ -10,6 +10,7 @@
         <if test="targetName != null">
             and target_name LIKE CONCAT(CONCAT('%', #{targetName}), '%')
         </if>
+        AND (platform_os =0 or platform_os = #{platformOs})
         order by create_time desc
     </select>
 

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

@@ -16,7 +16,7 @@ import java.util.List;
  */
 public interface IAiKuaishouAccountAutoTargetService extends IService<AiKuaishouAccountAutoTarget> {
 
-    Result<Object> queryPageList(Long accountId, String targetName, Integer pageNo, Integer pageSize);
+    Result<Object> queryPageList(Long accountId, String targetName,Integer platformOs, Integer pageNo, Integer pageSize);
 
     Result<Object> addLocalTarget(JSONObject requestJson);
 

+ 10 - 9
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAccountAutoDoServiceImpl.java

@@ -2089,16 +2089,17 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
                 target.put("gender", templateTarget.getGender());
             }
             // 操作系统
-            if (!Check.isNull(templateTarget.getPlatformOs())) {
+            Integer platformOs = templateTarget.getPlatformOs();
+            if (!Check.isNull(platformOs)) {
                 target.put("platform_os", templateTarget.getPlatformOs());
-            }
-            // Android版本
-            if (!Check.isNull(templateTarget.getAndroidOsv())) {
-                target.put("android_osv", templateTarget.getAndroidOsv());
-            }
-            // Ios版本
-            if (!Check.isNull(templateTarget.getIosOsv())) {
-                target.put("ios_osv", templateTarget.getIosOsv());
+                // Android版本
+                if (platformOs == 1 && !Check.isNull(templateTarget.getAndroidOsv())) {
+                    target.put("android_osv", templateTarget.getAndroidOsv());
+                }
+                // Ios版本
+                if (platformOs == 2 && !Check.isNull(templateTarget.getIosOsv())) {
+                    target.put("ios_osv", templateTarget.getIosOsv());
+                }
             }
             // 网络环境
             if (!Check.isNull(templateTarget.getNetwork())) {

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAccountAutoTargetServiceImpl.java

@@ -29,9 +29,9 @@ public class AiKuaishouAccountAutoTargetServiceImpl extends ServiceImpl<AiKuaish
     private AiKuaishouAccountAutoTargetMapper accountAutoTargetMapper;
 
     @Override
-    public Result<Object> queryPageList(Long accountId, String targetName, Integer pageNo, Integer pageSize) {
+    public Result<Object> queryPageList(Long accountId, String targetName,Integer platformOs, Integer pageNo, Integer pageSize) {
         PageHelper.startPage(pageNo, pageSize);
-        List<AiKuaishouAccountAutoTarget> list = accountAutoTargetMapper.queryPageList(accountId, targetName);
+        List<AiKuaishouAccountAutoTarget> list = accountAutoTargetMapper.queryPageList(accountId, targetName,platformOs);
         return Result.ok(new PageInfo<>(list));
     }