소스 검색

合并system分支代码

songyh 3 년 전
부모
커밋
c8759707ed
100개의 변경된 파일634개의 추가작업 그리고 5251개의 파일을 삭제
  1. 0 427
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
  2. 0 17
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/factory/SysBaseAPIFallbackFactory.java
  3. 0 272
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java
  4. 186 13
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
  5. 0 37
      jeecg-boot-base/jeecg-boot-base-core/pom.xml
  6. 0 1
      jeecg-boot-base/jeecg-boot-base-tools/pom.xml
  7. 28 0
      jeecg-boot-module-system/pom.xml
  8. 0 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/check/controller/CtopCheckTaskExecutorCtrl.java
  9. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/db/DataSourceCachePool.java
  10. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/db/dynamic/DataSourceCachePool.java
  11. 0 82
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysDict.java
  12. 0 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysDictItem.java
  13. 0 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysLog.java
  14. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysDictItemMapper.java
  15. 51 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysDictMapper.java
  16. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysRoleMapper.java
  17. 0 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysAnnouncementMapper.xml
  18. 0 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysAnnouncementSendMapper.xml
  19. 16 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysDictMapper.xml
  20. 0 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysLogMapper.xml
  21. 2 6
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/job/SendMsgJob.java
  22. 2 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/service/ISysMessageService.java
  23. 5 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/util/PushMsgUtil.java
  24. 0 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/websocket/TestSocketController.java
  25. 0 382
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysBaseApi.java
  26. 1 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysDataSourceService.java
  27. 52 5
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysDictService.java
  28. 12 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysBaseApiImpl.java
  29. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDepartServiceImpl.java
  30. 1 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDictItemServiceImpl.java
  31. 178 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDictServiceImpl.java
  32. 4 5
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysUserServiceImpl.java
  33. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/QueryGenerator.java
  34. 5 5
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/TokenUtils.java
  35. 0 16
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinApp.java
  36. 0 17
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinChannel.java
  37. 0 18
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportAccountDaily.java
  38. 0 36
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportAppHour.java
  39. 0 49
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportBillMonth.java
  40. 0 44
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportChannelDaily.java
  41. 0 13
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinAppMapper.java
  42. 0 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinChannelMapper.java
  43. 0 7
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportAccountDailyMapper.java
  44. 0 22
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportAppHourMapper.java
  45. 0 18
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportBillMonthMapper.java
  46. 0 25
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportChannelDailyMapper.java
  47. 0 30
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinAppMapper.xml
  48. 0 13
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinChannelMapper.xml
  49. 0 169
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportAppHourMapper.xml
  50. 0 55
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportBillMonthMapper.xml
  51. 0 98
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportChannelDailyMapper.xml
  52. 0 15
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinAppService.java
  53. 0 10
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinChannelService.java
  54. 0 15
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinCrawlerService.java
  55. 0 5
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinLoginService.java
  56. 0 7
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportAccountDailyService.java
  57. 0 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportAppHourService.java
  58. 0 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportBillMonthService.java
  59. 0 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportChannelDailyService.java
  60. 0 78
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinAppServiceImpl.java
  61. 0 28
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinChannelServiceImpl.java
  62. 0 368
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinCrawlerServiceImpl.java
  63. 0 112
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinLoginServiceImpl.java
  64. 0 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportAccountDailyServiceImpl.java
  65. 0 81
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportAppHourServiceImpl.java
  66. 0 64
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportBillMonthServiceImpl.java
  67. 0 86
      jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportChannelDailyServiceImpl.java
  68. 0 19
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/job/KuaishouAgentAccountJob.java
  69. 0 21
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/job/KuaishouReportAgentJob.java
  70. 0 20
      jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/edu/job/BytedanceEduJob.java
  71. 0 21
      jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/edu/job/KuaishouEduJob.java
  72. 8 6
      jeecg-boot-module-system/src/main/java/org/jeecg/config/jimureport/JimuReportTokenService.java
  73. 0 375
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/CommonController.java
  74. 0 535
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/controller/SystemAPIController.java
  75. 0 126
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/PangolinController.java
  76. 0 160
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SysMessageTemplateController.java
  77. 1 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  78. 3 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java
  79. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/SysMessageTemplateController.java
  80. 0 73
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/job/SendMsgJob.java
  81. 0 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/SysMessageMapper.java
  82. 0 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/SysMessageTemplateMapper.java
  83. 0 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/xml/SysMessageMapper.xml
  84. 0 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/xml/SysMessageTemplateMapper.xml
  85. 0 80
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/util/PushMsgUtil.java
  86. 0 49
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/websocket/TestSocketController.java
  87. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/controller/NgAlainController.java
  88. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/service/impl/NgAlainServiceImpl.java
  89. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/order/CommonServiceImpl.java
  90. 0 270
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java
  91. 0 62
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/entity/QuartzJob.java
  92. 0 35
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/AsyncJob.java
  93. 0 23
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/SampleJob.java
  94. 0 32
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/SampleParamJob.java
  95. 0 20
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/mapper/QuartzJobMapper.java
  96. 0 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/mapper/xml/QuartzJobMapper.xml
  97. 0 40
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/service/IQuartzJobService.java
  98. 0 177
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/service/impl/QuartzJobServiceImpl.java
  99. 61 178
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java
  100. 0 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java

+ 0 - 427
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java

@@ -1,427 +0,0 @@
-package org.jeecg.common.system.api;
-
-import com.alibaba.fastjson.JSONObject;
-import org.jeecg.common.api.CommonAPI;
-import org.jeecg.common.api.dto.OnlineAuthDTO;
-import org.jeecg.common.api.dto.message.*;
-import org.jeecg.common.constant.ServiceNameConstants;
-import org.jeecg.common.system.api.factory.SysBaseAPIFallbackFactory;
-import org.jeecg.common.system.vo.*;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 相比较local版
- * 去掉了一些方法:
- * addLog getDatabaseType queryAllDepart
- * queryAllUser(Wrapper wrapper) queryAllUser(String[] userIds, int pageNo, int pageSize)
- * 修改了一些方法:
- * createLog
- * sendSysAnnouncement 只保留了一个,其余全部干掉
- *
- * cloud接口数量43  local:35 common:9  额外一个特殊queryAllRole一个当两个用
- */
-@Component
-@FeignClient(contextId = "sysBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = SysBaseAPIFallbackFactory.class)
-public interface ISysBaseAPI extends CommonAPI {
-
-    /**
-     * 1发送系统消息
-     * @param message 使用构造器赋值参数 如果不设置category(消息类型)则默认为2 发送系统消息
-     */
-    @PostMapping("/sys/api/sendSysAnnouncement")
-    void sendSysAnnouncement(@RequestBody MessageDTO message);
-
-    /**
-     * 2发送消息 附带业务参数
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sys/api/sendBusAnnouncement")
-    void sendBusAnnouncement(@RequestBody BusMessageDTO message);
-
-    /**
-     * 3通过模板发送消息
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sys/api/sendTemplateAnnouncement")
-    void sendTemplateAnnouncement(@RequestBody TemplateMessageDTO message);
-
-    /**
-     * 4通过模板发送消息 附带业务参数
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sys/api/sendBusTemplateAnnouncement")
-    void sendBusTemplateAnnouncement(@RequestBody BusTemplateMessageDTO message);
-
-    /**
-     * 5通过消息中心模板,生成推送内容
-     * @param templateDTO 使用构造器赋值参数
-     * @return
-     */
-    @PostMapping("/sys/api/parseTemplateByCode")
-    String parseTemplateByCode(@RequestBody TemplateDTO templateDTO);
-
-    /**
-     * 6根据用户id查询用户信息
-     * @param id
-     * @return
-     */
-    @GetMapping("/sys/api/getUserById")
-    LoginUser getUserById(@RequestParam("id") String id);
-
-    /**
-     * 7通过用户账号查询角色集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/getRolesByUsername")
-    List<String> getRolesByUsername(@RequestParam("username") String username);
-
-    /**
-     * 8通过用户账号查询部门集合
-     * @param username
-     * @return 部门 id
-     */
-    @GetMapping("/sys/api/getDepartIdsByUsername")
-    List<String> getDepartIdsByUsername(@RequestParam("username") String username);
-
-    /**
-     * 9通过用户账号查询部门 name
-     * @param username
-     * @return 部门 name
-     */
-    @GetMapping("/sys/api/getDepartNamesByUsername")
-    List<String> getDepartNamesByUsername(@RequestParam("username") String username);
-
-    /**
-     * 10获取数据字典
-     * @param code
-     * @return
-     */
-    @GetMapping("/sys/api/queryDictItemsByCode")
-    List<DictModel> queryDictItemsByCode(@RequestParam("code") String code);
-
-    /** 11查询所有的父级字典,按照create_time排序 */
-    @GetMapping("/sys/api/queryAllDict")
-    List<DictModel> queryAllDict();
-
-    /**
-     * 12查询所有分类字典
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllDSysCategory")
-    List<SysCategoryModel> queryAllDSysCategory();
-
-    /**
-     * 13获取表数据字典
-     * @param table
-     * @param text
-     * @param code
-     * @return
-     */
-    @GetMapping("/sys/api/queryTableDictItemsByCode")
-    List<DictModel> queryTableDictItemsByCode(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code);
-
-    /**
-     * 14查询所有部门 作为字典信息 id -->value,departName -->text
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllDepartBackDictModel")
-    List<DictModel> queryAllDepartBackDictModel();
-
-    /**
-     * 15根据业务类型 busType 及业务 busId 修改消息已读
-     */
-    @GetMapping("/sys/api/updateSysAnnounReadFlag")
-    public void updateSysAnnounReadFlag(@RequestParam("busType") String busType, @RequestParam("busId")String busId);
-
-    /**
-     * 16查询表字典 支持过滤数据
-     * @param table
-     * @param text
-     * @param code
-     * @param filterSql
-     * @return
-     */
-    @GetMapping("/sys/api/queryFilterTableDictInfo")
-    List<DictModel> queryFilterTableDictInfo(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("filterSql") String filterSql);
-
-    /**
-     * 17查询指定table的 text code 获取字典,包含text和value
-     * @param table
-     * @param text
-     * @param code
-     * @param keyArray
-     * @return
-     */
-    @Deprecated
-    @GetMapping("/sys/api/queryTableDictByKeys")
-    public List<String> queryTableDictByKeys(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("keyArray") String[] keyArray);
-
-    /**
-     * 18查询所有用户 返回ComboModel
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllUserBackCombo")
-    public List<ComboModel> queryAllUserBackCombo();
-
-    /**
-     * 19分页查询用户 返回JSONObject
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllUser")
-    public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize);
-
-
-    /**
-     * 20获取所有角色 带参
-     * roleIds 默认选中角色
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllRole")
-    public List<ComboModel> queryAllRole(@RequestParam(name = "roleIds",required = false)String[] roleIds);
-
-    /**
-     * 21通过用户账号查询角色Id集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/getRoleIdsByUsername")
-    public List<String> getRoleIdsByUsername(@RequestParam("username")String username);
-
-    /**
-     * 22通过部门编号查询部门id
-     * @param orgCode
-     * @return
-     */
-    @GetMapping("/sys/api/getDepartIdsByOrgCode")
-    public String getDepartIdsByOrgCode(@RequestParam("orgCode")String orgCode);
-
-    /**
-     * 23查询所有部门
-     * @return
-     */
-    @GetMapping("/sys/api/getAllSysDepart")
-    public List<SysDepartModel> getAllSysDepart();
-
-    /**
-     * 24查找父级部门
-     * @param departId
-     * @return
-     */
-    @GetMapping("/sys/api/getParentDepartId")
-    DictModel getParentDepartId(@RequestParam("departId")String departId);
-
-    /**
-     * 25根据部门Id获取部门负责人
-     * @param deptId
-     * @return
-     */
-    @GetMapping("/sys/api/getDeptHeadByDepId")
-    public List<String> getDeptHeadByDepId(@RequestParam("deptId") String deptId);
-
-    /**
-     * 26给指定用户发消息
-     * @param userIds
-     * @param cmd
-     */
-    @GetMapping("/sys/api/sendWebSocketMsg")
-    public void sendWebSocketMsg(@RequestParam("userIds")String[] userIds, @RequestParam("cmd") String cmd);
-
-    /**
-     * 27根据id获取所有参与用户
-     * userIds
-     * @return
-     */
-    @GetMapping("/sys/api/queryAllUserByIds")
-    public List<LoginUser> queryAllUserByIds(@RequestParam("userIds") String[] userIds);
-
-    /**
-     * 28将会议签到信息推动到预览
-     * userIds
-     * @return
-     * @param userId
-     */
-    @GetMapping("/sys/api/meetingSignWebsocket")
-    void meetingSignWebsocket(@RequestParam("userId")String userId);
-
-    /**
-     * 29根据name获取所有参与用户
-     * userNames
-     * @return
-     */
-    @GetMapping("/sys/api/queryUserByNames")
-    List<LoginUser> queryUserByNames(@RequestParam("userNames")String[] userNames);
-
-
-    /**
-     * 30获取用户的角色集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/getUserRoleSet")
-    Set<String> getUserRoleSet(@RequestParam("username")String username);
-
-    /**
-     * 31获取用户的权限集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/getUserPermissionSet")
-    Set<String> getUserPermissionSet(@RequestParam("username") String username);
-
-    /**
-     * 32判断是否有online访问的权限
-     * @param onlineAuthDTO
-     * @return
-     */
-    @PostMapping("/sys/api/hasOnlineAuth")
-    boolean hasOnlineAuth(@RequestBody OnlineAuthDTO onlineAuthDTO);
-
-    /**
-     * 33通过部门id获取部门全部信息
-     */
-    @GetMapping("/sys/api/selectAllById")
-    SysDepartModel selectAllById(@RequestParam("id") String id);
-
-    /**
-     * 34根据用户id查询用户所属公司下所有用户ids
-     * @param userId
-     * @return
-     */
-    @GetMapping("/sys/api/queryDeptUsersByUserId")
-    List<String> queryDeptUsersByUserId(@RequestParam("userId") String userId);
-
-
-    //---
-
-    /**
-     * 35查询用户角色信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/queryUserRoles")
-    Set<String> queryUserRoles(@RequestParam("username")String username);
-
-    /**
-     * 36查询用户权限信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/queryUserAuths")
-    Set<String> queryUserAuths(@RequestParam("username")String username);
-
-    /**
-     * 37根据 id 查询数据库中存储的 DynamicDataSourceModel
-     *
-     * @param dbSourceId
-     * @return
-     */
-    @GetMapping("/sys/api/getDynamicDbSourceById")
-    DynamicDataSourceModel getDynamicDbSourceById(@RequestParam("dbSourceId") String dbSourceId);
-
-    /**
-     * 38根据 code 查询数据库中存储的 DynamicDataSourceModel
-     *
-     * @param dbSourceCode
-     * @return
-     */
-    @GetMapping("/sys/api/getDynamicDbSourceByCode")
-    DynamicDataSourceModel getDynamicDbSourceByCode(@RequestParam("dbSourceCode") String dbSourceCode);
-
-    /**
-     * 39根据用户账号查询用户信息 CommonAPI中定义
-     * @param username
-     */
-    @GetMapping("/sys/api/getUserByName")
-    LoginUser getUserByName(@RequestParam("username") String username);
-
-    /**
-     * 40字典表的 翻译
-     * @param table
-     * @param text
-     * @param code
-     * @param key
-     * @return
-     */
-    @GetMapping("/sys/api/translateDictFromTable")
-    String translateDictFromTable(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("key") String key,@RequestParam("extendsKey") String extendsKey, @RequestParam("extendsValue") String extendsValue);
-
-    /**
-     * 41普通字典的翻译
-     * @param code
-     * @param key
-     * @return
-     */
-    @GetMapping("/sys/api/translateDict")
-    String translateDict(@RequestParam("code") String code, @RequestParam("key") String key,@RequestParam("extendsKey") String extendsKey, @RequestParam("extendsValue") String extendsValue);
-
-    /**
-     * 42查询数据权限
-     * @return
-     */
-    @GetMapping("/sys/api/queryPermissionDataRule")
-    List<SysPermissionDataRuleModel> queryPermissionDataRule(@RequestParam("component") String component, @RequestParam("requestPath")String requestPath, @RequestParam("username") String username);
-
-    /**
-     * 43查询用户信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/sys/api/getCacheUser")
-    SysUserCacheInfo getCacheUser(@RequestParam("username") String username);
-
-    /**
-     * 36根据多个用户账号(逗号分隔),查询返回多个用户信息
-     * @param usernames
-     * @return
-     */
-    @GetMapping("/sys/api/queryUsersByUsernames")
-    List<JSONObject> queryUsersByUsernames(String usernames);
-
-    /**
-     * 37根据多个用户ID(逗号分隔),查询返回多个用户信息
-     * @param ids
-     * @return
-     */
-    @GetMapping("/sys/api/queryUsersByIds")
-    List<JSONObject> queryUsersByIds(String ids);
-
-    /**
-     * 38根据多个部门编码(逗号分隔),查询返回多个部门信息
-     * @param orgCodes
-     * @return
-     */
-    @GetMapping("/sys/api/queryDepartsByOrgcodes")
-    List<JSONObject> queryDepartsByOrgcodes(String orgCodes);
-    /**
-     * 39根据多个部门编码(逗号分隔),查询返回多个部门信息
-     * @param ids
-     * @return
-     */
-    @GetMapping("/sys/api/queryDepartsByOrgIds")
-    List<JSONObject> queryDepartsByOrgIds(String ids);
-    
-    /**
-     * 40发送邮件消息
-     * @param email
-     * @param title
-     * @param content
-     */
-    @GetMapping("/sys/api/sendEmailMsg")
-    void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content);
-    /**
-     * 41 获取公司下级部门和公司下所有用户id
-     * @param orgCode
-     */
-    @GetMapping("/sys/api/getDeptUserByOrgCode")
-    List<Map> getDeptUserByOrgCode(@RequestParam("orgCode")String orgCode);
-}

+ 0 - 17
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/factory/SysBaseAPIFallbackFactory.java

@@ -1,17 +0,0 @@
-package org.jeecg.common.system.api.factory;
-
-import feign.hystrix.FallbackFactory;
-import org.jeecg.common.system.api.ISysBaseAPI;
-import org.jeecg.common.system.api.fallback.SysBaseAPIFallback;
-import org.springframework.stereotype.Component;
-
-@Component
-public class SysBaseAPIFallbackFactory implements FallbackFactory<ISysBaseAPI> {
-
-    @Override
-    public ISysBaseAPI create(Throwable throwable) {
-        SysBaseAPIFallback fallback = new SysBaseAPIFallback();
-        fallback.setCause(throwable);
-        return fallback;
-    }
-}

+ 0 - 272
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java

@@ -1,272 +0,0 @@
-package org.jeecg.common.system.api.fallback;
-
-import com.alibaba.fastjson.JSONObject;
-import lombok.Setter;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.dto.OnlineAuthDTO;
-import org.jeecg.common.api.dto.message.*;
-import org.jeecg.common.system.api.ISysBaseAPI;
-import org.jeecg.common.system.vo.*;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 进入fallback的方法 检查是否token未设置
- */
-@Slf4j
-public class SysBaseAPIFallback implements ISysBaseAPI {
-
-    @Setter
-    private Throwable cause;
-
-    @Override
-    public void sendSysAnnouncement(MessageDTO message) {
-        log.error("发送消息失败 {}", cause);
-    }
-
-    @Override
-    public void sendBusAnnouncement(BusMessageDTO message) {
-        log.error("发送消息失败 {}", cause);
-    }
-
-    @Override
-    public void sendTemplateAnnouncement(TemplateMessageDTO message) {
-        log.error("发送消息失败 {}", cause);
-    }
-
-    @Override
-    public void sendBusTemplateAnnouncement(BusTemplateMessageDTO message) {
-        log.error("发送消息失败 {}", cause);
-    }
-
-    @Override
-    public String parseTemplateByCode(TemplateDTO templateDTO) {
-        log.error("通过模板获取消息内容失败 {}", cause);
-        return null;
-    }
-
-    @Override
-    public LoginUser getUserById(String id) {
-        return null;
-    }
-
-    @Override
-    public List<String> getRolesByUsername(String username) {
-        return null;
-    }
-
-    @Override
-    public List<String> getDepartIdsByUsername(String username) {
-        return null;
-    }
-
-    @Override
-    public List<String> getDepartNamesByUsername(String username) {
-        return null;
-    }
-
-    @Override
-    public List<DictModel> queryDictItemsByCode(String code) {
-        return null;
-    }
-
-    @Override
-    public List<DictModel> queryAllDict() {
-        return null;
-    }
-
-    @Override
-    public List<SysCategoryModel> queryAllDSysCategory() {
-        return null;
-    }
-
-    @Override
-    public List<DictModel> queryTableDictItemsByCode(String table, String text, String code) {
-        return null;
-    }
-
-    @Override
-    public List<DictModel> queryAllDepartBackDictModel() {
-        return null;
-    }
-
-    @Override
-    public void updateSysAnnounReadFlag(String busType, String busId) {
-
-    }
-
-    @Override
-    public List<DictModel> queryFilterTableDictInfo(String table, String text, String code, String filterSql) {
-        return null;
-    }
-
-    @Override
-    public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
-        log.error("queryTableDictByKeys查询失败 {}", cause);
-        return null;
-    }
-
-    @Override
-    public List<ComboModel> queryAllUserBackCombo() {
-        return null;
-    }
-
-    @Override
-    public JSONObject queryAllUser(String userIds, Integer pageNo, int pageSize) {
-        return null;
-    }
-
-    @Override
-    public List<ComboModel> queryAllRole(String[] roleIds) {
-        log.error("获取角色信息失败 {}", cause);
-        return null;
-    }
-
-    @Override
-    public List<String> getRoleIdsByUsername(String username) {
-        return null;
-    }
-
-    @Override
-    public String getDepartIdsByOrgCode(String orgCode) {
-        return null;
-    }
-
-    @Override
-    public List<SysDepartModel> getAllSysDepart() {
-        return null;
-    }
-
-    @Override
-    public DictModel getParentDepartId(String departId) {
-        return null;
-    }
-
-    @Override
-    public List<String> getDeptHeadByDepId(String deptId) {
-        return null;
-    }
-
-    @Override
-    public void sendWebSocketMsg(String[] userIds, String cmd) {
-
-    }
-
-    @Override
-    public List<LoginUser> queryAllUserByIds(String[] userIds) {
-        return null;
-    }
-
-    @Override
-    public void meetingSignWebsocket(String userId) {
-
-    }
-
-    @Override
-    public List<LoginUser> queryUserByNames(String[] userNames) {
-        return null;
-    }
-
-    @Override
-    public Set<String> getUserRoleSet(String username) {
-        return null;
-    }
-
-    @Override
-    public Set<String> getUserPermissionSet(String username) {
-        return null;
-    }
-
-    @Override
-    public boolean hasOnlineAuth(OnlineAuthDTO onlineAuthDTO) {
-        return false;
-    }
-
-    @Override
-    public SysDepartModel selectAllById(String id) {
-        return null;
-    }
-
-    @Override
-    public List<String> queryDeptUsersByUserId(String userId) {
-        return null;
-    }
-
-    @Override
-    public Set<String> queryUserRoles(String username) {
-        return null;
-    }
-
-    @Override
-    public Set<String> queryUserAuths(String username) {
-        return null;
-    }
-
-    @Override
-    public DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId) {
-        return null;
-    }
-
-    @Override
-    public DynamicDataSourceModel getDynamicDbSourceByCode(String dbSourceCode) {
-        return null;
-    }
-
-    @Override
-    public LoginUser getUserByName(String username) {
-        log.error("通过用户名获取当前登录用户信息 {}", cause);
-        return null;
-    }
-
-    @Override
-    public String translateDictFromTable(String table, String text, String code, String key,String ekey,String evalue) {
-        return null;
-    }
-
-    @Override
-    public String translateDict(String code, String key,String ekey,String evalue) {
-        return null;
-    }
-
-    @Override
-    public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
-        return null;
-    }
-
-    @Override
-    public SysUserCacheInfo getCacheUser(String username) {
-        log.error("获取用户信息失败 {}", cause);
-        return null;
-    }
-
-    @Override
-    public List<JSONObject> queryUsersByUsernames(String usernames) {
-        return null;
-    }
-
-    @Override
-    public List<JSONObject> queryUsersByIds(String ids) {
-        return null;
-    }
-
-    @Override
-    public List<JSONObject> queryDepartsByOrgcodes(String orgCodes) {
-        return null;
-    }
-    @Override
-    public void sendEmailMsg(String email,String title,String content) {
-
-    }
-
-    @Override
-    public List<Map> getDeptUserByOrgCode(String orgCode) {
-        return null;
-    }
-
-    @Override
-    public List<JSONObject> queryDepartsByOrgIds(String ids) {
-        return null;
-    }
-}

+ 186 - 13
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java

@@ -1,14 +1,15 @@
 package org.jeecg.common.system.api;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import org.jeecg.common.api.CommonAPI;
 import org.jeecg.common.api.dto.OnlineAuthDTO;
 import org.jeecg.common.api.dto.message.*;
 import org.jeecg.common.system.vo.*;
+import org.springframework.web.multipart.MultipartFile;
 
-import java.util.Arrays;
+import javax.servlet.http.HttpServletResponse;
+import java.sql.SQLException;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -19,9 +20,7 @@ import java.util.Set;
  * @Date 2019-4-20
  * @Version V1.0
  */
-public interface ISysBaseAPI extends CommonAPI {
-
-
+public interface ISysBaseApi extends CommonAPI {
     /**
      * 1发送系统消息
      * @param message 使用构造器赋值参数 如果不设置category(消息类型)则默认为2 发送系统消息
@@ -92,13 +91,6 @@ public interface ISysBaseAPI extends CommonAPI {
      */
     public List<SysCategoryModel> queryAllDSysCategory();
 
-
-    /**
-     * 14查询所有部门 作为字典信息 id -->value,departName -->text
-     * @return
-     */
-    public List<DictModel> queryAllDepartBackDictModel();
-
     /**
      * 15根据业务类型及业务id修改消息已读
      * @param busType
@@ -289,4 +281,185 @@ public interface ISysBaseAPI extends CommonAPI {
      * @param orgCode
      */
     List<Map> getDeptUserByOrgCode(String orgCode);
+
+    /**
+     * 日志添加
+     * @param LogContent 内容
+     * @param logType 日志类型(0:定时任务;1:登录日志;2:操作日志)
+     * @param operatetype 操作类型(1:添加;2:修改;3:删除;)
+     */
+    void addLog(String LogContent, Integer logType, Integer operatetype);
+
+    /**
+     * 根据用户账号查询用户信息
+     * @param username
+     * @return
+     */
+    LoginUser getUserByName(String username);
+
+    List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username);
+
+    SysUserCacheInfo getCacheUser(String username);
+
+    /**
+     * 获取当前数据库类型
+     * @return
+     * @throws Exception
+     */
+    public String getDatabaseType() throws SQLException;
+
+    /**
+     * 获取数据字典
+     * @param code
+     * @return
+     */
+    public List<DictModel> queryDictItemsByCode(String code);
+
+
+    /**
+     * 获取表数据字典
+     * @param table
+     * @param text
+     * @param code
+     * @return
+     */
+    List<DictModel> queryTableDictItemsByCode(String table, String text, String code);
+
+    /**
+     * 查询所有部门 作为字典信息 id -->value,departName -->text
+     * @return
+     */
+    public List<DictModel> queryAllDepartBackDictModel();
+
+    /**
+     * 查询所有部门,拼接查询条件
+     * @return
+     */
+    List<JSONObject> queryAllDepart(Wrapper wrapper);
+
+    /**
+     * 发送系统消息
+     * @param fromUser 发送人(用户登录账户)
+     * @param toUser  发送给(用户登录账户)
+     * @param title  消息主题
+     * @param msgContent  消息内容
+     */
+    public void sendSysAnnouncement(String fromUser,String toUser,String title, String msgContent);
+
+    /**
+     * 发送系统消息
+     * @param fromUser 发送人(用户登录账户)
+     * @param toUser   发送给(用户登录账户)
+     * @param title    通知标题
+     * @param map  	   模板参数
+     * @param templateCode  模板编码
+     */
+    public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode);
+
+    /**
+     *
+     * @param fromUser 发送人(用户登录账户)
+     * @param toUser 发送给(用户登录账户)
+     * @param title 通知标题
+     * @param map 模板参数
+     * @param templateCode 模板编码
+     * @param busType 业务类型
+     * @param busId 业务id
+     */
+    public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode,String busType,String busId);
+
+    /**
+     * 通过消息中心模板,生成推送内容
+     *
+     * @param templateCode 模板编码
+     * @param map          模板参数
+     * @return
+     */
+    public String parseTemplateByCode(String templateCode, Map<String, String> map);
+
+
+    /**
+     * 发送系统消息
+     * @param fromUser 发送人(用户登录账户)
+     * @param toUser  发送给(用户登录账户)
+     * @param title  消息主题
+     * @param msgContent  消息内容
+     * @param setMsgCategory  消息类型 1:消息2:系统消息
+     */
+    public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory);
+
+    /**queryTableDictByKeys
+     * 发送系统消息
+     * @param fromUser 发送人(用户登录账户)
+     * @param toUser  发送给(用户登录账户)
+     * @param title  消息主题
+     * @param msgContent  消息内容
+     * @param setMsgCategory  消息类型 1:消息2:系统消息
+     * @param busType  业务类型
+     * @param busId  业务id
+     */
+    public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory,String busType,String busId);
+
+    /**
+     * 获取所有有效用户
+     * @return
+     */
+    public List<ComboModel> queryAllUser();
+
+    /**
+     * 获取所有有效用户 带参
+     * userIds 默认选中用户
+     * @return
+     */
+    public JSONObject queryAllUser(String[] userIds, int pageNo, int pageSize);
+
+    /**
+     * 获取所有有效用户 拼接查询条件
+     *
+     * @return
+     */
+    List<JSONObject> queryAllUser(Wrapper wrapper);
+
+    /**
+     * 根据 id 查询数据库中存储的 DynamicDataSourceModel
+     *
+     * @param dbSourceId
+     * @return
+     */
+    DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId);
+
+    /**
+     * 根据 code 查询数据库中存储的 DynamicDataSourceModel
+     *
+     * @param dbSourceCode
+     * @return
+     */
+    DynamicDataSourceModel getDynamicDbSourceByCode(String dbSourceCode);
+
+    /**
+     * 文件上传
+     * @param file 文件
+     * @param bizPath 自定义路径
+     * @param uploadType 上传方式
+     * @return
+     */
+    public String upload(MultipartFile file, String bizPath, String uploadType);
+
+    /**
+     * 文件上传 自定义桶
+     * @param file
+     * @param bizPath
+     * @param uploadType
+     * @param customBucket
+     * @return
+     */
+    public String upload(MultipartFile file,String bizPath,String uploadType,String customBucket);
+
+    /**
+     * 文档管理文件下载预览
+     * @param filePath
+     * @param uploadpath
+     * @param response
+     */
+    public void viewAndDownload(String filePath, String uploadpath, String uploadType, HttpServletResponse response);
 }

+ 0 - 37
jeecg-boot-base/jeecg-boot-base-core/pom.xml

@@ -111,11 +111,6 @@
 				</exclusion>
 			</exclusions>
 		</dependency>
-		<dependency>
-			<groupId>org.jeecgframework.boot</groupId>
-			<artifactId>hibernate-re</artifactId>
-			<version>2.4.5-RC</version>
-		</dependency>
 
 		<!--mysql-->
 		<dependency>
@@ -124,33 +119,6 @@
 			<version>${mysql-connector-java.version}</version>
 			<scope>runtime</scope>
 		</dependency>
-		<!--  sqlserver-->
-		<dependency>
-			<groupId>com.microsoft.sqlserver</groupId>
-			<artifactId>sqljdbc4</artifactId>
-			<version>${sqljdbc4.version}</version>
-			<scope>runtime</scope>
-		</dependency>
-		<!-- oracle驱动 -->
-		<dependency>
-			<groupId>com.oracle</groupId>
-			<artifactId>ojdbc6</artifactId>
-			<version>${ojdbc6.version}</version>
-			<scope>runtime</scope>
-		</dependency>
-		<!-- postgresql驱动 -->
-		<dependency>
-			<groupId>org.postgresql</groupId>
-			<artifactId>postgresql</artifactId>
-			<version>${postgresql.version}</version>
-			<scope>runtime</scope>
-		</dependency>
-
-		<!-- Quartz定时任务 -->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-quartz</artifactId>
-		</dependency>
 
 		<!--JWT-->
 		<dependency>
@@ -221,11 +189,6 @@
 			<groupId>com.xkcoding.justauth</groupId>
 			<artifactId>justauth-spring-boot-starter</artifactId>
 		</dependency>
-		<!--<dependency>
-			<groupId>com.squareup.okhttp3</groupId>
-			<artifactId>okhttp</artifactId>
-		</dependency>
--->
 
 		<!-- pagehelper-->
 		<dependency>

+ 0 - 1
jeecg-boot-base/jeecg-boot-base-tools/pom.xml

@@ -7,7 +7,6 @@
         <version>2.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    <description>公共模块</description>
     <artifactId>jeecg-boot-base-tools</artifactId>
 
     <dependencies>

+ 28 - 0
jeecg-boot-module-system/pom.xml

@@ -35,6 +35,10 @@
 			<artifactId>jeecg-system-local-api</artifactId>
 		</dependency>
 		<dependency>
+			<groupId>org.jeecgframework.boot</groupId>
+			<artifactId>jeecg-boot-base-core</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.jeecgframework</groupId>
 			<artifactId>jeewx-api</artifactId>
 			<version>1.4.2</version>
@@ -150,10 +154,34 @@
 			<artifactId>javacv-platform</artifactId>
 			<version>1.4.2</version>
 		</dependency>
+		<dependency>
+			<groupId>com.baomidou</groupId>
+			<artifactId>mybatis-plus-boot-starter</artifactId>
+			<version>${mybatis-plus.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jeecgframework.boot</groupId>
+			<artifactId>jeecg-boot-base-tools</artifactId>
+		</dependency>
 
 	</dependencies>
 
 	<build>
+		<resources>
+			<!-- 解决MyBatis配置文件引入问题 -->
+			<resource>
+				<directory>src/main/java</directory>
+				<includes>
+					<include>**/*.properties</include>
+					<include>**/*.xml</include>
+				</includes>
+				<!-- 是否替换资源中的属性-->
+				<filtering>false</filtering>
+			</resource>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
 		<plugins>
 			<plugin>
 				<groupId>org.springframework.boot</groupId>

+ 0 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/check/controller/CtopCheckTaskExecutorCtrl.java

@@ -1,4 +0,0 @@
-package cn.com.ctop.check.controller;
-
-public class CtopCheckTaskExecutorCtrl {
-}

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/db/DataSourceCachePool.java

@@ -1,8 +1,8 @@
 package cn.com.ctop.common.module.db;
 
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import com.alibaba.druid.pool.DruidDataSource;
 import org.jeecg.common.constant.CacheConstant;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.vo.DynamicDataSourceModel;
 import org.jeecg.common.util.SpringContextUtils;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -37,8 +37,8 @@ public class DataSourceCachePool {
         if (getRedisTemplate().hasKey(redisCacheKey)) {
             return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
         }
-        ISysBaseApi sysBaseAPI = SpringContextUtils.getBean(ISysBaseApi.class);
-        DynamicDataSourceModel dbSource = sysBaseAPI.getDynamicDbSourceByCode(dbKey);
+        ISysBaseApi sysBaseApi = SpringContextUtils.getBean(ISysBaseApi.class);
+        DynamicDataSourceModel dbSource = sysBaseApi.getDynamicDbSourceByCode(dbKey);
         if (dbSource != null) {
             getRedisTemplate().opsForValue().set(redisCacheKey, dbSource);
         }

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/db/dynamic/DataSourceCachePool.java

@@ -1,8 +1,8 @@
 package cn.com.ctop.common.module.db.dynamic;
 
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import com.alibaba.druid.pool.DruidDataSource;
 import org.jeecg.common.constant.CacheConstant;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.vo.DynamicDataSourceModel;
 import org.jeecg.common.util.SpringContextUtils;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -37,8 +37,8 @@ public class DataSourceCachePool {
         if (getRedisTemplate().hasKey(redisCacheKey)) {
             return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
         }
-        ISysBaseApi sysBaseAPI = SpringContextUtils.getBean(ISysBaseApi.class);
-        DynamicDataSourceModel dbSource = sysBaseAPI.getDynamicDbSourceByCode(dbKey);
+        ISysBaseApi sysBaseApi = SpringContextUtils.getBean(ISysBaseApi.class);
+        DynamicDataSourceModel dbSource = sysBaseApi.getDynamicDbSourceByCode(dbKey);
         if (dbSource != null) {
             getRedisTemplate().opsForValue().set(redisCacheKey, dbSource);
         }

+ 0 - 82
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysDict.java

@@ -1,82 +0,0 @@
-package cn.com.ctop.common.module.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 字典表
- * </p>
- *
- * @Author zhangweijian
- * @since 2018-12-28
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class SysDict implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.ID_WORKER_STR)
-    private String id;
-
-    /**
-     * [预留字段,暂时无用]
-     * 字典类型,0 string,1 number类型,2 boolean
-     * 前端js对stirng类型和number类型 boolean 类型敏感,需要区分。在select 标签匹配的时候会用到
-     * 默认为string类型
-     */
-    private Integer type;
-
-    /**
-     * 字典名称
-     */
-    private String dictName;
-
-    /**
-     * 字典编码
-     */
-    private String dictCode;
-
-    /**
-     * 描述
-     */
-    private String description;
-
-    /**
-     * 删除状态
-     */
-    @TableLogic
-    private Integer delFlag;
-
-    /**
-     * 创建人
-     */
-    private String createBy;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新人
-     */
-    private String updateBy;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-}

+ 0 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysDictItem.java

@@ -75,6 +75,4 @@ public class SysDictItem implements Serializable {
     private String updateBy;
 
     private Date updateTime;
-
-
 }

+ 0 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/entity/SysLog.java

@@ -108,5 +108,4 @@ public class SysLog implements Serializable {
 	 */
 	@Dict(dicCode = "operate_type")
 	private Integer operateType;
-
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysDictItemMapper.java

@@ -16,5 +16,5 @@ import java.util.List;
  */
 public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
     @Select("SELECT * FROM sys_dict_item WHERE DICT_ID = #{mainId} order by sort_order asc, item_value asc")
-    public List<SysDictItem> selectItemsByMainId(String mainId);
+    List<SysDictItem> selectItemsByMainId(String mainId);
 }

+ 51 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysDictMapper.java

@@ -1,13 +1,14 @@
 package cn.com.ctop.common.module.mapper;
 
-import cn.com.ctop.common.module.entity.SysDict;
 import cn.com.ctop.common.module.model.DuplicateCheckVo;
 import cn.com.ctop.common.module.model.TreeSelectModel;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
+import org.jeecg.common.system.entity.SysDict;
 import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.common.system.vo.DictQuery;
 
@@ -109,4 +110,53 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
 	 */
 	@Deprecated
 	public Page<DictModel> queryDictTablePageList(Page page, @Param("query") DictQuery query);
+
+	/**
+	 *  重复检查SQL
+	 * @return
+	 */
+	public Long duplicateCheckCountSql(org.jeecg.modules.system.model.DuplicateCheckVo duplicateCheckVo);
+	public Long duplicateCheckCountSqlNoDataId(org.jeecg.modules.system.model.DuplicateCheckVo duplicateCheckVo);
+
+	@Deprecated
+	@Select("select ${key} as \"label\",${value} as \"value\" from ${table}")
+	public List<Map<String,String>> getDictByTableNgAlain(@Param("table") String table, @Param("key") String key, @Param("value") String value);
+
+	public String queryDictTextByKey(@Param("code") String code,@Param("key") String key);
+
+	@Deprecated
+	public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
+
+
+	/**
+	 * 通过关键字查询出字典表
+	 * @param page
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param keyword
+	 * @return
+	 */
+	IPage<DictModel> queryTableDictItems(Page<DictModel> page, @Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("keyword") String keyword);
+
+	/**
+	 * 查询 字典表数据 支持查询条件 分页
+	 * @param page
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param filterSql
+	 * @return
+	 */
+	IPage<DictModel> queryTableDictWithFilter(Page<DictModel> page, @Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
+
+	/**
+	 * 查询 字典表数据 支持查询条件 查询所有
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param filterSql
+	 * @return
+	 */
+	List<DictModel> queryAllTableDictItems(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/SysRoleMapper.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.entity.SysRole;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Delete;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 
 /**
  * <p>
@@ -25,7 +26,6 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
     @Delete("delete from sys_user_role where role_id = #{roleId}")
     void deleteRoleUserRelation(@Param("roleId") String roleId);
 
-
     /**
      * @Author scott
      * @Date 2019/12/13 16:12

+ 0 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysAnnouncementMapper.xml

@@ -27,7 +27,6 @@
 		<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
 	</resultMap>
 
-
 	<select id="querySysCementListByUserId" parameterType="String"  resultMap="SysAnnouncement">
 	   select * from sys_announcement
 	   where send_status = '1'
@@ -36,5 +35,4 @@
 	   and id IN ( select annt_id from sys_announcement_send where user_id = #{userId} and read_flag = '0')
 	   order by create_time DESC
 	</select>
-
 </mapper>

+ 0 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysAnnouncementSendMapper.xml

@@ -63,5 +63,4 @@
         </if>
 	   order by sas.read_flag,sa.send_time desc
 	</select>
-
 </mapper>

+ 16 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysDictMapper.xml

@@ -112,4 +112,20 @@
 		</if>
 	</select>
 
+	<!--通过查询指定table的 text code 获取字典数据,且支持关键字和自定义查询条件查询 分页-->
+	<select id="queryTableDictWithFilter" parameterType="String"  resultType="org.jeecg.common.system.vo.DictModel">
+		select ${text} as "text", ${code} as "value" from ${table}
+		<if test="filterSql != null and filterSql != ''">
+			${filterSql}
+		</if>
+	</select>
+
+	<!--通过查询指定table的 text code 获取字典数据,且支持关键字和自定义查询条件查询 获取所有 -->
+	<select id="queryAllTableDictItems" parameterType="String"  resultType="org.jeecg.common.system.vo.DictModel">
+		select ${text} as "text", ${code} as "value" from ${table}
+		<if test="filterSql != null and filterSql != ''">
+			${filterSql}
+		</if>
+	</select>
+
 </mapper>

+ 0 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/SysLogMapper.xml

@@ -65,5 +65,4 @@
          order by CONVERT(varchar(100), create_time, 23) asc
      </if>
     </select>
-
 </mapper>

+ 2 - 6
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/job/SendMsgJob.java

@@ -8,9 +8,6 @@ import cn.com.ctop.common.module.message.handle.ISendMsgHandle;
 import cn.com.ctop.common.module.message.handle.enums.SendMsgStatusEnum;
 import cn.com.ctop.common.module.message.handle.enums.SendMsgTypeEnum;
 import cn.com.ctop.common.module.message.service.ISysMessageService;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -22,13 +19,12 @@ import lombok.extern.slf4j.Slf4j;
  */
 
 @Slf4j
-public class SendMsgJob implements Job {
+public class SendMsgJob {
 
 	@Autowired
 	private ISysMessageService sysMessageService;
 
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+	public void execute() {
 
 		log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob !  时间:" + DateUtils.getTimestamp()));
 

+ 2 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/service/ISysMessageService.java

@@ -1,7 +1,6 @@
 package cn.com.ctop.common.module.message.service;
-
-import org.jeecg.common.system.base.service.JeecgService;
 import cn.com.ctop.common.module.message.entity.SysMessage;
+import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
  * @Description: 消息
@@ -9,6 +8,6 @@ import cn.com.ctop.common.module.message.entity.SysMessage;
  * @Date:  2019-04-09
  * @Version: V1.0
  */
-public interface ISysMessageService extends JeecgService<SysMessage> {
+public interface ISysMessageService extends IService<SysMessage> {
 
 }

+ 5 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/util/PushMsgUtil.java

@@ -5,11 +5,16 @@ import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
 import cn.com.ctop.common.module.message.handle.enums.SendMsgStatusEnum;
 import cn.com.ctop.common.module.message.service.ISysMessageService;
 import cn.com.ctop.common.module.message.service.ISysMessageTemplateService;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import com.alibaba.fastjson.JSONObject;
 
+import java.io.IOException;
+import java.io.StringWriter;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;

+ 0 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/message/websocket/TestSocketController.java

@@ -44,5 +44,4 @@ public class TestSocketController {
         result.setResult("单发");
         return result;
     }
-    
 }

+ 0 - 382
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysBaseApi.java

@@ -1,382 +0,0 @@
-package cn.com.ctop.common.module.service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import org.jeecg.common.api.dto.OnlineAuthDTO;
-import org.jeecg.common.api.dto.message.*;
-import org.jeecg.common.system.vo.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import java.sql.SQLException;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @Description: 底层共通业务API,提供其他独立模块调用
- * @Author: scott
- * @Date:2019-4-20
- * @Version:V1.0
- */
-public interface ISysBaseApi {
-
-	/**
-	 * 日志添加
-	 * @param LogContent 内容
-	 * @param logType 日志类型(0:定时任务;1:登录日志;2:操作日志)
-	 * @param operatetype 操作类型(1:添加;2:修改;3:删除;)
-	 */
-	void addLog(String LogContent, Integer logType, Integer operatetype);
-
-	/**
-	  * 根据用户账号查询用户信息
-	 * @param username
-	 * @return
-	 */
-	LoginUser getUserByName(String username);
-
-	List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username);
-
-	SysUserCacheInfo getCacheUser(String username);
-
-    /**
-	  * 根据用户id查询用户信息
-	 * @param id
-	 * @return
-	 */
-	public LoginUser getUserById(String id);
-
-	/**
-	 * 通过用户账号查询角色集合
-	 * @param username
-	 * @return
-	 */
-	public List<String> getRolesByUsername(String username);
-
-	/**
-	 * 通过用户账号查询部门集合
-	 * @param username
-	 * @return 部门 id
-	 */
-	List<String> getDepartIdsByUsername(String username);
-
-	/**
-	 * 通过用户账号查询部门 name
-	 * @param username
-	 * @return 部门 name
-	 */
-	List<String> getDepartNamesByUsername(String username);
-
-	/**
-	 * 获取当前数据库类型
-	 * @return
-	 * @throws Exception
-	 */
-	public String getDatabaseType() throws SQLException;
-
-	/**
-	  * 获取数据字典
-	 * @param code
-	 * @return
-	 */
-	public List<DictModel> queryDictItemsByCode(String code);
-
-	/** 查询所有的父级字典,按照create_time排序 */
-	public List<DictModel> queryAllDict();
-
-    /**
-     * 查询所有分类字典
-     * @return
-     */
-	public List<SysCategoryModel> queryAllDSysCategory();
-
-	/**
-	  * 获取表数据字典
-	 * @param table
-	 * @param text
-	 * @param code
-	 * @return
-	 */
-    List<DictModel> queryTableDictItemsByCode(String table, String text, String code);
-
-    /**
-   	 * 查询所有部门 作为字典信息 id -->value,departName -->text
-   	 * @return
-   	 */
-   	public List<DictModel> queryAllDepartBackDictModel();
-
-    /**
-   	 * 查询所有部门,拼接查询条件
-   	 * @return
-   	 */
-   	List<JSONObject> queryAllDepart(Wrapper wrapper);
-
-	/**
-	 * 发送系统消息
-	 * @param fromUser 发送人(用户登录账户)
-	 * @param toUser  发送给(用户登录账户)
-	 * @param title  消息主题
-	 * @param msgContent  消息内容
-	 */
-	public void sendSysAnnouncement(String fromUser,String toUser,String title, String msgContent);
-
-	/**
-	 * 发送系统消息
-	 * @param fromUser 发送人(用户登录账户)
-	 * @param toUser   发送给(用户登录账户)
-	 * @param title    通知标题
-	 * @param map  	   模板参数
-	 * @param templateCode  模板编码
-	 */
-	public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode);
-
-	/**
-	 *
-	 * @param fromUser 发送人(用户登录账户)
-	 * @param toUser 发送给(用户登录账户)
-	 * @param title 通知标题
-	 * @param map 模板参数
-	 * @param templateCode 模板编码
-	 * @param busType 业务类型
-	 * @param busId 业务id
-	 */
-	public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode,String busType,String busId);
-
-	/**
-	 * 通过消息中心模板,生成推送内容
-	 *
-	 * @param templateCode 模板编码
-	 * @param map          模板参数
-	 * @return
-	 */
-	public String parseTemplateByCode(String templateCode, Map<String, String> map);
-
-
-	/**
-	 * 发送系统消息
-	 * @param fromUser 发送人(用户登录账户)
-	 * @param toUser  发送给(用户登录账户)
-	 * @param title  消息主题
-	 * @param msgContent  消息内容
-	 * @param setMsgCategory  消息类型 1:消息2:系统消息
-	 */
-	public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory);
-
-	/**queryTableDictByKeys
-	 * 发送系统消息
-	 * @param fromUser 发送人(用户登录账户)
-	 * @param toUser  发送给(用户登录账户)
-	 * @param title  消息主题
-	 * @param msgContent  消息内容
-	 * @param setMsgCategory  消息类型 1:消息2:系统消息
-	 * @param busType  业务类型
-	 * @param busId  业务id
-	 */
-	public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory,String busType,String busId);
-
-	/**
-	 * 根据业务类型及业务id修改消息已读
-	 * @param busType
-	 * @param busId
-	 */
-	public void updateSysAnnounReadFlag(String busType,String busId);
-	/**
-	 * 查询表字典 支持过滤数据
-	 * @param table
-	 * @param text
-	 * @param code
-	 * @param filterSql
-	 * @return
-	 */
-	public List<DictModel> queryFilterTableDictInfo(String table, String text, String code, String filterSql);
-
-	/**
-	 * 查询指定table的 text code 获取字典,包含text和value
-	 * @param table
-	 * @param text
-	 * @param code
-	 * @param keyArray
-	 * @return
-	 */
-	@Deprecated
-	public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray);
-
-	/**
-	 * 获取所有有效用户
-	 * @return
-	 */
-	public List<ComboModel> queryAllUser();
-
-    /**
-     * 获取所有有效用户 带参
-     * userIds 默认选中用户
-     * @return
-     */
-    public JSONObject queryAllUser(String[] userIds, int pageNo, int pageSize);
-
-    /**
-     * 获取所有有效用户 拼接查询条件
-     *
-     * @return
-     */
-    List<JSONObject> queryAllUser(Wrapper wrapper);
-
-	void sendSysAnnouncement(MessageDTO message);
-
-	void sendBusAnnouncement(BusMessageDTO message);
-
-	void sendTemplateAnnouncement(TemplateMessageDTO message);
-
-	void sendBusTemplateAnnouncement(BusTemplateMessageDTO message);
-
-	String parseTemplateByCode(TemplateDTO templateDTO);
-
-	List<ComboModel> queryAllUserBackCombo();
-
-	JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize);
-
-	/**
-	 * 获取所有角色
-	 * @return
-	 */
-	public List<ComboModel> queryAllRole();
-
-	/**
-	 * 获取所有角色 带参
-     * roleIds 默认选中角色
-	 * @return
-	 */
-	public List<ComboModel> queryAllRole(String[] roleIds );
-
-	/**
-	 * 通过用户账号查询角色Id集合
-	 * @param username
-	 * @return
-	 */
-	public List<String> getRoleIdsByUsername(String username);
-
-	/**
-	 * 通过部门编号查询部门id
-	 * @param orgCode
-	 * @return
-	 */
-	public String getDepartIdsByOrgCode(String orgCode);
-
-	/**
-	 * 查询上一级部门
-	 * @param departId
-	 * @return
-	 */
-	public DictModel getParentDepartId(String departId);
-
-	/**
-	 * 查询所有部门
-	 * @return
-	 */
-	public List<SysDepartModel> getAllSysDepart();
-
-	/**
-	 * 根据 id 查询数据库中存储的 DynamicDataSourceModel
-	 *
-	 * @param dbSourceId
-	 * @return
-	 */
-	DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId);
-
-	/**
-	 * 根据 code 查询数据库中存储的 DynamicDataSourceModel
-	 *
-	 * @param dbSourceCode
-	 * @return
-	 */
-	DynamicDataSourceModel getDynamicDbSourceByCode(String dbSourceCode);
-
-	/**
-	 * 根据部门Id获取部门负责人
-	 * @param deptId
-	 * @return
-	 */
-	public List<String> getDeptHeadByDepId(String deptId);
-
-	/**
-	 * 文件上传
-	 * @param file 文件
-	 * @param bizPath 自定义路径
-	 * @param uploadType 上传方式
-	 * @return
-	 */
-	public String upload(MultipartFile file,String bizPath,String uploadType);
-
-	/**
-	 * 文件上传 自定义桶
-	 * @param file
-	 * @param bizPath
-	 * @param uploadType
-	 * @param customBucket
-	 * @return
-	 */
-	public String upload(MultipartFile file,String bizPath,String uploadType,String customBucket);
-
-	/**
-	 * 文档管理文件下载预览
-	 * @param filePath
-	 * @param uploadpath
-	 * @param response
-	 */
-	public void viewAndDownload(String filePath, String uploadpath, String uploadType,HttpServletResponse response);
-
-
-	/**
-	 * 给指定用户发消息
-	 * @param userIds
-	 * @param cmd
-	 */
-	public void sendWebSocketMsg(String[] userIds, String cmd);
-
-	/**
-	 * 根据id获取所有参与用户
-	 * userIds
-	 * @return
-	 */
-	public List<LoginUser> queryAllUserByIds(String[] userIds);
-	/**
-	 * 将会议签到信息推动到预览
-	 * userIds
-	 * @return
-	 * @param userId
-	 */
-    void meetingSignWebsocket(String userId);
-	/**
-	 * 根据name获取所有参与用户
-	 * userNames
-	 * @return
-	 */
-	List<LoginUser> queryUserByNames(String[] userNames);
-
-	SysDepartModel selectAllById(String id);
-
-	List<String> queryDeptUsersByUserId(String userId);
-
-	Set<String> getUserRoleSet(String username);
-
-	Set<String> getUserPermissionSet(String username);
-
-	boolean hasOnlineAuth(OnlineAuthDTO onlineAuthDTO);
-
-	Set<String> queryUserRoles(String username);
-
-	Set<String> queryUserAuths(String username);
-
-	List<JSONObject> queryUsersByUsernames(String usernames);
-
-	List<JSONObject> queryUsersByIds(String ids);
-
-	List<JSONObject> queryDepartsByOrgcodes(String orgCodes);
-
-	List<JSONObject> queryDepartsByIds(String ids);
-
-	void sendEmailMsg(String email, String title, String content);
-
-	List<Map> getDeptUserByOrgCode(String orgCode);
-}

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysDataSourceService.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.common.module.service;
 
+
 import cn.com.ctop.common.module.entity.SysDataSource;
 import com.baomidou.mybatisplus.extension.service.IService;
 

+ 52 - 5
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/ISysDictService.java

@@ -1,9 +1,9 @@
 package cn.com.ctop.common.module.service;
 
-import cn.com.ctop.common.module.entity.SysDict;
 import cn.com.ctop.common.module.entity.SysDictItem;
 import cn.com.ctop.common.module.model.TreeSelectModel;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.system.entity.SysDict;
 import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.common.system.vo.DictQuery;
 
@@ -20,15 +20,15 @@ import java.util.Map;
  */
 public interface ISysDictService extends IService<SysDict> {
 
-    public List<DictModel> queryDictItemsByCode(String code);
+    List<DictModel> queryDictItemsByCode(String code);
 
-    public Map<String,List<DictModel>> queryAllDictItems();
+    Map<String,List<DictModel>> queryAllDictItems();
 
     List<DictModel> queryTableDictItemsByCode(String table, String text, String code);
 
-	public List<DictModel> queryTableDictItemsByCodeAndFilter(String table, String text, String code, String filterSql);
+	List<DictModel> queryTableDictItemsByCodeAndFilter(String table, String text, String code, String filterSql);
 
-    public String queryDictTextByKey(String code, String key,String extendsKey,String extendsValue);
+	String queryDictTextByKey(String code, String key,String extendsKey,String extendsValue);
 
 	String queryTableDictTextByKey(String table, String text, String code, String key,String extendsKey,String extendsValue);
 
@@ -112,4 +112,51 @@ public interface ISysDictService extends IService<SysDict> {
 	@Deprecated
 	public List<DictModel> queryDictTablePageList(DictQuery query,int pageSize, int pageNo);
 
+	public String queryDictTextByKey(String code, String key);
+
+	@Deprecated
+	String queryTableDictTextByKey(String table, String text, String code, String key);
+
+	@Deprecated
+	List<String> queryTableDictByKeys(String table, String text, String code, String keys);
+	@Deprecated
+	List<String> queryTableDictByKeys(String table, String text, String code, String keys,boolean delNotExist);
+	/**
+	 * 查询字典表数据 只查询前10条
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param keyword
+	 * @return
+	 */
+	public List<DictModel> queryLittleTableDictItems(String table, String text, String code, String condition, String keyword, int pageSize);
+
+	/**
+	 * 查询字典表所有数据
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param condition
+	 * @param keyword
+	 * @return
+	 */
+	public List<DictModel> queryAllTableDictItems(String table, String text, String code, String condition, String keyword);
+
+	/**
+	 * 获取字典数据
+	 * @param dictCode 字典code
+	 * @param dictCode 表名,文本字段,code字段  | 举例:sys_user,realname,id
+	 * @return
+	 */
+	List<DictModel> getDictItems(String dictCode);
+
+	/**
+	 * 【JSearchSelectTag下拉搜索组件专用接口】
+	 * 大数据量的字典表 走异步加载  即前端输入内容过滤数据
+	 *
+	 * @param dictCode 字典code格式:table,text,code
+	 * @return
+	 */
+	List<DictModel> loadDict(String dictCode, String keyword, Integer pageSize);
+
 }

+ 12 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysBaseApiImpl.java

@@ -25,7 +25,9 @@ import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.constant.DataBaseConstant;
 import org.jeecg.common.constant.WebsocketConst;
 import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.entity.SysDepart;
+import org.jeecg.common.system.entity.SysDict;
 import org.jeecg.common.system.entity.SysPermission;
 import org.jeecg.common.system.entity.SysUser;
 import org.jeecg.common.system.query.QueryGenerator;
@@ -146,6 +148,16 @@ public class SysBaseApiImpl implements ISysBaseApi {
     }
 
     @Override
+    public String translateDictFromTable(String table, String text, String code, String key, String extendsKey, String extendsValue) {
+        return null;
+    }
+
+    @Override
+    public String translateDict(String code, String key, String extendsKey, String extendsValue) {
+        return null;
+    }
+
+    @Override
     public LoginUser getUserById(String id) {
         if (oConvertUtils.isEmpty(id)) {
             return null;

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDepartServiceImpl.java

@@ -8,7 +8,6 @@ import cn.com.ctop.common.module.entity.SysUserDepart;
 import cn.com.ctop.common.module.mapper.*;
 import cn.com.ctop.common.module.model.DepartIdModel;
 import cn.com.ctop.common.module.model.SysDepartTreeModel;
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import cn.com.ctop.common.module.service.ISysDepartService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.FindsDepartsChildrenUtil;
@@ -21,6 +20,7 @@ import io.netty.util.internal.StringUtil;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.entity.SysDepart;
 import org.jeecg.common.util.YouBianCodeUtil;
 import org.jeecg.common.util.oConvertUtils;
@@ -49,7 +49,7 @@ import java.util.UUID;
 @Service
 public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart> implements ISysDepartService {
     @Autowired
-    private ISysBaseApi sysBaseAPI;
+    private ISysBaseApi sysBaseApi;
     @Resource
     private SysUserDepartMapper userDepartMapper;
     @Resource
@@ -148,7 +148,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
             sysDepart.setCreateTime(new Date());
             sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
             this.save(sysDepart);
-            sysBaseAPI.addLog("添加部门,id: " + sysDepart.getId(), CommonConstant.LOG_TYPE_2, 1);
+            sysBaseApi.addLog("添加部门,id: " + sysDepart.getId(), CommonConstant.LOG_TYPE_2, 1);
         }
 
     }

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDictItemServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.entity.SysDictItem;
 import cn.com.ctop.common.module.mapper.SysDictItemMapper;
 import cn.com.ctop.common.module.service.ISysDictItemService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;

+ 178 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysDictServiceImpl.java

@@ -1,18 +1,23 @@
 package cn.com.ctop.common.module.service.impl;
 
-import cn.com.ctop.common.module.entity.SysDict;
 import cn.com.ctop.common.module.entity.SysDictItem;
 import cn.com.ctop.common.module.mapper.SysDictItemMapper;
 import cn.com.ctop.common.module.mapper.SysDictMapper;
 import cn.com.ctop.common.module.model.TreeSelectModel;
 import cn.com.ctop.common.module.service.ISysDictService;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.entity.SysDict;
 import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.common.system.vo.DictQuery;
+import org.jeecg.common.util.SqlInjectionUtil;
+import org.jeecg.common.util.oConvertUtils;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -211,4 +216,176 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
 		Page<DictModel> pageList = baseMapper.queryDictTablePageList(page, query);
 		return pageList.getRecords();
 	}
+
+	/**
+	 * 通过查询指定code 获取字典值text
+	 * @param code
+	 * @param key
+	 * @return
+	 */
+
+	@Override
+	@Cacheable(value = CacheConstant.SYS_DICT_CACHE,key = "#code+':'+#key", unless = "#result == null ")
+	public String queryDictTextByKey(String code, String key) {
+		log.debug("无缓存dictText的时候调用这里!");
+		return sysDictMapper.queryDictTextByKey(code, key);
+	}
+
+	/**
+	 * 通过查询指定table的 text code 获取字典值text
+	 * dictTableCache采用redis缓存有效期10分钟
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param key
+	 * @return
+	 */
+	@Override
+	@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE, unless = "#result == null ")
+	public String queryTableDictTextByKey(String table,String text,String code, String key) {
+		log.debug("无缓存dictTable的时候调用这里!");
+		return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
+	}
+
+	@Override
+	public List<String> queryTableDictByKeys(String table, String text, String code, String keys) {
+		return this.queryTableDictByKeys(table, text, code, keys, true);
+	}
+
+	/**
+	 * 通过查询指定table的 text code 获取字典,包含text和value
+	 * dictTableCache采用redis缓存有效期10分钟
+	 * @param table
+	 * @param text
+	 * @param code
+	 * @param keys (逗号分隔)
+	 * @param delNotExist 是否移除不存在的项,默认为true,设为false如果某个key不存在数据库中,则直接返回key本身
+	 * @return
+	 */
+	@Override
+	//update-begin--Author:lvdandan  Date:20201204 for:JT-36【online】树形列表bug修改后,还是显示原来值 暂时去掉缓存
+	//@Cacheable(value = CacheConstant.SYS_DICT_TABLE_BY_KEYS_CACHE)
+	//update-end--Author:lvdandan  Date:20201204 for:JT-36【online】树形列表bug修改后,还是显示原来值 暂时去掉缓存
+	public List<String> queryTableDictByKeys(String table, String text, String code, String keys, boolean delNotExist) {
+		if(oConvertUtils.isEmpty(keys)){
+			return null;
+		}
+		String[] keyArray = keys.split(",");
+		List<DictModel> dicts = sysDictMapper.queryTableDictByKeys(table, text, code, keyArray);
+		List<String> texts = new ArrayList<>(dicts.size());
+
+		// update-begin--author:sunjianlei--date:20210514--for:新增delNotExist参数,设为false不删除数据库里不存在的key ----
+		// 查询出来的顺序可能是乱的,需要排个序
+		for (String key : keyArray) {
+			List<DictModel> res = dicts.stream().filter(i -> key.equals(i.getValue())).collect(Collectors.toList());
+			if (res.size() > 0) {
+				texts.add(res.get(0).getText());
+			} else if (!delNotExist) {
+				texts.add(key);
+			}
+		}
+		// update-end--author:sunjianlei--date:20210514--for:新增delNotExist参数,设为false不删除数据库里不存在的key ----
+
+		return texts;
+	}
+
+	@Override
+	public List<DictModel> queryLittleTableDictItems(String table, String text, String code, String condition, String keyword, int pageSize) {
+		Page<DictModel> page = new Page<DictModel>(1, pageSize);
+		page.setSearchCount(false);
+		String filterSql = getFilterSql(text, code, condition, keyword);
+		IPage<DictModel> pageList = baseMapper.queryTableDictWithFilter(page, table, text, code, filterSql);
+		return pageList.getRecords();
+	}
+
+	/**
+	 * 获取条件语句
+	 * @param text
+	 * @param code
+	 * @param condition
+	 * @param keyword
+	 * @return
+	 */
+	private String getFilterSql(String text, String code, String condition, String keyword){
+		String keywordSql = null, filterSql = "", sql_where = " where ";
+		if(oConvertUtils.isNotEmpty(keyword)){
+			// 判断是否是多选
+			if (keyword.contains(",")) {
+				String inKeywords = "\"" + keyword.replaceAll(",", "\",\"") + "\"";
+				keywordSql = "(" + text + " in (" + inKeywords + ") or " + code + " in (" + inKeywords + "))";
+			} else {
+				keywordSql = "("+text + " like '%"+keyword+"%' or "+ code + " like '%"+keyword+"%')";
+			}
+		}
+		if(oConvertUtils.isNotEmpty(condition) && oConvertUtils.isNotEmpty(keywordSql)){
+			filterSql+= sql_where + condition + " and " + keywordSql;
+		}else if(oConvertUtils.isNotEmpty(condition)){
+			filterSql+= sql_where + condition;
+		}else if(oConvertUtils.isNotEmpty(keywordSql)){
+			filterSql+= sql_where + keywordSql;
+		}
+		return filterSql;
+	}
+	@Override
+	public List<DictModel> queryAllTableDictItems(String table, String text, String code, String condition, String keyword) {
+		String filterSql = getFilterSql(text, code, condition, keyword);
+		List<DictModel> ls = baseMapper.queryAllTableDictItems(table, text, code, filterSql);
+		return ls;
+	}
+
+	@Override
+	public List<DictModel> getDictItems(String dictCode) {
+		List<DictModel> ls;
+		if (dictCode.contains(",")) {
+			//关联表字典(举例:sys_user,realname,id)
+			String[] params = dictCode.split(",");
+			if (params.length < 3) {
+				// 字典Code格式不正确
+				return null;
+			}
+			//SQL注入校验(只限制非法串改数据库)
+			final String[] sqlInjCheck = {params[0], params[1], params[2]};
+			SqlInjectionUtil.filterContent(sqlInjCheck);
+			if (params.length == 4) {
+				// SQL注入校验(查询条件SQL 特殊check,此方法仅供此处使用)
+				SqlInjectionUtil.specialFilterContent(params[3]);
+				ls = this.queryTableDictItemsByCodeAndFilter(params[0], params[1], params[2], params[3]);
+			} else if (params.length == 3) {
+				ls = this.queryTableDictItemsByCode(params[0], params[1], params[2]);
+			} else {
+				// 字典Code格式不正确
+				return null;
+			}
+		} else {
+			//字典表
+			ls = this.queryDictItemsByCode(dictCode);
+		}
+		return ls;
+	}
+
+	@Override
+	public List<DictModel> loadDict(String dictCode, String keyword, Integer pageSize) {
+		if (dictCode.contains(",")) {
+			//update-begin-author:taoyan date:20210329 for: 下拉搜索不支持表名后加查询条件
+			String[] params = dictCode.split(",");
+			String condition = null;
+			if (params.length != 3 && params.length != 4) {
+				// 字典Code格式不正确
+				return null;
+			} else if (params.length == 4) {
+				condition = params[3];
+			}
+			List<DictModel> ls;
+			if (pageSize != null) {
+				ls = this.queryLittleTableDictItems(params[0], params[1], params[2], condition, keyword, pageSize);
+			} else {
+				ls = this.queryAllTableDictItems(params[0], params[1], params[2], condition, keyword);
+			}
+			//update-end-author:taoyan date:20210329 for: 下拉搜索不支持表名后加查询条件
+			return ls;
+		} else {
+			// 字典Code格式不正确
+			return null;
+		}
+	}
 }

+ 4 - 5
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/SysUserServiceImpl.java

@@ -3,7 +3,6 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.*;
 import cn.com.ctop.common.module.mapper.*;
 import cn.com.ctop.common.module.model.SysUserSysDepartModel;
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import cn.com.ctop.common.module.service.ISysUserService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.vo.SysUserDepVo;
@@ -15,11 +14,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.api.ISysBaseAPI;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.entity.SysDepart;
 import org.jeecg.common.system.entity.SysPermission;
 import org.jeecg.common.system.entity.SysUser;
@@ -173,7 +171,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     }
 
 
-    private ISysBaseAPI sysBaseAPI;
+    @Autowired
+    private ISysBaseApi sysBaseApi;
     @Resource
     private BaseCommonService baseCommonService;
     @Autowired
@@ -318,7 +317,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 //		info.setSysUserName(user.getRealname());
 
 
-        LoginUser user = sysBaseAPI.getUserByName(username);
+        LoginUser user = sysBaseApi.getUserByName(username);
         if(user!=null) {
             info.setSysUserCode(user.getUsername());
             info.setSysUserName(user.getRealname());

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/QueryGenerator.java

@@ -1,12 +1,12 @@
 package cn.com.ctop.common.module.utils;
 
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.constant.DataBaseConstant;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.query.MatchTypeEnum;
 import org.jeecg.common.system.query.QueryCondition;
 import org.jeecg.common.system.query.QueryRuleEnum;
@@ -877,8 +877,8 @@ public class QueryGenerator {
             return DB_TYPE;
         }
         try {
-            ISysBaseApi sysBaseAPI = ApplicationContextUtil.getContext().getBean(ISysBaseApi.class);
-            DB_TYPE = sysBaseAPI.getDatabaseType();
+            ISysBaseApi sysBaseApi = ApplicationContextUtil.getContext().getBean(ISysBaseApi.class);
+            DB_TYPE = sysBaseApi.getDatabaseType();
             return DB_TYPE;
         } catch (Exception e) {
             e.printStackTrace();

+ 5 - 5
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/TokenUtils.java

@@ -1,10 +1,10 @@
 package cn.com.ctop.common.module.utils;
 
-import cn.com.ctop.common.module.service.ISysBaseApi;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.RedisUtil;
@@ -37,7 +37,7 @@ public class TokenUtils {
     /**
      * 验证Token
      */
-    public static boolean verifyToken(String token, ISysBaseApi sysBaseAPI, RedisUtil redisUtil) {
+    public static boolean verifyToken(String token, ISysBaseApi sysBaseApi, RedisUtil redisUtil) {
         if (StringUtils.isBlank(token)) {
             throw new AuthenticationException("token不能为空!");
         }
@@ -49,7 +49,7 @@ public class TokenUtils {
         }
 
         // 查询用户信息
-        LoginUser user = sysBaseAPI.getUserByName(username);
+        LoginUser user = sysBaseApi.getUserByName(username);
         if (user == null) {
             throw new AuthenticationException("用户不存在!");
         }
@@ -68,7 +68,7 @@ public class TokenUtils {
     /**
      * 验证Token
      */
-    public static boolean verifyToken(HttpServletRequest request, ISysBaseApi sysBaseAPI, RedisUtil redisUtil) {
+    public static boolean verifyToken(HttpServletRequest request, ISysBaseApi sysBaseApi, RedisUtil redisUtil) {
         log.info(" -- url --" + request.getRequestURL());
         String token = getTokenByRequest(request);
 
@@ -83,7 +83,7 @@ public class TokenUtils {
         }
 
         // 查询用户信息
-        LoginUser user = sysBaseAPI.getUserByName(username);
+        LoginUser user = sysBaseApi.getUserByName(username);
         if (user == null) {
             throw new AuthenticationException("用户不存在!");
         }

+ 0 - 16
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinApp.java

@@ -1,16 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-@Data
-@TableName("ctop_pangolin_app")
-public class PangolinApp {
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-    private Long appId;
-    private String name;
-    private String accountName;
-}

+ 0 - 17
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinChannel.java

@@ -1,17 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-@Data
-@TableName("ctop_pangolin_channel")
-public class PangolinChannel {
-    @TableId(value = "id", type = IdType.INPUT)
-    private Long id;
-    private Long appId;
-    private String name;
-    private String accountName;
-
-}

+ 0 - 18
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportAccountDaily.java

@@ -1,18 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-@TableName("ctop_pangolin_report_account_daily")
-public class PangolinReportAccountDaily {
-    private Date date;
-    private String accountName;
-    private String appName;
-    private Integer externalActivation;
-    private BigDecimal retentionRatio;
-    private BigDecimal totalPrice;
-}

+ 0 - 36
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportAppHour.java

@@ -1,36 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 穿山甲实时数据
- */
-@Data
-@TableName("ctop_pangolin_report_app_hour")
-public class PangolinReportAppHour {
-    /**
-     * 日期
-     */
-    private Date date;
-    /**
-     * 时间
-     */
-    private Integer hour;
-    /**
-     * appId
-     */
-    private Long appId;
-    /**
-     * 类型
-     */
-    private String type;
-    private String accountName;
-    /**
-     * 数字
-     */
-    private BigDecimal num;
-}

+ 0 - 49
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportBillMonth.java

@@ -1,49 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-/**
- * 对账单
- */
-@Data
-@TableName("ctop_pangolin_report_bill_month")
-public class PangolinReportBillMonth {
-    /**
-     * 年
-     */
-    private Integer year;
-    /**
-     * 月
-     */
-    private Integer month;
-    private String date;
-    /**
-     * appId
-     */
-    private Long appId;
-    /**
-     * 操作系统
-     */
-    private String os;
-    /**
-     * 有效激活数
-     */
-    private Integer sumInternalActivations;
-    /**
-     * 实际结算金额
-     */
-    private BigDecimal actualTotalPrice;
-    /**
-     * 预估结算金额
-     */
-    private BigDecimal estimatedTotalPrice;
-    /**
-     * 账户质量分
-     */
-    private BigDecimal accountQualityScore;
-
-    private String accountName;
-}

+ 0 - 44
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/entity/PangolinReportChannelDaily.java

@@ -1,44 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 穿山甲激活统计信息
- */
-@Data
-@TableName("ctop_pangolin_report_channel_daily")
-public class PangolinReportChannelDaily {
-    /**
-     * 日期
-     */
-    private Date date;
-    /**
-     * 渠道信息
-     */
-    private String channelName;
-    /**
-     * 应用名称
-     */
-    private String appName;
-    private String accountName;
-    /**
-     * 操作系统
-     */
-    private String oprateSystem;
-    /**
-     * 激活数
-     */
-    private Integer externalActivation;
-    /**
-     * 留存率
-     */
-    private BigDecimal retentionRatio;
-    /**
-     * 预估结算金额
-     */
-    private BigDecimal totalPrice;
-}

+ 0 - 13
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinAppMapper.java

@@ -1,13 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface PangolinAppMapper extends BaseMapper<PangolinApp> {
-    List<PangolinApp> getListByParams(@Param(value = "userId") String userId,
-                                      @Param(value = "projectIds") List<Long> projectIds,
-                                      @Param(value = "accountNames") List<String> accountNames);
-}

+ 0 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinChannelMapper.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinChannel;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface PangolinChannelMapper extends BaseMapper<PangolinChannel> {
-    List<PangolinChannel> getListByUserId(@Param(value = "userId") String userId);
-}

+ 0 - 7
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportAccountDailyMapper.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAccountDaily;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-public interface PangolinReportAccountDailyMapper extends BaseMapper<PangolinReportAccountDaily> {
-}

+ 0 - 22
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportAppHourMapper.java

@@ -1,22 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAppHour;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface PangolinReportAppHourMapper extends BaseMapper<PangolinReportAppHour> {
-    JSONObject getComparedDate(@Param(value = "appId") Integer appId,
-                               @Param(value = "hour") Integer hour,
-                               @Param(value = "userId")String userId,
-                               @Param(value = "type")String type,
-                               @Param(value = "today")String today,
-                               @Param(value = "yesterday")String yesterday,
-                               @Param(value = "sevenDaysAgo")String sevenDaysAgo,
-                               @Param(value = "compareTime1")String compareTime1,
-                               @Param(value = "compareTime2")String compareTime2,
-                               @Param(value = "projectIds")List<Long> projectIds,
-                               @Param(value = "accountNames")List<String> accountNames);
-}

+ 0 - 18
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportBillMonthMapper.java

@@ -1,18 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.common.module.vo.PangolinReportAppMonthVO;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportBillMonth;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface PangolinReportBillMonthMapper extends BaseMapper<PangolinReportBillMonth> {
-    List<PangolinReportAppMonthVO> checkAppList(@Param(value = "appId") Integer appId,
-                                                @Param(value = "userId") String userId,
-                                                @Param(value = "startDate") String startDate,
-                                                @Param(value = "endDate") String endDate,
-                                                @Param(value = "operateSystem") String operateSystem,
-                                                @Param(value = "projectIds")List<Long>projectIds,
-                                                @Param(value = "accountNames")List<String>accountNames);
-}

+ 0 - 25
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/PangolinReportChannelDailyMapper.java

@@ -1,25 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.mapper;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportChannelDaily;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface PangolinReportChannelDailyMapper extends BaseMapper<PangolinReportChannelDaily> {
-    Integer sumAppList(@Param(value = "appId") Integer appId,
-                       @Param(value = "startDate") String startDate,
-                       @Param(value = "endDate") String endDate,
-                       @Param(value = "userId") String userId,
-                       @Param(value = "type") String type,
-                       @Param(value = "projectIds") List<Long>projectIds,
-                       @Param(value = "accountNames")List<String> accountNames);
-
-    List<PangolinReportChannelDaily> getActivationList(@Param(value = "appId") Integer appId,
-                                                       @Param(value = "startDate") String startDate,
-                                                       @Param(value = "endDate") String endDate,
-                                                       @Param(value = "userId") String userId,
-                                                       @Param(value = "type") String type,
-                                                       @Param(value = "projectIds") List<Long>projectIds,
-                                                       @Param(value = "accountNames")List<String> accountNames);
-}

+ 0 - 30
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinAppMapper.xml

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinAppMapper">
-    <select id="getListByParams" resultType="cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp">
-        select distinct app.app_id as 'id',name
-            from ctop_pangolin_app app
-        left join ctop_bind_account_login login on login.account_name = app.account_name
-        where
-        login.status = 1
-        <if test="userId!=null">
-            and login.user_id = #{userId}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-                <if test="accountNames!=null">
-                    or login.account_name in
-                    <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                      #{item}
-                    </foreach>
-                </if>
-                <if test="projectIds!=null">
-                    or login.project_id in
-                    <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
-                </if>
-              )
-        </if>
-    </select>
-</mapper>

+ 0 - 13
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinChannelMapper.xml

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinChannelMapper">
-    <select id="getListByUserId" resultType="cn.com.ctop.crawler.modules.pangolin.entity.PangolinChannel">
-        select channel.*
-from ctop_pangolin_channel channel
-         left join ctop_bind_account_login login on login.account_name = channel.account_name
-         where 1=1
-         <if test="userId!=null">
-             and login.user_id = #{userId}
-         </if>
-    </select>
-</mapper>

+ 0 - 169
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportAppHourMapper.xml

@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportAppHourMapper">
-    <select id="getComparedDate" resultType="com.alibaba.fastjson.JSONObject">
-        select
-        <if test="compareTime1!=null">
-            sum(if(date = '${compareTime1}',num,0)) as '${compareTime1}',
-        </if>
-        <if test="compareTime2!=null">
-            sum(if(date = '${compareTime2}',num,0)) as '${compareTime2}',
-        </if>
-            sum(if(date = '${today}',num,0)) as 'today',
-            sum(if(date = '${yesterday}',num,0)) as 'yesterday',
-            sum(if(date = '${sevenDaysAgo}',num,0)) as 'sevendaysAgo',
-            hour
-       from (select num,date,hour
-from ctop_pangolin_report_app_hour appHourActive
-         left join ctop_pangolin_app app on app.app_id = appHourActive.app_id
-         left join ctop_bind_account_login login on login.account_name = appHourActive.account_name
-where appHourActive.type = #{type}
-and date =  #{today} and hour = #{hour}
-<if test="appId!=null">
-    and app.app_id = #{appId}
-</if>
-<if test="userId!=null">
-    and login.user_id = #{userId}
-</if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or appHourActive.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-group by appHourActive.date, appHourActive.hour
-union all select num,date,hour
-from ctop_pangolin_report_app_hour appHourActive
-         left join ctop_pangolin_app app on app.app_id = appHourActive.app_id
-         left join ctop_bind_account_login login on login.account_name = appHourActive.account_name
-where appHourActive.type = #{type}
-        and date =  #{yesterday} and hour = #{hour}
-        <if test="appId!=null">
-            and app.app_id = #{appId}
-        </if>
-        <if test="userId!=null">
-            and login.user_id = #{userId}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or appHourActive.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-        group by appHourActive.date, appHourActive.hour
-union all select num,date,hour
-from ctop_pangolin_report_app_hour appHourActive
-         left join ctop_pangolin_app app on app.app_id = appHourActive.app_id
-         left join ctop_bind_account_login login on login.account_name = appHourActive.account_name
-where appHourActive.type = #{type}
-        and date =  #{sevenDaysAgo} and hour = #{hour}
-        <if test="appId!=null">
-            and app.app_id = #{appId}
-        </if>
-        <if test="userId!=null">
-            and login.user_id = #{userId}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or appHourActive.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-        group by appHourActive.date, appHourActive.hour
-<if test="compareTime1!=null">
-    union all
-    select num,date,hour
-    from ctop_pangolin_report_app_hour appHourActive
-    left join ctop_pangolin_app app on app.app_id = appHourActive.app_id
-    left join ctop_bind_account_login login on login.account_name = appHourActive.account_name
-    where appHourActive.type = #{type}
-    and date =  #{compareTime1} and hour = #{hour}
-    <if test="appId!=null">
-        and app.id = #{appId}
-    </if>
-    <if test="userId!=null">
-        and login.user_id = #{userId}
-    </if>
-    <if test="accountNames!=null or projectIds!=null">
-        and  ( 1=0
-        <if test="accountNames!=null">
-            or appHourActive.account_name in
-            <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
-        <if test="projectIds!=null">
-            or login.project_id in
-            <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
-        )
-    </if>
-    group by appHourActive.date, appHourActive.hour
-</if>
-        <if test="compareTime2!=null">
-            union all
-            select num,date,hour
-            from ctop_pangolin_report_app_hour appHourActive
-            left join ctop_pangolin_app app on app.app_id = appHourActive.app_id
-            left join ctop_bind_account_login login on login.account_name = appHourActive.account_name
-            where appHourActive.type = #{type}
-            and date =  #{compareTime2} and hour = #{hour}
-            <if test="appId!=null">
-                and app.app_id = #{appId}
-            </if>
-            <if test="userId!=null">
-                and login.user_id = #{userId}
-            </if>
-            <if test="accountNames!=null or projectIds!=null">
-                and  ( 1=0
-                <if test="accountNames!=null">
-                    or appHourActive.account_name in
-                    <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
-                </if>
-                <if test="projectIds!=null">
-                    or login.project_id in
-                    <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
-                </if>
-                )
-            </if>
-            group by appHourActive.date, appHourActive.hour
-        </if>
-        )a group by hour
-    </select>
-</mapper>

+ 0 - 55
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportBillMonthMapper.xml

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportBillMonthMapper">
-    <select id="checkAppList" resultType="cn.com.ctop.common.module.vo.PangolinReportAppMonthVO">
-        select
-       bill.date,
-        <if test="appId == null">
-            '-' as 'app_name',
-        </if>
-        <if test="appId != null">
-            app.name as 'app_name',
-        </if>
-       bill.os as 'operate_system',
-       sum(bill.sum_internal_activations) as 'sum_internal_activations',
-       sum(bill.estimated_total_price) as 'estimated_total_price',
-       round(avg(bill.account_quality_score),2) as 'account_quality_score',
-       sum(bill.actual_total_price) as 'actual_total_price'
-    from ctop_pangolin_report_bill_month bill
-         left join ctop_pangolin_app app on app.app_id = bill.app_id
-         left join ctop_bind_account_login login on login.account_name = bill.account_name
-         where 1=1
-         <if test="userId!=null">
-             and login.user_id = #{userId}
-         </if>
-         <if test="appId!=null">
-             and app.app_id = #{appId}
-         </if>
-        <if test="startDate!=null">
-            and bill.date &gt;= #{startDate}
-        </if>
-        <if test="endDate!=null">
-           and  bill.date &lt;= #{endDate}
-        </if>
-        <if test="operateSystem!=null">
-           and bill.os = #{operateSystem}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or bill.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-        group by bill.date,bill.os order by bill.date desc
-    </select>
-</mapper>

+ 0 - 98
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/mapper/xml/PangolinReportChannelDailyMapper.xml

@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportChannelDailyMapper">
-
-    <select id="getActivationList"
-            resultType="cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportChannelDaily">
-        select
-            daily.date,
-            '-' as 'channel_name',
-            <if test="appId == null">
-                '-' as 'app_name',
-            </if>
-            <if test="appId != null">
-                daily.app_name,
-            </if>
-            daily.oprate_system,
-            sum(daily.external_activation) as 'external_activation',
-            sum(daily.total_price)as 'total_price'
-        from
-        ctop_pangolin_report_channel_daily daily
-        left join ctop_bind_account_login login on login.account_name = daily.account_name
-        left join ctop_pangolin_app app on app.name = daily.app_name and app.account_name = daily.account_name
-        where 1=1
-        <if test="userId!=null">
-            and login.user_id = #{userId}
-        </if>
-        <if test="appId!=null">
-            and app.app_id = #{appId}
-        </if>
-        <if test="startDate!=null">
-            and daily.date &gt;= #{startDate}
-        </if>
-        <if test="endDate!=null">
-            and daily.date &lt;= #{endDate}
-        </if>
-        <if test="type!=null">
-            and daily.os = #{type}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or daily.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-        group by daily.date
-    </select>
-    <select id="sumAppList" resultType="java.lang.Integer">
-        select
-            sum(daily.external_activation)
-        from
-        ctop_pangolin_report_channel_daily daily
-        left join ctop_bind_account_login login on login.account_name = daily.account_name
-        left join ctop_pangolin_app app on app.account_name = daily.account_name and daily.app_name = app.name
-        where 1=1
-        <if test="userId!=null">
-            and login.user_id = #{userId}
-        </if>
-        <if test="appId!=null">
-            and app.app_id = #{appId}
-        </if>
-        <if test="startDate!=null">
-            and daily.date &gt;= #{startDate}
-        </if>
-        <if test="endDate!=null">
-            and daily.date &lt;= #{endDate}
-        </if>
-        <if test="type!=null">
-            and daily.os = #{type}
-        </if>
-        <if test="accountNames!=null or projectIds!=null">
-            and  ( 1=0
-            <if test="accountNames!=null">
-                or daily.account_name in
-                <foreach item="item" index="index" collection="accountNames" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test="projectIds!=null">
-                or login.project_id in
-                <foreach item="item" index="index" collection="projectIds" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            )
-        </if>
-    </select>
-
-</mapper>

+ 0 - 15
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinAppService.java

@@ -1,15 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.Map;
-
-public interface PangolinAppService extends IService<PangolinApp> {
-    Map<String, Object> getListByUserId(String userId, JSONObject data);
-
-    Map<String, Object> getMemberList(String userId);
-
-    void saveOrUpdateApp(PangolinApp app);
-}

+ 0 - 10
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinChannelService.java

@@ -1,10 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinChannel;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.Map;
-
-public interface PangolinChannelService extends IService<PangolinChannel> {
-    Map<String, Object> getListByUserId(String userId);
-}

+ 0 - 15
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinCrawlerService.java

@@ -1,15 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.common.module.entity.BindAccountLogin;
-
-public interface PangolinCrawlerService {
-    void getCheckList(BindAccountLogin bindAccountLogin);
-
-    void getChannelList(BindAccountLogin bindAccountLogin);
-
-    void getActivationList(BindAccountLogin bindAccountLogin, String date, int page);
-
-    void getRealTimeList(BindAccountLogin bindAccountLogin, Long appId);
-
-    void getNowData(BindAccountLogin bindAccountLogin);
-}

+ 0 - 5
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinLoginService.java

@@ -1,5 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-public interface PangolinLoginService {
-    void pangolinLogin(String username,String password);
-}

+ 0 - 7
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportAccountDailyService.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAccountDaily;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface PangolinReportAccountDailyService extends IService<PangolinReportAccountDaily> {
-}

+ 0 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportAppHourService.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAppHour;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.Map;
-
-public interface PangolinReportAppHourService extends IService<PangolinReportAppHour> {
-    Map<String, Object> getRealTimeData(String userId, JSONObject data);
-}

+ 0 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportBillMonthService.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.common.module.vo.PangolinReportAppMonthVO;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportBillMonth;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.github.pagehelper.PageInfo;
-
-public interface PangolinReportBillMonthService extends IService<PangolinReportBillMonth> {
-    PageInfo<PangolinReportAppMonthVO> checkAppList(String userId, JSONObject data);
-}

+ 0 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/PangolinReportChannelDailyService.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportChannelDaily;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.Map;
-
-public interface PangolinReportChannelDailyService extends IService<PangolinReportChannelDaily> {
-    Map<String, Object> getActivationList(String userId, JSONObject data);
-}

+ 0 - 78
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinAppServiceImpl.java

@@ -1,78 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.service.IBindAccountLoginService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import cn.com.ctop.common.module.vo.PangolinProjectVO;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinAppMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinAppService;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class PangolinAppServiceImpl extends ServiceImpl<PangolinAppMapper, PangolinApp> implements PangolinAppService {
-    @Autowired
-    private PangolinAppMapper pangolinAppMapper;
-    @Autowired
-    private IBindAccountLoginService bindAccountLoginService;
-    @Override
-    public Map<String, Object> getListByUserId(String userId, JSONObject data) {
-        Map<String,Object>result = new HashMap<>();
-        List<Long>projectIds = null;
-        List<String>accountNames = null;
-        JSONArray accountNameArray = data.getJSONArray("accountName");
-        JSONArray projectIdArray = data.getJSONArray("projectId");
-        if(null!=accountNameArray&&!accountNameArray.isEmpty()){
-            accountNames = new ArrayList<>();
-            for(int i=0;i<accountNameArray.size();i++){
-                accountNames.add(accountNameArray.getString(i));
-            }
-        }
-        if(null!=projectIdArray&&!projectIdArray.isEmpty()){
-            projectIds = new ArrayList<>();
-            for(int i=0;i<projectIdArray.size();i++){
-                projectIds.add(projectIdArray.getLong(i));
-            }
-        }
-        List<PangolinApp>appList = pangolinAppMapper.getListByParams(userId,projectIds,accountNames);
-        result.put("data",appList);
-        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        return result;
-    }
-
-    @Override
-    public Map<String, Object> getMemberList(String userId) {
-        Map<String,Object>resultMap = new HashMap<>();
-        //1:查询所有项目信息
-        List<PangolinProjectVO> projectVOS = bindAccountLoginService.getProjectByParams(userId, CtopAdConstant.PLATFORM_TYPE_PANGOLIN_PY);
-        resultMap.put("data",projectVOS);
-        ResultMapUtils.setResultMap(resultMap,StatusCode.COMMON_SUCCESS);
-        return resultMap;
-    }
-
-    @Override
-    public void saveOrUpdateApp(PangolinApp app) {
-        QueryWrapper<PangolinApp>queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("account_name",app.getAccountName());
-        queryWrapper.eq("app_id",app.getAppId());
-        queryWrapper.last(" limit 1");
-        PangolinApp getApp = this.getOne(queryWrapper);
-        if(null == getApp){
-            this.save(app);
-        }else{
-            getApp.setName(app.getName());
-            this.updateById(getApp);
-        }
-    }
-}

+ 0 - 28
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinChannelServiceImpl.java

@@ -1,28 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinChannel;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinChannelMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinChannelService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class PangolinChannelServiceImpl extends ServiceImpl<PangolinChannelMapper, PangolinChannel> implements PangolinChannelService {
-    @Autowired
-    private PangolinChannelMapper pangolinChannelMapper;
-    @Override
-    public Map<String, Object> getListByUserId(String userId) {
-        Map<String,Object>result = new HashMap<>();
-        List<PangolinChannel>channelList = pangolinChannelMapper.getListByUserId(userId);
-        result.put("data",channelList);
-        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        return result;
-    }
-}

+ 0 - 368
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinCrawlerServiceImpl.java

@@ -1,368 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.entity.BindAccountLogin;
-import cn.com.ctop.common.module.service.IBindAccountLoginService;
-import cn.com.ctop.common.module.utils.HttpUtils2;
-import cn.com.ctop.crawler.modules.pangolin.entity.*;
-import cn.com.ctop.crawler.modules.pangolin.service.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.http.impl.cookie.BasicClientCookie;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.*;
-
-@Service
-public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
-    @Autowired
-    private IBindAccountLoginService bindAccountLoginService;
-    @Autowired
-    private PangolinAppService pangolinAppService;
-    @Autowired
-    private PangolinChannelService pangolinChannelService;
-    @Autowired
-    private PangolinReportBillMonthService pangolinReportBillMonthService;
-    @Autowired
-    private PangolinReportChannelDailyService pangolinReportChannelDailyService;
-    @Autowired
-    private PangolinReportAppHourService pangolinReportAppHourService;
-
-    @Override
-    public void getCheckList(BindAccountLogin bindAccountLogin) {
-        String url = "https://pangolin.bytedance.com/api/check_apps/list";
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            List<String> cookieList = mapper.readValue(bindAccountLogin.getCookie(), new TypeReference<List<String>>() {
-            });
-            if (cookieList != null && !cookieList.isEmpty()) {
-                for (String cookieStr : cookieList) {
-                    String[] cookieArray = cookieStr.split(";");
-                    Map<String, String> cookieMap = new HashMap<>();
-                    for (String cookie : cookieArray) {
-                        String[] kv = cookie.split("=");
-                        if (kv.length > 1) {
-                            cookieMap.put(kv[0].trim(), kv[1].trim());
-                        }
-                    }
-                    BasicClientCookie clientCookie = new BasicClientCookie(cookieArray[0].split("=")[0],
-                            cookieArray[0].split("=")[1]);
-                    clientCookie.setDomain("pangolin.bytedance.com");
-                    clientCookie.setPath(cookieMap.get("path"));
-                    HttpUtils2.cookieStore.addCookie(clientCookie);
-                }
-            }
-            String result = HttpUtils2.httpPostRequest(url, null, null);
-            if (bindAccountLoginService.checkLogin(bindAccountLogin, result)) {
-                JsonNode resultNode = mapper.readTree(result);
-                Iterator<JsonNode> appIterator = resultNode.get("data").get("List").elements();
-                while (appIterator.hasNext()) {
-                    JsonNode checkNode = appIterator.next();
-                    Long appId = checkNode.get("ApplicationId").asLong();
-                    String date = checkNode.get("Date").asText();
-                    String os = checkNode.get("Os").asText();
-                    Integer sumInternalActivations = checkNode.get("SumInternalActivations").asInt();
-                    BigDecimal actualTotalPrice = checkNode.get("ActualTotalPrice").decimalValue();
-                    BigDecimal estimatedTotalPrice = checkNode.get("EstimatedTotalPrice").decimalValue();
-                    BigDecimal accountQualityScore = checkNode.get("AccountQualityScore").decimalValue();
-                    PangolinReportBillMonth pangolinReportBillMonth = new PangolinReportBillMonth();
-                    pangolinReportBillMonth.setAccountQualityScore(accountQualityScore);
-                    pangolinReportBillMonth.setActualTotalPrice(actualTotalPrice);
-                    pangolinReportBillMonth.setAppId(appId);
-                    pangolinReportBillMonth.setEstimatedTotalPrice(estimatedTotalPrice);
-                    pangolinReportBillMonth.setOs(os);
-                    pangolinReportBillMonth.setSumInternalActivations(sumInternalActivations);
-                    pangolinReportBillMonth.setYear(Integer.parseInt(date.split("-")[0]));
-                    pangolinReportBillMonth.setMonth(Integer.parseInt(date.split("-")[1]));
-                    pangolinReportBillMonth.setDate(date);
-                    pangolinReportBillMonth.setAccountName(bindAccountLogin.getAccountName());
-                    QueryWrapper<PangolinReportBillMonth> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("os", pangolinReportBillMonth.getOs());
-                    queryWrapper.eq("app_id", pangolinReportBillMonth.getAppId());
-                    queryWrapper.eq("month", pangolinReportBillMonth.getMonth());
-                    queryWrapper.eq("year", pangolinReportBillMonth.getYear());
-                    queryWrapper.eq("account_name", pangolinReportBillMonth.getAccountName());
-                    if (pangolinReportBillMonthService.getOne(queryWrapper) == null) {
-                        pangolinReportBillMonthService.save(pangolinReportBillMonth);
-                    } else {
-                        pangolinReportBillMonthService.update(pangolinReportBillMonth, queryWrapper);
-                    }
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void getChannelList(BindAccountLogin bindAccountLogin) {
-        String url = "https://pangolin.bytedance.com/api/search/external_default";
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            List<String> cookieList = mapper.readValue(bindAccountLogin.getCookie(), new TypeReference<List<String>>() {
-            });
-            if (cookieList != null && !cookieList.isEmpty()) {
-                for (String cookieStr : cookieList) {
-                    String[] cookieArray = cookieStr.split(";");
-                    Map<String, String> cookieMap = new HashMap<>();
-                    for (String cookie : cookieArray) {
-                        String[] kv = cookie.split("=");
-                        if (kv.length > 1) {
-                            cookieMap.put(kv[0].trim(), kv[1].trim());
-                        }
-                    }
-                    BasicClientCookie clientCookie = new BasicClientCookie(cookieArray[0].split("=")[0],
-                            cookieArray[0].split("=")[1]);
-                    clientCookie.setDomain("pangolin.bytedance.com");
-                    clientCookie.setPath(cookieMap.get("path"));
-                    HttpUtils2.cookieStore.addCookie(clientCookie);
-                }
-            }
-            String result = HttpUtils2.httpGetRequest(url);
-            if (bindAccountLoginService.checkLogin(bindAccountLogin, result)) {
-                JsonNode resultNode = mapper.readTree(result);
-                Iterator<JsonNode> appIterator = resultNode.get("data").get("AppNameList").elements();
-                while (appIterator.hasNext()) {
-                    JsonNode appNode = appIterator.next();
-                    Long id = appNode.get("Id").asLong();
-                    String name = appNode.get("Name").asText();
-                    PangolinApp app = new PangolinApp();
-                    app.setAccountName(bindAccountLogin.getAccountName());
-                    app.setAppId(id);
-                    app.setName(name);
-                    pangolinAppService.saveOrUpdateApp(app);
-                }
-//                Iterator<JsonNode> channelIterator = resultNode.get("data").get("ChannelNameList").elements();
-//                while (channelIterator.hasNext()) {
-//                    JsonNode channelNode = channelIterator.next();
-//                    Long id = channelNode.get("Id").asLong();
-//                    String name = channelNode.get("Name").asText();
-//                    PangolinChannel channel = new PangolinChannel();
-//                    channel.setAccountName(bindAccountLogin.getAccountName());
-//                    channel.setId(id);
-//                    channel.setName(name);
-//                    pangolinChannelService.saveOrUpdate(channel);
-//                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void getActivationList(BindAccountLogin bindAccountLogin, String date, int page) {
-        String url = "https://pangolin.bytedance.com/api/activation/list";
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            List<String> cookieList = mapper.readValue(bindAccountLogin.getCookie(), new TypeReference<List<String>>() {
-            });
-            if (cookieList != null && !cookieList.isEmpty()) {
-                for (String cookieStr : cookieList) {
-                    String[] cookieArray = cookieStr.split(";");
-                    Map<String, String> cookieMap = new HashMap<>();
-                    for (String cookie : cookieArray) {
-                        String[] kv = cookie.split("=");
-                        if (kv.length > 1) {
-                            cookieMap.put(kv[0].trim(), kv[1].trim());
-                        }
-                    }
-                    BasicClientCookie clientCookie = new BasicClientCookie(cookieArray[0].split("=")[0],
-                            cookieArray[0].split("=")[1]);
-                    clientCookie.setDomain("pangolin.bytedance.com");
-                    clientCookie.setPath(cookieMap.get("path"));
-                    HttpUtils2.cookieStore.addCookie(clientCookie);
-                }
-            }
-            Map<String, Object> paramMap = new HashMap<>();
-            Map<String, Object> searchMap = new HashMap<>();
-            searchMap.put("DateStart", DateUtils.addDay(date, -2));
-            searchMap.put("DateEnd", date);
-            searchMap.put("AppId", "");
-            searchMap.put("ChannelName", "");
-            searchMap.put("OS", "");
-            Map<String, Object> pageMap = new HashMap<>();
-            pageMap.put("p", page);
-            paramMap.put("search", searchMap);
-            paramMap.put("page", pageMap);
-            String result = HttpUtils2.httpPostRequest(url, paramMap, null);
-            if (bindAccountLoginService.checkLogin(bindAccountLogin, result)) {
-                JsonNode resultNode = mapper.readTree(result);
-                Iterator<JsonNode> listIterator = resultNode.get("data").get("list").elements();
-                while (listIterator.hasNext()) {
-                    JsonNode dataNode = listIterator.next();
-                    String startDate = dataNode.get("StatsDate").asText();
-                    String channelName = dataNode.get("ChannelName").asText();
-                    String appName = dataNode.get("AppVerboseName").asText();
-                    String os = dataNode.get("OS").asText();
-                    Integer externalActivation = dataNode.get("ExternalActivation").asInt();
-                    BigDecimal retentionRatio = dataNode.get("RetentionRatio").decimalValue();
-                    BigDecimal totalPrice = dataNode.get("TotalPrice").decimalValue();
-                    PangolinReportChannelDaily pangolinReportChannelDaily = new PangolinReportChannelDaily();
-                    pangolinReportChannelDaily.setAppName(appName);
-                    pangolinReportChannelDaily.setChannelName(channelName);
-                    pangolinReportChannelDaily.setDate(DateUtils.parseDate(startDate, "yyyy-MM-dd"));
-                    pangolinReportChannelDaily.setExternalActivation(externalActivation);
-                    pangolinReportChannelDaily.setOprateSystem(os);
-                    pangolinReportChannelDaily.setRetentionRatio(retentionRatio);
-                    pangolinReportChannelDaily.setTotalPrice(totalPrice);
-                    pangolinReportChannelDaily.setAccountName(bindAccountLogin.getAccountName());
-                    QueryWrapper<PangolinReportChannelDaily> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("date", pangolinReportChannelDaily.getDate());
-                    queryWrapper.eq("app_name", pangolinReportChannelDaily.getAppName());
-                    queryWrapper.eq("channel_name", pangolinReportChannelDaily.getChannelName());
-                    queryWrapper.eq("account_name", bindAccountLogin.getAccountName());
-                    if (pangolinReportChannelDailyService.getOne(queryWrapper) == null) {
-                        pangolinReportChannelDailyService.save(pangolinReportChannelDaily);
-                    } else {
-                        pangolinReportChannelDailyService.update(pangolinReportChannelDaily, queryWrapper);
-                    }
-                }
-                Integer maxPage = resultNode.get("data").get("page").get("MaxPage").asInt();
-                if (page < maxPage) {
-                    page++;
-                    getActivationList(bindAccountLogin, date, page);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void getRealTimeList(BindAccountLogin bindAccountLogin, Long appId) {
-        String url = "https://pangolin.bytedance.com/api/real_time/";
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            List<String> cookieList = mapper.readValue(bindAccountLogin.getCookie(), new TypeReference<List<String>>() {
-            });
-            if (cookieList != null && !cookieList.isEmpty()) {
-                for (String cookieStr : cookieList) {
-                    String[] cookieArray = cookieStr.split(";");
-                    Map<String, String> cookieMap = new HashMap<>();
-                    for (String cookie : cookieArray) {
-                        String[] kv = cookie.split("=");
-                        if (kv.length > 1) {
-                            cookieMap.put(kv[0].trim(), kv[1].trim());
-                        }
-                    }
-                    BasicClientCookie clientCookie = new BasicClientCookie(cookieArray[0].split("=")[0],
-                            cookieArray[0].split("=")[1]);
-                    clientCookie.setDomain("pangolin.bytedance.com");
-                    clientCookie.setPath(cookieMap.get("path"));
-                    HttpUtils2.cookieStore.addCookie(clientCookie);
-                }
-            }
-            Map<String, Object> paramMap = new HashMap<>();
-            List<Long> appIds = new ArrayList<>();
-            appIds.add(appId);
-            paramMap.put("isInternal", 0);
-            paramMap.put("channelName", "");
-            paramMap.put("appId", appIds);
-            String result = HttpUtils2.httpPostRequest(url, paramMap, null);
-            if (bindAccountLoginService.checkLogin(bindAccountLogin, result)) {
-                JsonNode resultNode = mapper.readTree(result);
-                Iterator<String> clickIterator = resultNode.get("data").get("ChartData").get("click_num").fieldNames();
-                while (clickIterator.hasNext()) {
-                    String date = clickIterator.next();
-                    JsonNode clickNode = resultNode.get("data").get("ChartData").get("click_num").get(date);
-                    int size = clickNode.size();
-                    for (int i = 0; i < size; i++) {
-                        BigDecimal clickNum = clickNode.get(i).decimalValue();
-                        PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
-                        pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
-                        pangolinReportAppHour.setAppId(appId);
-                        pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
-                        pangolinReportAppHour.setNum(clickNum);
-                        pangolinReportAppHour.setType("click");
-                        pangolinReportAppHour.setHour(i);
-                        QueryWrapper<PangolinReportAppHour> queryWrapper = new QueryWrapper<>();
-                        queryWrapper.eq("date", pangolinReportAppHour.getDate());
-                        queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
-                        queryWrapper.eq("type", pangolinReportAppHour.getType());
-                        queryWrapper.eq("hour", pangolinReportAppHour.getHour());
-                        queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
-                        if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
-                            pangolinReportAppHourService.save(pangolinReportAppHour);
-                        } else {
-                            pangolinReportAppHourService.update(pangolinReportAppHour, queryWrapper);
-                        }
-                    }
-                }
-                Iterator<String> activeIterator = resultNode.get("data").get("ChartData").get("active_num").fieldNames();
-                while (activeIterator.hasNext()) {
-                    String date = activeIterator.next();
-                    JsonNode activeNode = resultNode.get("data").get("ChartData").get("active_num").get(date);
-                    int size = activeNode.size();
-                    for (int i = 0; i < size; i++) {
-                        BigDecimal activeNum = activeNode.get(i).decimalValue();
-                        PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
-                        pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
-                        pangolinReportAppHour.setAppId(appId);
-                        pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
-                        pangolinReportAppHour.setNum(activeNum);
-                        pangolinReportAppHour.setType("active");
-                        pangolinReportAppHour.setHour(i);
-                        QueryWrapper<PangolinReportAppHour> queryWrapper = new QueryWrapper<>();
-                        queryWrapper.eq("date", pangolinReportAppHour.getDate());
-                        queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
-                        queryWrapper.eq("type", pangolinReportAppHour.getType());
-                        queryWrapper.eq("hour", pangolinReportAppHour.getHour());
-                        queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
-                        if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
-                            pangolinReportAppHourService.save(pangolinReportAppHour);
-                        } else {
-                            pangolinReportAppHourService.update(pangolinReportAppHour, queryWrapper);
-                        }
-                    }
-                }
-                Iterator<String> rateIterator = resultNode.get("data").get("ChartData").get("ratio").fieldNames();
-                while (rateIterator.hasNext()) {
-                    String date = rateIterator.next();
-                    JsonNode rateNode = resultNode.get("data").get("ChartData").get("ratio").get(date);
-                    int size = rateNode.size();
-                    for (int i = 0; i < size; i++) {
-                        BigDecimal clickNum = rateNode.get(i).decimalValue();
-                        PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
-                        pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
-                        pangolinReportAppHour.setAppId(appId);
-                        pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
-                        pangolinReportAppHour.setNum(clickNum);
-                        pangolinReportAppHour.setType("rate");
-                        pangolinReportAppHour.setHour(i);
-                        QueryWrapper<PangolinReportAppHour> queryWrapper = new QueryWrapper<>();
-                        queryWrapper.eq("date", pangolinReportAppHour.getDate());
-                        queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
-                        queryWrapper.eq("type", pangolinReportAppHour.getType());
-                        queryWrapper.eq("hour", pangolinReportAppHour.getHour());
-                        queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
-                        if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
-                            pangolinReportAppHourService.save(pangolinReportAppHour);
-                        } else {
-                            pangolinReportAppHourService.update(pangolinReportAppHour, queryWrapper);
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void getNowData(BindAccountLogin bindAccountLogin) {
-        getChannelList(bindAccountLogin);
-        getActivationList(bindAccountLogin, DateUtils.getNowDate("yyyy-MM-dd"), 1);
-        getCheckList(bindAccountLogin);
-        QueryWrapper<PangolinApp> queryWrapper1 = new QueryWrapper<>();
-        queryWrapper1.eq("account_name", bindAccountLogin.getAccountName());
-        List<PangolinApp> appList = pangolinAppService.list(queryWrapper1);
-        if (appList != null && !appList.isEmpty()) {
-            appList.forEach(pangolinApp -> getRealTimeList(bindAccountLogin, pangolinApp.getId()));
-        }
-    }
-}

+ 0 - 112
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinLoginServiceImpl.java

@@ -1,112 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.entity.BindAccountLogin;
-import cn.com.ctop.common.module.service.IBindAccountLoginService;
-import cn.com.ctop.common.module.utils.HttpUtils2;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinLoginService;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.google.gson.Gson;
-import org.apache.http.impl.client.BasicCookieStore;
-import org.apache.http.impl.cookie.BasicClientCookie;
-import org.openqa.selenium.*;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.chrome.ChromeOptions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-
-
-@Service
-public class PangolinLoginServiceImpl implements PangolinLoginService {
-    @Autowired
-    private IBindAccountLoginService bindAccountLoginService;
-    @Value("${jeecg.path.chrome-driver}")
-    private String chromeDriver;
-
-    @Override
-    public void pangolinLogin(String username, String password) {
-        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
-        String url = "https://pangolin.bytedance.com/auth/login";
-        ChromeOptions chromeOptions = new ChromeOptions();
-        chromeOptions.addArguments("--headless");
-        chromeOptions.addArguments("--incognito");
-        chromeOptions.addArguments("--disable-gpu");
-        chromeOptions.addArguments("--window-size=1920,1080");
-        chromeOptions.addArguments("--user-agent=" + HttpUtils2.USER_AGENT);
-        chromeOptions.setAcceptInsecureCerts(true);
-        WebDriver webDriver = new ChromeDriver(chromeOptions);
-        try {
-            Thread.sleep(3000L);
-            HttpUtils2.cookieStore = new BasicCookieStore();
-            webDriver.manage().deleteAllCookies();
-            //获取登录页面
-            webDriver.get(url);
-            Thread.sleep(3000L);
-            WebElement accountElement = webDriver.findElement(By.xpath("//input[@id='username']"));
-            accountElement.sendKeys(username);
-            Thread.sleep(3000L);
-            WebElement passwordElement = webDriver.findElement(By.xpath("//input[@id='password']"));
-            passwordElement.sendKeys(password);
-            WebElement captchaElement = webDriver.findElement(By.xpath("//div[@class='ant-form-item-control ']/img"));
-            String outputType = captchaElement.getScreenshotAs(OutputType.BASE64);
-//            String res = ChaojiyingUtils.process(outputType,1902);
-            String res = "";
-            JSONObject capachaObject = JSONObject.parseObject(res);
-            Integer code = capachaObject.getInteger("err_no");
-            String captcha = capachaObject.getString("pic_str");
-            WebElement captchaInputElement = webDriver.findElement(By.xpath("//input[@id='captcha']"));
-            captchaInputElement.sendKeys(captcha);
-            WebElement loginElement = webDriver.findElement(By.xpath("//button[@type='submit']"));
-            Thread.sleep(3000L);
-            //点击登录
-            loginElement.click();
-            Thread.sleep(3000L);
-            webDriver.get("https://pangolin.bytedance.com");
-            Thread.sleep(3000L);
-            List<WebElement> list = webDriver.findElements(By.xpath("//input[@id='captcha']"));
-            QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("account_name",username);
-            queryWrapper.eq("login_type","pangolin");
-            BindAccountLogin bindAccountLogin = bindAccountLoginService.getOne(queryWrapper);
-            if(null != code && code == 0 && null != list && !list.isEmpty()){
-                //表示验证码正确,登录不成功
-                bindAccountLogin.setStatus("2");
-                bindAccountLoginService.updateById(bindAccountLogin);
-                return ;
-            }
-            Set<Cookie> cookies = webDriver.manage().getCookies();
-            List<String> cookieList = new ArrayList<>();
-            Iterator iterator = cookies.iterator();
-            while (iterator.hasNext()) {
-                String cookieStr = iterator.next().toString();
-                cookieList.add(cookieStr);
-                String[] cookieArray = cookieStr.split(";");
-                Map<String, String> cookieMap = new HashMap<>();
-                for (String cookie : cookieArray) {
-                    String[] kv = cookie.split("=");
-                    if (kv.length > 1) {
-                        cookieMap.put(kv[0].trim(), kv[1].trim());
-                    }
-                }
-                BasicClientCookie clientCookie = new BasicClientCookie(cookieArray[0].split("=")[0],
-                        cookieArray[0].split("=")[1]);
-                clientCookie.setDomain("pangolin.bytedance.com");
-                clientCookie.setPath(cookieMap.get("path"));
-                HttpUtils2.cookieStore.addCookie(clientCookie);
-            }
-            if (bindAccountLogin != null){
-                bindAccountLogin.setCookie(new Gson().toJson(cookieList));
-                bindAccountLoginService.updateById(bindAccountLogin);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            webDriver.manage().deleteAllCookies();
-            webDriver.quit();
-        }
-    }
-
-}

+ 0 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportAccountDailyServiceImpl.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAccountDaily;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportAccountDailyMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinReportAccountDailyService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service
-public class PangolinReportAccountDailyServiceImpl extends ServiceImpl<PangolinReportAccountDailyMapper, PangolinReportAccountDaily> implements PangolinReportAccountDailyService {
-}

+ 0 - 81
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportAppHourServiceImpl.java

@@ -1,81 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportAppHour;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportAppHourMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinReportAppHourService;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class PangolinReportAppHourServiceImpl extends ServiceImpl<PangolinReportAppHourMapper, PangolinReportAppHour> implements PangolinReportAppHourService {
-    @Autowired
-    private PangolinReportAppHourMapper pangolinReportAppHourMapper;
-
-    @Override
-    public Map<String, Object> getRealTimeData(String userId, JSONObject data) {
-        Map<String, Object> resultMap = new HashMap<>();
-        String today = DateUtils.formatDate();
-        String yesterday = DateUtils.addDay(today,-1);
-        String sevenDaysAgo = DateUtils.addDay(today,-7);
-        String type = data.getString("type");
-        String compareTime1 = data.getString("compareTime1");
-        String compareTime2 = data.getString("compareTime2");
-        Integer appId = data.getInteger("appId");
-        List<Long>projectIds = null;
-        List<String>accountNames = null;
-        JSONArray accountNameArray = data.getJSONArray("accountName");
-        JSONArray projectIdArray = data.getJSONArray("projectId");
-        if(null!=accountNameArray&&!accountNameArray.isEmpty()){
-            accountNames = new ArrayList<>();
-            for(int i=0;i<accountNameArray.size();i++){
-                accountNames.add(accountNameArray.getString(i));
-            }
-        }
-        if(null!=projectIdArray&&!projectIdArray.isEmpty()){
-            projectIds = new ArrayList<>();
-            for(int i=0;i<projectIdArray.size();i++){
-                projectIds.add(projectIdArray.getLong(i));
-            }
-        }
-        if(null == appId||appId == 0){
-            appId = null;
-        }
-        List<JSONObject> dataList = new ArrayList<>();
-        for(int i=0;i<24;i++){
-            JSONObject getData = this.getComparedDate(appId,i,userId,type,today,yesterday,sevenDaysAgo,compareTime1,compareTime2,projectIds,accountNames);
-            dataList.add(getData);
-        }
-        resultMap.put("data",dataList);
-        ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_SUCCESS);
-        return resultMap;
-    }
-
-    private JSONObject getComparedDate(Integer appId,Integer hour,String userId,String type,String today, String yesterday, String sevenDaysAgo, String compareTime1, String compareTime2,List<Long>projectIds,List<String>  accountNames) {
-        JSONObject data = pangolinReportAppHourMapper.getComparedDate(appId,hour,userId,type,today, yesterday,sevenDaysAgo,compareTime1,compareTime2,projectIds,accountNames);
-        if(null==data|| "null".equals(data.toJSONString())){
-            data = new JSONObject();
-            data.put("today",0);
-            data.put("yesterday",0);
-            data.put("sevendaysAgo",0);
-            data.put("hour",hour);
-            if(null!=compareTime1&&!"".equals(compareTime1.trim())){
-                data.put(compareTime1,0);
-            }
-            if(null!=compareTime2&&!"".equals(compareTime2.trim())){
-                data.put(compareTime2,0);
-            }
-        }
-        return data;
-    }
-}

+ 0 - 64
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportBillMonthServiceImpl.java

@@ -1,64 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.vo.PangolinReportAppMonthVO;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportBillMonth;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportBillMonthMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinReportBillMonthService;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Service
-public class PangolinReportBillMonthServiceImpl extends ServiceImpl<PangolinReportBillMonthMapper, PangolinReportBillMonth> implements PangolinReportBillMonthService {
-    @Autowired
-    private PangolinReportBillMonthMapper pangolinReportBillMonthMapper;
-
-    @Override
-    public PageInfo<PangolinReportAppMonthVO> checkAppList(String userId, JSONObject data) {
-        Integer pageNo = data.getInteger("pageNo");
-        if(null == pageNo||pageNo == 0){
-            pageNo = 1;
-        }
-        Integer pageSize = data.getInteger("pageSize");
-        if(null == pageSize||pageSize == 0){
-            pageSize = 10;
-        }
-        Integer appId = data.getInteger("appId");
-        if(null == appId||appId == 0){
-            appId = null;
-        }
-        List<Long>projectIds = null;
-        List<String>accountNames = null;
-        JSONArray accountNameArray = data.getJSONArray("accountName");
-        JSONArray projectIdArray = data.getJSONArray("projectId");
-        if(null!=accountNameArray&&!accountNameArray.isEmpty()){
-            accountNames = new ArrayList<>();
-            for(int i=0;i<accountNameArray.size();i++){
-                accountNames.add(accountNameArray.getString(i));
-            }
-        }
-        if(null!=projectIdArray&&!projectIdArray.isEmpty()){
-            projectIds = new ArrayList<>();
-            for(int i=0;i<projectIdArray.size();i++){
-                projectIds.add(projectIdArray.getLong(i));
-            }
-        }
-        String startDate = data.getString("startDate");
-        String endDate = data.getString("endDate");
-        String operateSystem = data.getString("operateSystem");
-        if(null!=operateSystem&& "all".equals(operateSystem.trim())){
-            operateSystem = null;
-        }
-        PageHelper.startPage(pageNo,pageSize);
-        List<PangolinReportAppMonthVO> list = pangolinReportBillMonthMapper.checkAppList(appId,userId,startDate,endDate,operateSystem,projectIds,accountNames);
-        PageInfo<PangolinReportAppMonthVO> pageInfo = new PageInfo<>(list);
-        return pageInfo;
-    }
-}

+ 0 - 86
jeecg-boot-module-system/src/main/java/cn/com/ctop/crawler/modules/pangolin/service/impl/PangolinReportChannelDailyServiceImpl.java

@@ -1,86 +0,0 @@
-package cn.com.ctop.crawler.modules.pangolin.service.impl;
-
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import cn.com.ctop.crawler.modules.pangolin.entity.PangolinReportChannelDaily;
-import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinReportChannelDailyMapper;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinReportChannelDailyService;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class PangolinReportChannelDailyServiceImpl extends ServiceImpl<PangolinReportChannelDailyMapper, PangolinReportChannelDaily> implements PangolinReportChannelDailyService {
-    @Autowired
-    private PangolinReportChannelDailyMapper pangolinReportChannelDailyMapper;
-
-    @Override
-    public Map<String, Object>  getActivationList(String userId, JSONObject data) {
-        Map<String, Object> result = new HashMap<>();
-        Integer pageNo = data.getInteger("pageNo");
-        if(null == pageNo||pageNo == 0){
-            pageNo = 1;
-        }
-        Integer pageSize = data.getInteger("pageSize");
-        if(null == pageSize||pageSize == 0){
-            pageSize = 10;
-        }
-        String operateSystem = data.getString("operateSystem");
-        if(null!=operateSystem&& "all".equals(operateSystem.trim())){
-            operateSystem = null;
-        }
-        Integer appId = data.getInteger("appId");
-        if(null == appId||appId == 0){
-            appId = null;
-        }
-        List<Long>projectIds = null;
-        List<String>accountNames = null;
-        JSONArray accountNameArray = data.getJSONArray("accountName");
-        JSONArray projectIdArray = data.getJSONArray("projectId");
-        if(null!=accountNameArray&&!accountNameArray.isEmpty()){
-            accountNames = new ArrayList<>();
-            for(int i=0;i<accountNameArray.size();i++){
-                accountNames.add(accountNameArray.getString(i));
-            }
-        }
-        if(null!=projectIdArray&&!projectIdArray.isEmpty()){
-            projectIds = new ArrayList<>();
-            for(int i=0;i<projectIdArray.size();i++){
-                projectIds.add(projectIdArray.getLong(i));
-            }
-        }
-        String startDate = data.getString("startDate");
-        String endDate = data.getString("endDate");
-        PageHelper.startPage(pageNo,pageSize);
-        List<PangolinReportChannelDaily> dailyList = pangolinReportChannelDailyMapper.getActivationList(appId,startDate, endDate, userId, operateSystem,projectIds,accountNames);
-        PageInfo<PangolinReportChannelDaily> pageInfo = new PageInfo<>(dailyList);
-        result.put("data", pageInfo);
-        Integer totalActive = pangolinReportChannelDailyMapper.sumAppList(appId,startDate,endDate,userId,operateSystem,projectIds,accountNames);
-        Long totalDays = 1L;
-        if(!startDate.equals(endDate)){
-            totalDays = DateUtils.getDiscrepantDays(startDate,endDate)+1;
-        }
-        if(null == totalActive){
-            result.put("totalActive","-");
-            result.put("avgActive","-");
-        }else if(0 == totalActive){
-            result.put("totalActive","0");
-            result.put("avgActive","0");
-        }else{
-            result.put("totalActive",totalActive+"");
-            result.put("avgActive",totalActive/totalDays+"");
-        }
-        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        return result;
-    }
-}

+ 0 - 19
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/job/KuaishouAgentAccountJob.java

@@ -1,19 +0,0 @@
-package cn.com.ctop.kuaishou.modules.report.job;
-import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class KuaishouAgentAccountJob implements Job {
-
-    @Autowired
-    private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        int currentPage = 1;
-        while (kuaishouReportDailyAgentService.getAccount(currentPage)){
-            currentPage++;
-        }
-    }
-}

+ 0 - 21
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/job/KuaishouReportAgentJob.java

@@ -1,21 +0,0 @@
-package cn.com.ctop.kuaishou.modules.report.job;
-
-import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-
-public class KuaishouReportAgentJob implements Job {
-
-    @Autowired
-    private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-1));
-        kuaishouReportDailyAgentService.getReport(currentDate,DateUtils.getNowDate("yyyy-MM-dd"));
-    }
-}

+ 0 - 20
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/edu/job/BytedanceEduJob.java

@@ -1,20 +0,0 @@
-package cn.com.ctop.manage.modules.edu.job;
-
-import cn.com.ctop.manage.modules.edu.service.IEduLessonService;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class BytedanceEduJob implements Job {
-    @Autowired
-    private IEduLessonService eduLessonService;
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String url = "https://school.oceanengine.com/academy/v2/course/learning_path_json/";
-        for(int i = 1; i <=7;i++){
-            eduLessonService.getBytedanceEduLesson(url+i);
-        }
-
-    }
-}

+ 0 - 21
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/edu/job/KuaishouEduJob.java

@@ -1,21 +0,0 @@
-package cn.com.ctop.manage.modules.edu.job;
-
-import cn.com.ctop.manage.modules.edu.entity.EduLesson;
-import cn.com.ctop.manage.modules.edu.service.IEduLessonService;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class KuaishouEduJob implements Job {
-    @Autowired
-    private IEduLessonService eduLessonService;
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String url = "https://daxue.kuaishou.com/api/commercial/path/course/list/";
-        for(int i=9;i<=11;i++){
-            eduLessonService.getKuaishouEduLesson(url+i);
-        }
-
-    }
-}

+ 8 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/config/jimureport/JimuReportTokenService.java

@@ -1,15 +1,17 @@
 package org.jeecg.config.jimureport;
 
-import org.jeecg.common.constant.DataBaseConstant;
-import org.jeecg.common.system.api.ISysBaseAPI;
+import cn.com.ctop.common.module.utils.SpringUtils;
+import org.jeecg.common.system.api.ISysBaseApi;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.SysUserCacheInfo;
 import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.SpringContextUtils;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
@@ -21,10 +23,9 @@ import java.util.Map;
  *  * 2.自定义获取登录用户
  */
 @Component
+@Service
 public class JimuReportTokenService implements JmReportTokenServiceI {
     @Autowired
-    private ISysBaseAPI sysBaseAPI;
-    @Autowired
     @Lazy
     private RedisUtil redisUtil;
 
@@ -40,14 +41,15 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
 
     @Override
     public Boolean verifyToken(String token) {
-        return TokenUtils.verifyToken(token, sysBaseAPI, redisUtil);
+        return TokenUtils.verifyToken(token, SpringContextUtils.getBean(ISysBaseApi.class), redisUtil);
     }
 
     @Override
     public Map<String, Object> getUserInfo(String token) {
         String username = JwtUtil.getUsername(token);
+        ISysBaseApi sysBaseApi = SpringContextUtils.getBean(ISysBaseApi.class);
         //此处通过token只能拿到一个信息 用户账号  后面的就是根据账号获取其他信息 查询数据或是走redis 用户根据自身业务可自定义
-        SysUserCacheInfo userInfo = sysBaseAPI.getCacheUser(username);
+        SysUserCacheInfo userInfo = sysBaseApi.getCacheUser(username);
         Map<String, Object> map = new HashMap<String, Object>();
         //设置账号名
         map.put(SYS_USER_CODE, userInfo.getSysUserCode());

+ 0 - 375
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/CommonController.java

@@ -1,375 +0,0 @@
-package org.jeecg.modules.ads.controller;
-
-import cn.com.ctop.common.module.utils.TokenUtils;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.util.CommonUtils;
-import org.jeecg.common.util.RestUtil;
-import org.jeecg.common.util.oConvertUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.server.ServletServerHttpRequest;
-import org.springframework.util.AntPathMatcher;
-import org.springframework.util.FileCopyUtils;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.HandlerMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.*;
-import java.net.URLDecoder;
-
-/**
- * <p>
- * 用户表 前端控制器
- * </p>
- *
- * @Author scott
- * @since 2018-12-20
- */
-@Slf4j
-@RestController
-@RequestMapping("/sys/common")
-public class CommonController {
-	@Value(value = "${jeecg.path.upload}")
-	private String uploadpath;
-
-	/**
-	 * 本地:local minio:minio 阿里:alioss
-	 */
-	@Value(value="${jeecg.uploadType}")
-	private String uploadType;
-
-	/**
-	 * @Author 政辉
-	 * @return
-	 */
-	@GetMapping("/403")
-	public Result<?> noauth()  {
-		return Result.error("没有权限,请联系管理员授权");
-	}
-
-	/**
-	 * 文件上传统一方法
-	 * @param request
-	 * @param response
-	 * @return
-	 */
-	@PostMapping(value = "/upload")
-	public Result<?> upload(HttpServletRequest request, HttpServletResponse response) {
-		Result<?> result = new Result<>();
-		String savePath = "";
-		String bizPath = request.getParameter("biz");
-		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-		MultipartFile file = multipartRequest.getFile("file");// 获取上传文件对象
-		if(oConvertUtils.isEmpty(bizPath)){
-			if(CommonConstant.UPLOAD_TYPE_OSS.equals(uploadType)){
-				//未指定目录,则用阿里云默认目录 upload
-				bizPath = "upload";
-				//result.setMessage("使用阿里云文件上传时,必须添加目录!");
-				//result.setSuccess(false);
-				//return result;
-			}else{
-				bizPath = "";
-			}
-		}
-		if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)){
-			//针对jeditor编辑器如何使 lcaol模式,采用 base64格式存储
-			String jeditor = request.getParameter("jeditor");
-			if(oConvertUtils.isNotEmpty(jeditor)){
-				result.setMessage(CommonConstant.UPLOAD_TYPE_LOCAL);
-				result.setSuccess(true);
-				return result;
-			}else{
-				savePath = this.uploadLocal(file,bizPath);
-			}
-		}else{
-//			savePath = sysBaseApi.upload(file,bizPath,uploadType);
-		}
-		if(oConvertUtils.isNotEmpty(savePath)){
-			result.setMessage(savePath);
-			result.setSuccess(true);
-		}else {
-			result.setMessage("上传失败!");
-			result.setSuccess(false);
-		}
-		return result;
-	}
-
-	/**
-	 * 本地文件上传
-	 * @param mf 文件
-	 * @param bizPath  自定义路径
-	 * @return
-	 */
-	private String uploadLocal(MultipartFile mf,String bizPath){
-		try {
-			String ctxPath = uploadpath;
-			String fileName = null;
-			File file = new File(ctxPath + File.separator + bizPath + File.separator );
-			if (!file.exists()) {
-				file.mkdirs();// 创建文件根目录
-			}
-			String orgName = mf.getOriginalFilename();// 获取文件名
-			orgName = CommonUtils.getFileName(orgName);
-			if(orgName.indexOf(".")!=-1){
-				fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf("."));
-			}else{
-				fileName = orgName+ "_" + System.currentTimeMillis();
-			}
-			String savePath = file.getPath() + File.separator + fileName;
-			File savefile = new File(savePath);
-			FileCopyUtils.copy(mf.getBytes(), savefile);
-			String dbpath = null;
-			if(oConvertUtils.isNotEmpty(bizPath)){
-				dbpath = bizPath + File.separator + fileName;
-			}else{
-				dbpath = fileName;
-			}
-			if (dbpath.contains("\\")) {
-				dbpath = dbpath.replace("\\", "/");
-			}
-			return dbpath;
-		} catch (IOException e) {
-			log.error(e.getMessage(), e);
-		}
-		return "";
-	}
-
-//	@PostMapping(value = "/upload2")
-//	public Result<?> upload2(HttpServletRequest request, HttpServletResponse response) {
-//		Result<?> result = new Result<>();
-//		try {
-//			String ctxPath = uploadpath;
-//			String fileName = null;
-//			String bizPath = "files";
-//			String tempBizPath = request.getParameter("biz");
-//			if(oConvertUtils.isNotEmpty(tempBizPath)){
-//				bizPath = tempBizPath;
-//			}
-//			String nowday = new SimpleDateFormat("yyyyMMdd").format(new Date());
-//			File file = new File(ctxPath + File.separator + bizPath + File.separator + nowday);
-//			if (!file.exists()) {
-//				file.mkdirs();// 创建文件根目录
-//			}
-//			MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-//			MultipartFile mf = multipartRequest.getFile("file");// 获取上传文件对象
-//			String orgName = mf.getOriginalFilename();// 获取文件名
-//			fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf("."));
-//			String savePath = file.getPath() + File.separator + fileName;
-//			File savefile = new File(savePath);
-//			FileCopyUtils.copy(mf.getBytes(), savefile);
-//			String dbpath = bizPath + File.separator + nowday + File.separator + fileName;
-//			if (dbpath.contains("\\")) {
-//				dbpath = dbpath.replace("\\", "/");
-//			}
-//			result.setMessage(dbpath);
-//			result.setSuccess(true);
-//		} catch (IOException e) {
-//			result.setSuccess(false);
-//			result.setMessage(e.getMessage());
-//			log.error(e.getMessage(), e);
-//		}
-//		return result;
-//	}
-
-	/**
-	 * 预览图片&下载文件
-	 * 请求地址:http://localhost:8080/common/static/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
-	 *
-	 * @param request
-	 * @param response
-	 */
-	@GetMapping(value = "/static/**")
-	public void view(HttpServletRequest request, HttpServletResponse response) {
-		// ISO-8859-1 ==> UTF-8 进行编码转换
-		String imgPath = extractPathFromPattern(request);
-		if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
-			return;
-		}
-		// 其余处理略
-		InputStream inputStream = null;
-		OutputStream outputStream = null;
-		try {
-			imgPath = imgPath.replace("..", "");
-			if (imgPath.endsWith(",")) {
-				imgPath = imgPath.substring(0, imgPath.length() - 1);
-			}
-			String filePath = uploadpath + File.separator + imgPath;
-			File file = new File(filePath);
-			if(!file.exists()){
-				response.setStatus(404);
-				throw new RuntimeException("文件不存在..");
-			}
-			response.setContentType("application/force-download");// 设置强制下载不打开
-			response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
-			inputStream = new BufferedInputStream(new FileInputStream(filePath));
-			outputStream = response.getOutputStream();
-			byte[] buf = new byte[1024];
-			int len;
-			while ((len = inputStream.read(buf)) > 0) {
-				outputStream.write(buf, 0, len);
-			}
-			response.flushBuffer();
-		} catch (IOException e) {
-			log.error("预览文件失败" + e.getMessage());
-			response.setStatus(404);
-			e.printStackTrace();
-		} finally {
-			if (inputStream != null) {
-				try {
-					inputStream.close();
-				} catch (IOException e) {
-					log.error(e.getMessage(), e);
-				}
-			}
-			if (outputStream != null) {
-				try {
-					outputStream.close();
-				} catch (IOException e) {
-					log.error(e.getMessage(), e);
-				}
-			}
-		}
-
-	}
-
-//	/**
-//	 * 下载文件
-//	 * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
-//	 *
-//	 * @param request
-//	 * @param response
-//	 * @throws Exception
-//	 */
-//	@GetMapping(value = "/download/**")
-//	public void download(HttpServletRequest request, HttpServletResponse response) throws Exception {
-//		// ISO-8859-1 ==> UTF-8 进行编码转换
-//		String filePath = extractPathFromPattern(request);
-//		// 其余处理略
-//		InputStream inputStream = null;
-//		OutputStream outputStream = null;
-//		try {
-//			filePath = filePath.replace("..", "");
-//			if (filePath.endsWith(",")) {
-//				filePath = filePath.substring(0, filePath.length() - 1);
-//			}
-//			String localPath = uploadpath;
-//			String downloadFilePath = localPath + File.separator + filePath;
-//			File file = new File(downloadFilePath);
-//	         if (file.exists()) {
-//	         	response.setContentType("application/force-download");// 设置强制下载不打开            
-//	 			response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
-//	 			inputStream = new BufferedInputStream(new FileInputStream(file));
-//	 			outputStream = response.getOutputStream();
-//	 			byte[] buf = new byte[1024];
-//	 			int len;
-//	 			while ((len = inputStream.read(buf)) > 0) {
-//	 				outputStream.write(buf, 0, len);
-//	 			}
-//	 			response.flushBuffer();
-//	         }
-//
-//		} catch (Exception e) {
-//			log.info("文件下载失败" + e.getMessage());
-//			// e.printStackTrace();
-//		} finally {
-//			if (inputStream != null) {
-//				try {
-//					inputStream.close();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//			}
-//			if (outputStream != null) {
-//				try {
-//					outputStream.close();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//			}
-//		}
-//
-//	}
-
-	/**
-	 * @功能:pdf预览Iframe
-	 * @param modelAndView
-	 * @return
-	 */
-	@RequestMapping("/pdf/pdfPreviewIframe")
-	public ModelAndView pdfPreviewIframe(ModelAndView modelAndView) {
-		modelAndView.setViewName("pdfPreviewIframe");
-		return modelAndView;
-	}
-
-	/**
-	  *  把指定URL后的字符串全部截断当成参数
-	  *  这么做是为了防止URL中包含中文或者特殊字符(/等)时,匹配不了的问题
-	 * @param request
-	 * @return
-	 */
-	private static String extractPathFromPattern(final HttpServletRequest request) {
-		String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
-		String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
-		return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
-	}
-
-    /**
-     * 中转HTTP请求,解决跨域问题
-     *
-     * @param url 必填:请求地址
-     * @return
-     */
-    @RequestMapping("/transitRESTful")
-    public Result transitRESTful(@RequestParam("url") String url, HttpServletRequest request) {
-        try {
-            ServletServerHttpRequest httpRequest = new ServletServerHttpRequest(request);
-            // 中转请求method、body
-            HttpMethod method = httpRequest.getMethod();
-            JSONObject params;
-            try {
-                params = JSON.parseObject(JSON.toJSONString(httpRequest.getBody()));
-            } catch (Exception e) {
-                params = new JSONObject();
-            }
-            // 中转请求问号参数
-            JSONObject variables = JSON.parseObject(JSON.toJSONString(request.getParameterMap()));
-            variables.remove("url");
-            // 在 headers 里传递Token
-            String token = TokenUtils.getTokenByRequest(request);
-            HttpHeaders headers = new HttpHeaders();
-            headers.set("X-Access-Token", token);
-            // 发送请求
-            String httpURL = URLDecoder.decode(url, "UTF-8");
-            ResponseEntity<String> response = RestUtil.request(httpURL, method, headers , variables, params, String.class);
-            // 封装返回结果
-            Result<Object> result = new Result<>();
-            int statusCode = response.getStatusCodeValue();
-            result.setCode(statusCode);
-            result.setSuccess(statusCode == 200);
-            String responseBody = response.getBody();
-            try {
-                // 尝试将返回结果转为JSON
-                Object json = JSON.parse(responseBody);
-                result.setResult(json);
-            } catch (Exception e) {
-                // 转成JSON失败,直接返回原始数据
-                result.setResult(responseBody);
-            }
-            return result;
-        } catch (Exception e) {
-            log.debug("中转HTTP请求失败", e);
-            return Result.error(e.getMessage());
-        }
-    }
-
-}

+ 0 - 535
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/controller/SystemAPIController.java

@@ -1,535 +0,0 @@
-package org.jeecg.modules.api.controller;
-
-import cn.com.ctop.common.module.service.ISysUserService;
-import com.alibaba.fastjson.JSONObject;
-import org.jeecg.common.api.dto.message.*;
-import org.jeecg.common.api.dto.OnlineAuthDTO;
-import org.jeecg.common.system.api.ISysBaseAPI;
-import org.jeecg.common.system.vo.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * 服务化 system模块 对外接口请求类
- */
-@RestController
-@RequestMapping("/sys/api")
-public class SystemAPIController {
-
-    @Autowired
-    private ISysBaseAPI sysBaseAPI;
-
-    @Autowired
-    private ISysUserService sysUserService;
-
-
-    /**
-     * 发送系统消息
-     * @param message 使用构造器赋值参数 如果不设置category(消息类型)则默认为2 发送系统消息
-     */
-    @PostMapping("/sendSysAnnouncement")
-    public void sendSysAnnouncement(@RequestBody MessageDTO message){
-        sysBaseAPI.sendSysAnnouncement(message);
-    }
-
-    /**
-     * 发送消息 附带业务参数
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sendBusAnnouncement")
-    public void sendBusAnnouncement(@RequestBody BusMessageDTO message){
-        sysBaseAPI.sendBusAnnouncement(message);
-    }
-
-    /**
-     * 通过模板发送消息
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sendTemplateAnnouncement")
-    public void sendTemplateAnnouncement(@RequestBody TemplateMessageDTO message){
-        sysBaseAPI.sendTemplateAnnouncement(message);
-    }
-
-    /**
-     * 通过模板发送消息 附带业务参数
-     * @param message 使用构造器赋值参数
-     */
-    @PostMapping("/sendBusTemplateAnnouncement")
-    public void sendBusTemplateAnnouncement(@RequestBody BusTemplateMessageDTO message){
-        sysBaseAPI.sendBusTemplateAnnouncement(message);
-    }
-
-    /**
-     * 通过消息中心模板,生成推送内容
-     * @param templateDTO 使用构造器赋值参数
-     * @return
-     */
-    @PostMapping("/parseTemplateByCode")
-    public String parseTemplateByCode(@RequestBody TemplateDTO templateDTO){
-        return sysBaseAPI.parseTemplateByCode(templateDTO);
-    }
-
-    /**
-     * 根据业务类型busType及业务busId修改消息已读
-     */
-    @GetMapping("/updateSysAnnounReadFlag")
-    public void updateSysAnnounReadFlag(@RequestParam("busType") String busType, @RequestParam("busId")String busId){
-        sysBaseAPI.updateSysAnnounReadFlag(busType, busId);
-    }
-
-    /**
-     * 根据用户账号查询用户信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/getUserByName")
-    public LoginUser getUserByName(@RequestParam("username") String username){
-        return sysBaseAPI.getUserByName(username);
-    }
-
-    /**
-     * 根据用户id查询用户信息
-     * @param id
-     * @return
-     */
-    @GetMapping("/getUserById")
-    LoginUser getUserById(@RequestParam("id") String id){
-        return sysBaseAPI.getUserById(id);
-    }
-
-    /**
-     * 通过用户账号查询角色集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/getRolesByUsername")
-    List<String> getRolesByUsername(@RequestParam("username") String username){
-        return sysBaseAPI.getRolesByUsername(username);
-    }
-
-    /**
-     * 通过用户账号查询部门集合
-     * @param username
-     * @return 部门 id
-     */
-    @GetMapping("/getDepartIdsByUsername")
-    List<String> getDepartIdsByUsername(@RequestParam("username") String username){
-        return sysBaseAPI.getDepartIdsByUsername(username);
-    }
-
-    /**
-     * 通过用户账号查询部门 name
-     * @param username
-     * @return 部门 name
-     */
-    @GetMapping("/getDepartNamesByUsername")
-    List<String> getDepartNamesByUsername(@RequestParam("username") String username){
-        return sysBaseAPI.getDepartNamesByUsername(username);
-    }
-
-
-    /**
-     * 获取数据字典
-     * @param code
-     * @return
-     */
-    @GetMapping("/queryDictItemsByCode")
-    List<DictModel> queryDictItemsByCode(@RequestParam("code") String code){
-        return sysBaseAPI.queryDictItemsByCode(code);
-    }
-
-    /** 查询所有的父级字典,按照create_time排序 */
-    @GetMapping("/queryAllDict")
-    List<DictModel> queryAllDict(){
-        return sysBaseAPI.queryAllDict();
-    }
-
-    /**
-     * 查询所有分类字典
-     * @return
-     */
-    @GetMapping("/queryAllDSysCategory")
-    List<SysCategoryModel> queryAllDSysCategory(){
-        return sysBaseAPI.queryAllDSysCategory();
-    }
-
-    /**
-     * 获取表数据字典
-     * @param table
-     * @param text
-     * @param code
-     * @return
-     */
-    @GetMapping("/queryTableDictItemsByCode")
-    List<DictModel> queryTableDictItemsByCode(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code){
-        return sysBaseAPI.queryTableDictItemsByCode(table, text, code);
-    }
-
-    /**
-     * 查询所有部门 作为字典信息 id -->value,departName -->text
-     * @return
-     */
-    @GetMapping("/queryAllDepartBackDictModel")
-    List<DictModel> queryAllDepartBackDictModel(){
-        return sysBaseAPI.queryAllDepartBackDictModel();
-    }
-
-
-    /**
-     * 查询表字典 支持过滤数据
-     * @param table
-     * @param text
-     * @param code
-     * @param filterSql
-     * @return
-     */
-    @GetMapping("/queryFilterTableDictInfo")
-    List<DictModel> queryFilterTableDictInfo(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("filterSql") String filterSql){
-        return sysBaseAPI.queryFilterTableDictInfo(table, text, code, filterSql);
-    }
-
-    /**
-     * 查询指定table的 text code 获取字典,包含text和value
-     * @param table
-     * @param text
-     * @param code
-     * @param keyArray
-     * @return
-     */
-    @Deprecated
-    @GetMapping("/queryTableDictByKeys")
-    public List<String> queryTableDictByKeys(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("keyArray") String[] keyArray){
-        return sysBaseAPI.queryTableDictByKeys(table, text, code, keyArray);
-    }
-
-    /**
-     * 获取所有角色 带参
-     * roleIds 默认选中角色
-     * @return
-     */
-    @GetMapping("/queryAllRole")
-    public List<ComboModel> queryAllRole(@RequestParam(name = "roleIds",required = false)String[] roleIds){
-        if(roleIds==null || roleIds.length==0){
-            return sysBaseAPI.queryAllRole();
-        }else{
-            return sysBaseAPI.queryAllRole(roleIds);
-        }
-    }
-
-    /**
-     * 通过用户账号查询角色Id集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/getRoleIdsByUsername")
-    public List<String> getRoleIdsByUsername(@RequestParam("username")String username){
-        return sysBaseAPI.getRoleIdsByUsername(username);
-    }
-
-    /**
-     * 通过部门编号查询部门id
-     * @param orgCode
-     * @return
-     */
-    @GetMapping("/getDepartIdsByOrgCode")
-    public String getDepartIdsByOrgCode(@RequestParam("orgCode")String orgCode){
-        return sysBaseAPI.getDepartIdsByOrgCode(orgCode);
-    }
-
-    /**
-     * 查询所有部门
-     * @return
-     */
-    @GetMapping("/getAllSysDepart")
-    public List<SysDepartModel> getAllSysDepart(){
-        return sysBaseAPI.getAllSysDepart();
-    }
-
-    /**
-     * 根据 id 查询数据库中存储的 DynamicDataSourceModel
-     *
-     * @param dbSourceId
-     * @return
-     */
-    @GetMapping("/getDynamicDbSourceById")
-    DynamicDataSourceModel getDynamicDbSourceById(@RequestParam("dbSourceId")String dbSourceId){
-        return sysBaseAPI.getDynamicDbSourceById(dbSourceId);
-    }
-
-
-
-    /**
-     * 根据部门Id获取部门负责人
-     * @param deptId
-     * @return
-     */
-    @GetMapping("/getDeptHeadByDepId")
-    public List<String> getDeptHeadByDepId(@RequestParam("deptId") String deptId){
-        return sysBaseAPI.getDeptHeadByDepId(deptId);
-    }
-
-    /**
-     * 查找父级部门
-     * @param departId
-     * @return
-     */
-    @GetMapping("/getParentDepartId")
-    public DictModel getParentDepartId(@RequestParam("departId")String departId){
-        return sysBaseAPI.getParentDepartId(departId);
-    }
-
-    /**
-     * 根据 code 查询数据库中存储的 DynamicDataSourceModel
-     *
-     * @param dbSourceCode
-     * @return
-     */
-    @GetMapping("/getDynamicDbSourceByCode")
-    public DynamicDataSourceModel getDynamicDbSourceByCode(@RequestParam("dbSourceCode") String dbSourceCode){
-        return sysBaseAPI.getDynamicDbSourceByCode(dbSourceCode);
-    }
-
-    /**
-     * 给指定用户发消息
-     * @param userIds
-     * @param cmd
-     */
-    @GetMapping("/sendWebSocketMsg")
-    public void sendWebSocketMsg(String[] userIds, String cmd){
-        sysBaseAPI.sendWebSocketMsg(userIds, cmd);
-    }
-
-
-    /**
-     * 根据id获取所有参与用户
-     * userIds
-     * @return
-     */
-    @GetMapping("/queryAllUserByIds")
-    public List<LoginUser> queryAllUserByIds(@RequestParam("userIds") String[] userIds){
-        return sysBaseAPI.queryAllUserByIds(userIds);
-    }
-
-    /**
-     * 查询所有用户 返回ComboModel
-     * @return
-     */
-    @GetMapping("/queryAllUserBackCombo")
-    public List<ComboModel> queryAllUserBackCombo(){
-        return sysBaseAPI.queryAllUserBackCombo();
-    }
-
-    /**
-     * 分页查询用户 返回JSONObject
-     * @return
-     */
-    @GetMapping("/queryAllUser")
-    public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize){
-        return sysBaseAPI.queryAllUser(userIds, pageNo, pageSize);
-    }
-
-
-
-    /**
-     * 将会议签到信息推动到预览
-     * userIds
-     * @return
-     * @param userId
-     */
-    @GetMapping("/meetingSignWebsocket")
-    public void meetingSignWebsocket(@RequestParam("userId")String userId){
-        sysBaseAPI.meetingSignWebsocket(userId);
-    }
-
-    /**
-     * 根据name获取所有参与用户
-     * userNames
-     * @return
-     */
-    @GetMapping("/queryUserByNames")
-    public List<LoginUser> queryUserByNames(@RequestParam("userNames")String[] userNames){
-        return sysBaseAPI.queryUserByNames(userNames);
-    }
-
-    /**
-     * 获取用户的角色集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/getUserRoleSet")
-    public Set<String> getUserRoleSet(@RequestParam("username")String username){
-        return sysBaseAPI.getUserRoleSet(username);
-    }
-
-    /**
-     * 获取用户的权限集合
-     * @param username
-     * @return
-     */
-    @GetMapping("/getUserPermissionSet")
-    public Set<String> getUserPermissionSet(@RequestParam("username") String username){
-        return sysBaseAPI.getUserPermissionSet(username);
-    }
-
-    //-----
-
-    /**
-     * 判断是否有online访问的权限
-     * @param onlineAuthDTO
-     * @return
-     */
-    @PostMapping("/hasOnlineAuth")
-    public boolean hasOnlineAuth(@RequestBody OnlineAuthDTO onlineAuthDTO){
-        return sysBaseAPI.hasOnlineAuth(onlineAuthDTO);
-    }
-
-    /**
-     * 查询用户角色信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/queryUserRoles")
-    public Set<String> queryUserRoles(@RequestParam("username") String username){
-        return sysUserService.getUserRolesSet(username);
-    }
-
-
-    /**
-     * 查询用户权限信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/queryUserAuths")
-    public Set<String> queryUserAuths(@RequestParam("username") String username){
-        return sysUserService.getUserPermissionsSet(username);
-    }
-
-    /**
-     * 通过部门id获取部门全部信息
-     */
-    @GetMapping("/selectAllById")
-    public SysDepartModel selectAllById(@RequestParam("id") String id){
-        return sysBaseAPI.selectAllById(id);
-    }
-
-    /**
-     * 根据用户id查询用户所属公司下所有用户ids
-     * @param userId
-     * @return
-     */
-    @GetMapping("/queryDeptUsersByUserId")
-    public List<String> queryDeptUsersByUserId(@RequestParam("userId") String userId){
-        return sysBaseAPI.queryDeptUsersByUserId(userId);
-    }
-
-
-    /**
-     * 查询数据权限
-     * @return
-     */
-    @GetMapping("/queryPermissionDataRule")
-    public List<SysPermissionDataRuleModel> queryPermissionDataRule(@RequestParam("component") String component, @RequestParam("requestPath")String requestPath, @RequestParam("username") String username){
-        return sysBaseAPI.queryPermissionDataRule(component, requestPath, username);
-    }
-
-    /**
-     * 查询用户信息
-     * @param username
-     * @return
-     */
-    @GetMapping("/getCacheUser")
-    public SysUserCacheInfo getCacheUser(@RequestParam("username") String username){
-        return sysBaseAPI.getCacheUser(username);
-    }
-
-    /**
-     * 字典表的 翻译
-     * @param table
-     * @param text
-     * @param code
-     * @param key
-     * @return
-     */
-    @GetMapping("/translateDictFromTable")
-    public String translateDictFromTable(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("key") String key){
-//        return sysBaseAPI.translateDictFromTable(table, text, code, key);
-        return null;
-    }
-
-    /**
-     * 普通字典的翻译
-     * @param code
-     * @param key
-     * @return
-     */
-    @GetMapping("/translateDict")
-    public String translateDict(@RequestParam("code") String code, @RequestParam("key") String key){
-//        return sysBaseAPI.translateDict(code, key);
-        return null;
-    }
-
-
-    /**
-     * 36根据多个用户账号(逗号分隔),查询返回多个用户信息
-     * @param usernames
-     * @return
-     */
-    @GetMapping("/queryUsersByUsernames")
-    List<JSONObject> queryUsersByUsernames(String usernames){
-        return this.sysBaseAPI.queryUsersByUsernames(usernames);
-    }
-
-    /**
-     * 37根据多个用户id(逗号分隔),查询返回多个用户信息
-     * @param ids
-     * @return
-     */
-    @GetMapping("/queryUsersByIds")
-    List<JSONObject> queryUsersByIds(String ids){
-        return this.sysBaseAPI.queryUsersByIds(ids);
-    }
-
-    /**
-     * 38根据多个部门编码(逗号分隔),查询返回多个部门信息
-     * @param orgCodes
-     * @return
-     */
-    @GetMapping("/queryDepartsByOrgcodes")
-    List<JSONObject> queryDepartsByOrgcodes(String orgCodes){
-        return this.sysBaseAPI.queryDepartsByOrgcodes(orgCodes);
-    }
-
-    /**
-     * 39根据多个部门ID(逗号分隔),查询返回多个部门信息
-     * @param orgCodes
-     * @return
-     */
-    @GetMapping("/queryDepartsByIds")
-    List<JSONObject> queryDepartsByIds(String orgCodes){
-        return this.sysBaseAPI.queryDepartsByIds(orgCodes);
-    }
-
-    /**
-     * 40发送邮件消息
-     * @param email
-     * @param title
-     * @param content
-     */
-    @GetMapping("/sendEmailMsg")
-    public void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content){
-         this.sysBaseAPI.sendEmailMsg(email,title,content);
-    };
-    /**
-     * 41 获取公司下级部门和公司下所有用户信息
-     * @param orgCode
-     */
-    @GetMapping("/getDeptUserByOrgCode")
-    List<Map> getDeptUserByOrgCode(@RequestParam("orgCode")String orgCode){
-       return this.sysBaseAPI.getDeptUserByOrgCode(orgCode);
-    }
-}

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

@@ -1,126 +0,0 @@
-package org.jeecg.modules.ctop.controller;
-
-import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
-import cn.com.ctop.common.module.service.ISysRoleExtService;
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import cn.com.ctop.common.module.vo.PangolinReportAppMonthVO;
-import cn.com.ctop.crawler.modules.pangolin.service.*;
-import com.alibaba.fastjson.JSONObject;
-import com.github.pagehelper.PageInfo;
-import org.apache.shiro.SecurityUtils;
-import org.jeecg.common.system.vo.LoginUser;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@RestController
-@RequestMapping("pangolin")
-public class PangolinController {
-    @Autowired
-    private PangolinReportAppHourService pangolinReportAppHourService;
-    @Autowired
-    private PangolinReportChannelDailyService pangolinReportChannelDailyService;
-    @Autowired
-    private PangolinReportBillMonthService pangolinReportBillMonthService;
-    @Autowired
-    private PangolinAppService pangolinAppService;
-    @Autowired
-    private PangolinChannelService pangolinChannelService;
-    @Autowired
-    private ISysRoleExtService sysRoleService;
-
-    @PostMapping("api/channel/list")
-    public Map<String, Object> channelList(@RequestBody JSONObject data) {
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String userId = user.getId();
-        String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-        if(null!=roleCode&&(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN))){
-            userId = null;
-        }
-        return pangolinChannelService.getListByUserId(userId);
-    }
-
-    @PostMapping("api/app/list")
-    public Map<String, Object> appList(@RequestBody JSONObject data) {
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String userId = user.getId();
-        String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-        if(null!=roleCode&&(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN))){
-            userId = null;
-        }
-        return pangolinAppService.getListByUserId(userId,data);
-    }
-
-
-    @PostMapping("api/memberList")
-    public Map<String,Object> memberList(){
-        Map<String, Object> resultMap = new HashMap<>();
-        try {
-            LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-            String userId = user.getId();
-            String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-            if (null!=roleCode&&CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode)) {
-                userId = null;
-            }
-            resultMap = pangolinAppService.getMemberList(userId);
-            return resultMap;
-        } catch (Exception e) {
-            ResultMapUtils.setResultMap(resultMap,StatusCode.COMMON_SERVER_ERROR);
-            return resultMap;
-        }
-    }
-
-
-    /**
-     * 实时数据
-     */
-    @PostMapping("api/realtime")
-    public Map<String, Object> realTime(@RequestBody JSONObject data) {
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String userId = user.getId();
-        String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-        if(null!=roleCode&&(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN))){
-            userId = null;
-        }
-        return pangolinReportAppHourService.getRealTimeData(userId,data);
-    }
-
-    /**
-     * 激活统计
-     */
-    @PostMapping("api/activation/list")
-    public Map<String, Object> activationList(@RequestBody JSONObject data) {
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String userId = user.getId();
-        String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-        if(null!=roleCode&&(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN))){
-            userId = null;
-        }
-        return pangolinReportChannelDailyService.getActivationList(userId, data);
-    }
-
-    /**
-     * 对账单
-     */
-    @PostMapping("/api/checkApps/list")
-    public Map<String,Object> checkAppList(@RequestBody JSONObject data) {
-        Map<String,Object> result = new HashMap<>();
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String userId = user.getId();
-        String roleCode = sysRoleService.getRoleCodeByUserId(userId);
-        if(null!=roleCode&&(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN))){
-            userId = null;
-        }
-        PageInfo<PangolinReportAppMonthVO> pageInfo = pangolinReportBillMonthService.checkAppList(userId, data);
-        result.put("data",pageInfo);
-        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        return result;
-    }
-
-}

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

@@ -1,160 +0,0 @@
-package org.jeecg.modules.ctop.controller;
-
-import cn.com.ctop.common.module.message.entity.MsgParams;
-import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
-import cn.com.ctop.common.module.message.service.ISysMessageTemplateService;
-import cn.com.ctop.common.module.message.util.PushMsgUtil;
-import cn.com.ctop.common.module.utils.QueryGenerator;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.modules.ads.controller.JeecgController;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
-import java.util.Map;
-
-/**
- * @Description: 消息模板
- * @Author: jeecg-boot
- * @Sate: 2019-04-09
- * @Version: V1.0
- */
-@Slf4j
-@RestController
-@RequestMapping("/message/sysMessageTemplate")
-public class SysMessageTemplateController extends JeecgController<SysMessageTemplate, ISysMessageTemplateService> {
-	@Autowired
-	private ISysMessageTemplateService sysMessageTemplateService;
-	@Autowired
-	private PushMsgUtil pushMsgUtil;
-
-	/**
-	 * 分页列表查询
-	 *
-	 * @param sysMessageTemplate
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@GetMapping(value = "/list")
-	public Result<?> queryPageList(SysMessageTemplate sysMessageTemplate, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-			@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
-		QueryWrapper<SysMessageTemplate> queryWrapper = QueryGenerator.initQueryWrapper(sysMessageTemplate, req.getParameterMap());
-		Page<SysMessageTemplate> page = new Page<SysMessageTemplate>(pageNo, pageSize);
-		IPage<SysMessageTemplate> pageList = sysMessageTemplateService.page(page, queryWrapper);
-        return Result.ok(pageList);
-	}
-
-	/**
-	 * 添加
-	 *
-	 * @param sysMessageTemplate
-	 * @return
-	 */
-	@PostMapping(value = "/add")
-	public Result<?> add(@RequestBody SysMessageTemplate sysMessageTemplate) {
-		sysMessageTemplateService.save(sysMessageTemplate);
-        return Result.ok("添加成功!");
-	}
-
-	/**
-	 * 编辑
-	 *
-	 * @param sysMessageTemplate
-	 * @return
-	 */
-	@PutMapping(value = "/edit")
-	public Result<?> edit(@RequestBody SysMessageTemplate sysMessageTemplate) {
-		sysMessageTemplateService.updateById(sysMessageTemplate);
-        return Result.ok("更新成功!");
-	}
-
-	/**
-	 * 通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
-		sysMessageTemplateService.removeById(id);
-        return Result.ok("删除成功!");
-	}
-
-	/**
-	 * 批量删除
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-		this.sysMessageTemplateService.removeByIds(Arrays.asList(ids.split(",")));
-        return Result.ok("批量删除成功!");
-	}
-
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	@GetMapping(value = "/queryById")
-	public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
-		SysMessageTemplate sysMessageTemplate = sysMessageTemplateService.getById(id);
-        return Result.ok(sysMessageTemplate);
-	}
-
-	/**
-	 * 导出excel
-	 *
-	 * @param request
-	 */
-	@GetMapping(value = "/exportXls")
-	public ModelAndView exportXls(HttpServletRequest request,SysMessageTemplate sysMessageTemplate) {
-		return super.exportXls(request, sysMessageTemplate, SysMessageTemplate.class,"推送消息模板");
-	}
-
-	/**
-	 * excel导入
-	 *
-	 * @param request
-	 * @param response
-	 * @return
-	 */
-	@PostMapping(value = "/importExcel")
-	public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-		return super.importExcel(request, response, SysMessageTemplate.class);
-	}
-
-	/**
-	 * 发送消息
-	 */
-	@PostMapping(value = "/sendMsg")
-	public Result<SysMessageTemplate> sendMessage(@RequestBody MsgParams msgParams) {
-		Result<SysMessageTemplate> result = new Result<SysMessageTemplate>();
-		Map<String, String> map = null;
-		try {
-			map = (Map<String, String>) JSON.parse(msgParams.getTestData());
-		} catch (Exception e) {
-			result.error500("解析Json出错!");
-			return result;
-		}
-		boolean is_sendSuccess = pushMsgUtil.sendMessage(msgParams.getMsgType(), msgParams.getTemplateCode(), map, msgParams.getReceiver());
-		if (is_sendSuccess) {
-			result.success("发送消息任务添加成功!");
-		} else {
-			result.error500("发送消息任务添加失败!");
-		}
-		return result;
-	}
-}

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

@@ -38,7 +38,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.util.DateUtils;
-import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
@@ -67,8 +66,6 @@ public class TestController {
     @Autowired
     private ICtopOauthTokenService oauthTokenService;
     @Autowired
-    private IMaterialCutFrameService cutFrameService;
-    @Autowired
     IKuaiShouVideoGetService videoGetService;
     @Autowired
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
@@ -1270,7 +1267,7 @@ public class TestController {
 
 
     @GetMapping(value = "/getAppList")
-    public void getAppList() throws JobExecutionException {
+    public void getAppList() {
         try {
             //1:查询当日数据
             QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
@@ -1281,18 +1278,8 @@ public class TestController {
                 log.info("定时获取快手数据异常:未获取到可用的token");
                 return;
             }
-
             tokens.forEach(token -> {
-
                 kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
-                //suzhaoService.submit(new Runnable() {
-                //    @Override
-                //    public void run() {
-                //        //1: 获取广告主信息数据
-                //        log.info("获取素造素材:accountId:{}", token.getAccountId());
-                //        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
-                //    }
-                //});
             });
         } catch (Exception e) {
             e.printStackTrace();

+ 3 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java

@@ -5,8 +5,6 @@ import cn.com.ctop.common.module.mapper.BindAccountLoginMapper;
 import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.crawler.modules.core.util.FateadmHttpUtil;
 import cn.com.ctop.crawler.modules.core.util.FateadmUtil;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinCrawlerService;
-import cn.com.ctop.crawler.modules.pangolin.service.PangolinLoginService;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -23,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -33,12 +32,8 @@ import java.util.*;
 public class CreateInternalServiceImpl implements ICreateInternalService {
     @Value("${jeecg.path.chrome-driver}")
     private String chromeDriver;
-    @Autowired
+    @Resource
     private BindAccountLoginMapper bindAccountLoginMapper;
-    @Autowired
-    private PangolinLoginService pangolinLoginService;
-    @Autowired
-    private PangolinCrawlerService pangolinCrawlerService;
 
     @Override
     public Map<String, Object> bindLogin(Long projectId,String advertiserId, String accountName, String password, String loginType, String userId, String advertiserName) {
@@ -73,20 +68,6 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
         int i = bindAccountLoginMapper.insert(bindAccountLogin);
         if (i > 0) {
             log.info("登录账号绑定成功,广告主id:{}", bindAccountLogin.getAdvertiserId());
-            if(null!=loginType&&loginType.equals(CtopAdConstant.PLATFORM_TYPE_PANGOLIN_PY)){
-                //穿山甲账户绑定
-                Thread thread = new Thread(){
-                    @Override
-                    public void run() {
-                        //1:登录
-                        pangolinLoginService.pangolinLogin(bindAccountLogin.getAccountName(), bindAccountLogin.getPassword());
-                        //2:拉取数据
-                        pangolinCrawlerService.getNowData(bindAccountLogin);
-                    }
-                };
-                thread.start();
-            }
-
             returnMap.put("success", true);
             returnMap.put("accountUd", password);
         }
@@ -145,7 +126,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
             String orderId = null;
             while (errorCode != 0) {
                 //用户名或者密码错误
-                if (null != errorCode && errorCode == 1009) {
+                if (errorCode == 1009) {
                     ResultMapUtils.setResultMap(resultMap, StatusCode.USERNAME_OR_PASSWORD_ERROR.getCode());
                     return resultMap;
                 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/SysMessageTemplateController.java

@@ -8,11 +8,11 @@ import javax.servlet.http.HttpServletResponse;
 
 import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
 import cn.com.ctop.common.module.message.service.ISysMessageTemplateService;
+import cn.com.ctop.common.module.message.util.PushMsgUtil;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.message.entity.MsgParams;
-import org.jeecg.modules.message.util.PushMsgUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;

+ 0 - 73
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/job/SendMsgJob.java

@@ -1,73 +0,0 @@
-package org.jeecg.modules.message.job;
-
-import java.util.List;
-
-import cn.com.ctop.common.module.message.entity.SysMessage;
-import cn.com.ctop.common.module.message.service.ISysMessageService;
-import org.jeecg.common.util.DateUtils;
-import org.jeecg.modules.message.handle.ISendMsgHandle;
-import org.jeecg.modules.message.handle.enums.SendMsgStatusEnum;
-import org.jeecg.modules.message.handle.enums.SendMsgTypeEnum;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 发送消息任务
- */
-
-@Slf4j
-public class SendMsgJob implements Job {
-
-	@Autowired
-	private ISysMessageService sysMessageService;
-
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-		log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob !  时间:" + DateUtils.getTimestamp()));
-
-		// 1.读取消息中心数据,只查询未发送的和发送失败不超过次数的
-		QueryWrapper<SysMessage> queryWrapper = new QueryWrapper<SysMessage>();
-		queryWrapper.eq("es_send_status", SendMsgStatusEnum.WAIT.getCode())
-				.or(i -> i.eq("es_send_status", SendMsgStatusEnum.FAIL.getCode()).lt("es_send_num", 6));
-		List<SysMessage> sysMessages = sysMessageService.list(queryWrapper);
-		System.out.println(sysMessages);
-		// 2.根据不同的类型走不通的发送实现类
-		for (SysMessage sysMessage : sysMessages) {
-			ISendMsgHandle sendMsgHandle = null;
-			try {
-				if (sysMessage.getEsType().equals(SendMsgTypeEnum.EMAIL.getType())) {
-					sendMsgHandle = (ISendMsgHandle) Class.forName(SendMsgTypeEnum.EMAIL.getImplClass()).newInstance();
-				} else if (sysMessage.getEsType().equals(SendMsgTypeEnum.SMS.getType())) {
-					sendMsgHandle = (ISendMsgHandle) Class.forName(SendMsgTypeEnum.SMS.getImplClass()).newInstance();
-				} else if (sysMessage.getEsType().equals(SendMsgTypeEnum.WX.getType())) {
-					sendMsgHandle = (ISendMsgHandle) Class.forName(SendMsgTypeEnum.WX.getImplClass()).newInstance();
-				}
-			} catch (Exception e) {
-				log.error(e.getMessage(),e);
-			}
-			Integer sendNum = sysMessage.getEsSendNum();
-			try {
-				sendMsgHandle.SendMsg(sysMessage.getEsReceiver(), sysMessage.getEsTitle(),
-						sysMessage.getEsContent().toString());
-				// 发送消息成功
-				sysMessage.setEsSendStatus(SendMsgStatusEnum.SUCCESS.getCode());
-			} catch (Exception e) {
-				e.printStackTrace();
-				// 发送消息出现异常
-				sysMessage.setEsSendStatus(SendMsgStatusEnum.FAIL.getCode());
-			}
-			sysMessage.setEsSendNum(++sendNum);
-			// 发送结果回写到数据库
-			sysMessageService.updateById(sysMessage);
-		}
-
-	}
-
-}

+ 0 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/SysMessageMapper.java

@@ -1,14 +0,0 @@
-package org.jeecg.modules.message.mapper;
-
-import cn.com.ctop.common.module.message.entity.SysMessage;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * @Description: 消息
- * @Author: jeecg-boot
- * @Date:  2019-04-09
- * @Version: V1.0
- */
-public interface SysMessageMapper extends BaseMapper<SysMessage> {
-
-}

+ 0 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/SysMessageTemplateMapper.java

@@ -1,18 +0,0 @@
-package org.jeecg.modules.message.mapper;
-
-import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-
-/**
- * @Description: 消息模板
- * @Author: jeecg-boot
- * @Date:  2019-04-09
- * @Version: V1.0
- */
-public interface SysMessageTemplateMapper extends BaseMapper<SysMessageTemplate> {
-    @Select("SELECT * FROM SYS_SMS_TEMPLATE WHERE TEMPLATE_CODE = #{code}")
-    List<SysMessageTemplate> selectByCode(String code);
-}

+ 0 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/xml/SysMessageMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.message.mapper.SysMessageMapper">
-
-</mapper>

+ 0 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/xml/SysMessageTemplateMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.message.mapper.SysMessageTemplateMapper">
-
-</mapper>

+ 0 - 80
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/util/PushMsgUtil.java

@@ -1,80 +0,0 @@
-package org.jeecg.modules.message.util;
-
-import cn.com.ctop.common.module.message.entity.SysMessage;
-import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
-import cn.com.ctop.common.module.message.service.ISysMessageService;
-import cn.com.ctop.common.module.message.service.ISysMessageTemplateService;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import freemarker.template.TemplateException;
-import org.jeecg.modules.message.handle.enums.SendMsgStatusEnum;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 消息生成工具
- */
-
-@Component
-public class PushMsgUtil {
-
-    @Autowired
-    private ISysMessageService sysMessageService;
-
-    @Autowired
-    private ISysMessageTemplateService sysMessageTemplateService;
-
-    @Autowired
-    private Configuration freemarkerConfig;
-    /**
-     * @param msgType 消息类型 1短信 2邮件 3微信
-     * @param templateCode    消息模板码
-     * @param map     消息参数
-     * @param sentTo  接收消息方
-     */
-    public boolean sendMessage(String msgType, String templateCode, Map<String, String> map, String sentTo) {
-        List<SysMessageTemplate> sysSmsTemplates = sysMessageTemplateService.selectByCode(templateCode);
-        SysMessage sysMessage = new SysMessage();
-        if (sysSmsTemplates.size() > 0) {
-            SysMessageTemplate sysSmsTemplate = sysSmsTemplates.get(0);
-            sysMessage.setEsType(msgType);
-            sysMessage.setEsReceiver(sentTo);
-            //模板标题
-            String title = sysSmsTemplate.getTemplateName();
-            //模板内容
-            String content = sysSmsTemplate.getTemplateContent();
-            StringWriter stringWriter = new StringWriter();
-            Template template = null;
-            try {
-                template = new Template("SysMessageTemplate", content, freemarkerConfig);
-                template.process(map, stringWriter);
-            } catch (IOException e) {
-                e.printStackTrace();
-                return false;
-            } catch (TemplateException e) {
-                e.printStackTrace();
-                return false;
-            }
-            content = stringWriter.toString();
-            sysMessage.setEsTitle(title);
-            sysMessage.setEsContent(content);
-            sysMessage.setEsParam(JSONObject.toJSONString(map));
-            sysMessage.setEsSendTime(new Date());
-            sysMessage.setEsSendStatus(SendMsgStatusEnum.WAIT.getCode());
-            sysMessage.setEsSendNum(0);
-            if(sysMessageService.save(sysMessage)) {
-				return true;
-			}
-        }
-        return false;
-    }
-
-}

+ 0 - 49
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/websocket/TestSocketController.java

@@ -1,49 +0,0 @@
-package org.jeecg.modules.message.websocket;
-
-import cn.com.ctop.common.module.message.websocket.WebSocket;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.constant.WebsocketConst;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.fastjson.JSONObject;
-
-@RestController
-@RequestMapping("/sys/socketTest")
-public class TestSocketController {
-
-    @Autowired
-    private WebSocket webSocket;
-
-    @PostMapping("/sendAll")
-    public Result<String> sendAll(@RequestBody JSONObject jsonObject) {
-    	Result<String> result = new Result<String>();
-    	String message = jsonObject.getString("message");
-    	JSONObject obj = new JSONObject();
-    	obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
-		obj.put(WebsocketConst.MSG_ID, "M0001");
-		obj.put(WebsocketConst.MSG_TXT, message);
-    	webSocket.sendMessage(obj.toJSONString());
-        result.setResult("群发!");
-        return result;
-    }
-
-    @PostMapping("/sendUser")
-    public Result<String> sendUser(@RequestBody JSONObject jsonObject) {
-    	Result<String> result = new Result<String>();
-    	String userId = jsonObject.getString("userId");
-    	String message = jsonObject.getString("message");
-    	JSONObject obj = new JSONObject();
-    	obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_USER);
-    	obj.put(WebsocketConst.MSG_USER_ID, userId);
-		obj.put(WebsocketConst.MSG_ID, "M0001");
-		obj.put(WebsocketConst.MSG_TXT, message);
-        webSocket.sendMessage(userId, obj.toJSONString());
-        result.setResult("单发");
-        return result;
-    }
-
-}

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/controller/NgAlainController.java

@@ -2,16 +2,15 @@ package org.jeecg.modules.ngalain.controller;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 
+import cn.com.ctop.common.module.service.ISysDictService;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ngalain.service.NgAlainService;
-import org.jeecg.modules.system.service.ISysDictService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/service/impl/NgAlainServiceImpl.java

@@ -1,11 +1,11 @@
 package org.jeecg.modules.ngalain.service.impl;
 
+import cn.com.ctop.common.module.mapper.SysDictMapper;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import org.jeecg.common.system.entity.SysPermission;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ngalain.service.NgAlainService;
-import org.jeecg.modules.system.mapper.SysDictMapper;
 import org.jeecg.modules.system.service.ISysPermissionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/order/CommonServiceImpl.java

@@ -1,8 +1,8 @@
 package org.jeecg.modules.order;
 
+import cn.com.ctop.common.module.mapper.SysRoleMapper;
 import com.alibaba.dubbo.config.annotation.Service;
 import org.jeecg.common.system.api.ICommonService;
-import org.jeecg.modules.system.mapper.SysRoleMapper;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;

+ 0 - 270
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java

@@ -1,270 +0,0 @@
-package org.jeecg.modules.quartz.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shiro.authz.annotation.RequiresRoles;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.ImportExcelUtil;
-import org.jeecg.modules.quartz.entity.QuartzJob;
-import org.jeecg.modules.quartz.service.IQuartzJobService;
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 定时任务在线管理
- * @Author: jeecg-boot
- * @Date: 2019-01-02
- * @Version:V1.0
- */
-@RestController
-@RequestMapping("/sys/quartzJob")
-@Slf4j
-@Api(tags = "定时任务接口")
-public class QuartzJobController {
-	@Autowired
-	private IQuartzJobService quartzJobService;
-	@Autowired
-	private Scheduler scheduler;
-
-	/**
-	 * 分页列表查询
-	 * 
-	 * @param quartzJob
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result<?> queryPageList(QuartzJob quartzJob, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-			@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
-		QueryWrapper<QuartzJob> queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, req.getParameterMap());
-		Page<QuartzJob> page = new Page<QuartzJob>(pageNo, pageSize);
-		IPage<QuartzJob> pageList = quartzJobService.page(page, queryWrapper);
-        return Result.ok(pageList);
-
-	}
-
-	/**
-	 * 添加定时任务
-	 * 
-	 * @param quartzJob
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@RequestMapping(value = "/add", method = RequestMethod.POST)
-	public Result<?> add(@RequestBody QuartzJob quartzJob) {
-		quartzJobService.saveAndScheduleJob(quartzJob);
-		return Result.ok("创建定时任务成功");
-	}
-
-	/**
-	 * 更新定时任务
-	 * 
-	 * @param quartzJob
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@RequestMapping(value = "/edit", method = RequestMethod.PUT)
-	public Result<?> eidt(@RequestBody QuartzJob quartzJob) {
-		try {
-			quartzJobService.editAndScheduleJob(quartzJob);
-		} catch (SchedulerException e) {
-			log.error(e.getMessage(),e);
-			return Result.error("更新定时任务失败!");
-		}
-	    return Result.ok("更新定时任务成功!");
-	}
-
-	/**
-	 * 通过id删除
-	 * 
-	 * @param id
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
-	public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
-		QuartzJob quartzJob = quartzJobService.getById(id);
-		if (quartzJob == null) {
-			return Result.error("未找到对应实体");
-		}
-		quartzJobService.deleteAndStopJob(quartzJob);
-        return Result.ok("删除成功!");
-
-	}
-
-	/**
-	 * 批量删除
-	 * 
-	 * @param ids
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
-	public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-		if (ids == null || "".equals(ids.trim())) {
-			return Result.error("参数不识别!");
-		}
-		for (String id : Arrays.asList(ids.split(","))) {
-			QuartzJob job = quartzJobService.getById(id);
-			quartzJobService.deleteAndStopJob(job);
-		}
-        return Result.ok("删除定时任务成功!");
-	}
-
-	/**
-	 * 暂停定时任务
-	 * 
-	 * @param id
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@GetMapping(value = "/pause")
-	@ApiOperation(value = "暂停定时任务")
-	public Result<Object> pauseJob(@RequestParam(name = "id") String id) {
-		QuartzJob job = quartzJobService.getById(id);
-		if (job == null) {
-			return Result.error("定时任务不存在!");
-		}
-		quartzJobService.pause(job);
-		return Result.ok("暂停定时任务成功");
-	}
-
-	/**
-	 * 启动定时任务
-	 * 
-	 * @param id
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@GetMapping(value = "/resume")
-	@ApiOperation(value = "恢复定时任务")
-	public Result<Object> resumeJob(@RequestParam(name = "id") String id) {
-		QuartzJob job = quartzJobService.getById(id);
-		if (job == null) {
-			return Result.error("定时任务不存在!");
-		}
-		quartzJobService.resumeJob(job);
-		//scheduler.resumeJob(JobKey.jobKey(job.getJobClassName().trim()));
-		return Result.ok("恢复定时任务成功");
-	}
-
-	/**
-	 * 通过id查询
-	 * 
-	 * @param id
-	 * @return
-	 */
-	@RequestMapping(value = "/queryById", method = RequestMethod.GET)
-	public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
-		QuartzJob quartzJob = quartzJobService.getById(id);
-        return Result.ok(quartzJob);
-	}
-
-	/**
-	 * 导出excel
-	 * 
-	 * @param request
-	 * @param quartzJob
-	 */
-	@RequestMapping(value = "/exportXls")
-	public ModelAndView exportXls(HttpServletRequest request, QuartzJob quartzJob) {
-		// Step.1 组装查询条件
-		QueryWrapper<QuartzJob> queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, request.getParameterMap());
-		// Step.2 AutoPoi 导出Excel
-		ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-		List<QuartzJob> pageList = quartzJobService.list(queryWrapper);
-		// 导出文件名称
-		mv.addObject(NormalExcelConstants.FILE_NAME, "定时任务列表");
-		mv.addObject(NormalExcelConstants.CLASS, QuartzJob.class);
-		mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("定时任务列表数据", "导出人:Jeecg", "导出信息"));
-		mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-		return mv;
-	}
-
-	/**
-	 * 通过excel导入数据
-	 * 
-	 * @param request
-	 * @param response
-	 * @return
-	 */
-	@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-	public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
-		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-		Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-		// 错误信息
-		List<String> errorMessage = new ArrayList<>();
-		int successLines = 0, errorLines = 0;
-		for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-			MultipartFile file = entity.getValue();// 获取上传文件对象
-			ImportParams params = new ImportParams();
-			params.setTitleRows(2);
-			params.setHeadRows(1);
-			params.setNeedSave(true);
-			try {
-				List<Object> listQuartzJobs = ExcelImportUtil.importExcel(file.getInputStream(), QuartzJob.class, params);
-				List<String> list = ImportExcelUtil.importDateSave(listQuartzJobs, IQuartzJobService.class, errorMessage,CommonConstant.SQL_INDEX_UNIQ_JOB_CLASS_NAME);
-				errorLines+=list.size();
-				successLines+=(listQuartzJobs.size()-errorLines);
-			} catch (Exception e) {
-				log.error(e.getMessage(), e);
-				return Result.error("文件导入失败!");
-			} finally {
-				try {
-					file.getInputStream().close();
-				} catch (IOException e) {
-					e.printStackTrace();
-				}
-			}
-		}
-		return ImportExcelUtil.imporReturnRes(errorLines,successLines,errorMessage);
-	}
-
-	/**
-	 * 立即执行
-	 * @param id
-	 * @return
-	 */
-	//@RequiresRoles("admin")
-	@GetMapping("/execute")
-	public Result<?> execute(@RequestParam(name = "id", required = true) String id) {
-		QuartzJob quartzJob = quartzJobService.getById(id);
-		if (quartzJob == null) {
-			return Result.error("未找到对应实体");
-		}
-		try {
-			quartzJobService.execute(quartzJob);
-		} catch (Exception e) {
-			//e.printStackTrace();
-			log.info("定时任务 立即执行失败>>"+e.getMessage());
-			return Result.error("执行失败!");
-		}
-		return Result.ok("执行成功!");
-	}
-}

+ 0 - 62
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/entity/QuartzJob.java

@@ -1,62 +0,0 @@
-package org.jeecg.modules.quartz.entity;
-
-import java.io.Serializable;
-
-import org.jeecg.common.aspect.annotation.Dict;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-
-import lombok.Data;
-
-/**
- * @Description: 定时任务在线管理
- * @Author: jeecg-boot
- * @Date:  2019-01-02
- * @Version: V1.0
- */
-@Data
-@TableName("sys_quartz_job")
-public class QuartzJob implements Serializable {
-    private static final long serialVersionUID = 1L;
-    
-	/**id*/
-	@TableId(type = IdType.ASSIGN_ID)
-	private java.lang.String id;
-	/**创建人*/
-	private java.lang.String createBy;
-	/**创建时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	private java.util.Date createTime;
-	/**删除状态*/
-	private java.lang.Integer delFlag;
-	/**修改人*/
-	private java.lang.String updateBy;
-	/**修改时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	private java.util.Date updateTime;
-	/**任务类名*/
-	@Excel(name="任务类名",width=40)
-	private java.lang.String jobClassName;
-	/**cron表达式*/
-	@Excel(name="cron表达式",width=30)
-	private java.lang.String cronExpression;
-	/**参数*/
-	@Excel(name="参数",width=15)
-	private java.lang.String parameter;
-	/**描述*/
-	@Excel(name="描述",width=40)
-	private java.lang.String description;
-	/**状态 0正常 -1停止*/
-	@Excel(name="状态",width=15,dicCode="quartz_status")
-	@Dict(dicCode = "quartz_status")
-	private java.lang.Integer status;
-
-}

+ 0 - 35
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/AsyncJob.java

@@ -1,35 +0,0 @@
-package org.jeecg.modules.quartz.job;
-
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.*;
-
-/**
- * @Description: 同步定时任务测试
- *
- * 此处的同步是指 当定时任务的执行时间大于任务的时间间隔时
- * 会等待第一个任务执行完成才会走第二个任务
- *
- *
- * @author: taoyan
- * @date: 2020年06月19日
- */
-@PersistJobDataAfterExecution
-@DisallowConcurrentExecution
-@Slf4j
-public class AsyncJob implements Job {
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        log.info(" --- 同步任务调度开始 --- ");
-        try {
-            //此处模拟任务执行时间 5秒  任务表达式配置为每秒执行一次:0/1 * * * * ? *
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-        //测试发现 每5秒执行一次
-        log.info(" --- 执行完毕,时间:"+DateUtils.now()+"---");
-    }
-
-}

+ 0 - 23
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/SampleJob.java

@@ -1,23 +0,0 @@
-package org.jeecg.modules.quartz.job;
-
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 示例不带参定时任务
- * 
- * @Author Scott
- */
-@Slf4j
-public class SampleJob implements Job {
-
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-		log.info(String.format(" Jeecg-Boot 普通定时任务 SampleJob !  时间:" + DateUtils.getTimestamp()));
-	}
-}

+ 0 - 32
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/SampleParamJob.java

@@ -1,32 +0,0 @@
-package org.jeecg.modules.quartz.job;
-
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 示例带参定时任务
- * 
- * @Author Scott
- */
-@Slf4j
-public class SampleParamJob implements Job {
-
-	/**
-	 * 若参数变量名修改 QuartzJobController中也需对应修改
-	 */
-	private String parameter;
-
-	public void setParameter(String parameter) {
-		this.parameter = parameter;
-	}
-
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-		log.info(" Job Execution key:"+jobExecutionContext.getJobDetail().getKey());
-		log.info( String.format("welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob !   时间:" + DateUtils.now(), this.parameter));
-	}
-}

+ 0 - 20
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/mapper/QuartzJobMapper.java

@@ -1,20 +0,0 @@
-package org.jeecg.modules.quartz.mapper;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.quartz.entity.QuartzJob;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * @Description: 定时任务在线管理
- * @Author: jeecg-boot
- * @Date:  2019-01-02
- * @Version: V1.0
- */
-public interface QuartzJobMapper extends BaseMapper<QuartzJob> {
-
-	public List<QuartzJob> findByJobClassName(@Param("jobClassName") String jobClassName);
-
-}

+ 0 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/mapper/xml/QuartzJobMapper.xml

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.quartz.mapper.QuartzJobMapper">
-
-	<!-- 根据jobClassName查询 -->
-	<select id="findByJobClassName" resultType="org.jeecg.modules.quartz.entity.QuartzJob">
-		select * from  sys_quartz_job  where job_class_name = #{jobClassName}
-	</select>
-</mapper>

+ 0 - 40
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/service/IQuartzJobService.java

@@ -1,40 +0,0 @@
-package org.jeecg.modules.quartz.service;
-
-import java.util.List;
-
-import org.jeecg.modules.quartz.entity.QuartzJob;
-import org.quartz.SchedulerException;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * @Description: 定时任务在线管理
- * @Author: jeecg-boot
- * @Date: 2019-04-28
- * @Version: V1.1
- */
-public interface IQuartzJobService extends IService<QuartzJob> {
-
-	List<QuartzJob> findByJobClassName(String jobClassName);
-
-	boolean saveAndScheduleJob(QuartzJob quartzJob);
-
-	boolean editAndScheduleJob(QuartzJob quartzJob) throws SchedulerException;
-
-	boolean deleteAndStopJob(QuartzJob quartzJob);
-
-	boolean resumeJob(QuartzJob quartzJob);
-
-	/**
-	 * 执行定时任务
-	 * @param quartzJob
-	 */
-	void execute(QuartzJob quartzJob) throws Exception;
-
-	/**
-	 * 暂停任务
-	 * @param quartzJob
-	 * @throws SchedulerException
-	 */
-	void pause(QuartzJob quartzJob);
-}

+ 0 - 177
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/service/impl/QuartzJobServiceImpl.java

@@ -1,177 +0,0 @@
-package org.jeecg.modules.quartz.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.exception.JeecgBootException;
-import org.jeecg.common.util.DateUtils;
-import org.jeecg.modules.quartz.entity.QuartzJob;
-import org.jeecg.modules.quartz.mapper.QuartzJobMapper;
-import org.jeecg.modules.quartz.service.IQuartzJobService;
-import org.quartz.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * @Description: 定时任务在线管理
- * @Author: jeecg-boot
- * @Date: 2019-04-28
- * @Version: V1.1
- */
-@Slf4j
-@Service
-public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob> implements IQuartzJobService {
-	@Autowired
-	private QuartzJobMapper quartzJobMapper;
-	@Autowired
-	private Scheduler scheduler;
-
-	/**
-	 * 立即执行的任务分组
-	 */
-	private static final String JOB_TEST_GROUP = "test_group";
-
-	@Override
-	public List<QuartzJob> findByJobClassName(String jobClassName) {
-		return quartzJobMapper.findByJobClassName(jobClassName);
-	}
-
-	/**
-	 * 保存&启动定时任务
-	 */
-	@Override
-	public boolean saveAndScheduleJob(QuartzJob quartzJob) {
-		// DB设置修改
-		quartzJob.setDelFlag(CommonConstant.DEL_FLAG_0);
-		boolean success = this.save(quartzJob);
-		if (success) {
-			if (CommonConstant.STATUS_NORMAL.equals(quartzJob.getStatus())) {
-				// 定时器添加
-				this.schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter());
-			}
-		}
-		return success;
-	}
-
-	/**
-	 * 恢复定时任务
-	 */
-	@Override
-	public boolean resumeJob(QuartzJob quartzJob) {
-		schedulerDelete(quartzJob.getId());
-		schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter());
-		quartzJob.setStatus(CommonConstant.STATUS_NORMAL);
-		return this.updateById(quartzJob);
-	}
-
-	/**
-	 * 编辑&启停定时任务
-	 * @throws SchedulerException 
-	 */
-	@Override
-	public boolean editAndScheduleJob(QuartzJob quartzJob) throws SchedulerException {
-		if (CommonConstant.STATUS_NORMAL.equals(quartzJob.getStatus())) {
-			schedulerDelete(quartzJob.getId());
-			schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter());
-		}else{
-			scheduler.pauseJob(JobKey.jobKey(quartzJob.getId()));
-		}
-		return this.updateById(quartzJob);
-	}
-
-	/**
-	 * 删除&停止删除定时任务
-	 */
-	@Override
-	public boolean deleteAndStopJob(QuartzJob job) {
-		schedulerDelete(job.getId());
-		boolean ok = this.removeById(job.getId());
-		return ok;
-	}
-
-	@Override
-	public void execute(QuartzJob quartzJob) throws Exception {
-		String jobName = quartzJob.getJobClassName().trim();
-		Date startDate = new Date();
-		String ymd = DateUtils.date2Str(startDate,DateUtils.yyyymmddhhmmss.get());
-		String identity =  jobName + ymd;
-		//3秒后执行 只执行一次
-		// update-begin--author:sunjianlei ---- date:20210511--- for:定时任务立即执行,延迟3秒改成0.1秒-------
-		startDate.setTime(startDate.getTime() + 100L);
-		// update-end--author:sunjianlei ---- date:20210511--- for:定时任务立即执行,延迟3秒改成0.1秒-------
-		// 定义一个Trigger
-		SimpleTrigger trigger = (SimpleTrigger)TriggerBuilder.newTrigger()
-				.withIdentity(identity, JOB_TEST_GROUP)
-				.startAt(startDate)
-				.build();
-		// 构建job信息
-		JobDetail jobDetail = JobBuilder.newJob(getClass(jobName).getClass()).withIdentity(identity).usingJobData("parameter", quartzJob.getParameter()).build();
-		// 将trigger和 jobDetail 加入这个调度
-		scheduler.scheduleJob(jobDetail, trigger);
-		// 启动scheduler
-		scheduler.start();
-	}
-
-	@Override
-	public void pause(QuartzJob quartzJob){
-		schedulerDelete(quartzJob.getId());
-		quartzJob.setStatus(CommonConstant.STATUS_DISABLE);
-		this.updateById(quartzJob);
-	}
-
-	/**
-	 * 添加定时任务
-	 *
-	 * @param jobClassName
-	 * @param cronExpression
-	 * @param parameter
-	 */
-	private void schedulerAdd(String id, String jobClassName, String cronExpression, String parameter) {
-		try {
-			// 启动调度器
-			scheduler.start();
-
-			// 构建job信息
-			JobDetail jobDetail = JobBuilder.newJob(getClass(jobClassName).getClass()).withIdentity(id).usingJobData("parameter", parameter).build();
-
-			// 表达式调度构建器(即任务执行的时间)
-			CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression);
-
-			// 按新的cronExpression表达式构建一个新的trigger
-			CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(id).withSchedule(scheduleBuilder).build();
-
-			scheduler.scheduleJob(jobDetail, trigger);
-		} catch (SchedulerException e) {
-			throw new JeecgBootException("创建定时任务失败", e);
-		} catch (RuntimeException e) {
-			throw new JeecgBootException(e.getMessage(), e);
-		}catch (Exception e) {
-			throw new JeecgBootException("后台找不到该类名:" + jobClassName, e);
-		}
-	}
-
-	/**
-	 * 删除定时任务
-	 * 
-	 * @param id
-	 */
-	private void schedulerDelete(String id) {
-		try {
-			scheduler.pauseTrigger(TriggerKey.triggerKey(id));
-			scheduler.unscheduleJob(TriggerKey.triggerKey(id));
-			scheduler.deleteJob(JobKey.jobKey(id));
-		} catch (Exception e) {
-			log.error(e.getMessage(), e);
-			throw new JeecgBootException("删除定时任务失败");
-		}
-	}
-
-	private static Job getClass(String classname) throws Exception {
-		Class<?> class1 = Class.forName(classname);
-		return (Job) class1.newInstance();
-	}
-
-}

+ 61 - 178
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java

@@ -5,12 +5,10 @@ import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.util.CommonUtils;
 import org.jeecg.common.util.RestUtil;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.common.util.oConvertUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
@@ -41,9 +39,6 @@ import java.net.URLDecoder;
 @RequestMapping("/sys/common")
 public class CommonController {
 
-    @Autowired
-    private ISysBaseAPI sysBaseAPI;
-
     @Value(value = "${jeecg.path.upload}")
     private String uploadpath;
 
@@ -77,30 +72,13 @@ public class CommonController {
         MultipartFile file = multipartRequest.getFile("file");// 获取上传文件对象
         if(oConvertUtils.isEmpty(bizPath)){
             if(CommonConstant.UPLOAD_TYPE_OSS.equals(uploadType)){
-                //未指定目录,则用阿里云默认目录 upload
                 bizPath = "upload";
-                //result.setMessage("使用阿里云文件上传时,必须添加目录!");
-                //result.setSuccess(false);
-                //return result;
             }else{
                 bizPath = "";
             }
         }
         if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)){
-            //update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传
             savePath = this.uploadLocal(file,bizPath);
-            //update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传
-            /**  富文本编辑器及markdown本地上传时,采用返回链接方式
-            //针对jeditor编辑器如何使 lcaol模式,采用 base64格式存储
-            String jeditor = request.getParameter("jeditor");
-            if(oConvertUtils.isNotEmpty(jeditor)){
-                result.setMessage(CommonConstant.UPLOAD_TYPE_LOCAL);
-                result.setSuccess(true);
-                return result;
-            }else{
-                savePath = this.uploadLocal(file,bizPath);
-            }
-            */
         }else{
             //update-begin-author:taoyan date:20200814 for:文件上传改造
             savePath = CommonUtils.upload(file, bizPath, uploadType);
@@ -156,162 +134,6 @@ public class CommonController {
         return "";
     }
 
-//	@PostMapping(value = "/upload2")
-//	public Result<?> upload2(HttpServletRequest request, HttpServletResponse response) {
-//		Result<?> result = new Result<>();
-//		try {
-//			String ctxPath = uploadpath;
-//			String fileName = null;
-//			String bizPath = "files";
-//			String tempBizPath = request.getParameter("biz");
-//			if(oConvertUtils.isNotEmpty(tempBizPath)){
-//				bizPath = tempBizPath;
-//			}
-//			String nowday = new SimpleDateFormat("yyyyMMdd").format(new Date());
-//			File file = new File(ctxPath + File.separator + bizPath + File.separator + nowday);
-//			if (!file.exists()) {
-//				file.mkdirs();// 创建文件根目录
-//			}
-//			MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-//			MultipartFile mf = multipartRequest.getFile("file");// 获取上传文件对象
-//			String orgName = mf.getOriginalFilename();// 获取文件名
-//			fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf("."));
-//			String savePath = file.getPath() + File.separator + fileName;
-//			File savefile = new File(savePath);
-//			FileCopyUtils.copy(mf.getBytes(), savefile);
-//			String dbpath = bizPath + File.separator + nowday + File.separator + fileName;
-//			if (dbpath.contains("\\")) {
-//				dbpath = dbpath.replace("\\", "/");
-//			}
-//			result.setMessage(dbpath);
-//			result.setSuccess(true);
-//		} catch (IOException e) {
-//			result.setSuccess(false);
-//			result.setMessage(e.getMessage());
-//			log.error(e.getMessage(), e);
-//		}
-//		return result;
-//	}
-
-    /**
-     * 预览图片&下载文件
-     * 请求地址:http://localhost:8080/common/static/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
-     *
-     * @param request
-     * @param response
-     */
-    @GetMapping(value = "/static/**")
-    public void view(HttpServletRequest request, HttpServletResponse response) {
-        // ISO-8859-1 ==> UTF-8 进行编码转换
-        String imgPath = extractPathFromPattern(request);
-        if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
-            return;
-        }
-        // 其余处理略
-        InputStream inputStream = null;
-        OutputStream outputStream = null;
-        try {
-            imgPath = imgPath.replace("..", "");
-            if (imgPath.endsWith(",")) {
-                imgPath = imgPath.substring(0, imgPath.length() - 1);
-            }
-            String filePath = uploadpath + File.separator + imgPath;
-            File file = new File(filePath);
-            if(!file.exists()){
-                response.setStatus(404);
-                throw new RuntimeException("文件["+imgPath+"]不存在..");
-            }
-            response.setContentType("application/force-download");// 设置强制下载不打开
-            response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
-            inputStream = new BufferedInputStream(new FileInputStream(filePath));
-            outputStream = response.getOutputStream();
-            byte[] buf = new byte[1024];
-            int len;
-            while ((len = inputStream.read(buf)) > 0) {
-                outputStream.write(buf, 0, len);
-            }
-            response.flushBuffer();
-        } catch (IOException e) {
-            log.error("预览文件失败" + e.getMessage());
-            response.setStatus(404);
-            e.printStackTrace();
-        } finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    log.error(e.getMessage(), e);
-                }
-            }
-            if (outputStream != null) {
-                try {
-                    outputStream.close();
-                } catch (IOException e) {
-                    log.error(e.getMessage(), e);
-                }
-            }
-        }
-
-    }
-
-//	/**
-//	 * 下载文件
-//	 * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
-//	 *
-//	 * @param request
-//	 * @param response
-//	 * @throws Exception
-//	 */
-//	@GetMapping(value = "/download/**")
-//	public void download(HttpServletRequest request, HttpServletResponse response) throws Exception {
-//		// ISO-8859-1 ==> UTF-8 进行编码转换
-//		String filePath = extractPathFromPattern(request);
-//		// 其余处理略
-//		InputStream inputStream = null;
-//		OutputStream outputStream = null;
-//		try {
-//			filePath = filePath.replace("..", "");
-//			if (filePath.endsWith(",")) {
-//				filePath = filePath.substring(0, filePath.length() - 1);
-//			}
-//			String localPath = uploadpath;
-//			String downloadFilePath = localPath + File.separator + filePath;
-//			File file = new File(downloadFilePath);
-//	         if (file.exists()) {
-//	         	response.setContentType("application/force-download");// 设置强制下载不打开            
-//	 			response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
-//	 			inputStream = new BufferedInputStream(new FileInputStream(file));
-//	 			outputStream = response.getOutputStream();
-//	 			byte[] buf = new byte[1024];
-//	 			int len;
-//	 			while ((len = inputStream.read(buf)) > 0) {
-//	 				outputStream.write(buf, 0, len);
-//	 			}
-//	 			response.flushBuffer();
-//	         }
-//
-//		} catch (Exception e) {
-//			log.info("文件下载失败" + e.getMessage());
-//			// e.printStackTrace();
-//		} finally {
-//			if (inputStream != null) {
-//				try {
-//					inputStream.close();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//			}
-//			if (outputStream != null) {
-//				try {
-//					outputStream.close();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//			}
-//		}
-//
-//	}
-
     /**
      * @功能:pdf预览Iframe
      * @param modelAndView
@@ -384,4 +206,65 @@ public class CommonController {
         }
     }
 
+    /**
+     * 预览图片&下载文件
+     * 请求地址:http://localhost:8080/common/static/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
+     *
+     * @param request
+     * @param response
+     */
+    @GetMapping(value = "/static/**")
+    public void view(HttpServletRequest request, HttpServletResponse response) {
+        // ISO-8859-1 ==> UTF-8 进行编码转换
+        String imgPath = extractPathFromPattern(request);
+        if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
+            return;
+        }
+        // 其余处理略
+        InputStream inputStream = null;
+        OutputStream outputStream = null;
+        try {
+            imgPath = imgPath.replace("..", "");
+            if (imgPath.endsWith(",")) {
+                imgPath = imgPath.substring(0, imgPath.length() - 1);
+            }
+            String filePath = uploadpath + File.separator + imgPath;
+            File file = new File(filePath);
+            if(!file.exists()){
+                response.setStatus(404);
+                throw new RuntimeException("文件不存在..");
+            }
+            response.setContentType("application/force-download");// 设置强制下载不打开
+            response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
+            inputStream = new BufferedInputStream(new FileInputStream(filePath));
+            outputStream = response.getOutputStream();
+            byte[] buf = new byte[1024];
+            int len;
+            while ((len = inputStream.read(buf)) > 0) {
+                outputStream.write(buf, 0, len);
+            }
+            response.flushBuffer();
+        } catch (IOException e) {
+            log.error("预览文件失败" + e.getMessage());
+            response.setStatus(404);
+            e.printStackTrace();
+        } finally {
+            if (inputStream != null) {
+                try {
+                    inputStream.close();
+                } catch (IOException e) {
+                    log.error(e.getMessage(), e);
+                }
+            }
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    log.error(e.getMessage(), e);
+                }
+            }
+        }
+
+    }
+
 }

+ 0 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.