E1ED922C1E9526DD63272D7EC5C6CB77
2020-09-27 89ac7f9b30215669a15fb4fec39d698cb1892c6d
初始化
1 文件已重命名
2个文件已删除
1个文件已添加
4个文件已修改
314 ■■■■■ 已修改文件
.idea/modules.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/uiDesigner.xml 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/common/BaseController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/mybatisTool/SqlParam.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/mybatisTool/SqlSentence.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/util/BASE64.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/util/JwtTool.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/util/SimpleEncrypt.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/modules.xml
@@ -3,7 +3,6 @@
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/hx-common.iml" filepath="$PROJECT_DIR$/hx-common.iml" />
      <module fileurl="file://$PROJECT_DIR$/src/main/main.iml" filepath="$PROJECT_DIR$/src/main/main.iml" />
    </modules>
  </component>
</project>
.idea/uiDesigner.xml
New file
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Palette2">
    <group name="Swing">
      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
      </item>
      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
      </item>
      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
      </item>
      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
      </item>
      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
        <initial-values>
          <property name="text" value="Button" />
        </initial-values>
      </item>
      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
        <initial-values>
          <property name="text" value="RadioButton" />
        </initial-values>
      </item>
      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
        <initial-values>
          <property name="text" value="CheckBox" />
        </initial-values>
      </item>
      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
        <initial-values>
          <property name="text" value="Label" />
        </initial-values>
      </item>
      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
          <preferred-size width="150" height="-1" />
        </default-constraints>
      </item>
      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
          <preferred-size width="150" height="-1" />
        </default-constraints>
      </item>
      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
          <preferred-size width="150" height="-1" />
        </default-constraints>
      </item>
      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
      </item>
      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
          <preferred-size width="150" height="50" />
        </default-constraints>
      </item>
      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
          <preferred-size width="200" height="200" />
        </default-constraints>
      </item>
      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
          <preferred-size width="200" height="200" />
        </default-constraints>
      </item>
      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
      </item>
      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
      </item>
      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
      </item>
      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
      </item>
      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
          <preferred-size width="-1" height="20" />
        </default-constraints>
      </item>
      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
      </item>
      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
      </item>
    </group>
  </component>
</project>
src/main/java/com/hx/common/BaseController.java
File was renamed from src/main/java/com/hx/common/CommonInit.java
@@ -2,8 +2,6 @@
import com.hx.exception.ParamException;
import com.hx.exception.ServiceException;
import com.hx.mybatisTool.SqlParam;
import com.hx.mybatisTool.SqlSentence;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
@@ -16,8 +14,6 @@
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**公共初始化
@@ -25,13 +21,9 @@
 * @Date 2020-06-11
 */
public class CommonInit {
public class BaseController {
    /*请不要声明变量,会导致不安全,因为这个是单列*/
    protected HttpServletRequest request = null;
    protected HttpSession session = null;
    //只需要加上下面这段即可,注意不能忘记注解
    @InitBinder
@@ -44,14 +36,12 @@
    public HttpServletRequest getRequest() {
        //获取参数对象
        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        request = attributes.getRequest();
        return request;
        return attributes.getRequest();
    }
    public HttpSession getSession() {
        //获取参数对象
        session = getRequest() .getSession();
        return session;
        return getRequest() .getSession();
    }
    /**
@@ -73,8 +63,6 @@
        getRequest().setAttribute(attrName, attrObject);
    }
    /**
     * 抛出服务异常
     * @param msg 错误信息
@@ -92,6 +80,5 @@
    {
        throw new ParamException(msg);
    }
}
src/main/java/com/hx/mybatisTool/SqlParam.java
File was deleted
src/main/java/com/hx/mybatisTool/SqlSentence.java
@@ -15,8 +15,6 @@
    private String sqlSentence;
    private Map<String,Object> m;
    /**类型*/
    private Integer type = TYPE_NORMAL;
    /**排序*/
    private String orderBy;
    /**开始页数*/
@@ -25,10 +23,6 @@
    private Integer pageNum = 0;
    //////////////////////////////////////////////////////////////
    /**正常*/
    public static final int TYPE_NORMAL = 0;
    /**动态*/
    public static final int TYPE_DYN = 1;
    /********************mother****************************/
@@ -90,16 +84,6 @@
        m = values;
    }
    /**
     * 设置动态查询
     * @param map 查询
     */
    public void setDynSql(Map<String, Object> map)
    {
        this.type = TYPE_DYN;
        this.m = map;
    }
    
    /************************************************************************/
@@ -117,14 +101,6 @@
    public void setSqlSentence(String sqlSentence) {
        this.sqlSentence = sqlSentence;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getOrderBy() {
src/main/java/com/hx/util/BASE64.java
File was deleted
src/main/java/com/hx/util/JwtTool.java
@@ -1,5 +1,6 @@
package com.hx.util;
import java.util.Base64;
import java.util.Date;
import javax.crypto.SecretKey;
@@ -71,7 +72,7 @@
    }
    
    public static SecretKey generalKey() {
        byte[] encodedKey = BASE64.decryptBASE64(JwtConstant.JWT_SECERT);
        byte[] encodedKey = Base64.getDecoder().decode(JwtConstant.JWT_SECERT);
        SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
        return key;
    }
src/main/java/com/hx/util/SimpleEncrypt.java
@@ -1,12 +1,6 @@
package com.hx.util;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.util.*;
/***
 * �?单的加密程序,和解密程序
@@ -54,11 +48,7 @@
    public static String simpleEnCode(String dataString) {
        // 组拼随机值
        String ranString = generateCheckCode(13).toString() + dataString + generateCheckCode(9).toString();
        System.out.println(ranString);
        // 进行加密 sun.misc.BASE64Encoder.BASE64Encoder()
        String enCode = new BASE64Encoder().encodeBuffer(ranString.getBytes());
        String enCode = new String(Base64.getEncoder().encode(ranString.getBytes()));
        return enCode;
    }
@@ -73,7 +63,8 @@
     */
    public static String simpleDeCode(String dataString) throws Exception {
        // 进行解密sun.misc.BASE64Decoder.BASE64Decoder()
        byte[] enCode = new BASE64Decoder().decodeBuffer(dataString);
        byte[] enCode = Base64.getDecoder().decode(dataString);
        // 解得随机值
        String ranString = new String(enCode);