Просмотр исходного кода

Merge remote-tracking branch 'origin/test' into test

# Conflicts:
#	jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java
huangxuechao 4 лет назад
Родитель
Сommit
f0f46fde35
17 измененных файлов с 640 добавлено и 62 удалено
  1. 3 0
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/AiBytedanceAdDplinkInfo.java
  2. 5 0
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/ByteDanceVideoInfo.java
  3. 42 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/enums/BytedanceCreativeMatTypeEnum.java
  4. 23 3
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/ByteDanceVideoInfoMapper.java
  5. 99 5
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/ByteDanceVideoInfoMapper.xml
  6. 2 2
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IAiBytedanceAdDplinkInfoService.java
  7. 26 3
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IByteDanceVideoInfoService.java
  8. 6 2
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdDplinkInfoServiceImpl.java
  9. 97 33
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java
  10. 35 6
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/ByteDanceVideoInfoServiceImpl.java
  11. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/common/service/IMaterialInfoService.java
  12. 4 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/common/service/impl/MaterialInfoServiceImpl.java
  13. 5 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/bytedance/advertise/controller/AiBytedanceAdvertiserStrategyController.java
  14. 1 1
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  15. 289 0
      jeecg-boot-module-system/src/main/resources/application-pre.yml
  16. 1 1
      jeecg-boot-module-system/src/main/resources/application-prod.yml
  17. 1 1
      jeecg-boot-module-system/src/main/resources/application-test.yml

+ 3 - 0
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/AiBytedanceAdDplinkInfo.java

@@ -29,6 +29,9 @@ public class AiBytedanceAdDplinkInfo {
 	private Long adId;
 	/**accountId*/
 	private Long accountId;
+
+	private String imageMode;
+
 	private BigDecimal adBid;
 	/**strategyId*/
 	private Long strategyId;

+ 5 - 0
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/ByteDanceVideoInfo.java

@@ -80,6 +80,11 @@ public class ByteDanceVideoInfo {
     private String filename;
     private Integer type;
 
+
+    //素材类型  video-视频;image-图片
+    private String materialType;
+
+
     public ByteDanceVideoInfo(JSONObject data, CtopOauthToken token) {
         this.id = data.getString("id")+token.getAccountId();
         this.vid = data.getString("id");

+ 42 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/enums/BytedanceCreativeMatTypeEnum.java

@@ -8,7 +8,19 @@ public enum BytedanceCreativeMatTypeEnum {
     BYTEDANCE_CREATIVE_MAT_TYPE_ENUM_NEW("1","上新",0L,0L),
     BYTEDANCE_CREATIVE_MAT_TYPE_ENUM_HIGH_QUALITY("2","高质量",-4*60*24L,-1*60*24L),
     BYTEDANCE_CREATIVE_MAT_TYPE_ENUM_MISSING("3","遗漏",-8*60*24L,-1*60*24L),
-    BYTEDANCE_CREATIVE_MAT_TYPE_ENUM_HISTORY("4","打捞",-8*60*24L,-1*60*24L);
+    BYTEDANCE_CREATIVE_MAT_TYPE_ENUM_HISTORY("4","打捞",-8*60*24L,-1*60*24L),
+
+
+
+
+    BYTEDANCE_CREATIVE_IMAGE_MODE_LARGE("CREATIVE_IMAGE_MODE_LARGE","1","大图横图"),
+    BYTEDANCE_CREATIVE_IMAGE_MODE_LARGE_VERTICAL("CREATIVE_IMAGE_MODE_LARGE_VERTICAL","2","大图竖图"),
+    BYTEDANCE_CREATIVE_IMAGE_MODE_VIDEO("CREATIVE_IMAGE_MODE_VIDEO","2","横版视频"),
+    BYTEDANCE_CREATIVE_IMAGE_MODE_VIDEO_VERTICAL("CREATIVE_IMAGE_MODE_VIDEO_VERTICAL","1","竖版视频");
+
+
+
+
 
     /**
      * 类型
@@ -24,6 +36,8 @@ public enum BytedanceCreativeMatTypeEnum {
     private Long videoGetStartTime;
     private Long videoGetEndTime;
 
+    private String imageMode;
+
     BytedanceCreativeMatTypeEnum(String type, String name,Long videoGetStartTime,Long videoGetEndTime) {
         this.type = type;
         this.name = name;
@@ -89,4 +103,31 @@ public enum BytedanceCreativeMatTypeEnum {
     public void setVideoGetEndTime(Long videoGetEndTime) {
         this.videoGetEndTime = videoGetEndTime;
     }
+
+
+    public String getImageMode() {
+        return imageMode;
+    }
+
+    public void setImageMode(String imageMode) {
+        this.imageMode = imageMode;
+    }
+
+
+    BytedanceCreativeMatTypeEnum(String type, String name,String imageMode) {
+        this.type = type;
+        this.name = name;
+        this.imageMode = imageMode;
+    }
+
+
+    public static String getImageModeByType(String type) {
+        for (BytedanceCreativeMatTypeEnum createTypeEnum : BytedanceCreativeMatTypeEnum.values()) {
+            if (createTypeEnum.getType().equals(type)) {
+                return createTypeEnum.getImageMode();
+            }
+        }
+        return "";
+    }
+
 }

+ 23 - 3
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/ByteDanceVideoInfoMapper.java

@@ -25,9 +25,29 @@ public interface ByteDanceVideoInfoMapper extends BaseMapper<ByteDanceVideoInfo>
      * @param videoCnt
      * @return
      */
-    List<ByteDanceVideoInfo> getNewVideoByParams(@Param(value = "projectId") Long projectId,@Param(value = "accountId") Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "creativeCnt")Long creativeCnt,@Param(value = "now") String now);
+    List<ByteDanceVideoInfo> getNewVideoByParams(@Param(value = "projectId") Long projectId,@Param(value = "accountId") Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "creativeCnt")Long creativeCnt,@Param(value = "now") String now);
+
+    List<ByteDanceVideoInfo> topMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
+
+    List<ByteDanceVideoInfo>historyMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
+
+
+    /**
+     *图片 上新 遗漏
+     */
+    List<ByteDanceVideoInfo> imageListByParams(@Param(value = "projectId") Long projectId,@Param(value = "accountId") Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "creativeCnt")Long creativeCnt,@Param(value = "now") String now);
+
+    /**
+     * 图片 跑量
+     */
+    List<ByteDanceVideoInfo> imageTopMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
+
+    /**
+     * 图片 打捞
+     */
+    List<ByteDanceVideoInfo>imageHistoryMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "imageMode") String imageMode,@Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
+
+
 
-    List<ByteDanceVideoInfo> topMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
 
-    List<ByteDanceVideoInfo>historyMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
 }

+ 99 - 5
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/ByteDanceVideoInfoMapper.xml

@@ -71,12 +71,14 @@
         select distinct video.*,
         (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
         (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
-        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens
+        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens,
+         'video' As materialType
         from ctop_bytedance_video_info video
         left join ctop_material_info cmi on video.signature = cmi.code and cmi.project_id = #{projectId}
         where account_id = #{accountId}
         and cmi.code is not null
         and cmi.offline_flag = 0
+        and video.type = #{imageMode}
         and material_upload_time &gt;= #{startTime}
         and material_upload_time &lt;= #{endTime}
         having creativeCnt &lt;= #{creativeCnt} and slogens >0 and creativeNum = 0
@@ -88,7 +90,8 @@
         a.totalCost,
         (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
         (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
-        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature ) as slogens
+        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature ) as slogens,
+         'video' As materialType
         from (select report.material_id, sum(cost) as totalCost
         from ctop_bytedance_report_material_daily report
         left join ctop_user_allocation cua on report.account_id = cua.account_id
@@ -97,7 +100,7 @@
         and report.stat_datetime &lt;= #{endTime}
         group by report.material_id
         order by sum(report.cost) desc ) a
-        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId})as video
+        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode})as video
         on a.material_id = video.material_id
         left join ctop_material_info cmi on cmi.code = video.signature and cmi.project_id = #{projectId}
         where cmi.id is not null
@@ -116,7 +119,8 @@
                a.totalCost,
                (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
                (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
-               (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens
+               (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens,
+               'video' As materialType
         from (select report.material_id, sum(cost) as totalCost
               from ctop_bytedance_report_material_daily report
                        left join ctop_user_allocation cua on report.account_id = cua.account_id
@@ -125,7 +129,7 @@
                 and report.stat_datetime &lt;= #{endTime}
               group by report.material_id
               order by sum(report.cost) desc ) a
-                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId})as video
+                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode})as video
                            on a.material_id = video.material_id
                  left join ctop_material_info cmi on cmi.code = video.signature and cmi.project_id = #{projectId}
         where cmi.id is not null
@@ -138,4 +142,94 @@
         order by a.material_id desc
             limit #{videoCnt}
     </select>
+
+
+    <!-- 图片 上新 遗漏 -->
+    <select id="imageListByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
+        select distinct image.*,
+        (select count(1) from ctop_bytedance_ai_video_creative_log l
+        where l.video_code = image.signature
+        and l.account_id = image.account_id
+        and l.state_date = #{now}) as creativeNum,
+        (select count(1) from ctop_bytedance_creative c
+        where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
+        and c.account_id = '${accountId}') as creativeCnt,
+        'image' as materialType
+        from ctop_bytedance_image_info image
+        where account_id = #{accountId}
+        and image.type = #{imageMode}
+        and image.create_time &gt;= #{startTime}
+        and image.create_time &lt;= #{endTime}
+        having creativeCnt &lt;= #{creativeCnt}
+        and creativeNum = 0
+        order by create_time desc
+            limit #{videoCnt}
+    </select>
+
+
+    <!-- 图片 跑量-->
+    <select id="imageTopMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
+        select distinct image.*,
+        a.totalCost,
+        (select count(1) from ctop_bytedance_ai_video_creative_log l
+        where l.video_code = image.signature
+        and l.account_id = image.account_id
+        and l.state_date =#{now}) as creativeNum,
+        (select count(1)
+        from ctop_bytedance_creative c
+        where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
+        and c.account_id = '${accountId}')  as creativeCnt
+        from (select report.material_id, sum(cost) as totalCost,
+         'image' as materialType
+        from ctop_bytedance_report_image_daily report
+        left join ctop_user_allocation cua on report.account_id = cua.account_id
+        where cua.project_id = #{projectId}
+        and report.stat_datetime &gt;= #{startTime}
+        and report.stat_datetime &lt;= #{endTime}
+        group by report.material_id
+        order by sum(report.cost) desc ) a
+        left join (select distinct a.* from ctop_bytedance_image_info a where a.account_id = #{accountId} and a.type = #{imageMode})as image
+        on a.material_id = image.material_id
+        where 1=1
+        and a.totalCost &gt; 500
+        having creativeCnt &lt;= 100
+        and creativeNum = 0
+        order by a.material_id desc
+            limit #{videoCnt}
+    </select>
+
+
+    <!-- 图片 打捞-->
+    <select id="imageHistoryMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
+        select distinct image.*,
+        a.totalCost,
+        (select count(1)
+        from ctop_bytedance_ai_video_creative_log l
+        where l.video_code = image.signature
+        and l.account_id = image.account_id
+        and l.state_date = #{now}) as creativeNum,
+        (select count(1)
+        from ctop_bytedance_creative c
+        where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
+        and c.account_id = '${accountId}') as creativeCnt
+        from (select report.material_id, sum(cost) as totalCost,
+        'image' as materialType
+        from ctop_bytedance_report_image_daily report
+        left join ctop_user_allocation cua on report.account_id = cua.account_id
+        where cua.project_id = #{projectId}
+        and report.stat_datetime &gt;= #{startTime}
+        and report.stat_datetime &lt;= #{endTime}
+        group by report.material_id
+        order by sum(report.cost) desc) a
+        left join (select distinct a.* from ctop_bytedance_image_info a where a.account_id =#{accountId} and a.type = #{imageMode}) as image
+        on a.material_id = image.material_id
+        where 1=1
+        and a.totalCost &lt;= 100
+        having creativeCnt &lt; 20
+        and creativeNum = 0
+        order by a.material_id desc
+            limit #{videoCnt}
+    </select>
+
+
 </mapper>

+ 2 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IAiBytedanceAdDplinkInfoService.java

@@ -11,7 +11,7 @@ import org.jeecg.modules.bytedance.advertise.entity.AiBytedanceAdDplinkInfo;
  */
 public interface IAiBytedanceAdDplinkInfoService extends IService<AiBytedanceAdDplinkInfo> {
 
-    AiBytedanceAdDplinkInfo getlatestDpLinkInfo(Long strategyId, Long accountId, Integer status);
+    AiBytedanceAdDplinkInfo getlatestDpLinkInfo(Long strategyId, Long accountId,String imageMode,Integer status);
 
-    int getDpLinkInfoCount(Long accountId);
+    int getDpLinkInfoCount(Long accountId,String imageMode);
 }

+ 26 - 3
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IByteDanceVideoInfoService.java

@@ -19,9 +19,32 @@ public interface IByteDanceVideoInfoService extends IService<ByteDanceVideoInfo>
 
     void updateMaterialType();
 
-    List<ByteDanceVideoInfo> listByParams(Long projectId,Long accountId, String startTime, String endTime, Long videoCnt,long creativeCnt);
+    List<ByteDanceVideoInfo> listByParams(Long projectId,Long accountId, String imageMode,String startTime, String endTime, Long videoCnt,long creativeCnt);
+
+    List<ByteDanceVideoInfo> topMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt);
+
+    List<ByteDanceVideoInfo> historyMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt);
+
+
+    /**
+     * 图片 上新 遗漏
+     */
+    List<ByteDanceVideoInfo> imageListByParams(Long projectId,Long accountId, String imageMode,String startTime, String endTime, Long videoCnt,long creativeCnt);
+
+    /**
+     * 图片 跑量
+     */
+    List<ByteDanceVideoInfo> imageTopMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt);
+
+    /**
+     * 图片 打捞
+     */
+    List<ByteDanceVideoInfo> imageHistoryMatByParams(Long projectId, Long accountId,String imageMode, String startTime, String endTime, Long videoCnt);
+
+
+
+
+
 
-    List<ByteDanceVideoInfo> topMatByParams(Long projectId, Long accountId, String startTime, String endTime, Long videoCnt);
 
-    List<ByteDanceVideoInfo> historyMatByParams(Long projectId, Long accountId, String startTime, String endTime, Long videoCnt);
 }

+ 6 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdDplinkInfoServiceImpl.java

@@ -24,7 +24,7 @@ public class AiBytedanceAdDplinkInfoServiceImpl extends ServiceImpl<AiBytedanceA
     private AiBytedanceAdDplinkInfoMapper aiBytedanceAdDplinkInfoMapper;
 
     @Override
-    public AiBytedanceAdDplinkInfo getlatestDpLinkInfo(Long strategyId, Long accountId, Integer status) {
+    public AiBytedanceAdDplinkInfo getlatestDpLinkInfo(Long strategyId, Long accountId, String imageMode,Integer status) {
         QueryWrapper<AiBytedanceAdDplinkInfo> queryWrapper = new QueryWrapper<>();
         if(null!=strategyId&&strategyId!=0){
             queryWrapper.eq("strategy_id",strategyId);
@@ -35,6 +35,9 @@ public class AiBytedanceAdDplinkInfoServiceImpl extends ServiceImpl<AiBytedanceA
         if(null!=status){
             queryWrapper.eq("status",status);
         }
+        if(null!=imageMode){
+            queryWrapper.eq("image_mode",imageMode);
+        }
         queryWrapper.orderByDesc("id").last("limit 1");
         return this.getOne(queryWrapper);
     }
@@ -48,13 +51,14 @@ public class AiBytedanceAdDplinkInfoServiceImpl extends ServiceImpl<AiBytedanceA
      * @author: zianY
      */
     @Override
-    public int getDpLinkInfoCount(Long accountId) {
+    public int getDpLinkInfoCount(Long accountId,String imageMode) {
         QueryWrapper<AiBytedanceAdDplinkInfo> queryWrapper = new QueryWrapper<>();
         Date date = new Date();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         String format = sdf.format(date);
         queryWrapper.eq("account_id",accountId);
         queryWrapper.ge("create_time",format);
+        queryWrapper.eq("image_mode",imageMode);
         return aiBytedanceAdDplinkInfoMapper.selectCount(queryWrapper);
 
     }

+ 97 - 33
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -119,7 +119,9 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         if(timeEnd != 0){
             endTime = DateUtils.formatDateTime(now + timeEnd * 60 * 1000L);
         }
-        List<ByteDanceVideoInfo> videoInfos = getVideoInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
+        //List<ByteDanceVideoInfo> videoInfos = getVideoInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
+        List<ByteDanceVideoInfo> videoInfos = getvideoOrImageInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
+
         if(null == videoInfos||videoInfos.isEmpty()){
             log.info("获取{}视频素材为空=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),token.getAccountId());
             AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
@@ -131,16 +133,23 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
             iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
             return videoCnt;
         }
-        log.info("获取{}视频素材个数:{}=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),videoInfos.size(),token.getAccountId());
+        log.info("获取{}素材个数:{}=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),videoInfos.size(),token.getAccountId());
+
 
         for (ByteDanceVideoInfo video:videoInfos) {
-            Integer isLowQuality = bytedanceMaterialRejectReasonMapper.getIsLowQualityByVideoId(video.getVid());    //判断次视频是否是低质视频,为1跳过
-            if(!Check.isNull(isLowQuality) && 1 == isLowQuality){
-                continue;
+            //判断此素材为视频
+            if ("video".equalsIgnoreCase(video.getMaterialType())){
+                //视频是否是低质视频,为1跳过
+                Integer isLowQuality = bytedanceMaterialRejectReasonMapper.getIsLowQualityByVideoId(video.getVid());
+                if(!Check.isNull(isLowQuality) && 1 == isLowQuality){
+                    continue;
+                }
             }
+
             Integer useDplinkIndex = strategy.getDpLinkIndexUsed();
             if(null==useDplinkIndex||useDplinkIndex.equals(0)){
-                AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),1);
+                //查看已使用的dp链接
+                AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),strategy.getCreativeImageMode(),1);
                 if(null == adDplinkInfo){
                     adDplinkInfo = new AiBytedanceAdDplinkInfo();
                     if("FIX".equalsIgnoreCase(strategy.getAdBidCreateType())){
@@ -164,7 +173,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     return videoCnt;
                 }
                 //计划名称
-                String adName = getAdName(strategy,null,video);
+                String adName = getAdName(strategy,null,video,userAllocation.getProjectId());
                 //计算本次出价
                 BigDecimal currentCpaBid = StringUtils.getRandomAdCpaBid(strategy.getAdBidCreateType(),strategy.getAdMaxBid(),strategy.getAdMinBid(),strategy.getAdStepBid(),adDplinkInfo.getAdBid(),strategy.getAdCpaBid());
                 JSONObject adParams = getAdParams(strategy,adName,campaignId,currentCpaBid);
@@ -210,6 +219,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 adDplinkInfo.setAccountId(strategy.getAccountId());
                 adDplinkInfo.setStatus(1);
                 adDplinkInfo.setStrategyId(strategy.getId());
+                adDplinkInfo.setImageMode(strategy.getCreativeImageMode());
                 adDplinkInfoService.save(adDplinkInfo);
 
                 BytedanceAiVideoCreativeLog creativeLog = new BytedanceAiVideoCreativeLog(strategy,adId,campaignId,video);
@@ -220,7 +230,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 }
             }else{
                 Long dpIndex ;
-                AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),1);
+                AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),strategy.getCreativeImageMode(),1);
                 if(null == adDplinkInfo){
                     adDplinkInfo = new AiBytedanceAdDplinkInfo();
                     if("FIX".equalsIgnoreCase(strategy.getAdBidCreateType())){
@@ -249,7 +259,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 strategy.setAdOpenUrl(openUrl.replace("{{dp链接下标}}",dpIndex.toString()));
                 String dplinkCode = StringUtils.getParamFromUrl(strategy.getAdOpenUrl(),"bc_fl_src");
                 //计划名称
-                String adName = getAdName(strategy,dplinkCode,video);
+                String adName = getAdName(strategy,dplinkCode,video,userAllocation.getProjectId());
                 //计算本次出价
                 BigDecimal currentCpaBid = StringUtils.getRandomAdCpaBid(strategy.getAdBidCreateType(),strategy.getAdMaxBid(),strategy.getAdMinBid(),strategy.getAdStepBid(),adDplinkInfo.getAdBid(),strategy.getAdCpaBid());
                 adDplinkInfo.setAdBid(currentCpaBid);
@@ -295,6 +305,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 adDplinkInfo.setAccountId(strategy.getAccountId());
                 adDplinkInfo.setStatus(1);
                 adDplinkInfo.setStrategyId(strategy.getId());
+                adDplinkInfo.setImageMode(strategy.getCreativeImageMode());
                 adDplinkInfoService.save(adDplinkInfo);
                 BytedanceAiVideoCreativeLog creativeLog = new BytedanceAiVideoCreativeLog(strategy,adId,campaignId,video);
                 videoCreativeLogService.saveOrUpdate(creativeLog);
@@ -341,21 +352,25 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         //视频素材
         JSONArray imageArray = new JSONArray();
         JSONObject imageObject = new JSONObject();
-        //视频类型
-        if(videoInfo.getType() == 1){
-            //竖版视频
-            imageObject.put("image_mode","CREATIVE_IMAGE_MODE_VIDEO_VERTICAL");
-        }
-        if(videoInfo.getType() == 2){
-            //横版视频
-            imageObject.put("image_mode","CREATIVE_IMAGE_MODE_VIDEO");
-        }
-        imageObject.put("video_id",videoInfo.getVid());
-        //获取视频封面id
-        String imageId = getSuggestImageId(token,videoInfo.getVid());
-        if(!Check.isNull(imageId)){
-            imageObject.put("image_id",imageId);
+
+        if ("video".equalsIgnoreCase(videoInfo.getMaterialType())){
+            //视频类型
+            //1-竖版视频 2-横版视频
+            String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_VIDEO_VERTICAL" : "CREATIVE_IMAGE_MODE_VIDEO";
+            imageObject.put("image_mode",imageMode);
+            imageObject.put("video_id",videoInfo.getVid());
+            //获取视频封面id
+            String imageId = getSuggestImageId(token,videoInfo.getVid());
+            if(!Check.isNull(imageId)){
+                imageObject.put("image_id",imageId);
+            }
+        }else if ("image".equalsIgnoreCase(videoInfo.getMaterialType())){
+            //1-大图横图; 2-大图竖图
+            String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_LARGE" : "CREATIVE_IMAGE_MODE_LARGE_VERTICAL";
+            imageObject.put("image_mode",imageMode);
+            imageObject.put("image_ids",new String[]{videoInfo.getId()});
         }
+
         imageArray.add(imageObject);
         params.put("image_list",imageArray);
         JSONArray titleArray = new JSONArray();
@@ -977,7 +992,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         return params;
     }
 
-    private String getAdName(AiBytedanceAdvertiserStrategy strategy, String dplinkCode, ByteDanceVideoInfo videoInfo) {
+    private String getAdName(AiBytedanceAdvertiserStrategy strategy, String dplinkCode, ByteDanceVideoInfo videoInfo,Long projectId) {
         String adName = strategy.getAdName();
         if(null == adName|| "".equals(adName.trim())){
             return null;
@@ -996,14 +1011,20 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
             String pricing = strategy.getAdPricing().replace("PRICING_","").toLowerCase(Locale.ROOT);
             adName = adName.replace("{{出价方式}}",pricing);
         }
+
         if(adName.contains("{{素材名称}}")){
-            MaterialInfo info = materialInfoService.getParams(videoInfo.getSignature(),null);
-            if(null!=info&&null!=info.getMaterialName()){
-                adName = adName.replace("{{素材名称}}",info.getMaterialName());
+            if ("video".equals(videoInfo.getMaterialType())){
+                MaterialInfo info = materialInfoService.getParams(videoInfo.getSignature(),null,projectId);
+                if(null!=info&&null!=info.getMaterialName()){
+                    adName = adName.replace("{{素材名称}}",info.getMaterialName());
+                }
+            }else {
+                adName = adName.replace("{{素材名称}}",videoInfo.getFilename());
             }
         }
+
         if(adName.contains("{{序号}}")){
-            int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId());
+            int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId(),strategy.getCreativeImageMode());
             adName = adName.replace("{{序号}}",String.valueOf(i+1));
         }
 
@@ -1070,8 +1091,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         }
 
         if(result.contains("{{序号}}")){
-            //查询当天已有计划数量
-            int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId());
+            //查询同素材类型当天已有计划数量
+            int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId(),strategy.getCreativeImageMode());
             Long num = GetCampaignNum.getCampaignNameNum(strategy.getCampaignCnt(),strategy.getCampaignAdCnt(), i == 0 ? i+1 : i);
             result = result.replace("{{序号}}",String.valueOf(num));
         }
@@ -1114,18 +1135,61 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
     //TODO -- 高质量素材 一天只能创建一次 两周内总消耗》=500
     //TODO -- 打捞素材  两周消耗 <500 并且总关联创意数<20
     private List<ByteDanceVideoInfo> getVideoInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
+        //根据 imageMode 获取素材类型
+        //1-竖版视频 2-横板视频
+        String imageMode = BytedanceCreativeMatTypeEnum.getNameByType(strategy.getCreativeImageMode());
         //1:上新素材 2:跑量素材 3:遗漏素材 4:打捞素材
         if(createType == 1||createType == 3){
-            return videoInfoService.listByParams(projectId,strategy.getAccountId(),startTime,endTime,videoCnt,0);
+            return videoInfoService.listByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt,0);
         }else if(createType == 2){
             startTime = startTime.substring(0,10);
             endTime = endTime.substring(0,10);
-            return videoInfoService.topMatByParams(projectId,strategy.getAccountId(),startTime,endTime,videoCnt);
+            return videoInfoService.topMatByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt);
+        }else if(createType == 4){
+            return videoInfoService.historyMatByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt);
+        }
+        return null;
+    }
+
+    /**
+     * 图片素材
+     */
+    private List<ByteDanceVideoInfo> getImageInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
+        //根据 imageMode 获取素材类型
+        //1-大图横图; 2-大图竖图
+        String imageMode = BytedanceCreativeMatTypeEnum.getNameByType(strategy.getCreativeImageMode());
+        //1:上新素材 2:跑量素材 3:遗漏素材 4:打捞素材
+        if(createType == 1||createType == 3){
+            return videoInfoService.imageListByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt,0);
+        }else if(createType == 2){
+            return videoInfoService.imageTopMatByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt);
         }else if(createType == 4){
-            return videoInfoService.listByParams(projectId,strategy.getAccountId(),startTime,endTime,videoCnt,20);
+            return videoInfoService.imageHistoryMatByParams(projectId,strategy.getAccountId(),imageMode,startTime,endTime,videoCnt);
         }
         return null;
     }
+
+    private List<ByteDanceVideoInfo> getvideoOrImageInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
+        //横板视频 || 竖版视频
+        if (strategy.getCreativeImageMode().equalsIgnoreCase("CREATIVE_IMAGE_MODE_VIDEO")
+                || strategy.getCreativeImageMode().equalsIgnoreCase("CREATIVE_IMAGE_MODE_VIDEO_VERTICAL")){
+            //获取 视频 素材
+            return getVideoInfoByCreateType(projectId,strategy,startTime,endTime,createType,videoCnt);
+        }
+        //获取 图片 素材
+        return getImageInfoByCreateType(projectId,strategy,startTime,endTime,createType,videoCnt);
+    }
+
+
+
+
+
+
+
+
+
+
+
     /**
      *  修改状态 (0开-1关)
      *  同一账户下只能有一条数据信息为开启,可以全部关闭

+ 35 - 6
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/ByteDanceVideoInfoServiceImpl.java

@@ -44,20 +44,49 @@ public class ByteDanceVideoInfoServiceImpl extends ServiceImpl<ByteDanceVideoInf
     }
 
     @Override
-    public List<ByteDanceVideoInfo> listByParams(Long projectId,Long accountId, String startTime, String endTime, Long videoCnt,long creativeCnt) {
+    public List<ByteDanceVideoInfo> listByParams(Long projectId,Long accountId, String imageMode,String startTime, String endTime, Long videoCnt,long creativeCnt) {
         String now = DateUtils.formatDate();
-        return videoInfoMapper.getNewVideoByParams(projectId,accountId,startTime,endTime,videoCnt,creativeCnt,now);
+        return videoInfoMapper.getNewVideoByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,creativeCnt,now);
     }
 
     @Override
-    public List<ByteDanceVideoInfo> topMatByParams(Long projectId, Long accountId, String startTime, String endTime, Long videoCnt) {
+    public List<ByteDanceVideoInfo> topMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt) {
         String now = DateUtils.formatDate();
-        return videoInfoMapper.topMatByParams(projectId,accountId,startTime,endTime,videoCnt,now);
+        return videoInfoMapper.topMatByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,now);
     }
 
     @Override
-    public List<ByteDanceVideoInfo> historyMatByParams(Long projectId, Long accountId, String startTime, String endTime, Long videoCnt) {
+    public List<ByteDanceVideoInfo> historyMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt) {
         String now = DateUtils.formatDate();
-        return videoInfoMapper.historyMatByParams(projectId,accountId,startTime,endTime,videoCnt,now);
+        return videoInfoMapper.historyMatByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,now);
+    }
+
+
+    /**
+     * 图片 上新 遗漏
+     */
+    @Override
+    public List<ByteDanceVideoInfo> imageListByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt, long creativeCnt) {
+        String now = DateUtils.formatDate();
+        return videoInfoMapper.imageListByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,creativeCnt,now);
+
+    }
+
+    /**
+     * 图片 跑量
+     */
+    @Override
+    public List<ByteDanceVideoInfo> imageTopMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt) {
+        String now = DateUtils.formatDate();
+        return videoInfoMapper.imageTopMatByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,now);
+    }
+
+    /**
+     * 图片 打捞
+     */
+    @Override
+    public List<ByteDanceVideoInfo> imageHistoryMatByParams(Long projectId, Long accountId, String imageMode,String startTime, String endTime, Long videoCnt) {
+        String now = DateUtils.formatDate();
+        return videoInfoMapper.imageHistoryMatByParams(projectId,accountId,imageMode,startTime,endTime,videoCnt,now);
     }
 }

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/common/service/IMaterialInfoService.java

@@ -14,7 +14,7 @@ import java.util.List;
  * @date 2019-10-11
  */
 public interface IMaterialInfoService extends IService<MaterialInfo> {
-    MaterialInfo getParams(String signature, Integer status);
+    MaterialInfo getParams(String signature, Integer status,Long projectId);
 
 
     Result updMaterialOfflineById(List<String> ids, Integer offlineFlag);

+ 4 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/common/service/impl/MaterialInfoServiceImpl.java

@@ -31,7 +31,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
 
 
     @Override
-    public MaterialInfo getParams(String signature, Integer status) {
+    public MaterialInfo getParams(String signature, Integer status,Long projectId) {
         QueryWrapper<MaterialInfo>queryWrapper = new QueryWrapper<>();
         if(null!=signature&&!"".equals(signature.trim())){
             queryWrapper.eq("code",signature);
@@ -39,6 +39,9 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         if(null!=status){
             queryWrapper.eq("status",status);
         }
+        if(null!=projectId){
+            queryWrapper.eq("project_id",projectId);
+        }
         queryWrapper.orderByDesc("create_time").last("limit 1");
         return this.getOne(queryWrapper);
     }

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/bytedance/advertise/controller/AiBytedanceAdvertiserStrategyController.java

@@ -131,10 +131,11 @@ public class AiBytedanceAdvertiserStrategyController {
 			//复制功能 防止前端传id到后台
 			aiBytedanceAdvertiserStrategy.setId(null);
 			// 组名称 计划名称 是否重复
-			Result<AiBytedanceAdvertiserStrategy> resultName = aiBytedanceAdvertiserStrategyService.getStrategyInfoByName(aiBytedanceAdvertiserStrategy);
+			/*Result<AiBytedanceAdvertiserStrategy> resultName = aiBytedanceAdvertiserStrategyService.getStrategyInfoByName(aiBytedanceAdvertiserStrategy);
 			if (!resultName.isSuccess()) {
 				return Result.error(resultName.getMessage());
-			}
+			}*/
+
 			return aiBytedanceAdvertiserStrategyService.addBytedanceStrategy(aiBytedanceAdvertiserStrategy);
 		} catch (Exception e) {
 			log.error(e.getMessage(),e);
@@ -151,10 +152,12 @@ public class AiBytedanceAdvertiserStrategyController {
 	@PutMapping(value = "/edit")
 	public Result<AiBytedanceAdvertiserStrategy> edit(@RequestBody AiBytedanceAdvertiserStrategy aiBytedanceAdvertiserStrategy) {
 		// 组名称 计划名称 是否重复
+		/*
 		Result<AiBytedanceAdvertiserStrategy> resultName = aiBytedanceAdvertiserStrategyService.getStrategyInfoByName(aiBytedanceAdvertiserStrategy);
 		if (!resultName.isSuccess()) {
 			return Result.errorMsg(resultName.getMessage());
 		}
+		*/
 		CtopOauthToken token = tokenService.getOauthTokenByAccountId(String.valueOf(aiBytedanceAdvertiserStrategy.getAccountId()));
 		//修改后预算金额不能低于当前已消费金额的105%
 		QueryWrapper<RuleDataAccount> ruleDataAccountQueryWrapper = new QueryWrapper<>();

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8808
   tomcat:
     max-swallow-size: -1
   error:

+ 289 - 0
jeecg-boot-module-system/src/main/resources/application-pre.yml

@@ -0,0 +1,289 @@
+server:
+  port: 8808
+  tomcat:
+    max-swallow-size: -1
+  error:
+    include-exception: true
+    include-stacktrace: ALWAYS
+    include-message: ALWAYS
+  servlet:
+    context-path: /bytedance-api
+  compression:
+    enabled: true
+    min-response-size: 1024
+    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
+
+management:
+ endpoints:
+  web:
+   exposure:
+    include: metrics,httptrace
+
+spring:
+  servlet:
+     multipart:
+        max-file-size: 10MB
+        max-request-size: 10MB
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  ## quartz定时任务,采用数据库方式
+  quartz:
+    job-store-type: jdbc
+    initialize-schema: embedded
+    #设置自动启动,默认为 true
+    auto-startup: true
+    #启动时更新己存在的Job
+    overwrite-existing-jobs: true
+    properties:
+      org:
+        quartz:
+          scheduler:
+            instanceName: MyScheduler
+            instanceId: AUTO
+          jobStore:
+            class: org.quartz.impl.jdbcjobstore.JobStoreTX
+            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+            tablePrefix: QRTZ_
+            isClustered: true
+            misfireThreshold: 60000
+            clusterCheckinInterval: 10000
+          threadPool:
+            class: org.quartz.simpl.SimpleThreadPool
+            threadCount: 10
+            threadPriority: 5
+            threadsInheritContextClassLoaderOfInitializingThread: true
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  jpa:
+    open-in-view: false
+  activiti:
+    check-process-definitions: false
+    #启用作业执行器
+    async-executor-activate: false
+    #启用异步执行器
+    job-executor-activate: false
+  aop:
+    proxy-target-class: true
+  #配置freemarker
+  freemarker:
+    # 设置模板后缀名
+    suffix: .ftl
+    # 设置文档类型
+    content-type: text/html
+    # 设置页面编码格式
+    charset: UTF-8
+    # 设置页面缓存
+    cache: false
+    prefer-file-system-access: false
+    # 设置ftl文件路径
+    template-loader-path:
+      - classpath:/templates
+  # 设置静态文件路径,js,css等
+  mvc:
+    static-path-pattern: /**
+  resource:
+    static-locations: classpath:/static/,classpath:/public/
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    druid:
+      stat-view-servlet:
+        enabled: true
+        loginUsername: admin
+        loginPassword: 123456
+        allow:
+      web-stat-filter:
+        enabled: true
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initial-size: 5
+        min-idle: 5
+        maxActive: 1000
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters: stat,wall,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+          username: data
+          password: hcst@2021
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          # 多数据源配置
+          #multi-datasource1:
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+          #username: root
+          #password: root
+          #driver-class-name: com.mysql.cj.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 172.30.0.17
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: hcst@2021..
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
+  global-config:
+    # 关闭MP3.0自带的banner
+    banner: false
+    db-config:
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
+      id-type: ASSIGN_ID
+      # 默认数据库表下划线命名
+      table-underline: true
+  configuration:
+    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+    #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    # 返回类型为Map,显示null对应的字段
+    call-setters-on-nulls: true
+#minidao 设置
+minidao :
+  base-package: org.jeecg.modules.jmreport.*
+  db-type: mysql
+#jeecg专用配置
+jeecg :
+  # 本地:local\Minio:minio\阿里云:alioss
+  uploadType: alioss
+  path :
+    #文件上传根目录 设置
+    upload: /opt/jeecg-boot/upload
+    #webapp文件路径
+    webapp: /opt/jeecg-boot/webapp
+  shiro:
+     excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
+  #阿里云oss存储配置
+  oss:
+    endpoint: oss-cn-beijing.aliyuncs.com
+    accessKey: ??
+    secretKey: ??
+    bucketName: jeecgos
+    staticDomain: https://static.jeecg.com
+  # ElasticSearch 设置
+  elasticsearch:
+    cluster-name: jeecg-ES
+    cluster-nodes: 111.225.222.176:9200
+    check-enabled: true
+  # 表单设计器配置
+  desform:
+    # 主题颜色(仅支持 16进制颜色代码)
+    theme-color: "#1890ff"
+    # 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置)
+    upload-type: system
+  # 在线预览文件服务器地址配置
+  file-view-domain: http://fileview.jeecg.com
+  # minio文件上传
+  minio:
+    minio_url: http://minio.jeecg.com
+    minio_name: ??
+    minio_pass: ??
+    bucketName: otatest
+  #大屏报表参数设置
+  jmreport:
+    mode: prod
+    #数据字典是否进行saas数据隔离,自己看自己的字典
+    saas: false
+    #是否需要校验token
+    is_verify_token: true
+    #必须校验方法
+    verify_methods: remove,delete,save,add,update
+  #Wps在线文档
+  wps:
+    domain: https://wwo.wps.cn/office/
+    appid: ??
+    appsecret: ??
+  #xxl-job配置
+  xxljob:
+    enabled: false
+    adminAddresses: http://127.0.0.1:9080/xxl-job-admin
+    appname: ${spring.application.name}
+    accessToken: ''
+    address: 127.0.0.1:30007
+    ip: 127.0.0.1
+    port: 30007
+    logPath: logs/jeecg/job/jobhandler/
+    logRetentionDays: 30
+   #自定义路由配置 yml nacos database
+  route:
+    config:
+      data-id: jeecg-gateway-router
+      group: DEFAULT_GROUP
+      data-type: yml
+  #分布式锁配置
+  redisson:
+    address: 127.0.0.1:6379
+    password:
+    type: STANDALONE
+    enabled: true
+#cas单点登录
+cas:
+  prefixUrl: http://cas.example.org:8443/cas
+#Mybatis输出sql日志
+logging:
+  level:
+    org.jeecg.modules.system.mapper : info
+#swagger
+knife4j:
+  production: false
+  basic:
+    enable: false
+    username: jeecg
+    password: jeecg1314
+#第三方登录
+justauth:
+  enabled: true
+  type:
+    GITHUB:
+      client-id: ??
+      client-secret: ??
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/github/callback
+    WECHAT_ENTERPRISE:
+      client-id: ??
+      client-secret: ??
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_enterprise/callback
+      agent-id: 1000002
+    DINGTALK:
+      client-id: ??
+      client-secret: ??
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/dingtalk/callback
+    WECHAT_OPEN:
+      client-id: ??
+      client-secret: ??
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_open/callback
+  cache:
+    type: default
+    prefix: 'demo::'
+    timeout: 1h

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-prod.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8808
   tomcat:
     max-swallow-size: -1
   error:

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8808
   tomcat:
     max-swallow-size: -1
   error: