Merge remote-tracking branch 'origin/master'

master
星期八 5 years ago
commit 16d768c809
  1. 1
      pom.xml
  2. 15
      src/main/java/com/lq/cms/dao/AdminBaseDao.java
  3. 2
      src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java
  4. 25
      src/main/java/com/lq/cms/service/SysRoleService.java
  5. 5
      src/main/java/com/lq/cms/service/WechatMessageService.java
  6. 3
      src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java
  7. 1
      src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java
  8. 4
      src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java
  9. 2
      src/main/java/com/lq/cms/web/IndexController.java
  10. 1
      src/main/java/com/lq/code/annotation/Length.java
  11. 31
      src/main/java/com/lq/code/entity/AjaxResult.java
  12. 1
      src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java
  13. 2
      src/main/java/com/lq/code/service/BaseService.java
  14. 2
      src/main/java/com/lq/dao/SysFileDao.java
  15. 12
      src/main/java/com/lq/dao/SysLogDao.java
  16. 2
      src/main/java/com/lq/dao/SysPermissionDao.java
  17. 22
      src/main/java/com/lq/dao/SysResourceDao.java
  18. 1
      src/main/java/com/lq/entity/SysLog.java
  19. 2
      src/main/java/com/lq/jms/service/impl/ProductServiceImpl.java
  20. 170
      src/main/java/com/lq/wechat/web/WechatController.java
  21. 2
      src/main/profile/dev/jdbc.properties
  22. 10
      src/main/resources/mybatis/mapping/SysPermissionDao.xml
  23. 14
      src/main/resources/mybatis/mapping/WechatInfoDao.xml
  24. 10
      src/main/resources/mybatis/mapping/WechatKeywordDao.xml
  25. 10
      src/main/resources/mybatis/mapping/WechatMessageDao.xml
  26. 10
      src/main/resources/mybatis/mapping/WechatRuleDao.xml
  27. 12
      src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml
  28. 8
      src/main/resources/mybatis/mapping/WechatUserDao.xml
  29. 3
      src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp

@ -684,4 +684,5 @@
</build>
</project>

@ -5,10 +5,25 @@ import com.lq.code.dao.BaseDao;
import java.util.List;
/**
* @author qi
* @param <T> 实体类
* @param <V> 视图实体
*/
public interface AdminBaseDao<T,V extends AdminBaseVo> extends BaseDao<T> {
/**
* 带参数分页查询
* @param vo
* @return
*/
List<V> findListPage(V vo);
/**
* 参数统计
* @param vo
* @return
*/
int count(V vo);
}

@ -10,6 +10,8 @@ import java.util.List;
/**
* Created by qi_liang on 2018/6/21.
* @author qi
* 角色菜单权限关联类
*/
public interface SysRoleResourcePermissionService extends BaseService<SysRoleResourcePermission> {

@ -12,14 +12,37 @@ import java.util.List;
* 角色事务类
*/
public interface SysRoleService extends BaseService<SysRole> {
/**
* 参数统计
* @param vo
* @return
*/
Integer count(SysRoleVo vo);
/**
* 参数分页查询
* @param vo
* @return
*/
List<SysRoleVo> findListPage(SysRoleVo vo);
/**
*
* @param userId
* @return
*/
List<SysUserRoleVo> findAllRoleVo(Long userId);
/**
* 通过用户ID查询角色
* @param userId
* @return
*/
List<SysRole> findByUserId(Long userId);
/**
* 通过角色ID删除角色
* @param roleId
*/
void deleteRole(Long roleId);
}

@ -5,7 +5,10 @@ import com.lq.entity.WechatMessage;
import java.util.List;
/**
* 微信消息事务类
* @author qi
*/
public interface WechatMessageService extends AdminBaseService<WechatMessage,WechatMessageVo> {
List<WechatMessageVo> findAllWechatMessageVo(WechatMessageVo wechatMessageVo);

@ -12,9 +12,10 @@ import java.util.List;
/**
* Created by qi_liang on 2018/6/21.
* @author qi
*/
@Service
public class SysLogServiceImpl implements SysLogService {
public class SysLogServiceImpl implements SysLogService {
@Autowired
private SysLogDao sysLogDao;

@ -51,7 +51,6 @@ public class SysRoleResourcePermissionServiceImpl implements SysRoleResourcePer
public List<ZtreeComposite> findZtree(Long roleId) {
List<ZtreeComposite> ztreeList=new ArrayList<>();
List<SysResource> resourceList=sysResourceDao.findByParentId(0L);
for (SysResource sysResource:resourceList){
ZtreeItem ztreeItem=new ZtreeItem();
ztreeItem.setId(sysResource.getId());

@ -27,9 +27,9 @@ public class WechatMessageServiceImpl extends AdminBaseServiceImpl<WechatMessage
@Override
public List<WechatMessageVo> findAllWechatMessageVo(WechatMessageVo wechatMessageVo) {
List<WechatMessageVo> wechatMessageVoList = new ArrayList<>();
List<WechatMessage> wechatMessageList = wechatMessageDao.findAllByWechatMessageVo(wechatMessageVo);
List<WechatMessage> wechatMessageList = wechatMessageDao.findAllByWechatMessageVo(wechatMessageVo);
List<WechatMessageVo> wechatMessageVoList = new ArrayList<>(wechatMessageList.size());
wechatMessageList.forEach(wechatMessage -> {
WechatMessageVo wechatMessageVo1 = new WechatMessageVo();
BeanUtil.copyNotNull(wechatMessageVo1,wechatMessage);

@ -72,7 +72,7 @@ public class IndexController {
context.getServerInfo();
DbInfo dbInfo = JdbcUtils.getDBInfo();
OsInfo osInfo = OsUtil.getInfo();
String serverIp = NetUtil.getIP();
String serverIp = NetUtil.getLocalIpAddr();
JvmInfo jvmInfo = JvmUtil.getInfo();
vo.setDbInfo(dbInfo);
vo.setUserIP(userIp);

@ -4,6 +4,7 @@ import java.lang.annotation.*;
/**
* Created by qi_liang on 2018/4/26.
* @author qi
*/
@Documented
@Target(ElementType.FIELD)

@ -2,13 +2,20 @@ package com.lq.code.entity;
/**
* Created by qi on 2018-1-9.
* @author qi
*/
public class AjaxResult {
//操作结果
private Boolean success;
//提示信息
/**
* 操作结果
*/
private boolean success;
/**
* 提示信息
*/
private String msg;
//返回数据
/**
* 返回数据
*/
private Object data;
public AjaxResult() {
@ -46,4 +53,20 @@ public class AjaxResult {
public void setData(Object data) {
this.data = data;
}
public static AjaxResult getInstance(){
return new AjaxResult();
}
public static AjaxResult getSuccessInstance(){
return new AjaxResult();
}
public static AjaxResult getSuccessInstance(Object data){
AjaxResult ajaxResult = new AjaxResult();
ajaxResult.setData(data);
return ajaxResult;
}
}

@ -13,6 +13,7 @@ import org.springframework.context.event.ContextRefreshedEvent;
import java.util.Set;
/**
* 扫描实体类自动同步表结构类
* @author qi
*/
public class InstantiationTracingBeanPostProcessor implements ApplicationListener<ContextRefreshedEvent> {

@ -10,7 +10,7 @@ import java.util.List;
*/
public interface BaseService<T> {
BaseDao<T> getBaseDao();
BaseDao<T> getBaseDao();
default T findOne(Long id){
return getBaseDao().findOne(id);

@ -5,6 +5,8 @@ import com.lq.entity.SysFile;
/**
* Created by qi_liang on 2018/3/25.
* 文件管理类
* @author qi
*/
public interface SysFileDao extends BaseDao<SysFile> {
}

@ -8,10 +8,22 @@ import java.util.List;
/**
* Created by qi on 2017/7/27.
* @author qi
* 系统日志类
*/
public interface SysLogDao extends BaseDao<SysLog>{
/**
* 参数分页查询
* @param vo
* @return
*/
List<SysLogVo> findListPage(SysLogVo vo);
/**
* 参数统计
* @param vo
* @return
*/
Integer count(SysLogVo vo);
}

@ -9,6 +9,8 @@ import java.util.List;
/**
* Created by qi on 2017-11-29.
* @author qi
* 系统权限
*/
public interface SysPermissionDao extends BaseDao<SysPermission>{
/**

@ -10,6 +10,8 @@ import java.util.Map;
/**
* Created by qi on 2017-11-29.
* @author qi
* 菜单资源类
*/
public interface SysResourceDao extends BaseDao<SysResource> {
/**
@ -19,12 +21,32 @@ public interface SysResourceDao extends BaseDao<SysResource> {
*/
List<SysResource> findByParentId(@Param("parentId") Long parentId);
/**
* 参数查询
* @param vo
* @return
*/
List<SysResource> findList(SysResourceVo vo);
/**
* 参数查询实体类
* @param vo
* @return
*/
List<SysResourceVo> findListPage(SysResourceVo vo);
/**
* 参数统计
* @param vo
* @return
*/
Integer count(SysResourceVo vo);
/**
*
* @param map
* @return
*/
List<SysResource> findMenu(Map<String, Object> map);
}

@ -6,6 +6,7 @@ import java.util.Date;
/** 系统日志表
* Created by qi on 2017/7/27.
* @author qi
*/
public class SysLog extends IdEntity {
/**

@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
@Service
public class ProductServiceImpl implements ProductService {
@Autowired
@Autowired(required = false)
private JmsTemplate jmsTemplate;

@ -9,8 +9,6 @@ import com.lq.code.web.BaseController;
import com.lq.entity.WechatInfo;
import com.lq.entity.WechatUser;
import com.lq.wechat.mode.message.BaseMessage;
import com.lq.wechat.mode.message.ItemMessage;
import com.lq.wechat.mode.message.NewsMessage;
import com.lq.wechat.mode.message.TextMessage;
import com.lq.wechat.util.CheckUtil;
import com.lq.wechat.util.ConstantSet;
@ -26,8 +24,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -92,99 +88,79 @@ public class WechatController extends BaseController {
//微信公众号详情
WechatInfo wechatInfo = wechatInfoService.getByOpenId(wechatOpenId);
TextMessage text = new TextMessage();
text.setFromUserName(wechatOpenId);
text.setToUserName(openId);
text.setMsgType(ConstantSet.MESSAGE_TYPE_TEXT);
text.setCreateTime(System.currentTimeMillis());
switch (msgType) {
case ConstantSet.MESSAGE_TYPE_TEXT:
String content = map.get(WECHAT_CONTENT_KEY);
BaseMessage baseMessage = wechatRuleService.getByKeyworkdAndWechatInfoId(content,wechatInfo);
baseMessage.setCreateTime(System.currentTimeMillis());
baseMessage.setFromUserName(wechatOpenId);
baseMessage.setToUserName(openId);
message = MessageUtil.MessageToXml(baseMessage);
// if("1".equals(content)){
// NewsMessage newsMessage=new NewsMessage();
// List<ItemMessage> items=new ArrayList<>();
// ItemMessage item=new ItemMessage();
// item.setTitle("六弄咖啡馆");
// item.setDescription("两个人在爱在距离面前是否禁受考验?");
// String path = req.getContextPath();
// String basePath = req.getScheme()+"://"+req.getServerName()+":"+req.getServerPort()+path+"/";
// item.setPicUrl("https://img3.doubanio.com/view/photo/l/public/p2367455902.webp");
// item.setUrl("http://www.iqiyi.com/v_19rr95j3vc.html?vfm=2008_aldbd");
// items.add(item);
// newsMessage.setArticles(items);
// newsMessage.setArticleCount(1);
// newsMessage.setCreateTime(System.currentTimeMillis());
// newsMessage.setFromUserName(wechatOpenId);
// newsMessage.setMsgType(ConstantSet.MESSAGE_TYPE_NEW);
// newsMessage.setToUserName(openId);
// message = MessageUtil.MessageToXml(newsMessage);
// } else{
// text.setContent("您发送的消息是:" + content);
// message = MessageUtil.MessageToXml(text);
// }
break;
case ConstantSet.MESSAGE_TYPE_IMAGE:
text.setContent("您发送的消息是:" + "图片");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_VIDEO:
text.setContent("您发送的消息是:" + "视频");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_SHORTVIDEO:
text.setContent("您发送的消息是:" + "小视频");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_VOICE:
text.setContent("您发送的消息是:" + "语音");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_LINK:
text.setContent("您发送的消息是:" + "链接");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_LOCATION:
text.setContent("您发送的消息是:" + "位置");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_EVENT:
String event = map.get("Event");
switch (event) {
case ConstantSet.EVENT_TYPE_SUBSCRIBE:
LOGGER.info("微信公众号关注事件:"+wechatInfo.getWechatName());
//公众号在认证的情况下才可以获取用户信息
if (WechatInfoCertificationTypeEnum.CERTIFICATION_YES.getValue().equals(wechatInfo.getCertification())) {
WechatUser wechatUser = wechatUserService.saveWechatUser(openId, wechatInfo);
}
break;
case ConstantSet.EVENT_TYPE_UNSUBSCRIBE:
;
break;
case ConstantSet.EVENT_TYPE_CLICK:
//自定义菜单点击事件KEY值
String eventKey = map.get(ConstantSet.EVENT_CLICK_KEY);
;
break;
default:
break;
}
break;
default:
text.setContent("您发送的消息是:" + "无法理解");
message = MessageUtil.MessageToXml(text);
break;
if (wechatInfo!=null) {
TextMessage text = new TextMessage();
text.setFromUserName(wechatOpenId);
text.setToUserName(openId);
text.setMsgType(ConstantSet.MESSAGE_TYPE_TEXT);
text.setCreateTime(System.currentTimeMillis());
switch (msgType) {
case ConstantSet.MESSAGE_TYPE_TEXT:
String content = map.get(WECHAT_CONTENT_KEY);
BaseMessage baseMessage = wechatRuleService.getByKeyworkdAndWechatInfoId(content, wechatInfo);
baseMessage.setCreateTime(System.currentTimeMillis());
baseMessage.setFromUserName(wechatOpenId);
baseMessage.setToUserName(openId);
message = MessageUtil.MessageToXml(baseMessage);
break;
case ConstantSet.MESSAGE_TYPE_IMAGE:
text.setContent("您发送的消息是:" + "图片");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_VIDEO:
text.setContent("您发送的消息是:" + "视频");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_SHORTVIDEO:
text.setContent("您发送的消息是:" + "小视频");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_VOICE:
text.setContent("您发送的消息是:" + "语音");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_LINK:
text.setContent("您发送的消息是:" + "链接");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_LOCATION:
text.setContent("您发送的消息是:" + "位置");
message = MessageUtil.MessageToXml(text);
break;
case ConstantSet.MESSAGE_TYPE_EVENT:
String event = map.get("Event");
switch (event) {
case ConstantSet.EVENT_TYPE_SUBSCRIBE:
LOGGER.info("微信公众号关注事件:" + wechatInfo.getWechatName());
//公众号在认证的情况下才可以获取用户信息
if (WechatInfoCertificationTypeEnum.CERTIFICATION_YES.getValue().equals(wechatInfo.getCertification())) {
WechatUser wechatUser = wechatUserService.saveWechatUser(openId, wechatInfo);
}
break;
case ConstantSet.EVENT_TYPE_UNSUBSCRIBE:
;
break;
case ConstantSet.EVENT_TYPE_CLICK:
//自定义菜单点击事件KEY值
String eventKey = map.get(ConstantSet.EVENT_CLICK_KEY);
;
break;
default:
break;
}
break;
default:
text.setContent("您发送的消息是:" + "无法理解");
message = MessageUtil.MessageToXml(text);
break;
}
}
} catch (Exception e) {

@ -1,6 +1,6 @@
#--------- jdbc 配置---------
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.url=jdbc:mysql://192.168.31.110:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
jdbc.user=root
jdbc.password=mysql
#--------数据库连接池配置 -------

@ -12,13 +12,13 @@
permission_type,permission_key,name,sys_resource_id,sp.id,sp.status,sp.create_time,sp.create_user_id,sp.update_time,sp.update_user_id
</sql>
<select id="findOne" resultType="com.lq.entity.SysPermission" parameterType="long">
<select id="findOne" resultType="SysPermission" parameterType="long">
SELECT <include refid="column_list"/>
FROM sys_permission
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.SysPermission">
<select id="findAll" resultType="SysPermission">
SELECT <include refid="column_list"/>
FROM sys_permission
WHERE status = 1
@ -40,7 +40,7 @@
WHERE status = 1
</select>
<select id="findBySysResourceId" resultType="com.lq.entity.SysPermission" parameterType="long">
<select id="findBySysResourceId" resultType="SysPermission" parameterType="long">
SELECT <include refid="column_list"/>
FROM sys_permission
WHERE status = 1
@ -48,7 +48,7 @@
ORDER BY create_time DESC,update_time DESC
</select>
<insert id="save" parameterType="com.lq.entity.SysPermission" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="SysPermission" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -62,7 +62,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.SysPermission" >
<update id="update" parameterType="SysPermission" >
UPDATE
sys_permission

@ -9,15 +9,15 @@
<sql id="column_list">
id,wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status,wechat_info_type,certification,open_reply
</sql>
<select id="findOne" resultType="com.lq.entity.WechatInfo" parameterType="long">
<select id="findOne" resultType="WechatInfo" parameterType="long">
SELECT <include refid="column_list"/> FROM wechat_info WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatInfo">
<select id="findAll" resultType="WechatInfo">
SELECT <include refid="column_list"/> FROM wechat_info WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatInfo" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatInfo" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -31,7 +31,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatInfo">
<update id="update" parameterType="WechatInfo">
UPDATE
wechat_info
<trim prefix="set" suffixOverrides=",">
@ -65,18 +65,18 @@
</delete>
<select id="count" resultType="int" parameterType="com.lq.cms.vo.WechatInfoVo">
<select id="count" resultType="int" parameterType="WechatInfoVo">
SELECT count(id) FROM wechat_info
</select>
<select id="findListPage" parameterType="com.lq.cms.vo.WechatInfoVo" resultType="com.lq.cms.vo.WechatInfoVo">
<select id="findListPage" parameterType="WechatInfoVo" resultType="WechatInfoVo">
SELECT <include refid="column_list"/>
FROM wechat_info t1
WHERE status = 1
ORDER BY t1.create_time DESC
</select>
<select id="getByWechatOpenId" resultType="com.lq.entity.WechatInfo" parameterType="string">
<select id="getByWechatOpenId" resultType="WechatInfo" parameterType="string">
SELECT <include refid="column_list"/>
FROM wechat_info wi
WHERE

@ -9,13 +9,13 @@
matchin_type,create_time,update_time,wechat_rule_id,id,keyword,status
</sql>
<select id="findOne" resultType="com.lq.entity.WechatKeyword" parameterType="long">
<select id="findOne" resultType="WechatKeyword" parameterType="long">
SELECT <include refid="column_list"/>
FROM wechat_keyword
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatKeyword">
<select id="findAll" resultType="WechatKeyword">
SELECT <include refid="column_list"/>
FROM wechat_keyword
WHERE status = 1
@ -27,7 +27,7 @@
WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatKeyword" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatKeyword" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -41,7 +41,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatKeyword">
<update id="update" parameterType="WechatKeyword">
UPDATE
wechat_keyword
<trim prefix="set" suffixOverrides=",">
@ -66,7 +66,7 @@
id=#{id}
</update>
<select id="findByWechatRuleIdAndStatus" resultType="com.lq.entity.WechatKeyword">
<select id="findByWechatRuleIdAndStatus" resultType="WechatKeyword">
SELECT <include refid="column_list"/>
FROM wechat_keyword
WHERE

@ -9,13 +9,13 @@
to_url,message_type,create_time,image_url,update_time,id,title,media_id,user_id,content,status
</sql>
<select id="findOne" resultType="com.lq.entity.WechatMessage" parameterType="long">
<select id="findOne" resultType="WechatMessage" parameterType="long">
SELECT <include refid="column_list"/>
FROM wechat_message
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatMessage">
<select id="findAll" resultType="WechatMessage">
SELECT <include refid="column_list"/>
FROM wechat_message
WHERE status = 1
@ -27,7 +27,7 @@
WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatMessage" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatMessage" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -41,7 +41,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatMessage">
<update id="update" parameterType="WechatMessage">
UPDATE
wechat_message
<trim prefix="set" suffixOverrides=",">
@ -78,7 +78,7 @@
status = 1
</select>
<select id="findAllByWechatMessageVo" resultType="com.lq.entity.WechatMessage" parameterType="WechatMessageVo">
<select id="findAllByWechatMessageVo" resultType="WechatMessage" parameterType="WechatMessageVo">
SELECT <include refid="column_list"/>
FROM wechat_message
WHERE

@ -9,13 +9,13 @@
create_user_id,reply_type,create_time,update_user_id,rule_name,wechat_info_id,update_time,id,status
</sql>
<select id="findOne" resultType="com.lq.entity.WechatRule" parameterType="long">
<select id="findOne" resultType="WechatRule" parameterType="long">
SELECT <include refid="column_list"/>
FROM wechat_rule
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatRule">
<select id="findAll" resultType="WechatRule">
SELECT <include refid="column_list"/>
FROM wechat_rule
WHERE status = 1
@ -28,7 +28,7 @@
WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatRule" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatRule" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -42,7 +42,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatRule">
<update id="update" parameterType="WechatRule">
UPDATE
wechat_rule
<trim prefix="set" suffixOverrides=",">
@ -70,7 +70,7 @@
id=#{id}
</update>
<select id="findByWechatInfoIdAndStatus" resultType="com.lq.entity.WechatRule" >
<select id="findByWechatInfoIdAndStatus" resultType="WechatRule" >
SELECT <include refid="column_list"/>
FROM wechat_rule
WHERE

@ -9,13 +9,13 @@
wechat_rule_id,id,wechat_message_id,status,create_time
</sql>
<select id="findOne" resultType="com.lq.entity.WechatRuleMessage" parameterType="long">
<select id="findOne" resultType="WechatRuleMessage" parameterType="long">
SELECT <include refid="column_list"/>
FROM wechat_rule_message
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatRuleMessage">
<select id="findAll" resultType="WechatRuleMessage">
SELECT <include refid="column_list"/>
FROM wechat_rule_message
WHERE status = 1
@ -27,7 +27,7 @@
WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatRuleMessage" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatRuleMessage" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -41,7 +41,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatRuleMessage">
<update id="update" parameterType="WechatRuleMessage">
UPDATE
wechat_rule_message
<trim prefix="set" suffixOverrides=",">
@ -64,7 +64,7 @@
id=#{id}
</update>
<select id="getByRuleIdAndMessageId" resultType="com.lq.entity.WechatRuleMessage" parameterType="Long">
<select id="getByRuleIdAndMessageId" resultType="WechatRuleMessage" parameterType="Long">
SELECT <include refid="column_list"/>
FROM wechat_rule_message
WHERE status = 1
@ -72,7 +72,7 @@
AND wechat_rule_id = #{ruleId}
</select>
<select id="findByWechatRuleId" resultType="com.lq.entity.WechatRuleMessage" parameterType="Long">
<select id="findByWechatRuleId" resultType="WechatRuleMessage" parameterType="Long">
SELECT <include refid="column_list"/>
FROM wechat_rule_message
WHERE status = 1

@ -9,13 +9,13 @@
country,unionid,sybscribe_scene,qr_scene,qr_scene_str,subscribe_time,city,tagid_id,open_id,nick_name,sex,groupid,language,remark,province,head_img_url,wechat_info_id,id,status
</sql>
<select id="findOne" resultType="com.lq.entity.WechatUser" parameterType="long">
<select id="findOne" resultType="WechatUser" parameterType="long">
SELECT <include refid="column_list"/>
FROM wechat_user
WHERE id=#{id} AND status = 1
</select>
<select id="findAll" resultType="com.lq.entity.WechatUser">
<select id="findAll" resultType="WechatUser">
SELECT <include refid="column_list"/>
FROM wechat_user
WHERE status = 1
@ -27,7 +27,7 @@
WHERE status = 1
</select>
<insert id="save" parameterType="com.lq.entity.WechatUser" useGeneratedKeys="true" keyProperty="id">
<insert id="save" parameterType="WechatUser" useGeneratedKeys="true" keyProperty="id">
<selectKey keyProperty="id" order="AFTER" resultType="Long">
SELECT LAST_INSERT_ID()
@ -41,7 +41,7 @@
</insert>
<update id="update" parameterType="com.lq.entity.WechatUser">
<update id="update" parameterType="WechatUser">
UPDATE
wechat_user
<trim prefix="set" suffixOverrides=",">

@ -27,6 +27,9 @@
</script>
</head>
<body>
<div id="searchFrom">
时间: <input class="easyui-datebox"> - <input class="easyui-datebox">
</div>
<table id="dataList"></table>
</body>
</html>

Loading…
Cancel
Save