更新注释

master
星期八 5 years ago
parent 1103b8c1e1
commit 210df7f85b
  1. 11
      src/main/java/com/lq/cms/service/WechatInfoService.java
  2. 12
      src/main/java/com/lq/cms/vo/SysRoleResourcePermissionVo.java
  3. 6
      src/main/java/com/lq/code/util/XmlUtil.java
  4. 9
      src/main/java/com/lq/code/util/email/emailUtil.java
  5. 5
      src/main/java/com/lq/code/util/jdbc/ResultSetHandler.java
  6. 42
      src/main/java/com/lq/code/util/jdbc/mode/Table.java
  7. 3
      src/main/java/com/lq/code/util/os/NetUtil.java
  8. 6
      src/main/java/com/lq/code/util/sql/factory/DbBuilerFactory.java
  9. 2
      src/main/java/com/lq/dao/SysResourceDao.java
  10. 18
      src/main/java/com/lq/wechat/util/DecriptTest.java
  11. 3
      src/main/java/com/lq/wechat/util/MessageUtil.java

@ -11,9 +11,18 @@ import java.util.List;
* @author qi
*/
public interface WechatInfoService extends BaseService<WechatInfo> {
/**
* 返回统计数据
* @param vo
* @return
*/
Integer count(WechatInfoVo vo);
/**
* 带条件分页查询
* @param vo
* @return
*/
List<WechatInfoVo> findListPage(WechatInfoVo vo);
/**

@ -7,11 +7,17 @@ package com.lq.cms.vo;
*/
public class SysRoleResourcePermissionVo {
//角色ID
/**
* 角色ID
*/
private Long roleId;
//资源ID
/**
* 资源ID
*/
private Long resourceId;
//权限ID
/**
* 权限ID
*/
private Long permissionId;
public Long getRoleId() {

@ -23,7 +23,8 @@ public class XmlUtil {
*/
public static String objToXml(Object obj){
XStream xstream = new XStream(new DomDriver("utf8"));
xstream.processAnnotations(obj.getClass()); // 识别obj类中的注解
// 识别obj类中的注解
xstream.processAnnotations(obj.getClass());
/*
// 以压缩的方式输出XML
StringWriter sw = new StringWriter();
@ -37,7 +38,8 @@ public class XmlUtil {
public static String objToXml(Object obj,String str) throws IOException {
XStream xstream = new XStream(new DomDriver("utf8"));
xstream.processAnnotations(obj.getClass()); // 识别obj类中的注解
// 识别obj类中的注解
xstream.processAnnotations(obj.getClass());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Writer writer = new OutputStreamWriter(outputStream, "UTF-8");
writer.write(str);

@ -36,9 +36,12 @@ public class emailUtil {
Properties props = new Properties();
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.starttls.enable","true");//使用 STARTTLS安全连接
props.put("mail.smtp.port", "25"); //google使用465或587端口
props.put("mail.smtp.auth", "true"); // 使用验证
//使用 STARTTLS安全连接
props.put("mail.smtp.starttls.enable","true");
//google使用465或587端口
props.put("mail.smtp.port", "25");
// 使用验证
props.put("mail.smtp.auth", "true");
Session mailSession = Session.getInstance(props,new MyAuthenticator(from,fromUserPassword));
// 第二步:编写消息

@ -8,6 +8,11 @@ import java.sql.ResultSet;
*/
public interface ResultSetHandler {
/**
* 结果集封装成对象
* @param rs
* @return
*/
Object handler(ResultSet rs);
}

@ -20,27 +20,45 @@ public class Table {
SELF_REFERENCING_COL_NAME
REF_GENERATION
*/
//类别
/**
* 类别
*/
private String tableCat;
//模式
/**
* 模式
*/
private String tableSchem;
//表名
/**
* 表名
*/
private String tableName;
//表类型
/**
* 表类型
*/
private String tableType;
//备注
/**
* 备注
*/
private String remarks;
//类型的类别
/**
* 类型的类别
*/
private String typeCat;
//类型模式
/**
* 类型模式
*/
private String typeSchem;
//类型名称
/**
* 类型名称
*/
private String typeName;
// 有类型表的指定 "identifier" 的列的名称
/**
* 有类型表的指定 "identifier" 的列的名称
*/
private String selfReferencingColName;
//
// private String refGeneration;
/**
* 表相关的列
*/
private List<Column> columns;
public String getTableCat() {

@ -48,7 +48,8 @@ public class NetUtil {
LOGGER.info("获取到的客户端内网ip为空,从配置文件读取本地ip。");
return null;
}
return ip.getHostAddress();// 客户端ip
// 客户端ip
return ip.getHostAddress();
}
}
}

@ -8,6 +8,10 @@ import com.lq.code.util.sql.AbstractDbBuiler;
* @author qi
*/
public interface DbBuilerFactory {
/**
* 返回sql构造器
* @param dbType
* @return
*/
AbstractDbBuiler getSqlBuilder(String dbType);
}

@ -43,7 +43,7 @@ public interface SysResourceDao extends BaseDao<SysResource> {
Integer count(SysResourceVo vo);
/**
*
* 查找菜单
* @param map
* @return
*/

@ -103,11 +103,14 @@ public class DecriptTest {
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
// 创建密码器
Cipher cipher = Cipher.getInstance("AES");
byte[] byteContent = content.getBytes("utf-8");
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
// 初始化
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] result = cipher.doFinal(byteContent);
return result; // 加密
// 加密
return result;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
@ -140,10 +143,13 @@ public class DecriptTest {
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
cipher.init(Cipher.DECRYPT_MODE, key);// 初始化
// 创建密码器
Cipher cipher = Cipher.getInstance("AES");
// 初始化
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] result = cipher.doFinal(content);
return result; // 加密
// 加密
return result;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {

@ -52,7 +52,8 @@ public class MessageUtil {
*/
public static String MessageToXml(Object obj){
XStream xstream = new XStream(new DomDriver("utf8"));
xstream.processAnnotations(obj.getClass()); // 识别obj类中的注解
// 识别obj类中的注解
xstream.processAnnotations(obj.getClass());
/*
// 以压缩的方式输出XML
StringWriter sw = new StringWriter();

Loading…
Cancel
Save