diff --git a/src/main/java/com/lq/cms/emun/BasicsPermissionKeyEnum.java b/src/main/java/com/lq/cms/emun/BasicsPermissionKeyEnum.java index 31a46fe..f292a93 100644 --- a/src/main/java/com/lq/cms/emun/BasicsPermissionKeyEnum.java +++ b/src/main/java/com/lq/cms/emun/BasicsPermissionKeyEnum.java @@ -3,11 +3,14 @@ package com.lq.cms.emun; /** * @Author: qi - * @Description: + * @Description:权限默认key美剧 * @Date: Create in 1:25 PM 2019/8/8 */ public enum BasicsPermissionKeyEnum { + /** + * 权限枚举 + */ SELECT_MENU_KEY("SELECT_MENU_KEY","查看菜单","SELECT"), SELECT_DATA_KEY("SELECT_DATA_KEY","查询全部数据","SELECT"), INSERT_KEY("INSERT_KEY","新增数据","INSERT"), diff --git a/src/main/java/com/lq/cms/vo/BasePageVo.java b/src/main/java/com/lq/cms/vo/BasePageVo.java index 567f145..5bad7c8 100755 --- a/src/main/java/com/lq/cms/vo/BasePageVo.java +++ b/src/main/java/com/lq/cms/vo/BasePageVo.java @@ -2,8 +2,9 @@ package com.lq.cms.vo; import com.lq.code.util.sql.PageInterface; -/**分页父类 - * Created by qi_liang on 2018/1/27. +/** + * 分页父类 + * @author qi */ public class BasePageVo implements PageInterface { diff --git a/src/main/java/com/lq/cms/web/LoginController.java b/src/main/java/com/lq/cms/web/LoginController.java index 208dff7..8055c67 100755 --- a/src/main/java/com/lq/cms/web/LoginController.java +++ b/src/main/java/com/lq/cms/web/LoginController.java @@ -28,8 +28,9 @@ import java.io.IOException; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; -/**管理后台登陆页 - * Created by qi on 2017/7/16. +/** + * 管理后台登陆页 + * @author qi */ @Controller @RequestMapping("/cms/login") @@ -151,7 +152,9 @@ public class LoginController extends BaseController{ response.getOutputStream().flush(); } - //创建颜色 + /** + * 创建颜色 + */ private Color getRandColor(int fc,int bc){ Random random=new Random(); if(fc>255){ diff --git a/src/main/java/com/lq/code/util/XmlUtil.java b/src/main/java/com/lq/code/util/XmlUtil.java index af47ce2..3428559 100755 --- a/src/main/java/com/lq/code/util/XmlUtil.java +++ b/src/main/java/com/lq/code/util/XmlUtil.java @@ -35,18 +35,6 @@ public class XmlUtil { } -// public static String objToXml(Writer writer,Object obj) throws UnsupportedEncodingException { -// XStream xstream = new XStream(new DomDriver("utf8")); -// xstream.processAnnotations(obj.getClass()); // 识别obj类中的注解 -// ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); -// -// writer = new OutputStreamWriter(outputStream, "UTF-8"); -// -// xstream.toXML(obj, writer); -// String xml = outputStream.toString("UTF-8"); -// return xml; -// } - public static String objToXml(Object obj,String str) throws IOException { XStream xstream = new XStream(new DomDriver("utf8")); xstream.processAnnotations(obj.getClass()); // 识别obj类中的注解 @@ -58,15 +46,4 @@ public class XmlUtil { return xml; } - public static void main(String[] args) { - - SqlMapperXmlDtl sqlMapperXmlDtl = new SqlMapperXmlDtl(); - sqlMapperXmlDtl.setId("findOne"); - sqlMapperXmlDtl.setVale("select * from sys_id "); - - String xmlStr= objToXml(sqlMapperXmlDtl); - System.out.println(xmlStr); - - } - } diff --git a/src/main/java/com/lq/code/util/email/emailUtil.java b/src/main/java/com/lq/code/util/email/emailUtil.java index 376b9df..b618872 100755 --- a/src/main/java/com/lq/code/util/email/emailUtil.java +++ b/src/main/java/com/lq/code/util/email/emailUtil.java @@ -10,10 +10,22 @@ import java.util.Calendar; import java.util.Properties; /** - * Created by qi on 2017/9/8. + * email 工具类 + * @author qi */ public class emailUtil { + /** + * 发送邮件消息 + * @param smtpHost 发送地址 + * @param from 账号 + * @param fromUserPassword 密码 + * @param to 目标邮箱 + * @param subject 主题 + * @param messageText 消息内容 + * @param messageType 消息类型 + * @throws MessagingException + */ @SuppressWarnings("static-access") public static void sendMessage(String smtpHost, String from, String fromUserPassword, String to, String subject, @@ -53,9 +65,6 @@ public class emailUtil { System.out.println("message yes"); } - public void copy(){ - - } public static void main(String[] args) { try { diff --git a/src/main/java/com/lq/code/util/sql/MysqlBuilder.java b/src/main/java/com/lq/code/util/sql/MysqlBuilder.java index b2b5e08..b9fdba1 100755 --- a/src/main/java/com/lq/code/util/sql/MysqlBuilder.java +++ b/src/main/java/com/lq/code/util/sql/MysqlBuilder.java @@ -45,9 +45,9 @@ public class MysqlBuilder extends AbstractDbBuiler { Table table = tableIterator.next(); if (map.containsKey(table.getTableName())) { Class clazz = map.get(table.getTableName()); - Map clazzMap = new HashMap<>(); List fieldsList = BeanUtil.getAllField(clazz); Iterator fieldsIterator = fieldsList.iterator(); + Map clazzMap = new HashMap<>(fieldsList.size()); while (fieldsIterator.hasNext()) { Field f = fieldsIterator.next(); clazzMap.put(SqlUtil.caseToHump(f.getName()), f); diff --git a/src/main/java/com/lq/code/web/BaseController.java b/src/main/java/com/lq/code/web/BaseController.java index e6e299e..27444f4 100755 --- a/src/main/java/com/lq/code/web/BaseController.java +++ b/src/main/java/com/lq/code/web/BaseController.java @@ -5,7 +5,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; /** - * + * 控制类父类 + * 统一异常处理 * @author qi * @date 2017/7/16 */