添加作者

master
星期八 5 years ago
parent afb036a2ca
commit 735207e877
  1. 5
      src/main/java/com/lq/cms/service/AdminBaseService.java
  2. 5
      src/main/java/com/lq/cms/service/impl/AdminBaseServiceImpl.java
  3. 3
      src/main/java/com/lq/cms/vo/AdminBaseVo.java
  4. 1
      src/main/java/com/lq/cms/web/BaseAdminController.java
  5. 5
      src/main/java/com/lq/code/util/email/emailUtil.java
  6. 15
      src/main/java/com/lq/code/util/jdbc/BeanHander.java
  7. 3
      src/main/java/com/lq/code/util/mybatisPlus/xml/SelectMappserXmlDtl.java
  8. 1
      src/main/java/com/lq/code/util/os/CpuUtil.java
  9. 1
      src/main/java/com/lq/code/util/sql/MysqlBuilder.java
  10. 4
      src/main/java/com/lq/code/web/BaseController.java
  11. 1
      src/main/java/com/lq/wechat/util/ConstantSet.java
  12. 6
      src/main/java/com/lq/wechat/web/WechatController.java

@ -5,6 +5,11 @@ import com.lq.code.service.BaseService;
import java.util.List;
/**
* @author qi
* @param <T>
* @param <V>
*/
public interface AdminBaseService<T,V extends AdminBaseVo> extends BaseService<T>{
/**

@ -11,6 +11,11 @@ import java.lang.reflect.ParameterizedType;
import java.util.Date;
import java.util.List;
/**
* @author qi
* @param <T>
* @param <V>
*/
public abstract class AdminBaseServiceImpl<T,V extends AdminBaseVo> implements AdminBaseService<T,V>{
abstract AdminBaseDao<T,V> getAdminBaseDao();

@ -2,6 +2,9 @@ package com.lq.cms.vo;
import java.util.Date;
/**
* @author qi
*/
public class AdminBaseVo extends BasePageVo {
private Long id;

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
/**
* 管理后台 父类
* 强封装缺少扩展不建议采用
* @author qi
*/
public abstract class BaseAdminController<T,V extends AdminBaseVo> {

@ -27,7 +27,6 @@ public class emailUtil {
props.put("mail.smtp.starttls.enable","true");//使用 STARTTLS安全连接
props.put("mail.smtp.port", "25"); //google使用465或587端口
props.put("mail.smtp.auth", "true"); // 使用验证
//props.put("mail.debug", "true");
Session mailSession = Session.getInstance(props,new MyAuthenticator(from,fromUserPassword));
// 第二步:编写消息
@ -54,6 +53,10 @@ public class emailUtil {
System.out.println("message yes");
}
public void copy(){
}
public static void main(String[] args) {
try {
sendMessage("smtp.163.com", "qi_liang_gz@163.com", "a970209468", "wx_qi_liang@163.com", "test", "你好,旧时光", "test");

@ -22,20 +22,7 @@ public class BeanHander implements ResultSetHandler {
Object bean = clazz.newInstance();
ResultSetMetaData metadata = rs.getMetaData();
int coulumnCount = metadata.getColumnCount();
/** for (int i = 0; i < coulumnCount; i++) {
String coulmnName = metadata.getColumnLabel(i + 1);
Object coulmnData = rs.getObject(i + 1);
String fieldName = SqlUtil.humpToCase(coulmnName);
Field f = null;
try {
f = clazz.getDeclaredField(fieldName);
}catch (NoSuchFieldException e){
continue;
}
f.setAccessible(true);
f.set(bean, coulmnData);
}
**/
Field [] fields = clazz.getDeclaredFields();
for (Field f:fields){
String fieldName = f.getName();

@ -4,6 +4,9 @@ import com.lq.code.util.mybatisPlus.xml.converter.SelectMappserXmlDtlConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
/**
* @author qi
*/
@XStreamAlias("select")
@XStreamConverter(SelectMappserXmlDtlConverter.class)
public class SelectMappserXmlDtl {

@ -10,6 +10,5 @@ public class CpuUtil {
public static void getcpu(){
Sigar sigar = new Sigar();
}
}

@ -61,7 +61,6 @@ public class MysqlBuilder extends AbstractDbBuiler {
clazzMap.remove(column.getColumnName());
columnIterator.remove();
}
}
columnIterator = columnList.iterator();
while (columnIterator.hasNext()) {

@ -5,7 +5,9 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* Created by qi on 2017/7/16.
*
* @author qi
* @date 2017/7/16
*/
public class BaseController {

@ -2,6 +2,7 @@ package com.lq.wechat.util;
/**
* 微信公众号相关常量
* @author qi
*/
public class ConstantSet {

@ -147,15 +147,11 @@ public class WechatController extends BaseController {
case ConstantSet.EVENT_TYPE_CLICK:
//自定义菜单点击事件KEY值
String eventKey = map.get(ConstantSet.EVENT_CLICK_KEY);
;
break;
default:
break;
}
break;
default:
text.setContent("您发送的消息是:" + "无法理解");
baseMessage = text;
@ -163,11 +159,9 @@ public class WechatController extends BaseController {
}
message = MessageUtil.MessageToXml(baseMessage);
}
} catch (Exception e) {
e.printStackTrace();
}
return message;
}
}

Loading…
Cancel
Save