Browse Source

Merge branch 'master' into master-user

yumeng 4 years ago
parent
commit
6226f5cd6c

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialTagInfoController.java

@@ -57,6 +57,11 @@ public class MaterialTagInfoController {
 		return result;
 	}
 
+	@GetMapping(value = "/detail")
+	public Map<String,Object> detailList(MaterialTagInfo materialTagInfo) {
+		return materialTagInfoService.getTagDetail(materialTagInfo);
+	}
+
 	/**
 	  *   添加
 	 * @param materialTagInfo

+ 2 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TagInfoController.java

@@ -11,7 +11,6 @@ import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
-import org.jeecg.modules.system.service.ISysRoleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -166,15 +165,13 @@ public class TagInfoController {
 		}
 		return result;
 	}
-	@Autowired
-	private ISysRoleService roleService;
 
 	@RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
-    public Result<List<TagInfoTreeModel>> queryTreeList() {
+    public Result<List<TagInfoTreeModel>> queryTreeList(@RequestParam(name = "categoryId",defaultValue = "0")Long categoryId) {
 	    Result<List<TagInfoTreeModel>> result = new Result<>();
 	    try {
 			LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-            List<TagInfoTreeModel> list = tagInfoService.queryTreeList(user.getId());
+            List<TagInfoTreeModel> list = tagInfoService.queryTreeList(user.getId(),categoryId);
 	        result.setResult(list);
 	        result.setSuccess(true);
 	    } catch (Exception e) {

+ 50 - 48
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -9,13 +9,12 @@ import cn.com.ctop.common.module.entity.UReportSubscriber;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
 import cn.com.ctop.common.module.service.*;
-import cn.com.ctop.common.module.service.impl.UReportExportRest;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
+import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.junit.Test;
@@ -46,29 +45,27 @@ public class SampleTest {
     private IKuaiShouDailyAgentService kuaiShouDailyAgentService;
     @Autowired
     private IReportService reportService;
+    @Autowired
+    private IByteDanceAdvertiserDataService byteDanceAdvertiserDataService;
 
     @Test
     public void loadBytedanceCreativeData() {
-        String accountIdString = "1661556811389966,1650504410207245,1652711697337351,1652711697724429,1650504410574859,1668459522250759";
-        String[] accountIds = accountIdString.split(",");
-        for(int i=0;i<accountIds.length;i++){
-            CtopOauthToken token = oauthTokenService.getTokenByAccountId(Long.parseLong(accountIds[i]));
-            reportService.getAdvertiserPlanReport(token,new Date(),new Date(),CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-        }
+        byteDanceAdvertiserDataService.advertiserList("2093115cd521740b024a5811d361712e0b5c3303");
     }
 
     @Autowired
     private IBindAccountLoginService bindAccountLoginService;
     @Autowired
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
+
     @Test
-    public void loadKuaishouCookie(){
-        List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY,1);
-        if(list!=null&&!list.isEmpty()){
-            int i=0;
-            for (BindAccountLogin login:list) {
-                if(null==login.getCookie()||"".equals(login.getCookie().trim())){
-                    if(i>5){
+    public void loadKuaishouCookie() {
+        List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
+        if (list != null && !list.isEmpty()) {
+            int i = 0;
+            for (BindAccountLogin login : list) {
+                if (null == login.getCookie() || "".equals(login.getCookie().trim())) {
+                    if (i > 5) {
                         break;
                     }
                     kuaishouWebInterfaceService.getkuaishouWebLoginCookie(login);
@@ -77,23 +74,24 @@ public class SampleTest {
             }
         }
     }
+
     static ExecutorService executorService = null;
     //线程计数器
     static CountDownLatch countDownLatch = null;
 
     @Test
-    public void deleteKuaishouComment(){
+    public void deleteKuaishouComment() {
         Long start = System.currentTimeMillis();
-        List<BindAccountLogin>loginList = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY,1);
+        List<BindAccountLogin> loginList = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
         if (loginList != null && !loginList.isEmpty()) {
             executorService = Executors.newFixedThreadPool(5);
             countDownLatch = new CountDownLatch(loginList.size());
-            loginList.forEach(login -> executorService.submit(()->{
+            loginList.forEach(login -> executorService.submit(() -> {
                 try {
-                    kuaishouWebInterfaceService.deleteAllComment(new HashMap<>(),login);
-                }catch (Exception e){
-                    log.error(e.getMessage(),e);
-                }finally {
+                    kuaishouWebInterfaceService.deleteAllComment(new HashMap<>(), login);
+                } catch (Exception e) {
+                    log.error(e.getMessage(), e);
+                } finally {
                     countDownLatch.countDown();
                 }
             }));
@@ -103,19 +101,21 @@ public class SampleTest {
                 e.printStackTrace();
             }
             Long end = System.currentTimeMillis();
-            log.info("快手删评论所用时长:{}毫秒",end-start);
+            log.info("快手删评论所用时长:{}毫秒", end - start);
         }
     }
+
     @Autowired
     private IUserAllocationService allocationService;
+
     @Test
     public void testLoadBytedanceData() {
-        List<UserAllocation>allocations = allocationService.getByParams(435L,null,0);
-        for (UserAllocation allocation:allocations) {
-            for(int i=2;i<10;i++){
+        List<UserAllocation> allocations = allocationService.getByParams(435L, null, 0);
+        for (UserAllocation allocation : allocations) {
+            for (int i = 2; i < 10; i++) {
                 CtopOauthToken token = oauthTokenService.getTokenByAccountId(allocation.getAccountId());
-                Date getDate = DateUtils.addDay(new Date(),-i);
-                reportService.getAdvertiserReport(token,getDate,getDate,CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+                Date getDate = DateUtils.addDay(new Date(), -i);
+                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
             }
         }
     }
@@ -129,10 +129,10 @@ public class SampleTest {
 //
         kuaishouReportDailyAgentService.loginAgent();
         try {
-            for(int i=1;i<30;i++){
+            for (int i = 1; i < 30; i++) {
                 kuaishouReportDailyAgentService.getAccount(i);
             }
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
 //        String currentDate = D  ateUtils.formatDate(DateUtils.addDay(new Date(),-1));
@@ -144,19 +144,20 @@ public class SampleTest {
 
     @Autowired
     private ICtopCheckTaskListService checkTaskListService;
+
     @Test
-    public void checkDataStateJobTest(){
+    public void checkDataStateJobTest() {
         //查询需要检查的任务列表
-        List<CtopCheckTaskList> ctopCheckTaskList= checkTaskListService.queryExecuteList("checkDataStateJob");
-        if(ctopCheckTaskList!=null){
-            ctopCheckTaskList.forEach(it-> groovyScriptExecutor.execute(it));
+        List<CtopCheckTaskList> ctopCheckTaskList = checkTaskListService.queryExecuteList("checkDataStateJob");
+        if (ctopCheckTaskList != null) {
+            ctopCheckTaskList.forEach(it -> groovyScriptExecutor.execute(it));
         }
     }
 
     @Test
     public void loadAccountData() {
         CtopOauthToken token = oauthTokenService.getTokenByAccountId(1665922219192387L);
-        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-09-01","yy-MM-dd"),  DateUtils.parseDate("2020-09-01","yy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-09-01", "yy-MM-dd"), DateUtils.parseDate("2020-09-01", "yy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
     }
 
     @Autowired
@@ -167,24 +168,25 @@ public class SampleTest {
     IUReportService uReportService;
 
     @Test
-    public void sendUReport(){
-        uReportService.uReportList().forEach(uReport->{
+    public void sendUReport() {
+        uReportService.uReportList().forEach(uReport -> {
             List<UReportSubscriber> uReportSubscriber = uReportService.getUReportSubscriberByFileId(uReport.getString("id"));
-            if(!uReportSubscriber.isEmpty()){
-                String title=uReport.getString("name").replace(".ureport.xml","");
-                String content="您订阅的日报在附件中请注意查收》》》";
+            if (!uReportSubscriber.isEmpty()) {
+                String title = uReport.getString("name").replace(".ureport.xml", "");
+                String content = "您订阅的日报在附件中请注意查收》》》";
                 //下载文件到本地
                 uReportExportService.exportExcel(uReport.getString("name"));
-                uReportSubscriber.forEach(sender->{
-                    emailSendMsgHandle.SendAttachment("bijiequan@c-top.com.cn",title,content,
-                            new File(System.getProperty("user.dir")+ File.separator + "uReport"+File.separator+uReport.getString("name").replace("ureport.xml","")+"xlsx"));
-                }); }
+                uReportSubscriber.forEach(sender -> {
+                    emailSendMsgHandle.SendAttachment("bijiequan@c-top.com.cn", title, content,
+                            new File(System.getProperty("user.dir") + File.separator + "uReport" + File.separator + uReport.getString("name").replace("ureport.xml", "") + "xlsx"));
+                });
+            }
         });
         //发完全部订阅,删除文件
-        File file =new File(System.getProperty("user.dir")+ File.separator + "uReport");
-        File[] files=file.listFiles();
-        if(files!=null&&files.length>0){
-            for (File f: files){
+        File file = new File(System.getProperty("user.dir") + File.separator + "uReport");
+        File[] files = file.listFiles();
+        if (files != null && files.length > 0) {
+            for (File f : files) {
                 f.delete();
             }
         }

+ 1 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/MaterialTagInfo.java

@@ -30,6 +30,7 @@ public class MaterialTagInfo {
 	private Integer status;
 	private String tagName;
 	private String tagCode;
+	private Long categoryId;
 	private Long tagId;
 	private String userId;
 	private Date createTime;

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialTagInfoService.java

@@ -15,4 +15,6 @@ import java.util.Map;
  */
 public interface IMaterialTagInfoService extends IService<MaterialTagInfo> {
     Map<String, Object> mark(JSONObject data, LoginUser loginUser);
+
+    Map<String, Object> getTagDetail(MaterialTagInfo materialTagInfo);
 }

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/ITagInfoService.java

@@ -14,7 +14,7 @@ import java.util.List;
  */
 public interface ITagInfoService extends IService<TagInfo> {
 
-    List<TagInfoTreeModel> queryTreeList(String userId);
+    List<TagInfoTreeModel> queryTreeList(String userId,Long CategoryId);
 
     TagInfo getByTagCode(String tagCode);
 }

+ 21 - 22
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -589,28 +589,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                     log.info("素材归属信息入库完成,MaterialId:{}", info.getId());
                 }
             }
-            JSONArray tag = json.getJSONArray("tag");
-            if (!Check.isNull(tag)) {
-                materialTagMapper.deleteByMap(deleteMap);
-                for (int j = 0; j < tag.size(); j++) {
-                    String tagStr = tag.getString(j);
-                    if (!Check.isNull(tagStr)) {
-                        MaterialTag materialTag = new MaterialTag();
-                        materialTag.setMaterialId(info.getCode());
-                        materialTag.setTag(tagStr);
-                        materialTagMapper.insert(materialTag);
-                    }
-                }
-            }
-            JSONArray tagList = json.getJSONArray("tagList");
-            if(null!=tagList&&!tagList.isEmpty()){
-                for(int m=0;m<tagList.size();m++){
-                    Long tagId = tagList.getLong(m);
-                    TagInfo tagInfo = tagInfoService.getById(tagId);
-                    MaterialTagInfo setTag= new MaterialTagInfo(code,tagInfo,userId);
-                    materialTagInfoService.save(setTag);
-                }
-            }
+
+            JSONArray modalityTagList = json.getJSONArray("modalityTagList");
+            insertTagList(code,userId,modalityTagList);
+            JSONArray contentTagList = json.getJSONArray("contentTagList");
+            insertTagList(code,userId,contentTagList);
+            JSONArray senceTagList = json.getJSONArray("senceTagList");
+            insertTagList(code,userId,senceTagList);
+            JSONArray modTagList = json.getJSONArray("modTagList");
+            insertTagList(code,userId,modTagList);
             getFile(info, project.getMediaId());
             ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_SUCCESS.getCode());
         } catch (Exception e) {
@@ -619,6 +606,18 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         }
         return resultMap;
     }
+
+    private void insertTagList(String code,String userId,JSONArray tagList){
+        if(null!=tagList&&!tagList.isEmpty()){
+            for(int m=0;m<tagList.size();m++){
+                Long tagId = tagList.getLong(m);
+                TagInfo tagInfo = tagInfoService.getById(tagId);
+                MaterialTagInfo setTag= new MaterialTagInfo(code,tagInfo,userId);
+                setTag.setCategoryId(tagInfo.getTagCategoryId());
+                materialTagInfoService.save(setTag);
+            }
+        }
+    }
     @Autowired
     private ITagInfoService tagInfoService;
     @Autowired

+ 33 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialTagInfoServiceImpl.java

@@ -11,6 +11,7 @@ import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.common.system.vo.LoginUser;
@@ -19,6 +20,7 @@ import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -63,6 +65,37 @@ public class MaterialTagInfoServiceImpl extends ServiceImpl<MaterialTagInfoMappe
         return result;
     }
 
+    @Override
+    public Map<String, Object> getTagDetail(MaterialTagInfo materialTagInfo) {
+        Map<String,Object>result = new HashMap<>();
+        String code = materialTagInfo.getCode();
+        if(null == code||"".equals(code.trim())){
+            ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        List<MaterialTagInfo> modalityList = this.getByParams(code,1L);
+        result.put("modalityTagList",modalityList);
+        List<MaterialTagInfo> modList = this.getByParams(code,2L);
+        result.put("modTagList",modList);
+        List<MaterialTagInfo> contentList = this.getByParams(code,3L);
+        result.put("contentTagList",contentList);
+        List<MaterialTagInfo> senceList = this.getByParams(code,4L);
+        result.put("senceTagList",senceList);
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    public List<MaterialTagInfo> getByParams(String code,Long categotyId){
+        QueryWrapper<MaterialTagInfo>queryWrapper = new QueryWrapper<>();
+        if(null!=code&&!"".equals(code.trim())){
+            queryWrapper.eq("code",code);
+        }
+        if(null!=categotyId&&categotyId!=0){
+            queryWrapper.eq("category_id",categotyId);
+        }
+        return this.list(queryWrapper);
+    }
+
     private void deleteByCode(String code) {
         UpdateWrapper<MaterialTagInfo>updateWrapper = new UpdateWrapper<>();
         updateWrapper.eq("code",code).set("status",0).set("update_time",new Date());

+ 4 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/impl/TagInfoServiceImpl.java

@@ -24,8 +24,11 @@ public class TagInfoServiceImpl extends ServiceImpl<TagInfoMapper, TagInfo> impl
      * queryTreeList 对应 queryTreeList 查询所有的部门数据,以树结构形式响应给前端
      */
     @Override
-    public List<TagInfoTreeModel> queryTreeList(String userId) {
+    public List<TagInfoTreeModel> queryTreeList(String userId,Long categoryId) {
         QueryWrapper<TagInfo> query = new QueryWrapper<>();
+        if(null!=categoryId&&categoryId!=0){
+            query.eq("tag_category_id",categoryId);
+        }
         query.eq("del_flag", "0").or(wrapper->wrapper.eq("status",0).eq("user_id",userId));
         query.orderByAsc("tag_order");
         List<TagInfo> list = this.list(query);

+ 1 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaiShouYiCheReportMapper.xml

@@ -18,7 +18,6 @@
         t1.system_type systemType,
         t1.auth_name authName,
         ROUND(sum(t2.charge) / #{disCount},3) charge,
-        sum(t2.charge) charge,
         sum(t2.activation) activation,
         (
         case
@@ -68,7 +67,6 @@
         t1.system_type systemType,
         #{dateDesc} authName,
         ROUND(sum(t2.charge) / #{disCount},3) charge,
-        sum(t2.charge) charge,
         sum(t2.activation) activation,
         (
         case
@@ -84,7 +82,7 @@
         case
         when t1.system_type = 'android'
         then 16
-        when t1.system_type = 'IOS'
+        when t1.system_type = 'ios'
         then 23
         else 0
         end

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/IByteDanceAdvertiserDataService.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.service;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 
 import java.util.Map;
@@ -35,4 +36,6 @@ public interface IByteDanceAdvertiserDataService {
     void getMaterialList(CtopOauthToken token);
 
     void getImageByPage(CtopOauthToken token, String imageIds, int page);
+
+    JSONArray advertiserList(String token);
 }

+ 47 - 12
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -46,6 +46,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
             params.put("advertiser_id", accountId);
             String result = HttpUtils.httpGetRequest(url, headers, params);
             JSONObject jsonObject = JSONObject.parseObject(result);
+            System.err.println(jsonObject);
             if (Check.isNull(jsonObject)) {
                 throw new Exception("返回结果为空");
             }
@@ -82,9 +83,9 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     }
 
     @Override
-    public Map<String, Object> getAdvertiserInfo(String accountId,String token) {
+    public Map<String, Object> getAdvertiserInfo(String accountId, String token) {
         Map<String, Object> resultMap = new HashMap<>();
-     //   CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
+        //   CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
         //2: 根据token以及用户id获取用户信息数据
         String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_advertiser_info");
         Map<String, String> headers = new HashMap<>();
@@ -97,7 +98,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         JSONObject jsonObject = JSONObject.parseObject(result);
         int code = jsonObject.getInteger("code");
 
-        if (code!=0) {
+        if (code != 0) {
             log.info("获取广告主信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("success", false);
             resultMap.put("code", -1);
@@ -122,6 +123,40 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     }
 
 
+    @Override
+    public JSONArray advertiserList(String token) {
+        Map<String, Object> resultMap = new HashMap<>();
+        //   CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
+        //2: 根据token以及用户id获取用户信息数据
+        String url = "https://ad.oceanengine.com/open_api/oauth2/advertiser/get/";
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Content-Type", "application/json");
+        TreeMap<String, Object> params = new TreeMap<>();
+        params.put("access_token", token);
+        String appId = PropertiesUtils.getValue("bytedance_config", "bytedance_appid");
+        String secret = PropertiesUtils.getValue("bytedance_config", "bytedance_secret");
+        params.put("secret", secret);
+        params.put("app_id", appId);
+        String result = HttpUtils.httpGetRequest(url, headers, params);
+        JSONObject jsonObject = JSONObject.parseObject(result);
+        log.info("返回信息:{}", jsonObject);
+        Integer code = jsonObject.getInteger("code");
+        if (code == 0) {
+            JSONObject dataJson = jsonObject.getJSONObject("data");
+            if (!Check.isNull(dataJson)) {
+                JSONArray listArr = dataJson.getJSONArray("list");
+                if (!Check.isNull(listArr)) {
+                    return listArr;
+
+                }
+            }
+
+        }
+
+        return new JSONArray();
+    }
+
+
     public void getAd(CtopOauthToken token, int pageNum, String ids, String date, String updateDate) {
         JSONArray getIds = null;
         if (null != ids && !"".equals(ids)) {
@@ -260,7 +295,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     }
 
 
-
     private void getCreativeByPage(CtopOauthToken token, String date, int pageNum) {
         JSONObject resultObject = getCreative(token, date, pageNum);
         Integer code = resultObject.getInteger("code");
@@ -324,7 +358,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         String result = HttpUtils.httpPostRequest(url, params, headers);
         JSONObject jsonObject = JSONObject.parseObject(result);
         int code = jsonObject.getInteger("code");
-        if (code!=0) {
+        if (code != 0) {
             log.error("广告计划更新状态接口异常==》accountId:{},message:{}", token.getAccountId(), jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告计划更新状态接口异常");
@@ -375,7 +409,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         String result = HttpUtils.httpPostRequest(url, params, headers);
         JSONObject jsonObject = JSONObject.parseObject(result);
         int code = jsonObject.getInteger("code");
-        if (code!=0) {
+        if (code != 0) {
             log.info("修改计划出价接口异常==》accountId:{},message:{}", token.getAccountId(), jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改计划出价接口异常");
@@ -457,13 +491,13 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     @Override
     public Map<String, Object> advertiserCustomAudienceSelect(String accountId) {
         Map<String, Object> resultMap = new HashMap<>();
-        if(null == accountId||accountId.trim().equals("")){
-            ResultMapUtils.setResultMap(resultMap,StatusCode.COMMON_PARAM_ERROR);
+        if (null == accountId || accountId.trim().equals("")) {
+            ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_PARAM_ERROR);
             return resultMap;
         }
         CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
-        if(null==token){
-            ResultMapUtils.setResultMap(resultMap,StatusCode.COMMON_PARAM_ERROR);
+        if (null == token) {
+            ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_PARAM_ERROR);
             return resultMap;
         }
         String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_dmp_custom_audience_select");
@@ -581,6 +615,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
 
     @Autowired
     private IBytedanceImageInfoService imageInfoService;
+
     @Override
     public void getImageByPage(CtopOauthToken token, String imageIds, int page) {
         // 请求地址
@@ -602,7 +637,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
 
         JSONObject resultObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, param);
-        if(null==resultObject){
+        if (null == resultObject) {
             log.error("获取图片素材库接口异常==》accountId:{}", token.getAccountId());
             return;
         }
@@ -646,7 +681,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
 
         JSONObject resultObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, param);
-        if(null==resultObject){
+        if (null == resultObject) {
             log.error("获取视频素材库接口异常==》accountId:{}", token.getAccountId());
             return;
         }