1.新增一个字段

2.修复部分重写方法没有添加注解
master
星期八 6 years ago
parent 07f55fee24
commit 54bf07e1d6
  1. 10
      src/main/java/com/lq/code/dao/impl/BaseDaoImpl.java
  2. 2
      src/main/java/com/lq/code/service/impl/BaseServiceImpl.java
  3. 6
      src/main/java/com/lq/code/util/HttpKit.java
  4. 106
      src/main/java/com/lq/code/util/TestUtil.java
  5. 1
      src/main/java/com/lq/code/util/email/MyAuthenticator.java
  6. 2
      src/main/java/com/lq/dao/SysRoleDao.java
  7. 5
      src/main/java/com/lq/wechat/util/WechatUserUtil.java
  8. 2
      src/main/resources/dev/jdbc.properties
  9. 2
      src/main/resources/dev/redis.properties
  10. 7
      src/main/resources/mybatis/mapping/WechatInfoDao.xml
  11. 6
      src/main/resources/pro/jdbc.properties
  12. 8
      src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp
  13. 3
      src/main/webapp/WEB-INF/views/jsp/error/403.jsp
  14. 6
      src/main/webapp/WEB-INF/web.xml

@ -1,6 +1,7 @@
package com.lq.code.dao.impl;
import com.lq.code.dao.BaseDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
@ -17,14 +18,7 @@ import java.util.List;
*/
public class BaseDaoImpl<T> implements BaseDao<T> {
public final static String SQL_TYPE_INSERT="INSERT";
public final static String SQL_TYPE_UPDATE="UPDATE";
public final static String SQL_TYPE_DELETE="DELETE";
@Resource
@Autowired(required = false)
private JdbcTemplate jdbcTemplate;
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;

@ -10,7 +10,7 @@ import java.util.List;
* Created by qi_liang on 2018/6/21.
*/
public abstract class BaseServiceImpl<T> implements BaseService<T>{
@Override
public abstract BaseDao<T> getBaseDao();
@Override

@ -199,15 +199,15 @@ public class HttpKit {
* 证书管理
*/
class MyX509TrustManager implements X509TrustManager {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
}

@ -17,48 +17,70 @@ import java.util.*;
*/
public class TestUtil {
public static void main(String[] args) throws IOException {
// new TestUtil().showURL();
// Document document = Jsoup.connect("https://www.oschina.net/").get();
// System.out.println(document.body());
// InetAddress address = InetAddress.getLocalHost();
// String ip = address.getHostAddress().toLowerCase();
// System.out.println(ip);
new HashMap<>(8);
}
public void showURL() throws IOException, IOException {
// 第一种:获取类加载的根路径 D:\git\daotie\daotie\target\classes
File f = new File(this.getClass().getResource("/").getPath());
System.out.println(f);
// 获取当前类的所在工程路径; 如果不加“/” 获取当前类的加载目录 D:\git\daotie\daotie\target\classes\my
File f2 = new File(this.getClass().getResource("").getPath());
System.out.println(f2);
// 第二种:获取项目路径 D:\git\daotie\daotie
File directory = new File("");// 参数为空
String courseFile = directory.getCanonicalPath();
System.out.println(courseFile);
// 第三种: file:/D:/git/daotie/daotie/target/classes/
URL xmlpath = this.getClass().getClassLoader().getResource("");
System.out.println(xmlpath);
// 第四种: D:\git\daotie\daotie
System.out.println(System.getProperty("user.dir"));
/*
* 结果 C:\Documents and Settings\Administrator\workspace\projectName
* 获取当前工程路径
*/
// 第五种: 获取所有的类路径 包括jar包的路径
System.out.println(System.getProperty("java.class.path"));
// public static void main(String[] args) throws IOException {
//
// // new TestUtil().showURL();
// // Document document = Jsoup.connect("https://www.oschina.net/").get();
// // System.out.println(document.body());
// // InetAddress address = InetAddress.getLocalHost();
// // String ip = address.getHostAddress().toLowerCase();
// // System.out.println(ip);
// new HashMap<>(8);
// }
//
//
// public void showURL() throws IOException, IOException {
//
// // 第一种:获取类加载的根路径 D:\git\daotie\daotie\target\classes
// File f = new File(this.getClass().getResource("/").getPath());
// System.out.println(f);
//
// // 获取当前类的所在工程路径; 如果不加“/” 获取当前类的加载目录 D:\git\daotie\daotie\target\classes\my
// File f2 = new File(this.getClass().getResource("").getPath());
// System.out.println(f2);
//
// // 第二种:获取项目路径 D:\git\daotie\daotie
// File directory = new File("");// 参数为空
// String courseFile = directory.getCanonicalPath();
// System.out.println(courseFile);
//
//
// // 第三种: file:/D:/git/daotie/daotie/target/classes/
// URL xmlpath = this.getClass().getClassLoader().getResource("");
// System.out.println(xmlpath);
//
//
// // 第四种: D:\git\daotie\daotie
// System.out.println(System.getProperty("user.dir"));
// /*
// * 结果: C:\Documents and Settings\Administrator\workspace\projectName
// * 获取当前工程路径
// */
//
// // 第五种: 获取所有的类路径 包括jar包的路径
// System.out.println(System.getProperty("java.class.path"));
//
// }
public static void main(String[] args) {
int [] a = new int[78];
int [] b= new int[79];
int [] result = new int[99*99];
for (int i =0;i<a.length;i++){
int sum = 0;
for (int j=0;i<b.length;i++){
int aNum = a[i];
int bNum = b[j];
int sumNum = aNum*bNum;
sumNum += sum;
if (sumNum>10){
sum = sumNum%10;
}else {
sum = 0;
}
result[j]= sumNum/10;
}
}
}
}

@ -22,6 +22,7 @@ public class MyAuthenticator extends Authenticator {
this.userName=userName;
this.password=password;
}
@Override
protected PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(userName, password);
}

@ -14,7 +14,7 @@ import java.util.Map;
public interface SysRoleDao extends BaseDao<SysRole> {
List<SysRole> findByUserId(@Param("userId") Long userId);
@Override
List<SysRole> findAll();
Integer count(SysRoleVo vo);

@ -32,4 +32,9 @@ public class WechatUserUtil {
WechatUser wechatUser = JSONObject.parseObject(result,WechatUser.class);
return wechatUser;
}
public static void main(String[] args) {
}
}

@ -1,6 +1,6 @@
#--------- jdbc 配置---------
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.31.19:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.user=root
jdbc.password=mysql
#--------数据库连接池配置 -------

@ -1,4 +1,4 @@
redis.host=192.168.31.19
redis.host=127.0.0.1
redis.port=6379
redis.pass=
redis.timeout=-1

@ -7,7 +7,7 @@
<!-- 注意:使用mapper代理方法开发 ,namespace有着特殊作用-->
<sql id="column_list">
id,wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status
id,wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status,wechat_info_type
</sql>
<select id="findOne" resultType="com.lq.entity.WechatInfo" parameterType="long">
SELECT <include refid="column_list"/> FROM wechat_info WHERE id=#{id} AND status = 1
@ -23,10 +23,10 @@
SELECT LAST_INSERT_ID()
</selectKey>
INSERT INTO
wechat_info(wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status)
wechat_info(wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status,wechat_info_type)
VALUES
(
#{wechatOpenId},#{appSecpet},#{createTime},#{appId},#{encodingType},#{wechatName},#{url},#{token},#{encodingAesKey},#{lastUpdateTime},#{status}
#{wechatOpenId},#{appSecpet},#{createTime},#{appId},#{encodingType},#{wechatName},#{url},#{token},#{encodingAesKey},#{lastUpdateTime},#{status},#{wechatInfoType}
)
</insert>
@ -47,6 +47,7 @@
<if test="encodingAesKey!=null">encoding_aes_key=#{encodingAesKey},</if>
<if test="lastUpdateTime!=null">last_update_time=#{lastUpdateTime},</if>
<if test="status!=null">status=#{status},</if>
<if test="wechatInfoType!=null">wechat_info_type=#{wechatInfoType}</if>
</trim>
WHERE
id=#{id}

@ -1,9 +1,9 @@
#--------- jdbc 配置---------
#--------- jdbc <EFBFBD><EFBFBD><EFBFBD><EFBFBD>---------
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.url=jdbc:mysql://192.168.31.19:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.user=root
jdbc.password=mysql
#--------数据库连接池配置 -------
#--------<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -------
durid.pool.initialSize=5
durid.pool.maxActive=5
durid.pool.minIdle=1

@ -25,7 +25,9 @@
{field:'editId',title:'编辑',width:130,formatter:function (value,row,index) {
var html="<a href='#' onclick='openEdit(\"编辑\","+row.id+")'>编辑</a>&nbsp&nbsp";
html+="<a href='#' onclick='del("+row.id+")'>删除</a>&nbsp&nbsp";
html+="<a href='#' onclick='openMenu("+row.id+")'>菜单</a>&nbsp&nbsp";
if (row.wechatInfoType!=1){
html+="<a href='#' onclick='openMenu("+row.id+")'>菜单</a>&nbsp&nbsp";
}
html+="<a href='#' onclick='openRule("+row.id+")'>回复</a>&nbsp&nbsp";
return html;
}},
@ -40,10 +42,6 @@
{field:'encodingAesKey',title:'消息加密key',width:100},
{field:'createTimeStr',title:'创建时间',width:150},
{field:'url',title:'对接url',width:300},
]],
toolbar: [{
iconCls: 'icon-add',

@ -6,8 +6,7 @@
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ include file="../common/import-tag.jsp" %>
<html>
<head>
<title>403 - 您没有权限进行此操作</title>

@ -49,13 +49,17 @@
<!-- 配置 shiro 的Filter start-->
<filter>
<description>shiro 权限拦截 </description>
<description>shiroFilter</description>
<filter-name>shiroFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>exclusions</param-name>
<param-value>/public/*,*.js,*.css,*.jsp,*.swf</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>shiroFilter</filter-name>

Loading…
Cancel
Save