修改注解

master
星期八 5 years ago
parent bb300015cb
commit 96497617fe
  1. 5
      src/main/java/com/lq/cms/emun/BasicsPermissionKeyEnum.java
  2. 5
      src/main/java/com/lq/cms/vo/BasePageVo.java
  3. 9
      src/main/java/com/lq/cms/web/LoginController.java
  4. 23
      src/main/java/com/lq/code/util/XmlUtil.java
  5. 17
      src/main/java/com/lq/code/util/email/emailUtil.java
  6. 2
      src/main/java/com/lq/code/util/sql/MysqlBuilder.java
  7. 3
      src/main/java/com/lq/code/web/BaseController.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"),

@ -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 {

@ -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){

@ -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);
}
}

@ -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 {

@ -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<String, Object> clazzMap = new HashMap<>();
List<Field> fieldsList = BeanUtil.getAllField(clazz);
Iterator<Field> fieldsIterator = fieldsList.iterator();
Map<String, Object> clazzMap = new HashMap<>(fieldsList.size());
while (fieldsIterator.hasNext()) {
Field f = fieldsIterator.next();
clazzMap.put(SqlUtil.caseToHump(f.getName()), f);

@ -5,7 +5,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
/**
*
* 控制类父类
* 统一异常处理
* @author qi
* @date 2017/7/16
*/

Loading…
Cancel
Save