微信公众号更新

master
星期八 6 years ago
parent c2f13bde10
commit 552cc2ca74
  1. 0
      src/main/java/com/lq/api/service/SysFileService.java
  2. 4
      src/main/java/com/lq/api/service/impl/SysFileServiceImpl.java
  3. 0
      src/main/java/com/lq/api/vo/SysFileVo.java
  4. 0
      src/main/java/com/lq/api/vo/UeditorVo.java
  5. 0
      src/main/java/com/lq/api/web/SysFileController.java
  6. 0
      src/main/java/com/lq/api/web/UmUeditorFileController.java
  7. 0
      src/main/java/com/lq/cms/aspectJ/SysUserServiceAspectj.java
  8. 0
      src/main/java/com/lq/cms/dao/AdminBaseDao.java
  9. 3
      src/main/java/com/lq/cms/emun/DatagridParamEnum.java
  10. 0
      src/main/java/com/lq/cms/emun/FileTypeEnum.java
  11. 0
      src/main/java/com/lq/cms/emun/PermissionTyepEnum.java
  12. 0
      src/main/java/com/lq/cms/emun/StatusTypeEnum.java
  13. 2
      src/main/java/com/lq/cms/emun/WechatInfoEncodingTypeEnum.java
  14. 2
      src/main/java/com/lq/cms/emun/WechatMessageTypeEnum.java
  15. 0
      src/main/java/com/lq/cms/mode/Menus.java
  16. 0
      src/main/java/com/lq/cms/mode/MenusComposite.java
  17. 0
      src/main/java/com/lq/cms/mode/MenusItem.java
  18. 0
      src/main/java/com/lq/cms/mode/MySessionManager.java
  19. 0
      src/main/java/com/lq/cms/mode/Ztree.java
  20. 0
      src/main/java/com/lq/cms/mode/ZtreeComposite.java
  21. 0
      src/main/java/com/lq/cms/mode/ZtreeItem.java
  22. 0
      src/main/java/com/lq/cms/service/AdminBaseService.java
  23. 0
      src/main/java/com/lq/cms/service/SysLogService.java
  24. 0
      src/main/java/com/lq/cms/service/SysResourceService.java
  25. 0
      src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java
  26. 0
      src/main/java/com/lq/cms/service/SysRoleService.java
  27. 0
      src/main/java/com/lq/cms/service/SysUserRoleService.java
  28. 0
      src/main/java/com/lq/cms/service/SysUserService.java
  29. 4
      src/main/java/com/lq/cms/service/WechatInfoService.java
  30. 0
      src/main/java/com/lq/cms/service/WechatMessageService.java
  31. 0
      src/main/java/com/lq/cms/service/impl/AdminBaseServiceImpl.java
  32. 0
      src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java
  33. 0
      src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java
  34. 0
      src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java
  35. 0
      src/main/java/com/lq/cms/service/impl/SysRoleServiceImpl.java
  36. 0
      src/main/java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java
  37. 0
      src/main/java/com/lq/cms/service/impl/SysUserServiceImpl.java
  38. 8
      src/main/java/com/lq/cms/service/impl/WechatInfoServiceImpl.java
  39. 0
      src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java
  40. 0
      src/main/java/com/lq/cms/vo/AdminBaseVo.java
  41. 0
      src/main/java/com/lq/cms/vo/BasePageVo.java
  42. 0
      src/main/java/com/lq/cms/vo/PermissionVo.java
  43. 0
      src/main/java/com/lq/cms/vo/SysInfoVo.java
  44. 0
      src/main/java/com/lq/cms/vo/SysLogVo.java
  45. 0
      src/main/java/com/lq/cms/vo/SysResourceVo.java
  46. 0
      src/main/java/com/lq/cms/vo/SysRoleResourcePermissionVo.java
  47. 0
      src/main/java/com/lq/cms/vo/SysRoleVo.java
  48. 0
      src/main/java/com/lq/cms/vo/SysUserRoleVo.java
  49. 0
      src/main/java/com/lq/cms/vo/SysUserVo.java
  50. 23
      src/main/java/com/lq/cms/vo/WechatInfoVo.java
  51. 0
      src/main/java/com/lq/cms/vo/WechatMessageVo.java
  52. 0
      src/main/java/com/lq/cms/web/AdminBaseController.java
  53. 0
      src/main/java/com/lq/cms/web/FileSystemController.java
  54. 0
      src/main/java/com/lq/cms/web/IndexController.java
  55. 0
      src/main/java/com/lq/cms/web/LoginController.java
  56. 0
      src/main/java/com/lq/cms/web/UeditorController.java
  57. 4
      src/main/java/com/lq/cms/web/sys/LogController.java
  58. 2
      src/main/java/com/lq/cms/web/sys/MenuController.java
  59. 2
      src/main/java/com/lq/cms/web/sys/RoleController.java
  60. 6
      src/main/java/com/lq/cms/web/sys/UserController.java
  61. 5
      src/main/java/com/lq/cms/web/wechat/WechatInfoController.java
  62. 0
      src/main/java/com/lq/cms/web/wechat/WechatMessageController.java
  63. 0
      src/main/java/com/lq/cms/web/wechat/WechatRuleController.java
  64. 0
      src/main/java/com/lq/code/annotation/Length.java
  65. 0
      src/main/java/com/lq/code/cache/RedisCache.java
  66. 9
      src/main/java/com/lq/code/cache/RedisSessionDao.java
  67. 0
      src/main/java/com/lq/code/dao/BaseDao.java
  68. 0
      src/main/java/com/lq/code/dao/impl/BaseDaoImpl.java
  69. 0
      src/main/java/com/lq/code/entity/AjaxResult.java
  70. 0
      src/main/java/com/lq/code/entity/IdEntity.java
  71. 0
      src/main/java/com/lq/code/executor/package-info.java
  72. 0
      src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java
  73. 0
      src/main/java/com/lq/code/interceptor/PageInteceptor.java
  74. 0
      src/main/java/com/lq/code/interceptor/SpringmvcInterceptor.java
  75. 0
      src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java
  76. 0
      src/main/java/com/lq/code/service/BaseService.java
  77. 0
      src/main/java/com/lq/code/service/impl/BaseServiceImpl.java
  78. 0
      src/main/java/com/lq/code/util/BeanUtil.java
  79. 0
      src/main/java/com/lq/code/util/CastUtil.java
  80. 0
      src/main/java/com/lq/code/util/Collectiontil.java
  81. 0
      src/main/java/com/lq/code/util/DataValidatorUtil.java
  82. 0
      src/main/java/com/lq/code/util/DateUtil.java
  83. 0
      src/main/java/com/lq/code/util/FileUtil.java
  84. 0
      src/main/java/com/lq/code/util/HttpKit.java
  85. 0
      src/main/java/com/lq/code/util/HttpUtil.java
  86. 3
      src/main/java/com/lq/code/util/HttpsClient.java
  87. 0
      src/main/java/com/lq/code/util/InterfaceProxyFactoryUtil.java
  88. 0
      src/main/java/com/lq/code/util/JvmUtil.java
  89. 0
      src/main/java/com/lq/code/util/Md5Util.java
  90. 0
      src/main/java/com/lq/code/util/PropsUtil.java
  91. 102
      src/main/java/com/lq/code/util/RedisUtil.java
  92. 0
      src/main/java/com/lq/code/util/StringUtil.java
  93. 0
      src/main/java/com/lq/code/util/TestUtil.java
  94. 2
      src/main/java/com/lq/code/util/XmlUtil.java
  95. 0
      src/main/java/com/lq/code/util/email/MyAuthenticator.java
  96. 0
      src/main/java/com/lq/code/util/email/emailUtil.java
  97. 0
      src/main/java/com/lq/code/util/email/emailUtil2.java
  98. 0
      src/main/java/com/lq/code/util/jdbc/BeanHander.java
  99. 0
      src/main/java/com/lq/code/util/jdbc/BeanListHandler.java
  100. 0
      src/main/java/com/lq/code/util/jdbc/JdbcUtils.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -9,10 +9,6 @@ import com.lq.entity.SysFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 文件接口事务类
* @author qi
*/
@Service
public class SysFileServiceImpl extends BaseServiceImpl<SysFile> implements SysFileService {

@ -3,6 +3,9 @@ package com.lq.cms.emun;
import java.util.HashMap;
import java.util.Map;
/**
* 管理后台数据
*/
public enum DatagridParamEnum {
TOTAL("total","数据总数"),

@ -11,7 +11,7 @@ public enum WechatInfoEncodingTypeEnum {
BLEND("BLEND","混合"),
ENCRYPT("ENCRYPT","加密")
;
private static Map<String,String> enumMap = new HashMap();
private static Map<String,String> enumMap = new HashMap(WechatInfoEncodingTypeEnum.values().length);
static {

@ -4,8 +4,8 @@ import java.util.HashMap;
import java.util.Map;
public enum WechatMessageTypeEnum {
IMAGE("IMAGE","图片"),
TEXT("TEXT","文本"),
IMAGE("IMAGE","图片"),
IMAGE_TEXT("IMAGE_TEXT","图文混合")
;

@ -21,4 +21,8 @@ public interface WechatInfoService extends BaseService<WechatInfo> {
* @return
*/
WechatInfo getByOpenId(String wechatOpenId);
/**
* 通过公众号名称查找公众号详情
*/
WechatInfo getByWechatName(String wechatName);
}

@ -37,6 +37,12 @@ public class WechatInfoServiceImpl extends BaseServiceImpl<WechatInfo> implement
@Override
public WechatInfo getByOpenId(String wechatOpenId) {
return null;
return wechatInfoDao.getByWechatOpenId(wechatOpenId);
}
@Override
public WechatInfo getByWechatName(String wechatName) {
return wechatInfoDao.getByWechatName(wechatName);
}
}

@ -1,6 +1,7 @@
package com.lq.cms.vo;
import com.lq.cms.emun.WechatInfoEncodingTypeEnum;
import com.lq.cms.emun.WechatInfoTypeEnum;
import com.lq.code.util.DateUtil;
import java.text.SimpleDateFormat;
@ -39,6 +40,10 @@ public class WechatInfoVo extends BasePageVo {
private Date lastUpdateTime;
//状态
private Integer status;
//公众号类型
private Integer wechatInfoType;
//公众号类型(字符串)
private String wechatInfoTypeStr;
public Long getId() {
return id;
@ -126,7 +131,6 @@ public class WechatInfoVo extends BasePageVo {
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
this.createTimeStr = DateUtil.getDateToStr(createTime);
}
@ -154,4 +158,21 @@ public class WechatInfoVo extends BasePageVo {
public void setStatus(Integer status) {
this.status = status;
}
public Integer getWechatInfoType() {
return wechatInfoType;
}
public void setWechatInfoType(Integer wechatInfoType) {
this.wechatInfoType = wechatInfoType;
this.wechatInfoTypeStr = WechatInfoTypeEnum.getDesc(wechatInfoType);
}
public String getWechatInfoTypeStr() {
return wechatInfoTypeStr;
}
public void setWechatInfoTypeStr(String wechatInfoTypeStr) {
this.wechatInfoTypeStr = wechatInfoTypeStr;
}
}

@ -22,9 +22,9 @@ import java.util.Map;
*/
@Controller
@RequestMapping("cms/log")
public class LogController {
public class LogController {
private static Logger logger = Logger.getLogger(LogController.class);
private static Logger LOGGER = Logger.getLogger(LogController.class);
@Autowired

@ -33,7 +33,7 @@ import java.util.Map;
@RequestMapping("/cms/menu")
public class MenuController {
private static Logger logger = Logger.getLogger(MenuController.class);
private static Logger LOGGER = Logger.getLogger(MenuController.class);
@Autowired
private SysResourceService sysResourceService;

@ -33,7 +33,7 @@ import java.util.Map;
@RequestMapping("/cms/role")
public class RoleController {
private static Logger logger = Logger.getLogger(RoleController.class);
private static Logger LOGGER = Logger.getLogger(RoleController.class);
@Autowired

@ -155,6 +155,7 @@ public class UserController {
String fileType = FileUtil.fileFormat(multipartFile.getOriginalFilename());
newFileName = "user/"+uuid.toString()+"."+fileType;
File newFile = new File(FILE_LOAD_PATH +newFileName);
if (!newFile.exists()){
newFile.mkdirs();
}
@ -164,6 +165,7 @@ public class UserController {
e.printStackTrace();
}
}
return newFileName;
}
@ -174,7 +176,6 @@ public class UserController {
AjaxResult ajaxResult = new AjaxResult();
Subject subject= SecurityUtils.getSubject();
SysUser sysUser= (SysUser) subject.getPrincipal();
// System.out.println(StringUtil.isNotNull(oldPass)&&StringUtil.isNotNull(newPass));
if (StringUtil.isNotNull(oldPass)&&StringUtil.isNotNull(newPass)){
String md5Pass = Md5Util.getMd5(oldPass);
if (md5Pass.equals(sysUser.getPassword())){
@ -192,9 +193,6 @@ public class UserController {
ajaxResult.setSuccess(false);
ajaxResult.setMsg("参数为空,请检查");
}
return ajaxResult;
}

@ -2,6 +2,7 @@ package com.lq.cms.web.wechat;
import com.lq.cms.emun.StatusTypeEnum;
import com.lq.cms.emun.WechatInfoEncodingTypeEnum;
import com.lq.cms.emun.WechatInfoTypeEnum;
import com.lq.cms.service.WechatInfoService;
import com.lq.cms.vo.WechatInfoVo;
import com.lq.code.entity.AjaxResult;
@ -43,8 +44,9 @@ public class WechatInfoController {
modelAndView.addObject("wechatInfo", wechatInfo);
}
Map<String,String> encodingTypeMap = WechatInfoEncodingTypeEnum.getEnumMap();
modelAndView.addObject("encodingTypeMap",encodingTypeMap);
Map<Integer,String> wechatInfoTypeMap = WechatInfoTypeEnum.getEnumMap();
modelAndView.addObject("wechatInfoTypeMap",wechatInfoTypeMap);
modelAndView.setViewName("cms/wechat/info/edit");
return modelAndView;
}
@ -77,7 +79,6 @@ public class WechatInfoController {
@ResponseBody
@RequestMapping("/update")
public Object update(WechatInfoVo vo){
Date nowTime = new Date();
AjaxResult ajaxResult = new AjaxResult();
WechatInfo wechatInfo = wechatInfoService.findOne(1L);
BeanUtils.copyProperties(vo,wechatInfo);

@ -20,9 +20,9 @@ import java.util.concurrent.TimeUnit;
/**
* Created by qi_liang on 2018/9/11.
*/
public class RedisSessionDao extends CachingSessionDAO {
public class RedisSessionDao extends EnterpriseCacheSessionDAO {
private final static Logger log = LoggerFactory.getLogger(RedisSessionDao.class);
private final static Logger LOGGER = LoggerFactory.getLogger(RedisSessionDao.class);
private RedisTemplate<String,Object> redisTemplate;
@ -39,6 +39,10 @@ public class RedisSessionDao extends CachingSessionDAO {
@Override
protected void doUpdate(Session session) {
//该方法交给父类去执行
super.doUpdate(session);
//更新reids中的session时间
redisTemplate.expire(session.toString(),this.defaultExpireTime, TimeUnit.SECONDS);
}
@Override
@ -71,6 +75,7 @@ public class RedisSessionDao extends CachingSessionDAO {
@Override
protected Session doReadSession(Serializable serializable) {
LOGGER.warn("执行读取read session方法");
//此方法不会执行,不用管
return null;
}

@ -25,9 +25,12 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HttpsClient {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpsClient.class);
public static String post(String url,Map<String, Object> params) throws IOException{

@ -1,18 +1,108 @@
package com.lq.code.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;
import java.util.concurrent.TimeUnit;
/**
* Created by qi_liang on 2018/8/31.
*/
@Component
public class RedisUtil {
public static void main(String[] args) {
Jedis jedis = new Jedis("192.168.99.135",6379);
jedis.set("user","qi_liang");
System.out.println("连接成功");
System.out.println("服务正在运行:"+jedis.ping());
System.out.println(jedis.get("user"));
@Autowired
private RedisTemplate<String,Object> redisTemplate;
public void setRedisTemplate(RedisTemplate<String, Object> redisTemplate) {
this.redisTemplate = redisTemplate;
}
/**
* 指定缓存失效时间
* @param key
* @param time 时间
* @return
*/
public boolean expirce(String key,Long time){
boolean result = false;
try {
if (time>0){
redisTemplate.expire(key,time, TimeUnit.SECONDS);
result = true;
}
}catch (Exception e){
e.printStackTrace();
result = false;
}
return result;
}
/**
* 根据key 获取过期时间
* @param key 不能为null
* @return 时间() 返回0代码永久有效
*/
public long getExpire(String key){
return redisTemplate.getExpire(key,TimeUnit.SECONDS);
}
/**
* 判断key是否在缓存中存在
* @param key
* @return
*/
public boolean hasKey(String key){
return redisTemplate.hasKey(key);
}
/**
* 通过key删除缓存
* @param key
*/
public void del(String ...key){
if (key!=null&&key.length>0){
for (String keyStr:key){
redisTemplate.delete(keyStr);
}
}
}
/**
* 通过key获取缓存
* @param key
* @return
*/
public Object get(String key){
return StringUtil.isNotNull(key)?redisTemplate.opsForValue().get(key):null;
}
/**
* 设置缓存
* @param key
* @param value 缓存内容
* @return
*/
public void set(String key,Object value){
redisTemplate.opsForValue().set(key,value);
}
/**
* 设置缓存
* @param key
* @param value 缓存内容
* @param time 失效时间单位
*/
public void set(String key,Object value,long time){
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
}
}

@ -10,6 +10,8 @@ import java.io.*;
*/
public class XmlUtil {
public static final String DEFAULT_ENCODING = "utf8";
/**
* object xml 文档
* @param obj

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save