Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

yumeng 4 years ago
parent
commit
f6f68c7f59

+ 6 - 19
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -21,9 +21,8 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.ctop.entity.KuaishouEffectVideoInfo;
 import org.jeecg.modules.ctop.service.IKuaishouEffectVideoInfoService;
+import org.jeecg.modules.ctop.service.IProjectMemberService;
 import org.jeecg.modules.ctop.service.IRuleEngineService;
-import org.jeecg.modules.ctop.vo.QueryParam;
-import org.jeecg.modules.ctop.vo.RuleResult;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.kie.api.runtime.KieSession;
@@ -227,24 +226,12 @@ public class SampleTest {
     private KieSession kieSession;
     @Autowired
     private IRuleEngineService ruleEngineService;
-
+    @Autowired
+    private IProjectMemberService projectMemberService;
     @Test
-    public void testEngine() {
-        QueryParam queryParam1 = new QueryParam();
-        queryParam1.setParamId("1");
-        queryParam1.setParamSign("+");
-        QueryParam queryParam2 = new QueryParam();
-        queryParam2.setParamId("2");
-        queryParam2.setParamSign("-");
-        // 入参
-        kieSession.insert(queryParam1);
-        kieSession.insert(queryParam2);
-        kieSession.insert(this.ruleEngineService);
-        // 返参
-        RuleResult resultParam = new RuleResult();
-        kieSession.insert(resultParam);
-        kieSession.fireAllRules();
-        System.out.println(resultParam.isPostCodeResult());
+    public void testLoadAccount() {
+        String userId = "c3611c88d0c8414abd3d2ee2a5a0ee7a";
+        List<Map<String, Object>> result = projectMemberService.getProjectAccountByUserId(userId);
     }
 }
 

+ 2 - 3
module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/OceanEngineServiceImpl.java

@@ -56,8 +56,7 @@ public class OceanEngineServiceImpl implements IOceanEngineService {
             conn.addRequestProperty("User-Agent",
                     "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.8) Firefox/3.6.8");
             conn.connect();
-            String location = conn.getHeaderField("Location");
-            return location;
+            return conn.getHeaderField("Location");
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -76,7 +75,7 @@ public class OceanEngineServiceImpl implements IOceanEngineService {
                 if (node.get("data") != null&&node.get("data").get("materials")!=null) {
                     String dataJson = node.get("data").get("materials").toString();
                     List<HotMaterial> list = mapper.readValue(dataJson,new TypeReference<List<HotMaterial>>() {});
-                    if(list != null && list.size() > 0){
+                    if(list != null && !list.isEmpty()){
                         for (HotMaterial material : list){
                             material.setAppCode(appCode);
                             material.setAppName(appName);

+ 4 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCampaignController.java

@@ -50,6 +50,7 @@ public class ByteDanceCampaignController {
     @GetMapping(value = "/list")
     public Result<IPage<ByteDanceCampaign>> queryPageList(
             @RequestParam(name = "name",defaultValue = "")String name,
+            @RequestParam(name = "accountId",defaultValue = "0")String accountId,
             @RequestParam(name = "status",defaultValue = "")String status,
             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -70,6 +71,9 @@ public class ByteDanceCampaignController {
         if(null!=endDate&&!"".equals(endDate)){
             queryWrapper.le("campaign_create_time",endDate+" 11:59:59");
         }
+        if(null!=accountId&&"".equals(accountId.trim())){
+            queryWrapper.eq("account_id",accountId);
+        }
         queryWrapper.ne("status","CAMPAIGN_STATUS_DELETE");
         queryWrapper.orderByDesc("campaign_create_time");
         Page<ByteDanceCampaign> page = new Page<>(pageNo, pageSize);

+ 4 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCreativeController.java

@@ -48,6 +48,7 @@ public class ByteDanceCreativeController {
     @GetMapping(value = "/list")
     public Result<IPage<ByteDanceCreative>> queryPageList(
             @RequestParam(name = "accountId", defaultValue = "0") Long accountId,
+            @RequestParam(name = "planId", defaultValue = "0") Long planId,
             @RequestParam(name = "status",required = false) String status,
             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -62,6 +63,9 @@ public class ByteDanceCreativeController {
         if(null!=accountId){
             queryWrapper.eq("account_id",accountId);
         }
+        if(null!=planId){
+            queryWrapper.eq("plan_id",planId);
+        }
         if(null!=endDate&&!endDate.trim().equals("")){
             queryWrapper.le("",startDate+" 23:59:59");
         }