瀏覽代碼

格式化代码

syh 5 年之前
父節點
當前提交
f7f305c8d5
共有 61 個文件被更改,包括 768 次插入1072 次删除
  1. 5 2
      jeecg-boot-base-common/src/main/java/org/jeecg/common/system/query/QueryGenerator.java
  2. 3 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/system/util/JwtUtil.java
  3. 9 15
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  4. 6 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DySmsHelper.java
  5. 1 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MD5Util.java
  6. 6 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MyClassLoader.java
  7. 18 23
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java
  8. 3 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java
  9. 21 78
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/jsonschema/CommonProperty.java
  10. 7 27
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/jsonschema/validate/DictProperty.java
  11. 15 9
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/oConvertUtils.java
  12. 1 1
      jeecg-boot-module-system/pom.xml
  13. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/config/RedisConfig.java
  14. 33 17
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  15. 2 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdCoverController.java
  16. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountAuthController.java
  17. 15 10
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java
  18. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertisePlanController.java
  19. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertiserBudgetController.java
  20. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertiserController.java
  21. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceBudgetTemplateController.java
  22. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignController.java
  23. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignTemplateController.java
  24. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeController.java
  25. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeMaterialController.java
  26. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCustomAudienceController.java
  27. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceAdvertisePlanTemplateController.java
  28. 31 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReportController.java
  29. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountAuthServiceImpl.java
  30. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java
  31. 4 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertisePlanServiceImpl.java
  32. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java
  33. 4 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java
  34. 9 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/itext5/Pkcs.java
  35. 6 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/itext5/SignPdf.java
  36. 6 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/pdf/RSACertHelper.java
  37. 90 333
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vo/StatisticCampaignVo.java
  38. 7 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mock/MockController.java
  39. 5 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java
  40. 49 46
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCreateServiceImpl.java
  41. 138 238
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java
  42. 12 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/MsgParams.java
  43. 16 16
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/aop/LogRecordAspect.java
  44. 17 31
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/shiro/vo/ResponseBean.java
  45. 4 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/aspect/DictAspect.java
  46. 18 10
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java
  47. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
  48. 18 42
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/model/DepartIdModel.java
  49. 3 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java
  50. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDictServiceImpl.java
  51. 7 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysLogServiceImpl.java
  52. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysPermissionServiceImpl.java
  53. 7 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
  54. 0 15
      module-common/src/main/java/cn/com/ctop/common/utils/Base64Utils.java
  55. 22 13
      module-common/src/main/java/cn/com/ctop/common/utils/FileUploadTool.java
  56. 3 1
      module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java
  57. 16 13
      module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils2.java
  58. 3 1
      module-common/src/main/java/cn/com/ctop/common/utils/JsonUtil.java
  59. 15 10
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/FateadmHttpUtil.java
  60. 6 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java
  61. 92 24
      module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

+ 5 - 2
jeecg-boot-base-common/src/main/java/org/jeecg/common/system/query/QueryGenerator.java

@@ -157,8 +157,11 @@ public class QueryGenerator {
 		doSuperQuery(queryWrapper, parameterMap);
 		
 	}
-	
-	//多字段排序 TODO 需要修改前端
+
+    /**
+     * 多字段排序
+     * TODO 需要修改前端
+     */
 	public static void doMultiFieldsOrder(QueryWrapper<?> queryWrapper,Map<String, String[]> parameterMap) {
 		String column=null,order=null;
 		if(parameterMap!=null&& parameterMap.containsKey(ORDER_COLUMN)) {

+ 3 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/system/util/JwtUtil.java

@@ -30,7 +30,9 @@ import org.jeecg.common.util.oConvertUtils;
  **/
 public class JwtUtil {
 
-	// 过期时间30分钟
+    /**
+     * 过期时间30分钟
+     */
 	public static final long EXPIRE_TIME = 30 * 60 * 1000;
 
 	/**

+ 9 - 15
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -17,23 +17,20 @@ import org.springframework.util.StringUtils;
  * @Version 1.0
  */
 public class DateUtils extends PropertyEditorSupport {
-    // 各种时间格式
-//    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-    // 各种时间格式
-//    public static final SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd");
-    // 各种时间格式
-//    public static final SimpleDateFormat date_sdf_wz = new SimpleDateFormat("yyyy年MM月dd日");
-//    public static final SimpleDateFormat time_sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-//    public static final SimpleDateFormat yyyymmddhhmmss = new SimpleDateFormat("yyyyMMddHHmmss");
-//    public static final SimpleDateFormat short_time_sdf = new SimpleDateFormat("HH:mm");
-//    public static final SimpleDateFormat datetimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-    // 以毫秒表示的时间
+    /**
+     * 以毫秒表示的时间
+     */
     private static final long DAY_IN_MILLIS = 24 * 3600 * 1000;
     private static final long HOUR_IN_MILLIS = 3600 * 1000;
     private static final long MINUTE_IN_MILLIS = 60 * 1000;
     private static final long SECOND_IN_MILLIS = 1000;
 
-    // 指定模式的时间格式
+    /**
+     * 指定模式的时间格式
+     *
+     * @param pattern
+     * @return
+     */
     private static SimpleDateFormat getDateFormat(String pattern) {
         return new SimpleDateFormat(pattern);
     }
@@ -74,7 +71,6 @@ public class DateUtils extends PropertyEditorSupport {
         return new Date();
     }
 
-
     /**
      * 字符串转换成日期
      *
@@ -122,7 +118,6 @@ public class DateUtils extends PropertyEditorSupport {
         try {
             getDate = sformat.parse(date);
         } catch (ParseException e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
         return sformat.format(getDate);
@@ -130,7 +125,6 @@ public class DateUtils extends PropertyEditorSupport {
 
     /**
      * 日期转换为字符串
-     *
      * @param date   日期
      * @return 字符串
      */

+ 6 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DySmsHelper.java

@@ -34,7 +34,12 @@ public class DySmsHelper {
      */
     static final String DOMAIN = "dysmsapi.aliyuncs.com";
 
-    // TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
+    /**
+     * TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
+     *
+     * @return
+     */
+
     static final String ACCESS_KEY_ID = "?";
     static final String ACCESS_KEY_SECRET = "?";
 

+ 1 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MD5Util.java

@@ -52,7 +52,7 @@ public class MD5Util {
         return HEX_DIGITS[d1] + HEX_DIGITS[d2];
 	}
 
-    public static String Md5Encode(String origin, String charsetname) {
+    public static String md5Encode(String origin, String charsetname) {
 		String resultString = null;
 		try {
 			resultString = new String(origin);

+ 6 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MyClassLoader.java

@@ -15,7 +15,12 @@ public class MyClassLoader extends ClassLoader {
 		return myclass;
 	}
 
-	// 获得类的全名,包括包名
+    /**
+     * 获得类的全名,包括包名
+     *
+     * @param object
+     * @return
+     */
 	public static String getPackPath(Object object) {
 		// 检查用户传入的参数是否为空
 		if (object == null) {

+ 18 - 23
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java

@@ -10,9 +10,10 @@ import io.netty.util.internal.StringUtil;
  * @Author zhangdaihao
  */
 public class YouBianCodeUtil {
-
-    // 数字位数(默认生成3位的数字)
-    //代表数字位数
+    /**
+     * 代表数字位数
+     * 数字位数(默认生成3位的数字)
+     */
     private static final int NUM_LENGTH = 2;
 
     public static final int ZHANWEI_LENGTH = 1 + NUM_LENGTH;
@@ -31,34 +32,31 @@ public class YouBianCodeUtil {
             String num = getStrNum(1);
             newcode = zimu + num;
         } else {
-            String before_code = code.substring(0, code.length() - 1 - NUM_LENGTH);
-            String after_code = code.substring(code.length() - 1 - NUM_LENGTH, code.length());
-            char after_code_zimu = after_code.substring(0, 1).charAt(0);
-            Integer after_code_num = Integer.parseInt(after_code.substring(1));
-//			org.jeecgframework.core.util.LogUtil.info(after_code);
-//			org.jeecgframework.core.util.LogUtil.info(after_code_zimu);
-//			org.jeecgframework.core.util.LogUtil.info(after_code_num);
+            String beforeCode = code.substring(0, code.length() - 1 - NUM_LENGTH);
+            String afterCode = code.substring(code.length() - 1 - NUM_LENGTH, code.length());
+            char afterCodeZimu = afterCode.substring(0, 1).charAt(0);
+            Integer afterCodeNum = Integer.parseInt(afterCode.substring(1));
 
             String nextNum = "";
             char nextZimu = 'A';
             // 先判断数字等于999*,则计数从1重新开始,递增
-            if (after_code_num == getMaxNumByLength(NUM_LENGTH)) {
+            if (afterCodeNum == getMaxNumByLength(NUM_LENGTH)) {
                 nextNum = getNextStrNum(0);
             } else {
-                nextNum = getNextStrNum(after_code_num);
+                nextNum = getNextStrNum(afterCodeNum);
             }
             // 先判断数字等于999*,则字母从A重新开始,递增
-            if (after_code_num == getMaxNumByLength(NUM_LENGTH)) {
-                nextZimu = getNextZiMu(after_code_zimu);
+            if (afterCodeNum == getMaxNumByLength(NUM_LENGTH)) {
+                nextZimu = getNextZiMu(afterCodeZimu);
             } else {
-                nextZimu = after_code_zimu;
+                nextZimu = afterCodeZimu;
             }
 
             // 例如Z99,下一个code就是Z99A01
-            if ('Z' == after_code_zimu && getMaxNumByLength(NUM_LENGTH) == after_code_num) {
+            if ('Z' == afterCodeZimu && getMaxNumByLength(NUM_LENGTH) == afterCodeZimu) {
                 newcode = code + (nextZimu + nextNum);
             } else {
-                newcode = before_code + (nextZimu + nextNum);
+                newcode = beforeCode + (nextZimu + nextNum);
             }
         }
         return newcode;
@@ -78,10 +76,7 @@ public class YouBianCodeUtil {
      */
     public static synchronized String getSubYouBianCode(String parentCode, String localCode) {
         if (localCode != null && localCode != "") {
-
-//			return parentCode + getNextYouBianCode(localCode);
             return getNextYouBianCode(localCode);
-
         } else {
             parentCode = parentCode + "A" + getNextStrNum(0);
         }
@@ -145,11 +140,11 @@ public class YouBianCodeUtil {
         if (length == 0) {
             return 0;
         }
-        String max_num = "";
+        String maxNum = "";
         for (int i = 0; i < length; i++) {
-            max_num = max_num + "9";
+            maxNum = maxNum + "9";
         }
-        return Integer.parseInt(max_num);
+        return Integer.parseInt(maxNum);
     }
 
     public static String[] cutYouBianCode(String code) {

+ 3 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java

@@ -12,7 +12,9 @@ import java.io.UnsupportedEncodingException;
  */
 public class AesEncryptUtil {
 
-    //使用AES-128-CBC加密模式,key需要为16位,key和iv可以相同!
+    /**
+     * 使用AES-128-CBC加密模式,key需要为16位,key和iv可以相同!
+     */
     private static String KEY = EncryptedString.key;
 
     private static String IV = EncryptedString.iv;

+ 21 - 78
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/jsonschema/CommonProperty.java

@@ -4,6 +4,7 @@ import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
+import lombok.Data;
 import org.jeecg.common.system.vo.DictModel;
 
 import com.alibaba.fastjson.JSONObject;
@@ -11,14 +12,10 @@ import com.alibaba.fastjson.JSONObject;
 /**
  * 验证通用属性
  */
+@Data
 public abstract class CommonProperty implements Serializable{
-
 	private static final long serialVersionUID = -426159949502493187L;
-
-
 	protected String key;
-	
-	
 	/**
 	 * <p>此关键字的值必须是字符串或数组。如果它是一个数组,那么数组的元素必须是字符串,并且必须是唯一的。
 	 * <p>字符串值必须是六种基本类型之一(“null”,“boolean”,“object”,“array”,“number”或“string”),或“integer”,它匹配任何数字,零分数部分。
@@ -45,78 +42,26 @@ public abstract class CommonProperty implements Serializable{
 	 *	如果实例的值等于关键字的值,则实例将针对此关键字成功验证。
 	 */
 	protected Object constant;
-	
-	//三个自定义 属性
-	protected String view;// 展示类型
-	protected String title;//数据库字段备注
-	protected Integer order;//字段显示排序
-	
-	protected boolean disabled;//是否禁用
-	
-	public boolean isDisabled() {
-		return disabled;
-	}
-
-	public void setDisabled(boolean disabled) {
-		this.disabled = disabled;
-	}
-
-	public String getView() {
-		return view;
-	}
-
-	public void setView(String view) {
-		this.view = view;
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public void setKey(String key) {
-		this.key = key;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public List<DictModel> getInclude() {
-		return include;
-	}
-
-	public void setInclude(List<DictModel> include) {
-		this.include = include;
-	}
-
-	public Object getConstant() {
-		return constant;
-	}
-
-	public void setConstant(Object constant) {
-		this.constant = constant;
-	}
-	
-	public String getTitle() {
-		return title;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public Integer getOrder() {
-		return order;
-	}
-
-	public void setOrder(Integer order) {
-		this.order = order;
-	}
 
+    /**
+     * 三个自定义 属性
+     */
+    /**
+     * 展示类型
+     */
+    protected String view;
+    /**
+     * 数据库字段备注
+     */
+    protected String title;
+    /**
+     * 字段显示排序
+     */
+    protected Integer order;
+    /**
+     * 是否禁用
+     */
+    protected boolean disabled;
 	/**
 	 * 返回一个map有两个key
 	 * <P>key ---> Property JSON的key
@@ -152,6 +97,4 @@ public abstract class CommonProperty implements Serializable{
 		}
 		return json;
 	}
-	
-
 }

+ 7 - 27
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/jsonschema/validate/DictProperty.java

@@ -3,6 +3,7 @@ package org.jeecg.common.util.jsonschema.validate;
 import java.util.HashMap;
 import java.util.Map;
 
+import lombok.Data;
 import org.jeecg.common.util.jsonschema.CommonProperty;
 
 import com.alibaba.fastjson.JSONObject;
@@ -12,41 +13,20 @@ import com.alibaba.fastjson.JSONObject;
  * @author 86729
  *
  */
+@Data
 public class DictProperty extends CommonProperty {
 	
 	private static final long serialVersionUID = 3786503639885610767L;
-	
-	//字典三属性
+
+    /**
+     * 字典三属性
+     */
+
 	private String dictCode;
 	private String dictTable;
 	private String dictText;
-	
-	public String getDictCode() {
-		return dictCode;
-	}
-
-	public void setDictCode(String dictCode) {
-		this.dictCode = dictCode;
-	}
-
-	public String getDictTable() {
-		return dictTable;
-	}
-
-	public void setDictTable(String dictTable) {
-		this.dictTable = dictTable;
-	}
-
-	public String getDictText() {
-		return dictText;
-	}
-
-	public void setDictText(String dictText) {
-		this.dictText = dictText;
-	}
 
 	public DictProperty() {}
-	
 	/**
 	 *  构造器
 	 */

+ 15 - 9
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/oConvertUtils.java

@@ -1,5 +1,7 @@
 package org.jeecg.common.util;
 
+import org.apache.commons.lang.StringEscapeUtils;
+
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
@@ -54,7 +56,7 @@ public class oConvertUtils {
 		return temp;
 	}
 
-    public static String StrToUtf(String strIn, String sourceCode, String targetCode) {
+    public static String strToUtf(String strIn, String sourceCode, String targetCode) {
 		strIn = "";
 		try {
 			strIn = new String(strIn.getBytes("ISO-8859-1"), "GBK");
@@ -206,9 +208,9 @@ public class oConvertUtils {
 	 * @param s
 	 * @return
 	 */
-	/*public static String escapeJava(Object s) {
+    public static String escapeJava(Object s) {
 		return StringEscapeUtils.escapeJava(getString(s));
-	}*/
+    }
 	
 	public static String getString(Object object) {
 		if (isEmpty(object)) {
@@ -298,12 +300,15 @@ public class oConvertUtils {
 	 * @throws SocketException
 	 */
 	public static String getRealIp() throws SocketException {
-		String localip = null;// 本地IP,如果没有配置外网IP则返回它
-		String netip = null;// 外网IP
+        // 本地IP,如果没有配置外网IP则返回它
+        String localip = null;
+        // 外网IP
+        String netip = null;
 
 		Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
 		InetAddress ip = null;
-		boolean finded = false;// 是否找到外网IP
+        // 是否找到外网IP
+        boolean finded = false;
 		while (netInterfaces.hasMoreElements() && !finded) {
 			NetworkInterface ni = netInterfaces.nextElement();
 			Enumeration<InetAddress> address = ni.getInetAddresses();
@@ -463,8 +468,8 @@ public class oConvertUtils {
 	 * 将下划线大写方式命名的字符串转换为驼峰式。
 	 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。</br>
 	 * 例如:hello_world,test_id->helloWorld,testId
-	 * 
-	 * @param name
+	 *
+     * @param names
 	 *            转换前的下划线大写方式命名的字符串
 	 * @return 转换后的驼峰式命名的字符串
 	 */
@@ -527,7 +532,8 @@ public class oConvertUtils {
         	return para.toLowerCase(); 
         }
         StringBuilder sb=new StringBuilder(para);
-        int temp=0;//定位
+        //定位
+        int temp = 0;
         //从第三个字符开始 避免命名不规范 
         for(int i=2;i<para.length();i++){
             if(Character.isUpperCase(para.charAt(i))){

+ 1 - 1
jeecg-boot-module-system/pom.xml

@@ -92,7 +92,7 @@
         <dependency>
             <groupId>e-iceblue</groupId>
             <artifactId>spire.pdf</artifactId>
-            <version>2.2.0</version>
+            <version>2.7.8</version>
         </dependency>
     </dependencies>
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/config/RedisConfig.java

@@ -27,7 +27,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
 
 @Configuration
-@EnableCaching // 开启缓存支持
+@EnableCaching
 public class RedisConfig extends CachingConfigurerSupport {
 
 	@Resource

+ 33 - 17
jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java

@@ -43,21 +43,35 @@ public class ShiroConfig {
 		// 拦截器
 		Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
 		// 配置不会被拦截的链接 顺序判断
-		filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
-
-		filterChainDefinitionMap.put("/sys/getEncryptedString", "anon"); //获取加密串
-		filterChainDefinitionMap.put("/sys/sms", "anon");//短信验证码
-		filterChainDefinitionMap.put("/sys/phoneLogin", "anon");//手机登录		
-		filterChainDefinitionMap.put("/sys/user/checkOnlyUser", "anon");//校验用户是否存在
-		filterChainDefinitionMap.put("/sys/user/register", "anon");//用户注册
-		filterChainDefinitionMap.put("/sys/user/querySysUser", "anon");//根据手机号获取用户信息
-		filterChainDefinitionMap.put("/sys/user/phoneVerification", "anon");//用户忘记密码验证手机号
-		filterChainDefinitionMap.put("/sys/user/passwordChange", "anon");//用户更改密码
-		filterChainDefinitionMap.put("/auth/2step-code", "anon");//登录验证码
-		filterChainDefinitionMap.put("/sys/common/view/**", "anon");//图片预览不限制token
-		filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件下载不限制token
-		filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
-		filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件
+        //登录接口排除
+        filterChainDefinitionMap.put("/sys/login", "anon");
+
+        //获取加密串
+        filterChainDefinitionMap.put("/sys/getEncryptedString", "anon");
+        //短信验证码
+        filterChainDefinitionMap.put("/sys/sms", "anon");
+        //手机登录
+        filterChainDefinitionMap.put("/sys/phoneLogin", "anon");
+        //校验用户是否存在
+        filterChainDefinitionMap.put("/sys/user/checkOnlyUser", "anon");
+        //用户注册
+        filterChainDefinitionMap.put("/sys/user/register", "anon");
+        //根据手机号获取用户信息
+        filterChainDefinitionMap.put("/sys/user/querySysUser", "anon");
+        //用户忘记密码验证手机号
+        filterChainDefinitionMap.put("/sys/user/phoneVerification", "anon");
+        //用户更改密码
+        filterChainDefinitionMap.put("/sys/user/passwordChange", "anon");
+        //登录验证码
+        filterChainDefinitionMap.put("/auth/2step-code", "anon");
+        //图片预览不限制token
+        filterChainDefinitionMap.put("/sys/common/view/**", "anon");
+        //文件下载不限制token
+        filterChainDefinitionMap.put("/sys/common/download/**", "anon");
+        //pdf预览
+        filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");
+        //pdf预览需要文件
+        filterChainDefinitionMap.put("/generic/**", "anon");
 		filterChainDefinitionMap.put("/", "anon");
 		filterChainDefinitionMap.put("/doc.html", "anon");
 		filterChainDefinitionMap.put("/**/*.js", "anon");
@@ -82,8 +96,10 @@ public class ShiroConfig {
 		filterChainDefinitionMap.put("/actuator/metrics/**", "anon");
 		filterChainDefinitionMap.put("/actuator/httptrace/**", "anon");
 		filterChainDefinitionMap.put("/actuator/redis/**", "anon");
-        filterChainDefinitionMap.put("/test/**", "anon"); //模板测试
-        filterChainDefinitionMap.put("/report/**", "anon"); //模板测试
+        //模板测试
+        filterChainDefinitionMap.put("/test/**", "anon");
+        //报表测试
+        filterChainDefinitionMap.put("/report/**", "anon");
 
 		//oauth接口
         filterChainDefinitionMap.put("/auth/**", "anon");

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

@@ -108,22 +108,10 @@ public class AdCoverController {
         return result;
     }
 
-    //    @RequestMapping(value = "/list", method = RequestMethod.GET)
-//    //@RequiresPermissions("sys:user:list")
-//    public Result<IPage<SysUser>> queryPageList(SysUser user, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-//                                                @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
-//        Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
-//        QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
-//        Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
-//        IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);
-//        result.setSuccess(true);
-//        result.setResult(pageList);
-//        return result;
-//    }
     @ResponseBody
     @RequestMapping(value="/detail", method = RequestMethod.GET)
     public Result<Map<String,Object>> getDetail(@RequestParam(name="photoId") Long photoId, @RequestParam(name="userId") Long userId){
-        Result<Map<String,Object>> result = new Result<Map<String,Object>>();
+        Result<Map<String, Object>> result = new Result<>();
         AppAd ad = new AppAd();
         ad.setPhotoId(photoId);
         QueryWrapper<AppAd> queryWrapper = QueryGenerator.initQueryWrapper(ad,null);
@@ -160,7 +148,7 @@ public class AdCoverController {
     @ResponseBody
     @RequestMapping(value="/adlist", method = RequestMethod.GET)
     public Result<List<AppAd>> getAdList(@RequestParam(name="photoId") String photoId, @RequestParam(name="userId") Long userId){
-        Result<List<AppAd>> result = new Result<List<AppAd>>();
+        Result<List<AppAd>> result = new Result<>();
         AppAd ad = new AppAd();
         ad.setPhotoId(Long.valueOf(photoId));
         QueryWrapper<AppAd> queryWrapper = QueryGenerator.initQueryWrapper(ad,null);

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

@@ -262,7 +262,7 @@ public class BindAccountAuthController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

+ 15 - 10
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java

@@ -72,17 +72,23 @@ public class BindAccountLoginController {
             result.setSuccess(false);
             return result;
         }
-        String userId = json.getString("userId"); //创建人
+        //创建人
+        String userId = json.getString("userId");
         String password = json.getString("password");
         String loginType = json.getString("loginType");
-        String accountName = json.getString("accountName"); //账号
+        //账号
+        String accountName = json.getString("accountName");
         boolean trueOrFalse = bindAccountLoginService.bindLogin(advertiserId, accountName, password, loginType, userId);
         if (trueOrFalse) {
             String realName = json.getString("realName");
-            String departmentId = json.getString("departmentId"); //部门id
-            String distributionName = json.getString("distributionName");//指定分配人姓名
-            String advertiserName = json.getString("advertiser_name"); // 广告主名称
-            String mediaId = json.getString("mediaId"); // 媒体类型: 1 头条 2 快手
+            //部门id
+            String departmentId = json.getString("departmentId");
+            //指定分配人姓名
+            String distributionName = json.getString("distributionName");
+            // 广告主名称
+            String advertiserName = json.getString("advertiser_name");
+            // 媒体类型: 1 头条 2 快手
+            String mediaId = json.getString("mediaId");
             UserAllocation userAllocation = new UserAllocation();
             userAllocation.setDistributionName(distributionName);
             userAllocation.setUserId(userId);
@@ -119,9 +125,9 @@ public class BindAccountLoginController {
                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                          HttpServletRequest req) {
-        Result<IPage<BindAccountLogin>> result = new Result<IPage<BindAccountLogin>>();
+        Result<IPage<BindAccountLogin>> result = new Result<>();
         QueryWrapper<BindAccountLogin> queryWrapper = QueryGenerator.initQueryWrapper(bindAccountLogin, req.getParameterMap());
-        Page<BindAccountLogin> page = new Page<BindAccountLogin>(pageNo, pageSize);
+        Page<BindAccountLogin> page = new Page<>(pageNo, pageSize);
         IPage<BindAccountLogin> pageList = bindAccountLoginService.page(page, queryWrapper);
         result.setSuccess(true);
         result.setResult(pageList);
@@ -138,7 +144,7 @@ public class BindAccountLoginController {
     @ApiOperation(value = "账号绑定-登陆-添加", notes = "账号绑定-登陆-添加")
     @PostMapping(value = "/add")
     public Result<BindAccountLogin> add(@RequestBody BindAccountLogin bindAccountLogin) {
-        Result<BindAccountLogin> result = new Result<BindAccountLogin>();
+        Result<BindAccountLogin> result = new Result<>();
         try {
             bindAccountLoginService.save(bindAccountLogin);
             result.success("添加成功!");
@@ -165,7 +171,6 @@ public class BindAccountLoginController {
             result.error500("未找到对应实体");
         } else {
             boolean ok = bindAccountLoginService.updateById(bindAccountLogin);
-            //TODO 返回false说明什么?
             if (ok) {
                 result.success("修改成功!");
             }

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

@@ -222,7 +222,7 @@ public class ByteDanceAdvertisePlanController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class ByteDanceAdvertiserBudgetController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -227,7 +227,7 @@ public class ByteDanceAdvertiserController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -220,7 +220,7 @@ public class ByteDanceBudgetTemplateController {
       MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
       Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
       for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();// 获取上传文件对象
+          MultipartFile file = entity.getValue();
           ImportParams params = new ImportParams();
           params.setTitleRows(2);
           params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class ByteDanceCampaignController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -226,7 +226,7 @@ public class ByteDanceCampaignTemplateController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class ByteDanceCreativeController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class ByteDanceCreativeMaterialController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class ByteDanceCustomAudienceController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -222,7 +222,7 @@ public class BytedanceAdvertisePlanTemplateController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

+ 31 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReportController.java

@@ -20,30 +20,54 @@ import java.util.Map;
 @RestController
 @RequestMapping("report")
 public class ReportController {
-    @GetMapping("advertiser")
-//    public Map<String, Object> advertiserReport(@RequestBody JSONObject conditions) {
-    public Map<String, Object> advertiserReport() {
-        JSONObject conditions = new JSONObject();
+    /**
+     * 头条广告主报表信息
+     * 只支持查询2016-10-26及以后的日期
+     * 单次获取最大条数1000
+     *
+     * @return
+     */
+    @GetMapping("bytedance/advertiser")
+    public Map<String, Object> advertiserReport(@RequestBody JSONObject conditions) {
         return reportService.getAdvertiserReport(conditions);
     }
 
+    /**
+     * 头条广告计划报表信息
+     * 只支持查询2016-10-26及以后的日期
+     * 单次获取最大条数1000
+     * @return
+     */
     @GetMapping("campaign")
-//    public Map<String, Object> campaignReport(@RequestBody JSONObject conditions) {
-    public Map<String, Object> campaignReport() {
-        JSONObject conditions = new JSONObject();
+    public Map<String, Object> campaignReport(@RequestBody JSONObject conditions) {
         return reportService.getCampaignReport(conditions);
     }
 
+    /**
+     * 头条广告计划报表信息
+     * @param conditions
+     * @return
+     */
     @GetMapping("ad")
     public Map<String, Object> adReport(@RequestBody JSONObject conditions) {
         return reportService.getAdReport(conditions);
     }
 
+    /**
+     * 头条广告创意报表信息
+     * @param conditions
+     * @return
+     */
     @GetMapping("creative")
     public Map<String, Object> creativeReport(@RequestBody JSONObject conditions) {
         return reportService.getCreativeReport(conditions);
     }
 
+    /**
+     * 代理商数据
+     * @param conditions
+     * @return
+     */
     @GetMapping("agent")
     public Map<String, Object> agentReport(@RequestBody JSONObject conditions) {
         return reportService.getAgentReport(conditions);

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountAuthServiceImpl.java

@@ -45,7 +45,6 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
         bindAccountAuthMapper.deleteByMap(deleteMap);
         BindAccountAuth bindAccount = new BindAccountAuth();
         bindAccount.setAccountId(accountId);
-
         bindAccount.setAdvertiserId(state);
         bindAccount.setUpdateTime(new Date());
         bindAccount.setAuthType(authType);

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java

@@ -62,7 +62,6 @@ public class BindAccountLoginServiceImpl extends ServiceImpl<BindAccountLoginMap
             log.info("登录账号绑定成功,广告主id:{}", bindAccountLogin.getAdvertiserId());
             return true;
         }
-
         return false;
     }
 

+ 4 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertisePlanServiceImpl.java

@@ -167,10 +167,12 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
                 put("advertiser_id", advertiserId);
             }
         };
-        if ("EXTERNAL_URL".equals(targetTemplate.getDownloadType())) {//落地页
+        //落地页
+        if ("EXTERNAL_URL".equals(targetTemplate.getDownloadType())) {
             data.put("external_url", targetTemplate.getDownloadUrl());
         }
-        if ("DOWNLOAD_URL".equals(targetTemplate.getDownloadType())) {//落地页
+        //下载链接
+        if ("DOWNLOAD_URL".equals(targetTemplate.getDownloadType())) {
             if ("ios".equals(targetTemplate.getDownloadMode())) {
                 data.put("download_url", targetTemplate.getDownloadUrl());
             }

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java

@@ -98,8 +98,8 @@ public class BytedanceAdvertisePlanTemplateServiceImpl extends ServiceImpl<Byted
         //(3):预算与出价
         //广告预算类型 日预算、总预算
         data.put("budget_mode", budgetTemplate.getBudgetPriceMode());
-        //广告预算
-        data.put("budget", budgetTemplate.getBudgetPrice());//需要大于bid
+        //广告预算 //需要大于bid
+        data.put("budget", budgetTemplate.getBudgetPrice());
         //转化出价(ocpm请填写 cpa_bid)
         data.put("cpa_bid", budgetTemplate.getConvertPrice());
         data.put("convert_id", convertId);

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java

@@ -212,9 +212,9 @@ public class ReportServiceImpl implements IReportService {
         String accountFourKsDataUrl = data.getString("accountFourKsDataUrl");
         String debitDataUrl = data.getString("debitDataUrl");
         //1:文件下载入库
-        String accountOneKsDataPath = downLoadByURL(accountOneKsDataUrl);
-        String accountFourKsDataPath = downLoadByURL(accountFourKsDataUrl);
-        String debitDataPath = downLoadByURL(debitDataUrl);
+        String accountOneKsDataPath = downLoadByUrl(accountOneKsDataUrl);
+        String accountFourKsDataPath = downLoadByUrl(accountFourKsDataUrl);
+        String debitDataPath = downLoadByUrl(debitDataUrl);
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/M/dd");
         //2:文件入库
         //2.1 清除数据库原始数据
@@ -573,7 +573,7 @@ public class ReportServiceImpl implements IReportService {
         }
     }
 
-    public String downLoadByURL(String fileUrl) {
+    public String downLoadByUrl(String fileUrl) {
         //获取文件名,文件名实际上在URL中可以找到
         String fileName = fileUrl.substring(fileUrl.lastIndexOf("/") + 1);
         //这里服务器上要将此图保存的路径

+ 9 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/itext5/Pkcs.java

@@ -118,7 +118,7 @@ public class Pkcs {
             ContentSigner singer = jBuilder.setProvider(
                     new BouncyCastleProvider()).build(privateKey);
             // 分发点
-            ASN1ObjectIdentifier cRLDistributionPoints = new ASN1ObjectIdentifier(
+            ASN1ObjectIdentifier crlDistributionPoints = new ASN1ObjectIdentifier(
                     "2.5.29.31");
             GeneralName generalName = new GeneralName(
                     GeneralName.uniformResourceIdentifier, certificateCrl);
@@ -127,8 +127,8 @@ public class Pkcs {
                     seneralNames);
             DistributionPoint[] points = new DistributionPoint[1];
             points[0] = new DistributionPoint(distributionPoint, null, null);
-            CRLDistPoint cRLDistPoint = new CRLDistPoint(points);
-            builder.addExtension(cRLDistributionPoints, true, cRLDistPoint);
+            CRLDistPoint crlDistPoint = new CRLDistPoint(points);
+            builder.addExtension(crlDistributionPoints, true, crlDistPoint);
             // 用途
             ASN1ObjectIdentifier keyUsage = new ASN1ObjectIdentifier(
                     "2.5.29.15");
@@ -141,13 +141,14 @@ public class Pkcs {
             builder.addExtension(basicConstraints, true, new BasicConstraints(
                     true));
             // privKey:使用自己的私钥进行签名,CA证书
-            if (extensions != null)
+            if (extensions != null) {
                 for (Extension ext : extensions) {
                     builder.addExtension(
                             new ASN1ObjectIdentifier(ext.getOid()),
                             ext.isCritical(),
                             ASN1Primitive.fromByteArray(ext.getValue()));
                 }
+            }
             X509CertificateHolder holder = builder.build(singer);
             CertificateFactory cf = CertificateFactory.getInstance("X.509");
             bout = new ByteArrayInputStream(holder.toASN1Structure()
@@ -186,7 +187,7 @@ public class Pkcs {
      * @param cert
      * @return
      */
-    public boolean SignedData_Verify(byte[] signData, byte[] signedData, byte[] cert) {
+    public boolean signedDataVerify(byte[] signData, byte[] signedData, byte[] cert) {
         boolean verifyRet = true;
         try {
             // 创建Factory对象
@@ -216,7 +217,7 @@ public class Pkcs {
      * @param signedData
      * @return
      */
-    public boolean SignedData_Verify(byte[] signedData) {
+    public boolean signedDataVerify(byte[] signedData) {
         boolean verifyRet = true;
         try {
             // 新建PKCS#7签名数据处理对象
@@ -266,8 +267,8 @@ public class Pkcs {
         // ST: 州或省份名称  C: 单位的两字母国家代码
         String issuerStr = "CN=在线医院,OU=gitbook研发部,O=gitbook有限公司,C=CN,E=gitbook@sina.com,L=北京,ST=北京";
         String subjectStr = "CN=huangjinjin,OU=gitbook研发部,O=gitbook有限公司,C=CN,E=huangjinjin@sina.com,L=北京,ST=北京";
-        String certificateCRL = "https://gitbook.cn";
-        Map<String, byte[]> result = createCert("123456", issuerStr, subjectStr, certificateCRL);
+        String certificateCrl = "https://gitbook.cn";
+        Map<String, byte[]> result = createCert("123456", issuerStr, subjectStr, certificateCrl);
 
         FileOutputStream outPutStream = new FileOutputStream("D:/keystore.p12"); // ca.jks
         outPutStream.write(result.get("keyStoreData"));

+ 6 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/itext5/SignPdf.java

@@ -46,7 +46,7 @@ public class SignPdf {
                               float x, float y) {
         File signPdfSrcFile = new File(signPdfSrc);
         PdfReader reader = null;
-        ByteArrayOutputStream signPDFData = null;
+        ByteArrayOutputStream signPdfData = null;
         PdfStamper stp = null;
         FileInputStream fos = null;
         try {
@@ -60,10 +60,10 @@ public class SignPdf {
             PrivateKey key = (PrivateKey) ks.getKey(alias, password.toCharArray());
             Certificate[] chain = ks.getCertificateChain(alias);
             reader = new PdfReader(signPdfSrc);
-            signPDFData = new ByteArrayOutputStream();
+            signPdfData = new ByteArrayOutputStream();
             // 临时pdf文件
             File temp = new File(signPdfSrcFile.getParent(), System.currentTimeMillis() + ".pdf");
-            stp = PdfStamper.createSignature(reader, signPDFData, '\0', temp, true);
+            stp = PdfStamper.createSignature(reader, signPdfData, '\0', temp, true);
             stp.setFullCompression();
             PdfSignatureAppearance sap = stp.getSignatureAppearance();
             sap.setReason("数字签名,不可改变");
@@ -81,18 +81,16 @@ public class SignPdf {
             MakeSignature.signDetached(sap, digest, signature, chain, null, null, null, 0, CryptoStandard.CADES);
             stp.close();
             reader.close();
-            return signPDFData.toByteArray();
+            return signPdfData.toByteArray();
         } catch (Exception e) {
             e.printStackTrace();
         } finally {
-
-            if (signPDFData != null) {
+            if (signPdfData != null) {
                 try {
-                    signPDFData.close();
+                    signPdfData.close();
                 } catch (IOException e) {
                 }
             }
-
             if (fos != null) {
                 try {
                     fos.close();

+ 6 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/sign/pdf/RSACertHelper.java

@@ -88,7 +88,9 @@ public class RSACertHelper {
         System.out.println(cerStr);
     }
 
-    //1生成pfx文件
+    /**
+     * 生成pfx文件
+     */
     public static void coverToPfx(String keyStoreFile, String passwd, String keyAlias, String pfxFile) {
         try {
             KeyStore inputKeyStore = KeyStore.getInstance("JKS");
@@ -113,7 +115,6 @@ public class RSACertHelper {
                 outputKeyStore.setKeyEntry(keyAlias, key, passwd
                         .toCharArray(), certChain);
             }
-
             FileOutputStream out = new FileOutputStream(pfxFile);
             outputKeyStore.store(out, nPassword);
             out.close();
@@ -123,7 +124,9 @@ public class RSACertHelper {
         }
     }
 
-    //2获取公钥字符串
+    /**
+     * 获取公钥字符串
+     */
     public static String getPubStr(String cerFile) {
         String key = "";
         // 读取证书文件
@@ -142,6 +145,4 @@ public class RSACertHelper {
         }
         return key;
     }
-
-
 }

+ 90 - 333
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vo/StatisticCampaignVo.java

@@ -1,12 +1,17 @@
 package org.jeecg.modules.ctop.vo;
 
+import lombok.Data;
+
 import java.io.Serializable;
 
 /**
  * @author 宋英豪
  */
+@Data
 public class StatisticCampaignVo implements Serializable {
-    //日期
+    /**
+     * 日期
+     */
     private String statisticDate;
     /**
      * 代理
@@ -44,61 +49,117 @@ public class StatisticCampaignVo implements Serializable {
      * 花费
      */
     private String cost;
-    //封面曝光数
+    /**
+     * 封面曝光数
+     */
     private String coverViews;
-    //封面点击数
+    /**
+     * 封面点击数
+     */
     private String coverClick;
-    //素材曝光数
+    /**
+     * 素材曝光数
+     */
     private String materialViews;
-    //行为数
+    /**
+     * 行为数
+     */
     private String actions;
-    //点击率
+    /**
+     * 点击率
+     */
     private String clickRate;
-    //行为点击率
+    /**
+     * 行为点击率
+     */
     private String actionClickRate;
-    //ACTR*BCTR
+    /**
+     * ACTR*BCTR
+     */
     private String abctr;
-    //点击成本
+    /**
+     * 点击成本
+     */
     private String clickPrice;
-    //行为成本
+    /**
+     * 行为成本
+     */
     private String actionPrice;
-    //注册用户
+    /**
+     * 注册用户
+     */
     private String registUserNum;
-    //完件用户
+    /**
+     * 完件用户
+     */
     private String complateUserNum;
-    //授信用户
+    /**
+     * 授信用户
+     */
     private String creditUserNum;
-    //当日注册且完件数
+    /**
+     * 当日注册且完件数
+     */
     private String registCompleteNum;
-    //当日注册且授信数
+    /**
+     * 当日注册且授信数
+     */
     private String registCreditNum;
-    //注册成本
+    /**
+     * 注册成本
+     */
     private String registPrice;
-    //完件成本
+    /**
+     * 完件成本
+     */
     private String completePrice;
-    //授信成本
+    /**
+     * 授信成本
+     */
     private String creditPrice;
-    //当日注册且完件成本
+    /**
+     * 当日注册且完件成本
+     */
     private String registCompletePrice;
-    //当日注册且授信成本
+    /**
+     * 当日注册且授信成本
+     */
     private String registCreditPrice;
-    //点击注册率
+    /**
+     * 点击注册率
+     */
     private String clickRegistRate;
-    //行为注册率
+    /**
+     * 行为注册率
+     */
     private String actionRegistRate;
-    //完件率
+    /**
+     * 完件率
+     */
     private String completeRate;
-    //授信率
+    /**
+     * 授信率
+     */
     private String creditRate;
-    //当日完件率
+    /**
+     * 当日完件率
+     */
     private String registCompleteRate;
-    //当日授信率
+    /**
+     * 当日授信率
+     */
     private String registCreditRate;
-    //当日完件百分比
+    /**
+     * 当日完件百分比
+     */
     private String completeRateDay;
-    //当日授信百分比
+    /**
+     * 当日授信百分比
+     */
     private String creditRateDay;
-    //当日授信注册百分比
+    /**
+     * 当日授信注册百分比
+     */
     private String creditRegistRateDay;
 
     @Override
@@ -144,308 +205,4 @@ public class StatisticCampaignVo implements Serializable {
                 ", creditRegistRateDay='" + creditRegistRateDay + '\'' +
                 '}';
     }
-
-    public String getStatisticDate() {
-        return statisticDate;
-    }
-
-    public void setStatisticDate(String statisticDate) {
-        this.statisticDate = statisticDate;
-    }
-
-    public String getProxy() {
-        return proxy;
-    }
-
-    public void setProxy(String proxy) {
-        this.proxy = proxy;
-    }
-
-    public String getDeliverySystem() {
-        return deliverySystem;
-    }
-
-    public void setDeliverySystem(String deliverySystem) {
-        this.deliverySystem = deliverySystem;
-    }
-
-    public String getChannelName() {
-        return channelName;
-    }
-
-    public void setChannelName(String channelName) {
-        this.channelName = channelName;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    public String getMeterial() {
-        return meterial;
-    }
-
-    public void setMeterial(String meterial) {
-        this.meterial = meterial;
-    }
-
-    public String getPriceType() {
-        return priceType;
-    }
-
-    public void setPriceType(String priceType) {
-        this.priceType = priceType;
-    }
-
-    public String getDirectCondition() {
-        return directCondition;
-    }
-
-    public void setDirectCondition(String directCondition) {
-        this.directCondition = directCondition;
-    }
-
-    public String getBasicDirect() {
-        return basicDirect;
-    }
-
-    public void setBasicDirect(String basicDirect) {
-        this.basicDirect = basicDirect;
-    }
-
-    public String getCost() {
-        return cost;
-    }
-
-    public void setCost(String cost) {
-        this.cost = cost;
-    }
-
-    public String getCoverViews() {
-        return coverViews;
-    }
-
-    public void setCoverViews(String coverViews) {
-        this.coverViews = coverViews;
-    }
-
-    public String getCoverClick() {
-        return coverClick;
-    }
-
-    public void setCoverClick(String coverClick) {
-        this.coverClick = coverClick;
-    }
-
-    public String getMaterialViews() {
-        return materialViews;
-    }
-
-    public void setMaterialViews(String materialViews) {
-        this.materialViews = materialViews;
-    }
-
-    public String getActions() {
-        return actions;
-    }
-
-    public void setActions(String actions) {
-        this.actions = actions;
-    }
-
-    public String getClickRate() {
-        return clickRate;
-    }
-
-    public void setClickRate(String clickRate) {
-        this.clickRate = clickRate;
-    }
-
-    public String getActionClickRate() {
-        return actionClickRate;
-    }
-
-    public void setActionClickRate(String actionClickRate) {
-        this.actionClickRate = actionClickRate;
-    }
-
-    public String getAbctr() {
-        return abctr;
-    }
-
-    public void setAbctr(String abctr) {
-        this.abctr = abctr;
-    }
-
-    public String getClickPrice() {
-        return clickPrice;
-    }
-
-    public void setClickPrice(String clickPrice) {
-        this.clickPrice = clickPrice;
-    }
-
-    public String getActionPrice() {
-        return actionPrice;
-    }
-
-    public void setActionPrice(String actionPrice) {
-        this.actionPrice = actionPrice;
-    }
-
-    public String getRegistUserNum() {
-        return registUserNum;
-    }
-
-    public void setRegistUserNum(String registUserNum) {
-        this.registUserNum = registUserNum;
-    }
-
-    public String getComplateUserNum() {
-        return complateUserNum;
-    }
-
-    public void setComplateUserNum(String complateUserNum) {
-        this.complateUserNum = complateUserNum;
-    }
-
-    public String getCreditUserNum() {
-        return creditUserNum;
-    }
-
-    public void setCreditUserNum(String creditUserNum) {
-        this.creditUserNum = creditUserNum;
-    }
-
-    public String getRegistCompleteNum() {
-        return registCompleteNum;
-    }
-
-    public void setRegistCompleteNum(String registCompleteNum) {
-        this.registCompleteNum = registCompleteNum;
-    }
-
-    public String getRegistCreditNum() {
-        return registCreditNum;
-    }
-
-    public void setRegistCreditNum(String registCreditNum) {
-        this.registCreditNum = registCreditNum;
-    }
-
-    public String getRegistPrice() {
-        return registPrice;
-    }
-
-    public void setRegistPrice(String registPrice) {
-        this.registPrice = registPrice;
-    }
-
-    public String getCompletePrice() {
-        return completePrice;
-    }
-
-    public void setCompletePrice(String completePrice) {
-        this.completePrice = completePrice;
-    }
-
-    public String getCreditPrice() {
-        return creditPrice;
-    }
-
-    public void setCreditPrice(String creditPrice) {
-        this.creditPrice = creditPrice;
-    }
-
-    public String getRegistCompletePrice() {
-        return registCompletePrice;
-    }
-
-    public void setRegistCompletePrice(String registCompletePrice) {
-        this.registCompletePrice = registCompletePrice;
-    }
-
-    public String getRegistCreditPrice() {
-        return registCreditPrice;
-    }
-
-    public void setRegistCreditPrice(String registCreditPrice) {
-        this.registCreditPrice = registCreditPrice;
-    }
-
-    public String getClickRegistRate() {
-        return clickRegistRate;
-    }
-
-    public void setClickRegistRate(String clickRegistRate) {
-        this.clickRegistRate = clickRegistRate;
-    }
-
-    public String getActionRegistRate() {
-        return actionRegistRate;
-    }
-
-    public void setActionRegistRate(String actionRegistRate) {
-        this.actionRegistRate = actionRegistRate;
-    }
-
-    public String getCompleteRate() {
-        return completeRate;
-    }
-
-    public void setCompleteRate(String completeRate) {
-        this.completeRate = completeRate;
-    }
-
-    public String getCreditRate() {
-        return creditRate;
-    }
-
-    public void setCreditRate(String creditRate) {
-        this.creditRate = creditRate;
-    }
-
-    public String getRegistCompleteRate() {
-        return registCompleteRate;
-    }
-
-    public void setRegistCompleteRate(String registCompleteRate) {
-        this.registCompleteRate = registCompleteRate;
-    }
-
-    public String getRegistCreditRate() {
-        return registCreditRate;
-    }
-
-    public void setRegistCreditRate(String registCreditRate) {
-        this.registCreditRate = registCreditRate;
-    }
-
-    public String getCompleteRateDay() {
-        return completeRateDay;
-    }
-
-    public void setCompleteRateDay(String completeRateDay) {
-        this.completeRateDay = completeRateDay;
-    }
-
-    public String getCreditRateDay() {
-        return creditRateDay;
-    }
-
-    public void setCreditRateDay(String creditRateDay) {
-        this.creditRateDay = creditRateDay;
-    }
-
-    public String getCreditRegistRateDay() {
-        return creditRegistRateDay;
-    }
-
-    public void setCreditRegistRateDay(String creditRegistRateDay) {
-        this.creditRegistRateDay = creditRegistRateDay;
-    }
 }

+ 7 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mock/MockController.java

@@ -144,8 +144,7 @@ public class MockController {
 		}
 		return res;
 	}
-	
-	//-------------------------------------------------------------------------------------------
+
 	/**
 	 * 工作台首页的数据
 	 * @return
@@ -174,13 +173,15 @@ public class MockController {
 	public String taskProcess() {
 		return readJson("classpath:org/jeecg/modules/demo/mock/json/task_process.json");
 	}
-	//-------------------------------------------------------------------------------------------
-	
-	//author:lvdandan-----date:20190315---for:添加数据日志json----
+
+    /**
+     * author:lvdandan-----date:20190315---for:添加数据日志json----
+     *
+     * @return 数据日志
+     */
 	public String sysDataLogJson() {
 		return readJson("classpath:org/jeecg/modules/demo/mock/json/sysdatalog.json");
 	}
-	//author:lvdandan-----date:20190315---for:添加数据日志json----
 	
 	/**
 	 * 读取json格式文件

+ 5 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java

@@ -296,10 +296,12 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
         return modelAndView;
     }
 
-    // ================================================================================================================
+    /**
+     * ================================================================================================================
+     * ==========================================动态表单
+     * JSON接收测试==============================================================================
+     */
 
-    // ==========================================动态表单
-    // JSON接收测试===========================================//
     @PostMapping(value = "/testOnlineAdd")
     public Result<JeecgDemo> testOnlineAdd(@RequestBody JSONObject json) {
         Result<JeecgDemo> result = new Result<JeecgDemo>();

+ 49 - 46
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCreateServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.utils.Check;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.ctop.entity.CtopOauthToken;
 import org.jeecg.modules.ctop.service.ICtopOauthTokenService;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
@@ -27,9 +28,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+@Slf4j
 @Service
 public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
-    private static final Logger logger = LoggerFactory.getLogger(KuaiShouCreateServiceImpl.class);
     @Autowired
     private KuaiShouCampaignTemplateMapper campaignTemplateMapper;
     @Autowired
@@ -42,6 +43,11 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
     private ICtopOauthTokenService oauthTokenService;
     @Autowired
     private KuaiShouCampaignCreateMapper campaignCreateMapper;
+    @Autowired
+    private IKuaiShouVideoService videoService;
+    @Autowired
+    private IKuaiShouImageService imageService;
+
 
     @Override
     public Map<String, Object> createGroups(KuaiShouGroupCreateLog groupCreateTemplate) {
@@ -64,11 +70,12 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
 
             CtopOauthToken ctopOauthToken = oauthTokenService.getOauthTokenByAccountId(String.valueOf(accountId));
             if (Check.isNull(ctopOauthToken)) {
-                logger.error("未获取到token信息,accountId:{}", accountId);
+                log.error("未获取到token信息,accountId:{}", accountId);
                 throw new Exception("未获取到token信息");
             }
             String accessToken = ctopOauthToken.getAccessToken();
-            Long campaignTemplateId = groupCreateTemplate.getCampaignTemplateId(); // 广告计划模板id
+            // 广告计划模板id
+            Long campaignTemplateId = groupCreateTemplate.getCampaignTemplateId();
             if (Check.isNull(campaignTemplateId)) {
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
@@ -76,9 +83,10 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 return returnMap;
             }
 
-            KuaiShouCampaignTemplate kuaiShouCampaignTemplate = campaignTemplateMapper.selectById(campaignTemplateId); // 广告计划信息
+            // 广告计划信息
+            KuaiShouCampaignTemplate kuaiShouCampaignTemplate = campaignTemplateMapper.selectById(campaignTemplateId);
             if (Check.isNull(kuaiShouCampaignTemplate)) {
-                logger.error("查询广告计划为空:模板id:{}", campaignTemplateId);
+                log.error("查询广告计划为空:模板id:{}", campaignTemplateId);
                 throw new Exception("根据模板id查询创意模板信息为空");
             }
 
@@ -107,17 +115,19 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             groupCreateTemplate.setCampaignId(campaignId);
 
             JSONObject groupJson = new JSONObject();
-            Integer type = kuaiShouCampaignTemplate.getType();// 计划类型
+            // 计划类型
+            Integer type = kuaiShouCampaignTemplate.getType();
             if (type == 3 || type == 4 || type == 5) {
                 if (type == 3) {
                     groupJson.put("url_type", kuaiShouCampaignTemplate.getUrlType());
                 }
                 groupJson.put("url", kuaiShouCampaignTemplate.getUrl());
             }
-            if (type == 2) { // app推广
+            // app推广
+            if (type == 2) {
                 KuaiShouCreateAppTemplate appTemplate = createAppTemplateMapper.selectById(kuaiShouCampaignTemplate.getAppId());
                 if (Check.isNull(appTemplate)) {
-                    logger.error("快手上传视频未获取到本地app信息,appId:{}", kuaiShouCampaignTemplate.getAppId());
+                    log.error("快手上传视频未获取到本地app信息,appId:{}", kuaiShouCampaignTemplate.getAppId());
                     throw new Exception("快手上传视频未获取到本地app信息");
                 }
                 JSONObject apkJson = new JSONObject();
@@ -206,14 +216,14 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 groupJson.put("unit_name", name);
                 Map<String, Object> groupMap = kuaishouInterfaceService.adUnitCreate(accessToken, accountId, groupJson);
                 if ((Integer) groupMap.get("code") != 0) {
-                    logger.error("创建广告组失败,accountId:{},unitName:{}", accountId, unitName);
+                    log.error("创建广告组失败,accountId:{},unitName:{}", accountId, unitName);
                     return groupMap;
                 }
                 groupCreateTemplate.setUnitId((Long) groupMap.get("unitId"));
                 groupCreateTemplate.setUnitName(name);
                 int y = groupCreateLogMapper.insert(groupCreateTemplate);
                 if (y > 0) {
-                    logger.info("创建广告组记录信息入库完成,accountId:{},unitName:{}", accountId, unitName);
+                    log.info("创建广告组记录信息入库完成,accountId:{},unitName:{}", accountId, unitName);
                 }
             }
             returnMap.put("code", 0);
@@ -224,23 +234,16 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             returnMap.put("code", -1);
             returnMap.put("success", false);
             returnMap.put("desc", "批量创建广告组失败");
-
         }
         return returnMap;
     }
 
-
     /**
      * 批量创建创意
      *
      * @param requestJson
      * @return
      */
-    @Autowired
-    private IKuaiShouVideoService videoService;
-    @Autowired
-    private IKuaiShouImageService imageService;
-
     @Override
     public Map<String, Object> createCreative(JSONObject requestJson) {
         System.err.println("广告类型: " + requestJson.getInteger("positionType"));
@@ -250,7 +253,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
         Map<String, Object> returnMap = new HashMap<>();
         try {
             if (Check.isNull(requestJson)) {
-                logger.error("创建创意入参为空");
+                log.error("创建创意入参为空");
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
                 returnMap.put("message", "入参为空");
@@ -260,7 +263,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             JSONObject createJson = new JSONObject();
             Long accountId = requestJson.getLong("accountId");
             if (Check.isNull(accountId)) {
-                logger.error("创建创意广告主id为空,accountId:{}", accountId);
+                log.error("创建创意广告主id为空,accountId:{}", accountId);
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
                 returnMap.put("message", "请选择快手账号");
@@ -269,13 +272,13 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
 
             CtopOauthToken cTopOauthToken = oauthTokenService.getOauthTokenByAccountId(String.valueOf(accountId));
             if (Check.isNull(cTopOauthToken)) {
-                logger.error("未获取到token信息,accountId:{}", accountId);
+                log.error("未获取到token信息,accountId:{}", accountId);
                 throw new Exception("未获取到token信息");
             }
             String accessToken = cTopOauthToken.getAccessToken();
             Long unitId = requestJson.getLong("unitId");
             if (Check.isNull(unitId)) {
-                logger.error("创建创意广告组为空,accountId:{}", accountId);
+                log.error("创建创意广告组为空,accountId:{}", accountId);
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
                 returnMap.put("message", "请选择广告组");
@@ -284,7 +287,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             createJson.put("unit_id", unitId);
 
             if (Check.isNull(requestJson.getString("description"))) {
-                logger.error("请填写广告语,accountId:{}", accountId);
+                log.error("请填写广告语,accountId:{}", accountId);
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
                 returnMap.put("message", "请填写广告语");
@@ -295,12 +298,14 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 createJson.put("action_bar_text", requestJson.getString("actionBarText"));
             }
 
-            Integer creativeMaterialType = requestJson.getInteger("creativeMaterialType"); // 1 竖版视频 2 横版视频 3 贴片图片
+            // 1 竖版视频 2 横版视频 3 贴片图片
+            Integer creativeMaterialType = requestJson.getInteger("creativeMaterialType");
             createJson.put("creative_material_type", creativeMaterialType);
             createJson.put("description", requestJson.getString("description"));
             String creativeName = requestJson.getString("creativeName");
             Integer sceneId = requestJson.getInteger("sceneId");
-            if (sceneId == 2) {  // 普通 广告
+            // 普通 广告
+            if (sceneId == 2) {
                 JSONObject localVideoJson = new JSONObject();
                 localVideoJson.put("videoType", requestJson.getString("creativeMaterialType"));
                 localVideoJson.put("login_id", requestJson.getString("loginId"));
@@ -308,9 +313,10 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 localVideoJson.put("description", requestJson.getString("description"));
                 localVideoJson.put("positionType", requestJson.getString("positionType"));
                 localVideoJson.put("accountId", requestJson.getString("accountId"));
-                String videoUrl = videoService.localInsert(localVideoJson); // 校验文件是否在本地有留存记录
+                // 校验文件是否在本地有留存记录
+                String videoUrl = videoService.localInsert(localVideoJson);
                 if (Check.isNull(videoUrl)) {
-                    logger.error("创建创意视频为空,accountId:{}", accountId);
+                    log.error("创建创意视频为空,accountId:{}", accountId);
                     returnMap.put("code", -1);
                     returnMap.put("success", false);
                     returnMap.put("message", "请选择上传的视频");
@@ -318,14 +324,14 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 }
 
                 long startTime = System.currentTimeMillis();
-                logger.info("开始上传视频");
+                log.info("开始上传视频");
                 Map<String, Object> videoMap = kuaishouInterfaceService.videoUpload(accountId, accessToken, videoUrl); // 上传视频到快手后台
                 if ((Integer) videoMap.get("code") != 0) {
-                    logger.error("上传视频失败,accountId:{}", accountId);
+                    log.error("上传视频失败,accountId:{}", accountId);
                     return videoMap;
                 }
                 createJson.put("photo_id", videoMap.get("photoId"));
-                logger.info("上传信息流广告视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
+                log.info("上传信息流广告视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
 
 
                 if (!Check.isNull(requestJson.getString("clickTrackUrl"))) {
@@ -334,7 +340,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
 
                 JSONArray imageUrlArr = requestJson.getJSONArray("imageUrl");
                 if (Check.isNull(imageUrlArr)) {
-                    logger.error("请选择封面图,accountId:{}", accountId);
+                    log.error("请选择封面图,accountId:{}", accountId);
                     returnMap.put("code", -1);
                     returnMap.put("success", false);
                     returnMap.put("message", "请选择广告创意封面图");
@@ -367,7 +373,8 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                     }
                 }
 
-            } else if (sceneId == 3) { // 后贴片 广告
+            } else if (sceneId == 3) {
+                // 后贴片 广告
                 if (!Check.isNull(requestJson.getString("impressionUrl"))) {
                     createJson.put("impression_url", requestJson.getString("impressionUrl"));
                 }
@@ -375,7 +382,8 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 if (!Check.isNull(requestJson.getString("adPhotoPlayedT3sUrl"))) {
                     createJson.put("ad_photo_played_t3s_url", requestJson.getString("adPhotoPlayedT3sUrl"));
                 }
-                if (creativeMaterialType != 3) { // 后贴片 视频集合
+                if (creativeMaterialType != 3) {
+                    // 后贴片 视频集合
                     JSONArray haveSinglePicVideoUrlArr = requestJson.getJSONArray("haveSinglePicVideoUrl");
                     if (Check.isNull(haveSinglePicVideoUrlArr)) {
                         returnMap.put("code", -1);
@@ -398,7 +406,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                         haveLocalVideoJson.put("videoType", requestJson.getString("creativeMaterialType"));
                         String havaVideoUrl = videoService.localInsert(haveLocalVideoJson); // 校验文件是否在本地有留存记录
                         if (Check.isNull(havaVideoUrl)) {
-                            logger.error("创建创意视频为空,accountId:{}", accountId);
+                            log.error("创建创意视频为空,accountId:{}", accountId);
                             returnMap.put("code", -1);
                             returnMap.put("message", "请选择上传的视频");
                             returnMap.put("success", false);
@@ -406,24 +414,23 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                         }
 
                         long startTime = System.currentTimeMillis();
-                        logger.info("开始上传视频");
+                        log.info("开始上传视频");
                         Map<String, Object> videoMap = kuaishouInterfaceService.videoUpload(accountId, accessToken, havaVideoUrl); // 上传视频到快手后台
                         if ((Integer) videoMap.get("code") != 0) {
-                            logger.error("后贴片素材上传视频失败,accountId:{}", accountId);
+                            log.error("后贴片素材上传视频失败,accountId:{}", accountId);
                             return videoMap;
                         }
-                        logger.info("上传贴片视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
+                        log.info("上传贴片视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
                         createJson.put("photo_id", videoMap.get("photoId"));
                         createJson.put("creative_name", creativeName + "_" + i);
                         Map<String, Object> creativeMap = kuaishouInterfaceService.creativeCreate(accessToken, accountId, createJson);
                         if ((Integer) creativeMap.get("code") != 0) {
-                            logger.error("后贴片视频素材批量创建创意失败,accountId:{},creativeName:{}", accountId, creativeName + "_" + i);
+                            log.error("后贴片视频素材批量创建创意失败,accountId:{},creativeName:{}", accountId, creativeName + "_" + i);
                             return creativeMap;
                         }
                     }
-
-
-                } else { // 后贴片图片素材
+                } else {
+                    // 后贴片图片素材
                     JSONArray haveSinglePicimagesListArr = requestJson.getJSONArray("haveSinglePicimagesList");
                     if (Check.isNull(haveSinglePicimagesListArr)) {
                         returnMap.put("code", -1);
@@ -446,7 +453,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                         String imagePath = imageService.localInsert(imageJson);
                         Map<String, Object> imageMap = kuaishouInterfaceService.imageUpload(accountId, accessToken, imagePath, 0);
                         if ((Integer) imageMap.get("code") != 0) {
-                            logger.error("上传后贴片单张图片素材失败,accountId:{}", accountId);
+                            log.error("上传后贴片单张图片素材失败,accountId:{}", accountId);
                             return imageMap;
                         }
                         createJson.put("creative_name", creativeName + "_" + i);
@@ -455,13 +462,12 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                         createJson.put("image_tokens", imageTokens);
                         Map<String, Object> creativeMap = kuaishouInterfaceService.creativeCreate(accessToken, accountId, createJson);
                         if ((Integer) creativeMap.get("code") != 0) {
-                            logger.error("后贴片素材单张图片批量创建创意失败,accountId:{}", accountId);
+                            log.error("后贴片素材单张图片批量创建创意失败,accountId:{}", accountId);
                             return creativeMap;
                         }
                     }
                 }
             }
-
             returnMap.put("code", 0);
             returnMap.put("success", true);
             returnMap.put("message", "创建创意成功");
@@ -470,7 +476,6 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             returnMap.put("success", false);
             returnMap.put("message", "批量创建广告创意失败");
             e.printStackTrace();
-
         }
         return returnMap;
     }
@@ -505,7 +510,6 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 optionsJson.put("isLeaf", false);
                 result.add(optionsJson);
             }
-
         }
         return result;
     }
@@ -534,7 +538,6 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 optionsJson.put("label", groupCreateLog.getUnitName());
                 result.add(optionsJson);
             }
-
         }
         return result;
     }

File diff suppressed because it is too large
+ 138 - 238
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java


+ 12 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/MsgParams.java

@@ -11,13 +11,21 @@ import lombok.Data;
 public class MsgParams implements Serializable  {
 	
 	private static final long serialVersionUID = 1L;
-	/*消息类型*/
+    /**
+     * 消息类型
+     */
 	private String msgType;
-	/*消息接收方*/
+    /**
+     * 消息接收方
+	 */
 	private String receiver;
-	/*消息模板码*/
+    /**
+     * 消息模板码
+	 */
 	private String templateCode;
-	/*测试数据*/
+    /**
+     * 测试数据
+	 */
 	private String testData;
 	
 }

+ 16 - 16
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ngalain/aop/LogRecordAspect.java

@@ -1,26 +1,29 @@
 package org.jeecg.modules.ngalain.aop;
 
-import javax.servlet.http.HttpServletRequest;
-
+import lombok.extern.slf4j.Slf4j;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
-import org.springframework.context.annotation.Configuration;
 import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;;
 
+import javax.servlet.http.HttpServletRequest;
+
+;
 
-// 暂时注释掉,提高系统性能
-//@Aspect   //定义一个切面
-//@Configuration
+
+/**
+ * 暂时注释掉,提高系统性能
+ * //@Aspect   //定义一个切面
+ * //@Configuration
+ */
+@Slf4j
 public class LogRecordAspect {
-private static final Logger logger = LoggerFactory.getLogger(LogRecordAspect.class);
 
-    // 定义切点Pointcut
+    /**
+     * 定义切点Pointcut
+     */
     @Pointcut("execution(public * org.jeecg.modules.*.*.*Controller.*(..))")
     public void excudeService() {
     }
@@ -30,17 +33,14 @@ private static final Logger logger = LoggerFactory.getLogger(LogRecordAspect.cla
         RequestAttributes ra = RequestContextHolder.getRequestAttributes();
         ServletRequestAttributes sra = (ServletRequestAttributes) ra;
         HttpServletRequest request = sra.getRequest();
-
         String url = request.getRequestURL().toString();
         String method = request.getMethod();
         String uri = request.getRequestURI();
         String queryString = request.getQueryString();
-        logger.info("请求开始, 各个参数, url: {}, method: {}, uri: {}, params: {}", url, method, uri, queryString);
-
+        log.info("请求开始, 各个参数, url: {}, method: {}, uri: {}, params: {}", url, method, uri, queryString);
         // result的值就是被拦截方法的返回值
         Object result = pjp.proceed();
-
-        logger.info("请求结束,controller的返回值是 " + result);
+        log.info("请求结束,controller的返回值是 " + result);
         return result;
     }
 }

+ 17 - 31
jeecg-boot-module-system/src/main/java/org/jeecg/modules/shiro/vo/ResponseBean.java

@@ -1,42 +1,28 @@
 package org.jeecg.modules.shiro.vo;
+
+import lombok.Data;
+
+@Data
 public class ResponseBean {
-    
-    // http 状态码
+
+    /**
+     * http 状态码
+     */
     private int code;
- 
-    // 返回信息
+
+    /**
+     * 返回信息
+     */
     private String msg;
- 
-    // 返回的数据
+
+    /**
+     * 返回的数据
+     */
     private Object data;
- 
+
     public ResponseBean(int code, String msg, Object data) {
         this.code = code;
         this.msg = msg;
         this.data = data;
     }
- 
-    public int getCode() {
-        return code;
-    }
- 
-    public void setCode(int code) {
-        this.code = code;
-    }
- 
-    public String getMsg() {
-        return msg;
-    }
- 
-    public void setMsg(String msg) {
-        this.msg = msg;
-    }
- 
-    public Object getData() {
-        return data;
-    }
- 
-    public void setData(Object data) {
-        this.data = data;
-    }
 }

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/aspect/DictAspect.java

@@ -40,7 +40,10 @@ import lombok.extern.slf4j.Slf4j;
 public class DictAspect {
     @Autowired
     private ISysDictService dictService;
-    // 定义切点Pointcut
+
+    /**
+     * 定义切点Pointcut
+     */
     @Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..))")
     public void excudeService() {
     }

+ 18 - 10
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java

@@ -107,10 +107,11 @@ public class SysAnnouncementController {
 	 */
 	@RequestMapping(value = "/add", method = RequestMethod.POST)
 	public Result<SysAnnouncement> add(@RequestBody SysAnnouncement sysAnnouncement) {
-		Result<SysAnnouncement> result = new Result<SysAnnouncement>();
+        Result<SysAnnouncement> result = new Result<>();
 		try {
 			sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
-			sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);//未发布
+            //未发布
+            sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);
 			sysAnnouncementService.saveAnnouncement(sysAnnouncement);
 			result.success("添加成功!");
 		} catch (Exception e) {
@@ -216,7 +217,8 @@ public class SysAnnouncementController {
 		if(sysAnnouncement==null) {
 			result.error500("未找到对应实体");
 		}else {
-			sysAnnouncement.setSendStatus(CommonSendStatus.PUBLISHED_STATUS_1);//发布中
+            //发布中
+            sysAnnouncement.setSendStatus(CommonSendStatus.PUBLISHED_STATUS_1);
 			sysAnnouncement.setSendTime(new Date());
 			String currentUserName = JwtUtil.getUserNameByToken(request);
 			sysAnnouncement.setSender(currentUserName);
@@ -241,7 +243,8 @@ public class SysAnnouncementController {
 		if(sysAnnouncement==null) {
 			result.error500("未找到对应实体");
 		}else {
-			sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);//撤销发布
+            //撤销发布
+            sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);
 			sysAnnouncement.setCancelTime(new Date());
 			boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
 			if(ok) {
@@ -264,9 +267,12 @@ public class SysAnnouncementController {
 		// 1.将系统消息补充到用户通告阅读标记表中
 		Collection<String> anntIds = sysAnnouncementSendService.queryByUserId(userId);
 		LambdaQueryWrapper<SysAnnouncement> querySaWrapper = new LambdaQueryWrapper<SysAnnouncement>();
-		querySaWrapper.eq(SysAnnouncement::getMsgType,CommonConstant.MSG_TYPE_ALL); // 全部人员
-		querySaWrapper.eq(SysAnnouncement::getDelFlag,CommonConstant.DEL_FLAG_0.toString());  // 未删除
-		querySaWrapper.eq(SysAnnouncement::getSendStatus, CommonConstant.HAS_SEND); //已发布
+        // 全部人员
+        querySaWrapper.eq(SysAnnouncement::getMsgType, CommonConstant.MSG_TYPE_ALL);
+        // 未删除
+        querySaWrapper.eq(SysAnnouncement::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+        //已发布
+        querySaWrapper.eq(SysAnnouncement::getSendStatus, CommonConstant.HAS_SEND);
 		if(anntIds!=null&&anntIds.size()>0) {
 			querySaWrapper.notIn(SysAnnouncement::getId, anntIds);
 		}
@@ -282,9 +288,11 @@ public class SysAnnouncementController {
 		}
 		// 2.查询用户未读的系统消息
 		Page<SysAnnouncement> anntMsgList = new Page<SysAnnouncement>(0,5);
-		anntMsgList = sysAnnouncementService.querySysCementPageByUserId(anntMsgList,userId,"1");//通知公告消息
+        //通知公告消息
+        anntMsgList = sysAnnouncementService.querySysCementPageByUserId(anntMsgList, userId, "1");
 		Page<SysAnnouncement> sysMsgList = new Page<SysAnnouncement>(0,5);
-		sysMsgList = sysAnnouncementService.querySysCementPageByUserId(sysMsgList,userId,"2");//系统消息
+        //系统消息
+        sysMsgList = sysAnnouncementService.querySysCementPageByUserId(sysMsgList, userId, "2");
 		Map<String,Object> sysMsgMap = new HashMap<String, Object>();
 		sysMsgMap.put("sysMsgList", sysMsgList.getRecords());
 		sysMsgMap.put("sysMsgTotal", sysMsgList.getTotal());
@@ -330,7 +338,7 @@ public class SysAnnouncementController {
         MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
         Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            MultipartFile file = entity.getValue();// 获取上传文件对象
+            MultipartFile file = entity.getValue();
             ImportParams params = new ImportParams();
             params.setTitleRows(2);
             params.setHeadRows(1);

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

@@ -473,7 +473,7 @@ public class SysPermissionController {
 			}
 
             if (isWwwHttpUrl(permission.getUrl())) {
-                json.put("path", MD5Util.Md5Encode(permission.getUrl(), "utf-8"));
+                json.put("path", MD5Util.md5Encode(permission.getUrl(), "utf-8"));
 			} else {
 				json.put("path", permission.getUrl());
 			}

+ 18 - 42
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/model/DepartIdModel.java

@@ -4,36 +4,44 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
+import lombok.Data;
 import org.jeecg.modules.system.entity.SysDepart;
 
 /**
  * <p>
  * 部门表 封装树结构的部门的名称的实体类
  * <p>
- * 
- * @Author Steve
- * @Since 2019-01-22 
+ *
+ * @author Steve
+ * @since 2019-01-22
  *
  */
+@Data
 public class DepartIdModel implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    // 主键ID
+    /**
+     * 主键ID
+     */
     private String key;
 
-    // 主键ID
+    /**
+     * 主键ID
+     */
     private String value;
 
-    // 部门名称
+    /**
+     * 部门名称
+     */
     private String title;
     
     List<DepartIdModel> children = new ArrayList<>();
     
     /**
      * 将SysDepartTreeModel的部分数据放在该对象当中
-     * @param treeModel
-     * @return
+     * @param treeModel 树状结构
+     * @return 部门信息
      */
     public DepartIdModel convert(SysDepartTreeModel treeModel) {
         this.key = treeModel.getId();
@@ -44,45 +52,13 @@ public class DepartIdModel implements Serializable {
     
     /**
      * 该方法为用户部门的实现类所使用
-     * @param sysDepart
-     * @return
+     * @param sysDepart 系统部门信息
+     * @return 部门信息
      */
     public DepartIdModel convertByUserDepart(SysDepart sysDepart) {
         this.key = sysDepart.getId();
         this.value = sysDepart.getId();
         this.title = sysDepart.getDepartName();
         return this;
-    } 
-
-    public List<DepartIdModel> getChildren() {
-        return children;
-    }
-
-    public void setChildren(List<DepartIdModel> children) {
-        this.children = children;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
     }
 }

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

@@ -97,7 +97,9 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
 		return true;
 	}
 
-	// @功能:流程执行完成保存消息通知
+    /**
+     * @功能:流程执行完成保存消息通知
+     */
 	@Override
 	public void saveSysAnnouncement(String title, String msgContent) {
 		SysAnnouncement announcement = new SysAnnouncement();

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

@@ -74,7 +74,6 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
 	 * @return
 	 */
 	@Override
-	//@Cacheable(value = "dictTableCache")
 	public List<DictModel> queryTableDictItemsByCode(String table, String text, String code) {
 		log.info("无缓存dictTableList的时候调用这里!");
 		return sysDictMapper.queryTableDictItemsByCode(table,text,code);

+ 7 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysLogServiceImpl.java

@@ -40,7 +40,9 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
 		return sysLogMapper.findTotalVisitCount();
 	}
 
-	//update-begin--Author:zhangweijian  Date:20190428 for:传入开始时间,结束时间参数
+    /**
+     * update-begin--Author:zhangweijian  Date:20190428 for:传入开始时间,结束时间参数
+     */
 	@Override
 	public Long findTodayVisitCount(Date dayStart, Date dayEnd) {
 		return sysLogMapper.findTodayVisitCount(dayStart,dayEnd);
@@ -49,10 +51,11 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
 	@Override
 	public Long findTodayIp(Date dayStart, Date dayEnd) {
 		return sysLogMapper.findTodayIp(dayStart,dayEnd);
-	}
-	//update-end--Author:zhangweijian  Date:20190428 for:传入开始时间,结束时间参数
-
+    }
 
+    /**
+     * update-end--Author:zhangweijian  Date:20190428 for:传入开始时间,结束时间参数
+	 */
 	@Override
 	public List<Map<String,Object>> findVisitCount(Date dayStart, Date dayEnd) {
 		return sysLogMapper.findVisitCount(dayStart, dayEnd);

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

@@ -104,7 +104,6 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
 	 */
 	@Override
 	@CacheEvict(value = CacheConstant.PERMISSION_CACHE,allEntries=true)
-	//@CacheEvict(value = CacheConstant.PERMISSION_CACHE,allEntries=true,condition="#sysPermission.menuType==2")
 	public void deletePermissionLogical(String id) throws JeecgBootException {
 		SysPermission sysPermission = this.getById(id);
 		if(sysPermission==null) {

+ 7 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

@@ -181,14 +181,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 		return info;
 	}
 
-	// 根据部门Id查询
+    /**
+     * 根据部门Id查询
+     */
 	@Override
 	public IPage<SysUser> getUserByDepId(Page<SysUser> page, String departId,String username) {
 		return userMapper.getUserByDepId(page, departId,username);
-	}
+    }
 
 
-	// 根据角色Id查询
+    /**
+     * 根据角色Id查询
+ 	 */
 	@Override
 	public IPage<SysUser> getUserByRoleId(Page<SysUser> page, String roleId, String username) {
 		return userMapper.getUserByRoleId(page,roleId,username);

File diff suppressed because it is too large
+ 0 - 15
module-common/src/main/java/cn/com/ctop/common/utils/Base64Utils.java


+ 22 - 13
module-common/src/main/java/cn/com/ctop/common/utils/FileUploadTool.java

@@ -15,18 +15,27 @@ public class FileUploadTool {
 
 
     TransfMediaTool transfMediaTool = new TransfMediaTool();
-    // 文件最大500M
-    private static long upload_maxsize = 800 * 1024 * 1024;
-    // 文件允许格式
-    private static String[] allowFiles = {".rar", ".doc", ".docx", ".zip",
+    /**
+     * 文件最大500M
+     */
+    private static long UPLOAD_MAXSIZE = 800 * 1024 * 1024;
+    /**
+     * 文件允许格式
+     */
+    private static String[] ALLOWFILES = {".rar", ".doc", ".docx", ".zip",
             ".pdf", ".txt", ".swf", ".xlsx", ".gif", ".png", ".jpg", ".jpeg",
             ".bmp", ".xls", ".mp4", ".flv", ".ppt", ".avi", ".mpg", ".wmv",
             ".3gp", ".mov", ".asf", ".asx", ".vob", ".wmv9", ".rm", ".rmvb", ".apk"};
-    // 允许转码的视频格式(ffmpeg)
-    private static String[] allowFLV = {".avi", ".mpg", ".wmv", ".3gp",
+    /**
+     * 允许转码的视频格式(ffmpeg)
+     */
+    private static String[] ALLOWFLV = {".avi", ".mpg", ".wmv", ".3gp",
             ".mov", ".asf", ".asx", ".vob"};
-    // 允许的视频转码格式(mencoder)
-    private static String[] allowAVI = {".wmv9", ".rm", ".rmvb"};
+
+    /**
+     * 允许的视频转码格式(mencoder)
+     */
+    private static String[] ALLOWAVI = {".wmv9", ".rm", ".rmvb"};
 
     public FileEntity createFile(MultipartFile multipartFile, HttpServletRequest request, String savaPath) {
         FileEntity entity = new FileEntity();
@@ -36,7 +45,7 @@ public class FileUploadTool {
         if (multipartFile.getSize() != 0 && !multipartFile.isEmpty()) {
             bflag = true;
             // 判断文件大小
-            if (multipartFile.getSize() <= upload_maxsize) {
+            if (multipartFile.getSize() <= UPLOAD_MAXSIZE) {
                 bflag = true;
                 // 文件类型判断
                 if (this.checkFileType(fileName)) {
@@ -138,7 +147,7 @@ public class FileUploadTool {
      * @return
      */
     private boolean checkFileType(String fileName) {
-        Iterator<String> type = Arrays.asList(allowFiles).iterator();
+        Iterator<String> type = Arrays.asList(ALLOWFILES).iterator();
         while (type.hasNext()) {
             String ext = type.next();
             if (fileName.toLowerCase().endsWith(ext)) {
@@ -155,7 +164,7 @@ public class FileUploadTool {
      * @return
      */
     private boolean checkMediaType(String fileEnd) {
-        Iterator<String> type = Arrays.asList(allowFLV).iterator();
+        Iterator<String> type = Arrays.asList(ALLOWFLV).iterator();
         while (type.hasNext()) {
             String ext = type.next();
             if (fileEnd.equals(ext)) {
@@ -172,7 +181,7 @@ public class FileUploadTool {
      * @return
      */
     private boolean checkAviType(String fileEnd) {
-        Iterator<String> type = Arrays.asList(allowAVI).iterator();
+        Iterator<String> type = Arrays.asList(ALLOWAVI).iterator();
         while (type.hasNext()) {
             String ext = type.next();
             if (fileEnd.equals(ext)) {
@@ -197,7 +206,7 @@ public class FileUploadTool {
      * @return
      */
     private String getName(String fileName) {
-        Iterator<String> type = Arrays.asList(allowFiles).iterator();
+        Iterator<String> type = Arrays.asList(ALLOWFILES).iterator();
         while (type.hasNext()) {
             String ext = type.next();
             if (fileName.contains(ext)) {

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java

@@ -100,7 +100,9 @@ public class HttpUtils {
     }
 
     public static CookieStore cookieStore = new BasicCookieStore();
-    //.setProxy(new HttpHost("106.125.239.179", 4245))
+    /**
+     * setProxy(new HttpHost("106.125.239.179", 4245))
+     */
     public static Map<String, Map<String, String>> fontsMap = new HashMap<String, Map<String, String>>();
     public static String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36";
 

+ 16 - 13
module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils2.java

@@ -2,6 +2,7 @@ package cn.com.ctop.common.utils;
 
 import com.alibaba.fastjson.JSONObject;
 import com.google.gson.Gson;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.fontbox.ttf.CmapSubtable;
 import org.apache.fontbox.ttf.GlyphData;
 import org.apache.fontbox.ttf.TTFParser;
@@ -42,10 +43,12 @@ import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 import java.util.*;
 
+@Slf4j
 public class HttpUtils2 {
-    private static final Logger logger = LoggerFactory.getLogger(HttpUtils2.class);
     public static CookieStore cookieStore = new BasicCookieStore();
-    //.setProxy(new HttpHost("106.125.239.179", 4245))
+    /**
+     * setProxy(new HttpHost("106.125.239.179", 4245))
+     */
     public static Map<String, Map<String, String>> fontsMap = new HashMap<String, Map<String, String>>();
     public static String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36";
 
@@ -62,7 +65,7 @@ public class HttpUtils2 {
             SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory(sslContext);
             return HttpClients.custom().setDefaultCookieStore(cookieStore).setDefaultRequestConfig(globalConfig).setConnectionReuseStrategy((response, context) -> false).setSSLSocketFactory(sslFactory).build();
         } catch (Exception e) {
-            logger.error("处理Https证书异常", e);
+            log.error("处理Https证书异常", e);
         }
         return HttpClients.createDefault();
     }
@@ -109,7 +112,7 @@ public class HttpUtils2 {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -145,7 +148,7 @@ public class HttpUtils2 {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -182,7 +185,7 @@ public class HttpUtils2 {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -213,7 +216,7 @@ public class HttpUtils2 {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -250,7 +253,7 @@ public class HttpUtils2 {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -309,7 +312,7 @@ public class HttpUtils2 {
             strReturn = EntityUtils.toString(respentity);
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -330,7 +333,7 @@ public class HttpUtils2 {
             strReturn = EntityUtils.toString(respentity);
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -507,7 +510,7 @@ public class HttpUtils2 {
             strReturn = EntityUtils.toString(respentity);
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -533,7 +536,7 @@ public class HttpUtils2 {
             strReturn = EntityUtils.toString(respentity);
         } catch (Exception e) {
             e.printStackTrace();
-            logger.error(e.getMessage());
+            log.error(e.getMessage());
         }
         return strReturn;
     }
@@ -578,7 +581,7 @@ public class HttpUtils2 {
             respEntity = response.getEntity();
             result = EntityUtils.toString(respEntity);
         } catch (Exception e) {
-            logger.error("http get请求异常");
+            log.error("http get请求异常");
             e.printStackTrace();
         }
         return result;

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/utils/JsonUtil.java

@@ -12,7 +12,9 @@ import java.util.List;
  */
 public class JsonUtil {
 
-    // 定义jackson对象
+    /**
+     * 定义jackson对象
+     */
     private static final ObjectMapper MAPPER = new ObjectMapper();
 
     /**

+ 15 - 10
module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/FateadmHttpUtil.java

@@ -7,7 +7,7 @@ import java.net.URLConnection;
 import java.util.Base64;
 
 public class FateadmHttpUtil {
-    public static  class HttpResp{
+    public static class HttpResp {
         public int      ret_code;
         public double   cust_val;
         public String   err_msg;
@@ -16,7 +16,9 @@ public class FateadmHttpUtil {
         public String   pred_resl;
     }
 
-    // 为避免引入复杂的json包,这里简单实现一个,只用来能解析从网络的回包中的指定字段的内容
+    /**
+     * 为避免引入复杂的json包,这里简单实现一个,只用来能解析从网络的回包中的指定字段的内容
+     */
     public static class JsonHelper{
         public String json;
         public int next_idx;
@@ -159,7 +161,8 @@ public class FateadmHttpUtil {
             }
         }
     }
-    public static String ToHex( byte[] arr){
+
+    public static String toHex(byte[] arr) {
         StringBuffer md5str = new StringBuffer();
         int digital;
         for (int i = 0; i < arr.length; i++) {
@@ -174,13 +177,14 @@ public class FateadmHttpUtil {
         }
         return md5str.toString().toLowerCase();
     }
-    public static String CalcMd5( String src){
+
+    public static String calcMd5(String src) {
         String md5str = "";
         try {
             MessageDigest md = MessageDigest.getInstance("MD5");
             byte[] input = src.getBytes();
             byte[] buff = md.digest(input);
-            md5str = ToHex(buff);
+            md5str = toHex(buff);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -194,8 +198,8 @@ public class FateadmHttpUtil {
         return s;
     }
     public static String CalcSign(String id, String key, String tm){
-        String chk1 = CalcMd5( tm + key);
-        String sum  = CalcMd5( id + tm + chk1);
+        String chk1 = calcMd5(tm + key);
+        String sum = calcMd5(id + tm + chk1);
         //System.out.printf("userid: %s key: %s tm: %s chk1: %s chk2: %s\n", id, key, tm, chk1, sum);
         return sum;
     }
@@ -254,7 +258,7 @@ public class FateadmHttpUtil {
         return bArray;
     }
     public static String MFPost(URL url,byte[] img_data,String stm,String pd_id,String sign,String app_id,String asign,String pred_type) throws Exception {
-    	String boundary = "--" + CalcMd5(stm);
+        String boundary = "--" + calcMd5(stm);
         String boundarybytes_string = "--" + boundary + "\r\n";
         HttpURLConnection con = (HttpURLConnection) url.openConnection();
         con.setRequestMethod("POST");
@@ -294,8 +298,9 @@ public class FateadmHttpUtil {
         }
         return buffer.toString().trim();
 	}
-    public static byte[] GetUrlImage(String str_url) throws IOException {
-    	URL url = new URL(str_url);
+
+    public static byte[] getUrlImage(String strUrl) throws IOException {
+        URL url = new URL(strUrl);
     	URLConnection con = url.openConnection();
 		con.setConnectTimeout(30000);
 		InputStream is = con.getInputStream();

+ 6 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -374,7 +374,8 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
         HttpUtils2.cookieStore.clear();
         KuaishouWebInterfaceServiceImpl i = new KuaishouWebInterfaceServiceImpl();
         BasicClientCookie cookie = new BasicClientCookie("clientid", "3");
-        cookie.setDomain("live.kuaishou.com");   //设置范围
+        //设置范围
+        cookie.setDomain("live.kuaishou.com");
         cookie.setPath("/");
         cookie.setExpiryDate(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24 * 365));
         HttpUtils2.cookieStore.addCookie(cookie);
@@ -386,13 +387,15 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
         HttpUtils2.cookieStore.addCookie(cookie1);
 
         BasicClientCookie cookie2 = new BasicClientCookie("client_key", "65890b29");
-        cookie2.setDomain("live.kuaishou.com");   //设置范围
+        //设置范围
+        cookie2.setDomain("live.kuaishou.com");
         cookie2.setPath("/");
         cookie2.setExpiryDate(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24 * 365));
         HttpUtils2.cookieStore.addCookie(cookie2);
 
         BasicClientCookie cookie3 = new BasicClientCookie("kuaishou.live.bfb1s", "3e261140b0cf7444a0ba411c6f227d88");
-        cookie3.setDomain("live.kuaishou.com");   //设置范围
+        //设置范围
+        cookie3.setDomain("live.kuaishou.com");
         cookie3.setPath("/");
         cookie3.setExpiryDate(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24 * 365));
         HttpUtils2.cookieStore.addCookie(cookie3);

+ 92 - 24
module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

@@ -1,38 +1,106 @@
 package constant;
 
+/**
+ * @author 于萌萌
+ * 2019年9月9日13:21:39
+ */
 public class KuaishouInterfaceConstant {
     public static final String AUTH_PATH = "/#/openapi/oauth";
     public static final String AUTH_TOKEN = "/rest/openapi/oauth2/authorize/access_token";
     public static final String REFRESH_TOKEN = "/rest/openapi/oauth2/authorize/refresh_token";
+    /**
+     * 广告主报表数据
+     */
     public static final String ACCOUNT_REPORT = "/rest/openapi/v1/report/account_report";
+    /**
+     * 广告计划报表数据
+     */
     public static final String CAMPAIGN_REPORT = "/rest/openapi/v1/report/campaign_report";
+    /**
+     * 广告组报表数据
+     */
     public static final String GTOUP_REPORT = "/rest/openapi/v1/report/unit_report";
+    /**
+     * 广告创意报表数据
+     */
     public static final String CREATIVE_REPORT = "/rest/openapi/v1/report/creative_report";
-    public static final String CAMPAIGN_LIST = "/rest/openapi/v1/campaign/list"; // 广告计划信息
-    public static final String GROUP_LIST = "/rest/openapi/v1/ad_unit/list"; //广告组信息
-    public static final String CREATIVE_LIST = "/rest/openapi/v1/creative/list"; //创意信息
-    public static final String CAMPAIGN_CREATE = "/rest/openapi/v2/campaign/create"; //创建广告计划
-    public static final String AD_UNIT_CREATE = "/rest/openapi/v2/ad_unit/create"; //创建广告组
-    public static final String AD_CREATIVE_CREATE = "/rest/openapi/v2/creative/create"; //创建广告组
+    /**
+     * 广告计划信息
+     */
+    public static final String CAMPAIGN_LIST = "/rest/openapi/v1/campaign/list";
+    /**
+     * 广告组信息
+     */
+    public static final String GROUP_LIST = "/rest/openapi/v1/ad_unit/list";
+    /**
+     * 创意信息
+     */
+    public static final String CREATIVE_LIST = "/rest/openapi/v1/creative/list";
+    /**
+     * 创建广告计划
+     */
+    public static final String CAMPAIGN_CREATE = "/rest/openapi/v2/campaign/create";
+    /**
+     * 创建广告组
+     */
+    public static final String AD_UNIT_CREATE = "/rest/openapi/v2/ad_unit/create";
+    /**
+     * 创建广告组
+     */
+    public static final String AD_CREATIVE_CREATE = "/rest/openapi/v2/creative/create";
+    /**
+     * 获取可选的深度转化类型
+     */
+    public static final String DEEP_CONVERSION_INFOS = "/rest/openapi/v1/ad_unit/ocpc/conversion_infos";
+    /**
+     * 视频文件上传
+     */
+    public static final String VIDEO_UPLOAD = "/rest/openapi/v1/file/ad/video/upload";
+    /**
+     * 视频文件获取
+     */
+    public static final String VIDEO_GET = "/rest/openapi/v1/file/ad/video/get";
+    /**
+     * 图片文件获取
+     */
+    public static final String IMAGE_GET = "/rest/openapi/v1/file/ad/image/get";
+    /**
+     * 获取地域信息
+     */
+    public static final String REGION_LIST = "/rest/openapi/v1/region/list";
+    /**
+     * 图片文件上传
+     */
+    public static final String IMAGE_UPLOAD = "/rest/openapi/v1/file/ad/image/upload";
+    /**
+     * 创建应用
+     */
+    public static final String APP_CREATE = "/rest/openapi/v1/file/ad/app/create";
+    /**
+     * 创建广告获取应用列表
+     */
+    public static final String APP_LIST = "/rest/openapi/v1/file/ad/app/list";
 
-
-    public static final String DEEP_CONVERSION_INFOS = "/rest/openapi/v1/ad_unit/ocpc/conversion_infos"; //获取可选的深度转化类型
-    public static final String VIDEO_UPLOAD = "/rest/openapi/v1/file/ad/video/upload"; //视频文件上传
-    public static final String VIDEO_GET = "/rest/openapi/v1/file/ad/video/get"; //视频文件获取
-    public static final String IMAGE_GET = "/rest/openapi/v1/file/ad/image/get"; //图片文件获取获取地域信息图片文件获取
-    public static final String REGION_LIST = "/rest/openapi/v1/region/list"; //图片文件获取获取地域信息图片文件获取
-    public static final String IMAGE_UPLOAD = "/rest/openapi/v1/file/ad/image/upload"; //图片文件上传
-    public static final String APP_CREATE = "/rest/openapi/v1/file/ad/app/create"; //创建应用
-    public static final String APP_LIST = "/rest/openapi/v1/file/ad/app/list"; //创建广告获取应用列表
-
-
-    public static final String TYPE_LOGIN = "login"; //登录
-    public static final String TYPE_AUTHORIZATION = "authorization"; //授权
-    public static final String LOGIN_TYPE_KUAISHOU = "kuaishou"; //登录方式-快手
-    public static final String LOGIN_TYPE_BYTEDANCE = "bytedance"; //登录方式-快手
-
-
-    public static final String HTTPS_PREFIX = "https:"; //登录方式-快手
+    /**
+     * 登录
+     */
+    public static final String TYPE_LOGIN = "login";
+    /**
+     * 授权
+     */
+    public static final String TYPE_AUTHORIZATION = "authorization";
+    /**
+     * 登录方式-快手
+     */
+    public static final String LOGIN_TYPE_KUAISHOU = "kuaishou";
+    /**
+     * 登录方式-快手
+     */
+    public static final String LOGIN_TYPE_BYTEDANCE = "bytedance";
+    /**
+     * 请求前缀
+     */
+    public static final String HTTPS_PREFIX = "https:";
 
 
 }