瀏覽代碼

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

zhaoxian 4 年之前
父節點
當前提交
ad559cd47f
共有 35 個文件被更改,包括 1927 次插入673 次删除
  1. 0 324
      jeecg-boot-module-activiti/db/create/activiti.mysql.create.engine.sql
  2. 0 155
      jeecg-boot-module-activiti/db/create/activiti.mysql.create.history.sql
  3. 0 46
      jeecg-boot-module-activiti/db/create/activiti.mysql.create.identity.sql
  4. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicInfoController.java
  5. 42 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  6. 27 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/YardController.java
  7. 2 3
      jeecg-boot-module-system/src/main/resources/application-wps.yml
  8. 60 130
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  9. 18 0
      module-common/src/main/java/cn/com/ctop/common/module/entity/SysUser.java
  10. 236 0
      module-job-distribute/pom.xml
  11. 13 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/ModuleJobDistributeApplication.java
  12. 27 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/AutoPoiConfig.java
  13. 97 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/BrowseLogHandelInterceptor.java
  14. 158 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/MybatisInterceptor.java
  15. 34 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/MybatisPlusConfig.java
  16. 97 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/RedisConfig.java
  17. 33 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/WebMvcConfiguration.java
  18. 71 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/XxlJobConfig.java
  19. 5 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/handler/BytedanceHourlyJob.java
  20. 154 0
      module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/handler/KuaishouHourlyJob.java
  21. 155 0
      module-job-distribute/src/main/resources/application-dev.yml
  22. 169 0
      module-job-distribute/src/main/resources/application-prod.yml
  23. 179 0
      module-job-distribute/src/main/resources/application-test.yml
  24. 24 0
      module-job-distribute/src/main/resources/application.yml
  25. 14 0
      module-job-distribute/src/main/resources/banner.txt
  26. 49 0
      module-job-distribute/src/main/resources/generatorConfig.xml
  27. 4 0
      module-job-distribute/src/main/resources/log4j.properties
  28. 57 0
      module-job-distribute/src/main/resources/logback-dev.xml
  29. 57 0
      module-job-distribute/src/main/resources/logback-prod.xml
  30. 57 0
      module-job-distribute/src/main/resources/logback-test.xml
  31. 13 0
      module-job-distribute/src/test/java/cn/com/ctop/module/job/distribute/ModuleJobDistributeApplicationTests.java
  32. 3 2
      module-job-kuaishou/src/main/resources/application-prod.yml
  33. 2 0
      module-job-kuaishou/src/main/resources/application.yml
  34. 67 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupServiceImpl.java
  35. 1 0
      pom.xml

+ 0 - 324
jeecg-boot-module-activiti/db/create/activiti.mysql.create.engine.sql

@@ -1,324 +0,0 @@
-create table ACT_GE_PROPERTY (
-    NAME_ varchar(64),
-    VALUE_ varchar(300),
-    REV_ integer,
-    primary key (NAME_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-insert into ACT_GE_PROPERTY
-values ('schema.version', '5.22.0.0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('schema.history', 'create(5.22.0.0)', 1);
-
-insert into ACT_GE_PROPERTY
-values ('next.dbid', '1', 1);
-
-create table ACT_GE_BYTEARRAY (
-    ID_ varchar(64),
-    REV_ integer,
-    NAME_ varchar(255),
-    DEPLOYMENT_ID_ varchar(64),
-    BYTES_ LONGBLOB,
-    GENERATED_ TINYINT,
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RE_DEPLOYMENT (
-    ID_ varchar(64),
-    NAME_ varchar(255),
-    CATEGORY_ varchar(255),
-    TENANT_ID_ varchar(255) default '',
-    DEPLOY_TIME_ timestamp(3) NULL,
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RE_MODEL (
-    ID_ varchar(64) not null,
-    REV_ integer,
-    NAME_ varchar(255),
-    KEY_ varchar(255),
-    CATEGORY_ varchar(255),
-    CREATE_TIME_ timestamp(3) null,
-    LAST_UPDATE_TIME_ timestamp(3) null,
-    VERSION_ integer,
-    META_INFO_ varchar(4000),
-    DEPLOYMENT_ID_ varchar(64),
-    EDITOR_SOURCE_VALUE_ID_ varchar(64),
-    EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64),
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_EXECUTION (
-    ID_ varchar(64),
-    REV_ integer,
-    PROC_INST_ID_ varchar(64),
-    BUSINESS_KEY_ varchar(255),
-    PARENT_ID_ varchar(64),
-    PROC_DEF_ID_ varchar(64),
-    SUPER_EXEC_ varchar(64),
-    ACT_ID_ varchar(255),
-    IS_ACTIVE_ TINYINT,
-    IS_CONCURRENT_ TINYINT,
-    IS_SCOPE_ TINYINT,
-    IS_EVENT_SCOPE_ TINYINT,
-    SUSPENSION_STATE_ integer,
-    CACHED_ENT_STATE_ integer,
-    TENANT_ID_ varchar(255) default '',
-    NAME_ varchar(255),
-    LOCK_TIME_ timestamp(3) NULL,
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_JOB (
-    ID_ varchar(64) NOT NULL,
-    REV_ integer,
-    TYPE_ varchar(255) NOT NULL,
-    LOCK_EXP_TIME_ timestamp(3) NULL,
-    LOCK_OWNER_ varchar(255),
-    EXCLUSIVE_ boolean,
-    EXECUTION_ID_ varchar(64),
-    PROCESS_INSTANCE_ID_ varchar(64),
-    PROC_DEF_ID_ varchar(64),
-    RETRIES_ integer,
-    EXCEPTION_STACK_ID_ varchar(64),
-    EXCEPTION_MSG_ varchar(4000),
-    DUEDATE_ timestamp(3) NULL,
-    REPEAT_ varchar(255),
-    HANDLER_TYPE_ varchar(255),
-    HANDLER_CFG_ varchar(4000),
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RE_PROCDEF (
-    ID_ varchar(64) not null,
-    REV_ integer,
-    CATEGORY_ varchar(255),
-    NAME_ varchar(255),
-    KEY_ varchar(255) not null,
-    VERSION_ integer not null,
-    DEPLOYMENT_ID_ varchar(64),
-    RESOURCE_NAME_ varchar(4000),
-    DGRM_RESOURCE_NAME_ varchar(4000),
-    DESCRIPTION_ varchar(4000),
-    HAS_START_FORM_KEY_ TINYINT,
-    HAS_GRAPHICAL_NOTATION_ TINYINT,
-    SUSPENSION_STATE_ integer,
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_TASK (
-    ID_ varchar(64),
-    REV_ integer,
-    EXECUTION_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    PROC_DEF_ID_ varchar(64),
-    NAME_ varchar(255),
-    PARENT_TASK_ID_ varchar(64),
-    DESCRIPTION_ varchar(4000),
-    TASK_DEF_KEY_ varchar(255),
-    OWNER_ varchar(255),
-    ASSIGNEE_ varchar(255),
-    DELEGATION_ varchar(64),
-    PRIORITY_ integer,
-    CREATE_TIME_ timestamp(3) NULL,
-    DUE_DATE_ datetime(3),
-    CATEGORY_ varchar(255),
-    SUSPENSION_STATE_ integer,
-    TENANT_ID_ varchar(255) default '',
-    FORM_KEY_ varchar(255),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_IDENTITYLINK (
-    ID_ varchar(64),
-    REV_ integer,
-    GROUP_ID_ varchar(255),
-    TYPE_ varchar(255),
-    USER_ID_ varchar(255),
-    TASK_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    PROC_DEF_ID_ varchar(64),    
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_VARIABLE (
-    ID_ varchar(64) not null,
-    REV_ integer,
-    TYPE_ varchar(255) not null,
-    NAME_ varchar(255) not null,
-    EXECUTION_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    TASK_ID_ varchar(64),
-    BYTEARRAY_ID_ varchar(64),
-    DOUBLE_ double,
-    LONG_ bigint,
-    TEXT_ varchar(4000),
-    TEXT2_ varchar(4000),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_EVENT_SUBSCR (
-    ID_ varchar(64) not null,
-    REV_ integer,
-    EVENT_TYPE_ varchar(255) not null,
-    EVENT_NAME_ varchar(255),
-    EXECUTION_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    ACTIVITY_ID_ varchar(64),
-    CONFIGURATION_ varchar(255),
-    CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3),
-    PROC_DEF_ID_ varchar(64),
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_EVT_LOG (
-    LOG_NR_ bigint auto_increment,
-    TYPE_ varchar(64),
-    PROC_DEF_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    EXECUTION_ID_ varchar(64),
-    TASK_ID_ varchar(64),
-    TIME_STAMP_ timestamp(3) not null,
-    USER_ID_ varchar(255),
-    DATA_ LONGBLOB,
-    LOCK_OWNER_ varchar(255),
-    LOCK_TIME_ timestamp(3) null,
-    IS_PROCESSED_ tinyint default 0,
-    primary key (LOG_NR_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_PROCDEF_INFO (
-	ID_ varchar(64) not null,
-    PROC_DEF_ID_ varchar(64) not null,
-    REV_ integer,
-    INFO_JSON_ID_ varchar(64),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
-create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
-create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
-create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
-
-alter table ACT_GE_BYTEARRAY
-    add constraint ACT_FK_BYTEARR_DEPL 
-    foreign key (DEPLOYMENT_ID_) 
-    references ACT_RE_DEPLOYMENT (ID_);
-
-alter table ACT_RE_PROCDEF
-    add constraint ACT_UNIQ_PROCDEF
-    unique (KEY_,VERSION_, TENANT_ID_);
-    
-alter table ACT_RU_EXECUTION
-    add constraint ACT_FK_EXE_PROCINST 
-    foreign key (PROC_INST_ID_) 
-    references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
-
-alter table ACT_RU_EXECUTION
-    add constraint ACT_FK_EXE_PARENT 
-    foreign key (PARENT_ID_) 
-    references ACT_RU_EXECUTION (ID_);
-    
-alter table ACT_RU_EXECUTION
-    add constraint ACT_FK_EXE_SUPER 
-    foreign key (SUPER_EXEC_) 
-    references ACT_RU_EXECUTION (ID_);
-
-alter table ACT_RU_EXECUTION
-    add constraint ACT_FK_EXE_PROCDEF 
-    foreign key (PROC_DEF_ID_) 
-    references ACT_RE_PROCDEF (ID_);
-    
-alter table ACT_RU_IDENTITYLINK
-    add constraint ACT_FK_TSKASS_TASK 
-    foreign key (TASK_ID_) 
-    references ACT_RU_TASK (ID_);
-    
-alter table ACT_RU_IDENTITYLINK
-    add constraint ACT_FK_ATHRZ_PROCEDEF 
-    foreign key (PROC_DEF_ID_) 
-    references ACT_RE_PROCDEF(ID_);
-    
-alter table ACT_RU_IDENTITYLINK
-    add constraint ACT_FK_IDL_PROCINST
-    foreign key (PROC_INST_ID_) 
-    references ACT_RU_EXECUTION (ID_);       
-    
-alter table ACT_RU_TASK
-    add constraint ACT_FK_TASK_EXE
-    foreign key (EXECUTION_ID_)
-    references ACT_RU_EXECUTION (ID_);
-    
-alter table ACT_RU_TASK
-    add constraint ACT_FK_TASK_PROCINST
-    foreign key (PROC_INST_ID_)
-    references ACT_RU_EXECUTION (ID_);
-    
-alter table ACT_RU_TASK
-  	add constraint ACT_FK_TASK_PROCDEF
-  	foreign key (PROC_DEF_ID_)
-  	references ACT_RE_PROCDEF (ID_);
-  
-alter table ACT_RU_VARIABLE 
-    add constraint ACT_FK_VAR_EXE 
-    foreign key (EXECUTION_ID_) 
-    references ACT_RU_EXECUTION (ID_);
-
-alter table ACT_RU_VARIABLE
-    add constraint ACT_FK_VAR_PROCINST
-    foreign key (PROC_INST_ID_)
-    references ACT_RU_EXECUTION(ID_);
-
-alter table ACT_RU_VARIABLE 
-    add constraint ACT_FK_VAR_BYTEARRAY 
-    foreign key (BYTEARRAY_ID_) 
-    references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB 
-    add constraint ACT_FK_JOB_EXCEPTION 
-    foreign key (EXCEPTION_STACK_ID_) 
-    references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EVENT_SUBSCR
-    add constraint ACT_FK_EVENT_EXEC
-    foreign key (EXECUTION_ID_)
-    references ACT_RU_EXECUTION(ID_);
-    
-alter table ACT_RE_MODEL 
-    add constraint ACT_FK_MODEL_SOURCE 
-    foreign key (EDITOR_SOURCE_VALUE_ID_) 
-    references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RE_MODEL 
-    add constraint ACT_FK_MODEL_SOURCE_EXTRA 
-    foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) 
-    references ACT_GE_BYTEARRAY (ID_);
-    
-alter table ACT_RE_MODEL 
-    add constraint ACT_FK_MODEL_DEPLOYMENT 
-    foreign key (DEPLOYMENT_ID_) 
-    references ACT_RE_DEPLOYMENT (ID_);        
-
-alter table ACT_PROCDEF_INFO 
-    add constraint ACT_FK_INFO_JSON_BA 
-    foreign key (INFO_JSON_ID_) 
-    references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_PROCDEF_INFO 
-    add constraint ACT_FK_INFO_PROCDEF 
-    foreign key (PROC_DEF_ID_) 
-    references ACT_RE_PROCDEF (ID_);
-    
-alter table ACT_PROCDEF_INFO
-    add constraint ACT_UNIQ_INFO_PROCDEF
-    unique (PROC_DEF_ID_);
-    

+ 0 - 155
jeecg-boot-module-activiti/db/create/activiti.mysql.create.history.sql

@@ -1,155 +0,0 @@
-create table ACT_HI_PROCINST (
-    ID_ varchar(64) not null,
-    PROC_INST_ID_ varchar(64) not null,
-    BUSINESS_KEY_ varchar(255),
-    PROC_DEF_ID_ varchar(64) not null,
-    START_TIME_ datetime(3) not null,
-    END_TIME_ datetime(3),
-    DURATION_ bigint,
-    START_USER_ID_ varchar(255),
-    START_ACT_ID_ varchar(255),
-    END_ACT_ID_ varchar(255),
-    SUPER_PROCESS_INSTANCE_ID_ varchar(64),
-    DELETE_REASON_ varchar(4000),
-    TENANT_ID_ varchar(255) default '',
-    NAME_ varchar(255),
-    primary key (ID_),
-    unique (PROC_INST_ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_ACTINST (
-    ID_ varchar(64) not null,
-    PROC_DEF_ID_ varchar(64) not null,
-    PROC_INST_ID_ varchar(64) not null,
-    EXECUTION_ID_ varchar(64) not null,
-    ACT_ID_ varchar(255) not null,
-    TASK_ID_ varchar(64),
-    CALL_PROC_INST_ID_ varchar(64),
-    ACT_NAME_ varchar(255),
-    ACT_TYPE_ varchar(255) not null,
-    ASSIGNEE_ varchar(255),
-    START_TIME_ datetime(3) not null,
-    END_TIME_ datetime(3),
-    DURATION_ bigint,
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_TASKINST (
-    ID_ varchar(64) not null,
-    PROC_DEF_ID_ varchar(64),
-    TASK_DEF_KEY_ varchar(255),
-    PROC_INST_ID_ varchar(64),
-    EXECUTION_ID_ varchar(64),
-    NAME_ varchar(255),
-    PARENT_TASK_ID_ varchar(64),
-    DESCRIPTION_ varchar(4000),
-    OWNER_ varchar(255),
-    ASSIGNEE_ varchar(255),
-    START_TIME_ datetime(3) not null,
-    CLAIM_TIME_ datetime(3),
-    END_TIME_ datetime(3),
-    DURATION_ bigint,
-    DELETE_REASON_ varchar(4000),
-    PRIORITY_ integer,
-    DUE_DATE_ datetime(3),
-    FORM_KEY_ varchar(255),
-    CATEGORY_ varchar(255),
-    TENANT_ID_ varchar(255) default '',
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_VARINST (
-    ID_ varchar(64) not null,
-    PROC_INST_ID_ varchar(64),
-    EXECUTION_ID_ varchar(64),
-    TASK_ID_ varchar(64),
-    NAME_ varchar(255) not null,
-    VAR_TYPE_ varchar(100),
-    REV_ integer,
-    BYTEARRAY_ID_ varchar(64),
-    DOUBLE_ double,
-    LONG_ bigint,
-    TEXT_ varchar(4000),
-    TEXT2_ varchar(4000),
-    CREATE_TIME_ datetime(3),
-    LAST_UPDATED_TIME_ datetime(3),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_DETAIL (
-    ID_ varchar(64) not null,
-    TYPE_ varchar(255) not null,
-    PROC_INST_ID_ varchar(64),
-    EXECUTION_ID_ varchar(64),
-    TASK_ID_ varchar(64),
-    ACT_INST_ID_ varchar(64),
-    NAME_ varchar(255) not null,
-    VAR_TYPE_ varchar(255),
-    REV_ integer,
-    TIME_ datetime(3) not null,
-    BYTEARRAY_ID_ varchar(64),
-    DOUBLE_ double,
-    LONG_ bigint,
-    TEXT_ varchar(4000),
-    TEXT2_ varchar(4000),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_COMMENT (
-    ID_ varchar(64) not null,
-    TYPE_ varchar(255),
-    TIME_ datetime(3) not null,
-    USER_ID_ varchar(255),
-    TASK_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    ACTION_ varchar(255),
-    MESSAGE_ varchar(4000),
-    FULL_MSG_ LONGBLOB,
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_ATTACHMENT (
-    ID_ varchar(64) not null,
-    REV_ integer,
-    USER_ID_ varchar(255),
-    NAME_ varchar(255),
-    DESCRIPTION_ varchar(4000),
-    TYPE_ varchar(255),
-    TASK_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    URL_ varchar(4000),
-    CONTENT_ID_ varchar(64),
-    TIME_ datetime(3),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_HI_IDENTITYLINK (
-    ID_ varchar(64),
-    GROUP_ID_ varchar(255),
-    TYPE_ varchar(255),
-    USER_ID_ varchar(255),
-    TASK_ID_ varchar(64),
-    PROC_INST_ID_ varchar(64),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-
-create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
-create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
-create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
-create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
-create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
-create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
-create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
-create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
-create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
-create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
-create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
-create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_);
-create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
-create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_);
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_);
-create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_);
-create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_);

+ 0 - 46
jeecg-boot-module-activiti/db/create/activiti.mysql.create.identity.sql

@@ -1,46 +0,0 @@
-create table ACT_ID_GROUP (
-    ID_ varchar(64),
-    REV_ integer,
-    NAME_ varchar(255),
-    TYPE_ varchar(255),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_MEMBERSHIP (
-    USER_ID_ varchar(64),
-    GROUP_ID_ varchar(64),
-    primary key (USER_ID_, GROUP_ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_USER (
-    ID_ varchar(64),
-    REV_ integer,
-    FIRST_ varchar(255),
-    LAST_ varchar(255),
-    EMAIL_ varchar(255),
-    PWD_ varchar(255),
-    PICTURE_ID_ varchar(64),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_INFO (
-    ID_ varchar(64),
-    REV_ integer,
-    USER_ID_ varchar(64),
-    TYPE_ varchar(64),
-    KEY_ varchar(255),
-    VALUE_ varchar(255),
-    PASSWORD_ LONGBLOB,
-    PARENT_ID_ varchar(255),
-    primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-alter table ACT_ID_MEMBERSHIP 
-    add constraint ACT_FK_MEMB_GROUP 
-    foreign key (GROUP_ID_) 
-    references ACT_ID_GROUP (ID_);
-
-alter table ACT_ID_MEMBERSHIP 
-    add constraint ACT_FK_MEMB_USER 
-    foreign key (USER_ID_) 
-    references ACT_ID_USER (ID_);

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

@@ -39,7 +39,7 @@ public class BytedanceMusicInfoController {
     private IFileInfoService fileInfoService;
 
     @PostMapping(value = "/netEaseDownLoad")
-    public void netEasedownLoad(JSONObject data, HttpServletResponse response) throws Exception {
+    public void netEasedownLoad(@RequestBody JSONObject data, HttpServletResponse response) throws Exception {
         String fileName = data.getString("musicName");
         String fileUrl = data.getString("musicUrl");
         String filePath = fileInfoService.downLoadByUrl(fileUrl);
@@ -60,7 +60,7 @@ public class BytedanceMusicInfoController {
         toClient.close();
     }
 
-    @GetMapping(value = "/downLoad")
+    @PostMapping(value = "/downLoad")
     public void downLoad(Long id, HttpServletResponse response) throws Exception {
         if (null == id || id == 0) {
             log.error("抖音音乐文件下载异常:参数异常");

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

@@ -99,6 +99,48 @@ public class TestController {
         }
     }
 
+    @GetMapping("getKuaishouPlanHourlyReport")
+    public Map<String,Object> getKuaishouPlanHourlyReport(String params){
+        Long start = System.currentTimeMillis();
+        Map<String,Object>result = new HashMap<>();
+        if(null == params||params.trim().equals("")){
+            ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
+            result.put("message","COMMON_PARAM_ERROR");
+            return result;
+        }
+        Long accountId = Long.parseLong(params);
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        if(null == token){
+            ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
+            result.put("message","TOKEN_IS_NULL");
+            return result;
+        }
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if ("00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        Date finalGetDate = getDate;
+        try {
+            kuaishouInterfaceService.getAdvertiserCampaignReportHourly(token, finalGetDate, finalGetDate);
+            ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+            result.put("message","SUCCESS");
+            long end = System.currentTimeMillis();
+            log.info("执行时长:{}毫秒",end-start);
+            return result;
+        }catch (Exception e){
+            e.printStackTrace();
+            ResultMapUtils.setResultMap(result,StatusCode.COMMON_SERVER_ERROR);
+            result.put("message","COMMON_SERVER_ERROR");
+            return result;
+        }
+    }
+
+
+
+
     @GetMapping(value = "/getMd5")
     public void getMd5() {
         kuaiShouHistoryReportTaskService.getMd5(null, null);

+ 27 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/YardController.java

@@ -1,9 +1,8 @@
 package org.jeecg.modules.ctop.controller;
 
-import cn.com.ctop.manage.modules.actor.entity.Yard;
-import cn.com.ctop.manage.modules.actor.entity.YardComment;
-import cn.com.ctop.manage.modules.actor.entity.YardPhoto;
-import cn.com.ctop.manage.modules.actor.entity.YardVideo;
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
+import cn.com.ctop.manage.modules.actor.entity.*;
 import cn.com.ctop.manage.modules.actor.service.IYardCommentService;
 import cn.com.ctop.manage.modules.actor.service.IYardPhotoService;
 import cn.com.ctop.manage.modules.actor.service.IYardService;
@@ -49,7 +48,31 @@ public class YardController {
     public Result<Yard> add(@RequestBody Yard yard) {
         Result<Yard> result = new Result<>();
         try {
+            String coverUrl = yard.getCoverUrl();
+            if (!Check.isNull(coverUrl) && !coverUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                yard.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
+            }
             yardService.save(yard);
+            if (null != yard.getImageUrl() && !yard.getImageUrl().isEmpty()) {
+                for (String url : yard.getImageUrl()) {
+                    YardPhoto photo = new YardPhoto();
+                    photo.setYardId(yard.getId());
+                    if (!Check.isNull(url) && !url.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                        photo.setPhotoUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + url);
+                    }
+                    yardPhotoService.save(photo);
+                }
+            }
+            if (yard.getVideoUrl() != null && !yard.getVideoUrl().isEmpty()) {
+                for (String url : yard.getVideoUrl()) {
+                    YardVideo video = new YardVideo();
+                    video.setYardId(yard.getId());
+                    if (!Check.isNull(url) && !url.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                        video.setVideoUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + url);
+                    }
+                    yardVideoService.save(video);
+                }
+            }
             result.success("添加成功!");
         } catch (Exception e) {
             log.error(e.getMessage(), e);

+ 2 - 3
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -57,7 +57,6 @@ spring:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
     url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#    url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
     username: hcst
     password: test@20190531
     driver-class-name: com.mysql.jdbc.Driver
@@ -70,7 +69,8 @@ spring:
         enabled: true
     #      remove-abandoned: false
     dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+      druid:
+        # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
         # 连接池的配置信息
         # 初始化大小,最小,最大
         connection-init-sql: set names utf8mb4
@@ -97,7 +97,6 @@ spring:
       datasource:
         master:
           url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
           username: hcst
           password: test@20190531
           driver-class-name: com.mysql.jdbc.Driver

文件差異過大導致無法顯示
+ 60 - 130
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java


+ 18 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/SysUser.java

@@ -2,6 +2,7 @@ package cn.com.ctop.common.module.entity;
 
 import cn.com.ctop.common.module.annotation.Dict;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -180,4 +181,21 @@ public class SysUser implements Serializable {
      * (github/github,wechat_enterprise/企业微信,dingtalk/钉钉)
      */
     private String thirdType;
+
+    /**
+     * 职务
+     */
+    @TableField(exist = false)
+    private String position;
+    /**
+     * 区域
+     */
+    @TableField(exist = false)
+    private String area;
+    /**
+     * 部门
+     */
+    @TableField(exist = false)
+    private String depart;
+
 }

+ 236 - 0
module-job-distribute/pom.xml

@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>jeecg-boot-parent</artifactId>
+        <groupId>org.jeecgframework.boot</groupId>
+        <version>2.0.2</version>
+    </parent>
+    <groupId>cn.com.ctop</groupId>
+    <artifactId>module-job-distribute</artifactId>
+    <version>2.0.2</version>
+    <name>module-job-distribute</name>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
+    </properties>
+
+    <repositories>
+        <repository>
+            <id>aliyun</id>
+            <name>aliyun Repository</name>
+            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>jeecg</id>
+            <name>jeecg Repository</name>
+            <url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>com.e-iceblue</id>
+            <name>e-iceblue</name>
+            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <!-- rabbitmq 依赖jar包-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+            <version>1.5.2.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-boot-base-common</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-media</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-common</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-kuaishou</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-toutiao</artifactId>
+            <version>2.0.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-oa</artifactId>
+            <version>2.0.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.5.0</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-csv</artifactId>
+            <version>1.5</version>
+        </dependency>
+        <!--签章-->
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.49</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcpkix-jdk15on</artifactId>
+            <version>1.49</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>module-ctop</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>3.17</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>3.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>3.17</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>1.1.2-beat1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-check</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.com.ctop</groupId>
+            <artifactId>module-oa</artifactId>
+            <version>2.0.2</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.mybatis.generator</groupId>
+                <artifactId>mybatis-generator-maven-plugin</artifactId>
+                <version>1.3.6</version>
+                <configuration>
+                    <!-- 是否覆盖,true表示会替换生成的JAVA文件,false则不覆盖 -->
+                    <overwrite>true</overwrite>
+                </configuration>
+                <dependencies>
+                    <!--mysql驱动包-->
+                    <dependency>
+                        <groupId>mysql</groupId>
+                        <artifactId>mysql-connector-java</artifactId>
+                        <version>5.1.45</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+        <resources>
+            <!-- 解决MyBatis配置文件引入问题 -->
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/*.xml</include>
+                </includes>
+                <!-- 是否替换资源中的属性-->
+                <filtering>true</filtering>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <properties>
+                <!-- 环境标识,需要与配置文件的名称相对应 -->
+                <activatedProperties>dev</activatedProperties>
+            </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <id>test</id>
+            <properties>
+                <activatedProperties>test</activatedProperties>
+            </properties>
+        </profile>
+        <profile>
+            <id>prod</id>
+            <properties>
+                <activatedProperties>prod</activatedProperties>
+            </properties>
+        </profile>
+    </profiles>
+</project>

+ 13 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/ModuleJobDistributeApplication.java

@@ -0,0 +1,13 @@
+package cn.com.ctop.module.job.distribute;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ModuleJobDistributeApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(ModuleJobDistributeApplication.class, args);
+    }
+
+}

+ 27 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/AutoPoiConfig.java

@@ -0,0 +1,27 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import org.jeecgframework.core.util.ApplicationContextUtil;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author: Scott
+ * @Date: 2018/2/7
+ * @description: autopoi 配置类
+ */
+@Configuration
+public class AutoPoiConfig {
+
+    /**
+	 * excel注解字典参数支持(导入导出字典值,自动翻译)
+	 * 举例: @Excel(name = "性别", width = 15, dicCode = "sex")
+	 * 1、导出的时候会根据字典配置,把值1,2翻译成:男、女;
+	 * 2、导入的时候,会把男、女翻译成1,2存进数据库;
+	 * @return
+	 */
+	@Bean
+	public ApplicationContextUtil applicationContextUtil() {
+		return new ApplicationContextUtil();
+	}
+
+}

+ 97 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/BrowseLogHandelInterceptor.java

@@ -0,0 +1,97 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.jeecg.common.system.util.JwtUtil;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Created by JQ.bi on 2020.5.8
+ */
+@Component
+@Slf4j
+public class BrowseLogHandelInterceptor extends HandlerInterceptorAdapter {
+
+    private static final String REQUEST_METHOD = "GET_POST_PUT_DELETE_OPTIONS";
+
+    private final static ExecutorService executorServicePool;
+
+    //加载一次
+    static {
+        int threadCount = Runtime.getRuntime().availableProcessors();
+        ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
+        builder.setNameFormat("BrowseLogHandlerFactory");
+        builder.setDaemon(true);
+        builder.setUncaughtExceptionHandler((t, e) -> {
+        });//忽略异常
+        builder.setPriority(Thread.MIN_PRIORITY);
+        executorServicePool = new ThreadPoolExecutor(threadCount, threadCount,
+                0L, TimeUnit.MILLISECONDS,
+                new LinkedBlockingQueue<Runnable>(100000), builder.build(), new ThreadPoolExecutor.DiscardPolicy());
+    }
+
+
+    @Override
+    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
+        if (REQUEST_METHOD.contains(request.getMethod())) {
+            if (request.getRequestURI().endsWith("/sys/permission/getUserPermissionByToken")||request.getRequestURI().endsWith("/getEncryptedString")||request.getRequestURI().endsWith("/login")||request.getRequestURI().endsWith("/sys/annountCement/listByUser")) {
+                return;
+            }
+            boolean isSuccess = true;
+            if (response.getStatus() != 200) {
+                isSuccess = false;
+            }
+            String userName = JwtUtil.getUserNameByToken(request);
+            if (StringUtils.isEmpty(userName)) {
+                log.warn("登陆账号用户名为空");
+            }
+            String token = request.getHeader("X-Access-Token");
+            String uri = request.getRequestURI();
+            String currentDate = DateUtils.now();
+            BrowseLogRunnable runnable = new BrowseLogRunnable(userName, isSuccess,token, uri, currentDate);
+            executorServicePool.submit(runnable);
+        }
+    }
+
+
+    private static class BrowseLogRunnable implements Runnable {
+        String userName;
+        Boolean isSuccess;
+        String token;
+        String uri;
+        String currentDate;
+        BrowseLogRunnable(String userName, boolean isSuccess, String token, String uri, String currentDate) {
+            this.userName = userName;
+            this.isSuccess = isSuccess;
+            this.token = token;
+            this.uri = uri;
+            this.currentDate = currentDate;
+        }
+
+        @Override
+        public void run() {
+            try {
+                if (!StringUtils.isEmpty(token)) {
+                    if(isSuccess){
+                        log.info("-SUCCESS " + currentDate + " 用户:" + userName + " 访问了[" + uri + "]?token=\"" + token + "\"");
+                    }else {
+                        log.info("-FALSE " + currentDate + " 用户:" + userName + "” 访问了[" + uri + "]?token=\"" + token + "\"");
+                    }
+                }
+            } catch (Exception e) {
+                log.error(e.toString());
+            }
+        }
+    }
+}
+

+ 158 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/MybatisInterceptor.java

@@ -0,0 +1,158 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.binding.MapperMethod.ParamMap;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.SqlCommandType;
+import org.apache.ibatis.plugin.*;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Field;
+import java.util.Date;
+import java.util.Properties;
+
+/**
+ * mybatis拦截器,自动注入创建人、创建时间、修改人、修改时间
+ * @Author scott
+ * @Date  2019-01-19
+ *
+ */
+@Slf4j
+@Component
+@Intercepts({ @Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
+public class MybatisInterceptor implements Interceptor {
+
+	@Override
+	public Object intercept(Invocation invocation) throws Throwable {
+		MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0];
+		String sqlId = mappedStatement.getId();
+		log.debug("------sqlId------" + sqlId);
+		SqlCommandType sqlCommandType = mappedStatement.getSqlCommandType();
+		Object parameter = invocation.getArgs()[1];
+		log.debug("------sqlCommandType------" + sqlCommandType);
+
+		if (parameter == null) {
+			return invocation.proceed();
+		}
+		if (SqlCommandType.INSERT == sqlCommandType) {
+			Field[] fields = oConvertUtils.getAllFields(parameter);
+			for (Field field : fields) {
+				log.debug("------field.name------" + field.getName());
+				try {
+					// 获取登录用户信息
+					LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+					if ("createBy".equals(field.getName())) {
+						field.setAccessible(true);
+                        Object localCreateBy = field.get(parameter);
+						field.setAccessible(false);
+                        if (localCreateBy == null || "".equals(localCreateBy)) {
+							String createBy = "jeecg";
+							if (sysUser != null) {
+								// 登录账号
+								createBy = sysUser.getUsername();
+							}
+							if (oConvertUtils.isNotEmpty(createBy)) {
+								field.setAccessible(true);
+								field.set(parameter, createBy);
+								field.setAccessible(false);
+							}
+						}
+					}
+					// 注入创建时间
+					if ("createTime".equals(field.getName())) {
+						field.setAccessible(true);
+                        Object localCreateDate = field.get(parameter);
+						field.setAccessible(false);
+                        if (localCreateDate == null || "".equals(localCreateDate)) {
+							field.setAccessible(true);
+							field.set(parameter, new Date());
+							field.setAccessible(false);
+						}
+					}
+					//注入部门编码
+					if ("sysOrgCode".equals(field.getName())) {
+						field.setAccessible(true);
+                        Object localSysOrgCode = field.get(parameter);
+						field.setAccessible(false);
+                        if (localSysOrgCode == null || "".equals(localSysOrgCode)) {
+							String sysOrgCode = "";
+							// 获取登录用户信息
+							if (sysUser != null) {
+								// 登录账号
+								sysOrgCode = sysUser.getOrgCode();
+							}
+							if (oConvertUtils.isNotEmpty(sysOrgCode)) {
+								field.setAccessible(true);
+								field.set(parameter, sysOrgCode);
+								field.setAccessible(false);
+							}
+						}
+					}
+				} catch (Exception e) {
+				}
+			}
+		}
+		if (SqlCommandType.UPDATE == sqlCommandType) {
+			Field[] fields = null;
+			if (parameter instanceof ParamMap) {
+				ParamMap<?> p = (ParamMap<?>) parameter;
+				parameter = p.get("param1");
+				fields = oConvertUtils.getAllFields(parameter);
+			} else {
+				fields = oConvertUtils.getAllFields(parameter);
+			}
+
+			for (Field field : fields) {
+				log.debug("------field.name------" + field.getName());
+				try {
+					if ("updateBy".equals(field.getName())) {
+						field.setAccessible(true);
+                        Object localUpdateBy = field.get(parameter);
+						field.setAccessible(false);
+                        if (localUpdateBy == null || "".equals(localUpdateBy)) {
+							String updateBy = "jeecg";
+							// 获取登录用户信息
+							LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+							if (sysUser != null) {
+								// 登录账号
+								updateBy = sysUser.getUsername();
+							}
+							if (oConvertUtils.isNotEmpty(updateBy)) {
+								field.setAccessible(true);
+								field.set(parameter, updateBy);
+								field.setAccessible(false);
+							}
+						}
+					}
+					if ("updateTime".equals(field.getName())) {
+						field.setAccessible(true);
+                        Object localUpdateDate = field.get(parameter);
+						field.setAccessible(false);
+                        if (localUpdateDate == null || "".equals(localUpdateDate)) {
+							field.setAccessible(true);
+							field.set(parameter, new Date());
+							field.setAccessible(false);
+						}
+					}
+				} catch (Exception e) {
+				}
+			}
+		}
+		return invocation.proceed();
+	}
+
+	@Override
+	public Object plugin(Object target) {
+		return Plugin.wrap(target, this);
+	}
+
+	@Override
+	public void setProperties(Properties properties) {
+		// TODO Auto-generated method stub
+	}
+
+}

+ 34 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/MybatisPlusConfig.java

@@ -0,0 +1,34 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 单数据源配置(jeecg.datasource.open = false时生效)
+ * @Author zhoujf
+ *
+ */
+@Configuration
+@MapperScan(value = {"org.jeecg.modules.**.mapper*", "cn.com.ctop.**.mapper*"})
+public class MybatisPlusConfig {
+
+    /**
+         *  分页插件
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+
+//    /**
+//     * mybatis-plus SQL执行效率插件【生产环境可以关闭】
+//     */
+//    @Bean
+//    public PerformanceInterceptor performanceInterceptor() {
+//        return new PerformanceInterceptor();
+//    }
+
+
+}

+ 97 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/RedisConfig.java

@@ -0,0 +1,97 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+import java.time.Duration;
+import java.util.Arrays;
+
+@Configuration
+@EnableCaching
+public class RedisConfig extends CachingConfigurerSupport {
+
+	@Resource
+	private LettuceConnectionFactory lettuceConnectionFactory;
+
+	/**
+	 * @description 自定义的缓存key的生成策略 若想使用这个key
+	 *              只需要讲注解上keyGenerator的值设置为keyGenerator即可</br>
+	 * @return 自定义策略生成的key
+	 */
+	@Override
+	@Bean
+	public KeyGenerator keyGenerator() {
+		return new KeyGenerator() {
+			@Override
+			public Object generate(Object target, Method method, Object... params) {
+
+				StringBuilder sb = new StringBuilder();
+				sb.append(target.getClass().getName());
+				sb.append(method.getDeclaringClass().getName());
+				Arrays.stream(params).map(Object::toString).forEach(sb::append);
+				return sb.toString();
+			}
+		};
+	}
+
+	/**
+	 * RedisTemplate配置
+	 */
+	@Bean
+	public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) {
+		// 设置序列化
+		Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
+		ObjectMapper om = new ObjectMapper();
+		om.setVisibility(PropertyAccessor.ALL, Visibility.ANY);
+		om.enableDefaultTyping(DefaultTyping.NON_FINAL);
+		jackson2JsonRedisSerializer.setObjectMapper(om);
+		// 配置redisTemplate
+		RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>();
+		redisTemplate.setConnectionFactory(lettuceConnectionFactory);
+		RedisSerializer<?> stringSerializer = new StringRedisSerializer();
+        // key序列化
+        redisTemplate.setKeySerializer(stringSerializer);
+        // value序列化
+        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
+        // Hash key序列化
+        redisTemplate.setHashKeySerializer(stringSerializer);
+        // Hash value序列化
+        redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
+		redisTemplate.afterPropertiesSet();
+		return redisTemplate;
+	}
+
+	/**
+	 * 缓存配置管理器
+	 */
+	@Bean
+	public CacheManager cacheManager(LettuceConnectionFactory factory) {
+		// 以锁写入的方式创建RedisCacheWriter对象
+		RedisCacheWriter writer = RedisCacheWriter.lockingRedisCacheWriter(factory);
+		// 创建默认缓存配置对象
+        //设置缓存默认有效期3小时;
+        RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofHours(3));
+
+		RedisCacheManager cacheManager = new RedisCacheManager(writer, config);
+		return cacheManager;
+	}
+
+}

+ 33 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/WebMvcConfiguration.java

@@ -0,0 +1,33 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * Spring Boot 2.0 解决跨域问题
+ *
+ * @Author qinfeng
+ *
+ */
+@Configuration
+public class WebMvcConfiguration implements WebMvcConfigurer {
+	@Bean
+	public CorsFilter corsFilter() {
+		final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
+		final CorsConfiguration corsConfiguration = new CorsConfiguration();
+		/* 是否允许请求带有验证信息 */
+		corsConfiguration.setAllowCredentials(true);
+		/* 允许访问的客户端域名 */
+		corsConfiguration.addAllowedOrigin("*");
+		/* 允许服务端访问的客户端请求头 */
+		corsConfiguration.addAllowedHeader("*");
+		/* 允许访问的方法名,GET POST等 */
+		corsConfiguration.addAllowedMethod("*");
+		urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
+		return new CorsFilter(urlBasedCorsConfigurationSource);
+	}
+}

+ 71 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/config/XxlJobConfig.java

@@ -0,0 +1,71 @@
+package cn.com.ctop.module.job.distribute.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+public class XxlJobConfig {
+    @Value("${xxl.job.admin.addresses}")
+    private String adminAddresses;
+
+    @Value("${xxl.job.executor.appname}")
+    private String appName;
+
+    @Value("${xxl.job.executor.ip}")
+    private String ip;
+
+    @Value("${xxl.job.executor.port}")
+    private int port;
+
+    @Value("${xxl.job.accessToken}")
+    private String accessToken;
+
+    @Value("${xxl.job.executor.logpath}")
+    private String logPath;
+
+    @Value("${xxl.job.executor.logretentiondays}")
+    private int logRetentionDays;
+
+
+    @Bean
+    public XxlJobSpringExecutor xxlJobExecutor() {
+        XxlJobLogger.log(">>>>>>>>>>> xxl-job config init.");
+        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+        xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+        xxlJobSpringExecutor.setAppName(appName);
+        xxlJobSpringExecutor.setIp(ip);
+        xxlJobSpringExecutor.setPort(port);
+        xxlJobSpringExecutor.setAccessToken(accessToken);
+        xxlJobSpringExecutor.setLogPath(logPath);
+        xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+        return xxlJobSpringExecutor;
+    }
+
+    /**
+     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+     *
+     *      1、引入依赖:
+     *          <dependency>
+     *             <groupId>org.springframework.cloud</groupId>
+     *             <artifactId>spring-cloud-commons</artifactId>
+     *             <version>${version}</version>
+     *         </dependency>
+     *
+     *      2、配置文件,或者容器启动变量
+     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+     *
+     *      3、获取IP
+     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+     */
+
+
+}

+ 5 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/handler/BytedanceHourlyJob.java

@@ -0,0 +1,5 @@
+package cn.com.ctop.module.job.distribute.handler;
+
+
+public class BytedanceHourlyJob {
+}

+ 154 - 0
module-job-distribute/src/main/java/cn/com/ctop/module/job/distribute/handler/KuaishouHourlyJob.java

@@ -0,0 +1,154 @@
+package cn.com.ctop.module.job.distribute.handler;
+
+import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Component
+public class KuaishouHourlyJob {
+
+    @Autowired
+    private ICtopOauthTokenService tokenService;
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+    /**
+     * 快手账户时报
+     */
+    @XxlJob("kuaishouAccountHourlyJob")
+    public ReturnT<String> kuaishouAccountHourlyJob(String params) throws Exception {
+        if(null == params||params.trim().equals("")){
+            XxlJobLogger.log("获取快手账户时报数据异常:参数不存在");
+            return ReturnT.SUCCESS;
+        }
+        Long accountId = Long.parseLong(params);
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        if(null == token){
+            XxlJobLogger.log("获取快手账户时报数据异常:token数据不存在");
+            return ReturnT.SUCCESS;
+        }
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if ("00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        Date finalGetDate = getDate;
+        try {
+            kuaishouInterfaceService.getAdvertiserReportHourly(token, finalGetDate, finalGetDate);
+            XxlJobLogger.log("获取快手账户时报数据成功");
+            return ReturnT.SUCCESS;
+        }catch (Exception e){
+            XxlJobLogger.log("获取快手账户时报数据失败:服务器内部错误");
+            return ReturnT.FAIL;
+        }
+    }
+
+    /**
+     * 快手计划时报
+     */
+    @XxlJob("kuaishouPlanHourlyJob")
+    public ReturnT<String> kuaishouPlanHourlyJob(String params) throws Exception {
+        if(null == params||params.trim().equals("")){
+            XxlJobLogger.log("获取快手计划时报数据异常:参数不存在");
+            return ReturnT.SUCCESS;
+        }
+        Long accountId = Long.parseLong(params);
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        if(null == token){
+            XxlJobLogger.log("获取快手计划时报数据异常:token数据不存在");
+            return ReturnT.SUCCESS;
+        }
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if ("00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        Date finalGetDate = getDate;
+        try {
+            kuaishouInterfaceService.getAdvertiserCampaignReportHourly(token, finalGetDate, finalGetDate);
+            XxlJobLogger.log("获取快手计划时报数据成功");
+            return ReturnT.SUCCESS;
+        }catch (Exception e){
+            XxlJobLogger.log("获取快手计划时报数据失败:服务器内部错误");
+            return ReturnT.FAIL;
+        }
+    }
+
+    /**
+     * 快手组时报
+     */
+    @XxlJob("kuaishouGroupHourlyJob")
+    public ReturnT<String> kuaishouGroupHourlyJob(String params) throws Exception {
+        if(null == params||params.trim().equals("")){
+            XxlJobLogger.log("获取快手组时报数据异常:参数不存在");
+            return ReturnT.SUCCESS;
+        }
+        Long accountId = Long.parseLong(params);
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        if(null == token){
+            XxlJobLogger.log("获取快手组时报数据异常:token数据不存在");
+            return ReturnT.SUCCESS;
+        }
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if ("00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        Date finalGetDate = getDate;
+        try {
+            kuaishouInterfaceService.getAdvertiserGroupReportHourly(token, finalGetDate, finalGetDate);
+            XxlJobLogger.log("获取快手组时报数据成功");
+            return ReturnT.SUCCESS;
+        }catch (Exception e){
+            XxlJobLogger.log("获取快手组时报数据失败:服务器内部错误");
+            return ReturnT.FAIL;
+        }
+    }
+
+    /**
+     * 快手组时报
+     */
+    @XxlJob("kuaishouCreativeHourlyJob")
+    public ReturnT<String> kuaishouCreativeHourlyJob(String params) throws Exception {
+        if(null == params||params.trim().equals("")){
+            XxlJobLogger.log("获取快手创意时报数据异常:参数不存在");
+            return ReturnT.SUCCESS;
+        }
+        Long accountId = Long.parseLong(params);
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        if(null == token){
+            XxlJobLogger.log("获取快手创意时报数据异常:token数据不存在");
+            return ReturnT.SUCCESS;
+        }
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if ("00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        Date finalGetDate = getDate;
+        try {
+            kuaishouInterfaceService.getAdvertiserCreativeReportHourly(token, finalGetDate, finalGetDate);
+            XxlJobLogger.log("获取快手创意时报数据成功");
+            return ReturnT.SUCCESS;
+        }catch (Exception e){
+            XxlJobLogger.log("获取快手创意时报数据失败:服务器内部错误");
+            return ReturnT.FAIL;
+        }
+    }
+}

+ 155 - 0
module-job-distribute/src/main/resources/application-dev.yml

@@ -0,0 +1,155 @@
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+
+spring:
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  aop:
+    proxy-target-class: true
+  # 设置静态文件路径,js,css等
+  mvc:
+    static-path-pattern: /**
+  resource:
+    static-locations: classpath:/static/,classpath:/public/
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    druid:
+      removeAbandoned: true
+      removeAbandonedTimeout: 300
+      stat-view-servlet:
+        enabled: true
+        loginUsername: admin
+        loginPassword: 123456
+      web-stat-filter:
+        enabled: true
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        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,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: hcst
+          password: test@20190531
+          driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/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: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+    configuration:
+      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#jeecg专用配置
+jeecg:
+  elasticsearch:
+    cluster-nodes:
+    check-enabled: false
+  uploadType:
+  oss:
+    endpoint:
+    accessKey:
+    secretKey:
+    bucketName:
+    staticDomain:
+  sms:
+    accessKeyId:
+    accessKeySecret:
+  minio:
+    minio_url:
+    minio_name:
+    minio_pass:
+    bucketName:
+  ffmpeg:
+    bin: D:\java\ffmpeg\bin\ffmpeg.exe
+  path:
+    #文件上传根目录 设置
+    upload: D://upFiles
+    #webapp文件路径
+    webapp: D://webapp
+    video-upload: D://upFiles//video//
+    image-upload: D://upFiles//image//
+    chrome-driver: D://chromedriver.exe
+    csv-upload: D://upFiles//csv//
+    report-history: D://report//history//
+    report-daily: D://report//daily//
+kuaishou:
+  group-control:
+    path: http://39.106.184.70
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-dev.xml
+chrome:
+  script:
+    clean: sh /mnt/webapp/cleanProcess.sh
+
+oss:
+  replace:
+    replace-value: oss-cn-beijing
+    replace-old-value: oss-cn-beijing
+    download: D:\mnt\file\video
+

+ 169 - 0
module-job-distribute/src/main/resources/application-prod.yml

@@ -0,0 +1,169 @@
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+spring:
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  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:
+    url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+    username: hcst
+    password: test@20190531
+    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      stat-view-servlet:
+        loginUsername: admin
+        loginPassword: hcst2016
+        enabled: true
+      web-stat-filter:
+        enabled: true
+    #      remove-abandoned: false
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        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,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: hcst
+          password: test@20190531
+          driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/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: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+#jeecg专用配置
+jeecg:
+  elasticsearch:
+    cluster-nodes:
+    check-enabled: false
+  uploadType:
+  oss:
+    endpoint:
+    accessKey:
+    secretKey:
+    bucketName:
+    staticDomain:
+  sms:
+    accessKeyId:
+    accessKeySecret:
+  minio:
+    minio_url:
+    minio_name:
+    minio_pass:
+    bucketName:
+  ffmpeg:
+    bin: ffmpeg
+  path:
+    #文件上传根目录 设置
+    upload: /data/upload
+    #webapp文件路径
+    webapp: /data/webapp
+    video-upload: /data/upload/video/
+    image-upload: /data/upload/image/
+    chrome-driver: /usr/bin/chromedriver
+    csv-upload: /data/upload/csv/
+    bak-database-file: /data/data/bak/
+    report-history: /data/upload/report/history/
+    report-daily: /data/upload/report/daily/
+    kuaishou-agent-image: /data/upload/image/temp.png
+    kuaishou-account-captcha-image: /data/upload/image/captcha.png
+kuaishou:
+  group-control:
+    path: http://39.106.184.70
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-prod.xml
+chrome:
+  script:
+    clean: sh /data/webapp/cleanProcess.sh
+
+oss:
+  replace:
+    replace-value: oss-cn-beijing-internal
+    replace-old-value: oss-cn-beijing
+    download: /data/file/video/

+ 179 - 0
module-job-distribute/src/main/resources/application-test.yml

@@ -0,0 +1,179 @@
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+
+spring:
+  rabbitmq:
+    host: 39.106.184.70
+    port: 5672
+    username: guest
+    password: guest
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  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
+      web-stat-filter:
+        enabled: true
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        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,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: hcst
+          password: test@20190531
+          driver-class-name: com.mysql.jdbc.Driver
+          # 多数据源配置
+          #multi-datasource1:
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
+          #username: root
+          #password: root
+          #driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/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: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+    configuration:
+      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#jeecg专用配置
+jeecg:
+  elasticsearch:
+    cluster-nodes:
+    check-enabled: false
+  uploadType:
+  oss:
+    endpoint:
+    accessKey:
+    secretKey:
+    bucketName:
+    staticDomain:
+  sms:
+    accessKeyId:
+    accessKeySecret:
+  minio:
+    minio_url:
+    minio_name:
+    minio_pass:
+    bucketName:
+  ffmpeg:
+    bin: D:\java\ffmpeg\bin\ffmpeg.exe
+  path:
+    #文件上传根目录 设置
+    #文件上传根目录 设置
+    upload: /data/upload
+    #webapp文件路径
+    webapp: /data/webapp
+    video-upload: /data/upload/video/
+    image-upload: /data/upload/image/
+    chrome-driver: /usr/bin/chromedriver
+    csv-upload: /data/upload/csv/
+    report-history: /data/report/history/
+    report-daily: /data/report/daily/
+kuaishou:
+  group-control:
+    path: http://127.0.0.1
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-test.xml
+chrome:
+  script:
+    clean: sh /mnt/webapp/cleanProcess.sh
+
+
+oss:
+  replace:
+    replace-value: oss-cn-beijing-internal
+    replace-old-value: oss-cn-beijing
+    download: /mnt/file/video/

+ 24 - 0
module-job-distribute/src/main/resources/application.yml

@@ -0,0 +1,24 @@
+server:
+  port: 8091
+spring:
+  profiles:
+    active: @activatedProperties@
+  application:
+    name: system-web
+swagger:
+  production: false
+  basic:
+    enable: true
+    username: jeecg
+    password: jeecg1314
+xxl:
+  job:
+    accessToken:
+    executor:
+      appname: module-job-distribute
+      port: 9998
+      ip:
+      logpath: /data/applogs/xxl-job/jobhandler
+      logretentiondays: 30
+    admin:
+      addresses: http://139.186.29.76:8090

+ 14 - 0
module-job-distribute/src/main/resources/banner.txt

@@ -0,0 +1,14 @@
+
+${AnsiColor.BRIGHT_BLUE}
+   (_)                          | |               | |
+    _  ___  ___  ___ __ _ ______| |__   ___   ___ | |_ 
+   | |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
+   | |  __/  __/ (_| (_| |      | |_) | (_) | (_) | |_ 
+   | |\___|\___|\___\__, |      |_.__/ \___/ \___/ \__|
+  _/ |               __/ |                             
+ |__/               |___/
+
+${AnsiColor.BRIGHT_GREEN}
+Jeecg  Boot Version: 2.0.2
+Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
+${AnsiColor.BLACK}

+ 49 - 0
module-job-distribute/src/main/resources/generatorConfig.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE generatorConfiguration
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<generatorConfiguration>
+    <!-- 导入配置文件 -->
+    <properties resource="application.properties"/>
+
+    <!-- defaultModelType="flat" 设置复合主键时不单独为主键创建实体 -->
+    <context id="MySql" defaultModelType="flat">
+
+        <!-- 生成的POJO实现java.io.Serializable接口 -->
+        <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
+
+        <!--注释-->
+        <commentGenerator>
+            <!-- 将数据库中表的字段描述信息添加到注释 -->
+            <property name="addRemarkComments" value="true"/>
+            <!-- 注释里不添加日期 -->
+            <property name="suppressDate" value="true"/>
+        </commentGenerator>
+        <!-- 数据库连接,直接通过${}读取application.properties里的配置 -->
+        <jdbcConnection
+                driverClass="${spring.datasource.driver-class-name}"
+                connectionURL="${spring.datasource.url}"
+                userId="${spring.datasource.username}"
+                password="${spring.datasource.password}"/>
+
+        <!-- 生成POJO对象,并将类放到com.songguoliang.springboot.entity包下 -->
+        <javaModelGenerator targetPackage="com.songguoliang.springboot.entity"
+                            targetProject="src/main/java"></javaModelGenerator>
+        <!-- 生成mapper xml文件,并放到resources下的mapper文件夹下 -->
+        <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"></sqlMapGenerator>
+
+
+        <!-- 生成mapper xml对应dao接口,放到com.songguoliang.springboot.mapper包下-->
+        <javaClientGenerator targetPackage="com.songguoliang.springboot.mapper" targetProject="src/main/java"
+                             type="XMLMAPPER"></javaClientGenerator>
+
+        <!-- table标签可以有多个,至少一个,tableName指定表名,可以使用_和%通配符 -->
+        <table tableName="tbl_user">
+            <!-- 是否只生成POJO对象 -->
+            <property name="modelOnly" value="false"/>
+            <!-- 数据库中表名有时我们都会带个前缀,而实体又不想带前缀,这个配置可以把实体的前缀去掉 -->
+            <domainObjectRenamingRule searchString="^Tbl" replaceString=""/>
+
+        </table>
+    </context>
+</generatorConfiguration>

+ 4 - 0
module-job-distribute/src/main/resources/log4j.properties

@@ -0,0 +1,4 @@
+log4j.rootLogger=INFO,stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS}-[%p] [%t] %-5l - %m%n

+ 57 - 0
module-job-distribute/src/main/resources/logback-dev.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="D:/Desktop/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 57 - 0
module-job-distribute/src/main/resources/logback-prod.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="/mnt/webapps/logs/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 57 - 0
module-job-distribute/src/main/resources/logback-test.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="/data/webapp/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 13 - 0
module-job-distribute/src/test/java/cn/com/ctop/module/job/distribute/ModuleJobDistributeApplicationTests.java

@@ -0,0 +1,13 @@
+package cn.com.ctop.module.job.distribute;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class ModuleJobDistributeApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}

+ 3 - 2
module-job-kuaishou/src/main/resources/application-prod.yml

@@ -98,7 +98,8 @@ spring:
   #redis 配置
   redis:
     database: 0
-    host: 172.30.0.17
+#    host: 172.30.0.17
+    host: 127.0.0.1
     lettuce:
       pool:
         max-active: 8   #最大连接数据库连接数,设 0 为没有限制
@@ -107,7 +108,7 @@ spring:
         min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
       shutdown-timeout: 100ms
     password: foobared
-    port: 6379
+#    port: 6379
 #mybatis plus 设置
 mybatis-plus:
   mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml

+ 2 - 0
module-job-kuaishou/src/main/resources/application.yml

@@ -22,4 +22,6 @@ xxl:
       logpath: /data/applogs/xxl-job/jobhandler
       logretentiondays: 30
     admin:
+#      addresses: http://127.0.0.1:8090
       addresses: http://139.186.29.76:8090
+

+ 67 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupServiceImpl.java

@@ -12,6 +12,7 @@ import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouScheduleMapper;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCampaignService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCreativeService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupService;
+import cn.com.ctop.kuaishou.modules.batch.service.IWarningOperationService;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -260,8 +261,19 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
 
     }
 
+    static ExecutorService executorBidTypeService = Executors.newFixedThreadPool(20);
+    static ExecutorService executorMaxBidService = Executors.newFixedThreadPool(5);
+    @Autowired
+    private IWarningOperationService warningOperationService;
 
     private void addGroupV2(Long advertiserId, JSONArray details) {
+
+        JSONObject json = warningOperationService.getBidTypeAndMaxBid(advertiserId);
+        Long maxBid = json.getLong("maxBid");// 最高出价
+        String bidTypeStr = json.getString("bidType"); // 出价方式
+        JSONArray bidTypeArr = JSONArray.parseArray(bidTypeStr);
+        String ocpxActionTypeStr = json.getString("ocpxActionType"); // 优化目标
+        JSONArray bidArr = JSONArray.parseArray(ocpxActionTypeStr);
         if (!Check.isNull(details)) {
             List<KuaiShouGroup> groups = new ArrayList<>();
             List<KuaiShouAppInfo> appInfos = new ArrayList<>();
@@ -270,21 +282,69 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
             for (int i = 0; i < details.size(); i++) {
                 JSONObject detail = JSONObject.parseObject(details.get(i).toString());
                 if (!Check.isNull(detail)) {
-                    KuaiShouGroup group = new KuaiShouGroup();
+                    Integer bid_type = detail.getInteger("bid_type");
+                    Long bid = detail.getLong("bid");
+                    Long cpa_bid = detail.getLong("cpa_bid");
+                    Long day_budget = detail.getLong("day_budget");
+                    Integer ocpx_action_type = detail.getInteger("ocpx_action_type");
                     Long unitId = detail.getLong("unit_id");
+                    String unit_name = detail.getString("unit_name");
+                    Integer status = detail.getInteger("status");
+                    Integer put_status = detail.getInteger("put_status");
+                    if (put_status == 1) { // 组状态为 投放中的
+                        if (status != 15) { // 广告组状态为非暂停
+                            Boolean ocpxTrueOrFalse = false;
+                            for (int j = 0; j < bidArr.size(); j++) {
+                                Integer ocpxActionType = (Integer) bidArr.get(j);
+                                if (ocpxActionType.equals(ocpx_action_type)) {
+                                    ocpxTrueOrFalse = true;
+                                    break;
+                                }
+                            }
+                            Boolean bidTypeTrueOrFalse = false;
+                            for (int j = 0; j < bidTypeArr.size(); j++) {
+                                Integer bidType = (Integer) bidTypeArr.get(j);
+                                if (bidType.equals(bid_type)) {
+                                    bidTypeTrueOrFalse = true;
+                                    break;
+                                }
+                            }
+                            if (!bidTypeTrueOrFalse || !ocpxTrueOrFalse) { // 出价方式设置非法
+                                if (day_budget > 500 * 1000 || day_budget == 0) { // 预算大于500 或者不限制预算 需要发送通知 并且进行暂停操作
+                                    executorBidTypeService.submit(new Runnable() {
+                                        @Override
+                                        public void run() {
+                                            warningOperationService.kuaiShouWarningOperation(json.getLong("projectId"), json.getString("projectName"), advertiserId, unitId, unit_name);
+                                        }
+                                    });
+                                }
+                            }
+                            if (bid > maxBid || cpa_bid > maxBid) {
+                                executorMaxBidService.submit(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        warningOperationService.kuaiShouBidWarningOperation(json.getLong("projectId"), json.getString("projectName"), advertiserId, unitId, unit_name);
+                                    }
+                                });
+                            }
+                        }
+                    }
+
+
+                    KuaiShouGroup group = new KuaiShouGroup();
                     group.setId("" + advertiserId + unitId);
                     group.setAccountId(advertiserId);
                     group.setCampaignId(detail.getLong("campaign_id"));
                     group.setUnitId(unitId);
-                    group.setUnitName(detail.getString("unit_name"));
-                    group.setStatus(detail.getInteger("status"));
-                    group.setPutStatus(detail.getInteger("put_status"));
+                    group.setUnitName(unit_name);
+                    group.setStatus(status);
+                    group.setPutStatus(put_status);
                     group.setCreateChannel(detail.getInteger("create_channel"));
                     group.setReviewDetail(detail.getString("review_detail"));
-                    group.setBidType(detail.getInteger("bid_type"));
-                    group.setBid(detail.getLong("bid"));
+                    group.setBidType(bid_type);
+                    group.setBid(bid);
                     group.setCpaBid(detail.getLong("cpa_bid"));
-                    group.setOcpxActionType(detail.getInteger("ocpx_action_type"));
+                    group.setOcpxActionType(ocpx_action_type);
                     group.setDeepConversionType(detail.getInteger("deep_conversion_type"));
                     group.setDeepConversionBid(detail.getLong("deep_conversion_bid"));
                     group.setDayBudget(detail.getLong("day_budget"));

+ 1 - 0
pom.xml

@@ -31,6 +31,7 @@
         <module>module-job-bytedance</module>
         <module>module-job-kuaishou</module>
         <module>module-callback</module>
+        <module>module-job-distribute</module>
 
     </modules>