parent
9eed3592aa
commit
602f117364
15 changed files with 139 additions and 31 deletions
@ -0,0 +1,7 @@ |
|||||||
|
package com.lq.dao; |
||||||
|
|
||||||
|
import com.lq.code.dao.BaseDao; |
||||||
|
import com.lq.entity.WechatRuleMessage; |
||||||
|
|
||||||
|
public interface WechatRuleMessageDao extends BaseDao<WechatRuleMessage> { |
||||||
|
} |
@ -0,0 +1,67 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.lq.dao.WechatRuleMessageDao"> |
||||||
|
<!-- namespace命名空间,作用是对sql进行分类化管理,理解sql隔离 --> |
||||||
|
<!-- 注意:使用mapper代理方法开发 ,namespace有着特殊作用--> |
||||||
|
|
||||||
|
<sql id="column_list"> |
||||||
|
wechat_rule_id,id,wechat_message_id,status |
||||||
|
</sql> |
||||||
|
|
||||||
|
<select id="findOne" resultType="com.lq.entity.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 <include refid="column_list"/> |
||||||
|
FROM wechat_rule_message |
||||||
|
WHERE status = 1 |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="count" resultType="int"> |
||||||
|
SELECT count(id) |
||||||
|
FROM wechat_rule_message |
||||||
|
WHERE status = 1 |
||||||
|
</select> |
||||||
|
|
||||||
|
<insert id="save" parameterType="com.lq.entity.WechatRuleMessage" useGeneratedKeys="true" keyProperty="id"> |
||||||
|
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="Long"> |
||||||
|
SELECT LAST_INSERT_ID() |
||||||
|
</selectKey> |
||||||
|
INSERT INTO |
||||||
|
wechat_rule_message(wechat_rule_id,id,wechat_message_id,status) |
||||||
|
VALUES |
||||||
|
( |
||||||
|
#{wechatRuleId},#{id},#{wechatMessageId},#{status} |
||||||
|
) |
||||||
|
</insert> |
||||||
|
|
||||||
|
|
||||||
|
<update id="update" parameterType="com.lq.entity.WechatRuleMessage"> |
||||||
|
UPDATE |
||||||
|
wechat_rule_message |
||||||
|
<trim prefix="set" suffixOverrides=","> |
||||||
|
|
||||||
|
<if test="wechatRuleId!=null">wechat_rule_id=#{wechatRuleId},</if> |
||||||
|
<if test="id!=null">id=#{id},</if> |
||||||
|
<if test="wechatMessageId!=null">wechat_message_id=#{wechatMessageId},</if> |
||||||
|
<if test="status!=null">status=#{status},</if> |
||||||
|
</trim> |
||||||
|
WHERE |
||||||
|
id=#{id} |
||||||
|
</update> |
||||||
|
|
||||||
|
<update id="delete" parameterType="Long"> |
||||||
|
UPDATE |
||||||
|
wechat_rule_message |
||||||
|
SET |
||||||
|
status = 0 |
||||||
|
WHERE |
||||||
|
id=#{id} |
||||||
|
</update> |
||||||
|
|
||||||
|
</mapper> |
@ -1,16 +1,25 @@ |
|||||||
|
#--------- jdbc ÅäÖÃ--------- |
||||||
jdbc.driver=com.mysql.jdbc.Driver |
jdbc.driver=com.mysql.jdbc.Driver |
||||||
jdbc.url=jdbc:mysql://192.168.31.110:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 |
jdbc.url=jdbc:mysql://127.0.0.1:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 |
||||||
jdbc.user=root |
jdbc.user=root |
||||||
jdbc.password=mysql |
jdbc.password=mysql |
||||||
#\u5B9A\u4E49\u521D\u59CB\u8FDE\u63A5\u6570 |
#--------Êý¾Ý¿âÁ¬½Ó³ØÅäÖà ------- |
||||||
initialSize=0 |
durid.pool.initialSize=5 |
||||||
#\u5B9A\u4E49\u6700\u5927\u8FDE\u63A5\u6570 |
durid.pool.maxActive=5 |
||||||
maxActive=5 |
durid.pool.minIdle=1 |
||||||
#\u5B9A\u4E49\u6700\u5927\u7A7A\u95F2 |
durid.pool.maxWait=60000 |
||||||
maxIdle=5 |
durid.pool.timeBetweenEvictionRunsMillis=60000 |
||||||
#\u5B9A\u4E49\u6700\u5C0F\u7A7A\u95F2 |
durid.pool.filters=stat |
||||||
minIdle=1 |
durid.pool.poolPreparedStatements=false |
||||||
#\u5B9A\u4E49\u6700\u957F\u7B49\u5F85\u65F6\u95F4 |
durid.pool.maxPoolPreparedStatementPerConnectionSize=100 |
||||||
maxWait=6000 |
durid.pool.minEvictableIdleTimeMillis=300000 |
||||||
email.port=Create property |
durid.pool.validationQuery=SELECT 'X' |
||||||
|
durid.pool.testWhileIdle=true |
||||||
|
durid.pool.testOnBorrow=false |
||||||
|
durid.pool.testOnReturn=false |
||||||
|
durid.pool.removeAbandonedTimeout=1800 |
||||||
|
durid.pool.logAbandoned=true |
||||||
|
|
||||||
|
|
||||||
|
durid.pool.email.port=Create property |
||||||
|
|
||||||
|
Loading…
Reference in new issue