Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/thinkgem/jeesite
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Jun 30, 2016
2 parents 1ae1094 + 65b6bbf commit 3c13716
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions src/main/resources/mappings/modules/oa/OaNotifyDao.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
SELECT r.oa_notify_id,
sum(case when r.read_flag = '1' then 1 else 0 end) read_num,
sum(case when r.read_flag != '1' then 1 else 0 end) un_read_num
FROM OA_NOTIFY_RECORD r GROUP BY r.oa_notify_id
FROM oa_notify_record r GROUP BY r.oa_notify_id
) b ON b.oa_notify_id = a.id
</sql>

<select id="get" resultType="OaNotify">
SELECT
<include refid="oaNotifyColumns"/>
FROM OA_NOTIFY a
FROM oa_notify a
<include refid="oaNotifyJoins"/>
WHERE a.id = #{id}
</select>
Expand All @@ -43,11 +43,11 @@
<if test="isSelf">,
r.read_flag
</if>
FROM OA_NOTIFY a
FROM oa_notify a
<include refid="oaNotifyJoins"/>
<!-- 我的通知 -->
<if test="isSelf">
JOIN OA_NOTIFY_RECORD r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id}
JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id}
</if>
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
<if test="title != null and title != ''">
Expand All @@ -71,7 +71,7 @@
<select id="findAllList" resultType="OaNotify">
SELECT
<include refid="oaNotifyColumns"/>
FROM OA_NOTIFY a
FROM oa_notify a
<include refid="oaNotifyJoins"/>
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
ORDER BY a.update_date DESC
Expand All @@ -80,9 +80,9 @@
<select id="findCount" resultType="Long">
SELECT
count(1)
FROM OA_NOTIFY a
FROM oa_notify a
<if test="isSelf">
JOIN OA_NOTIFY_RECORD r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id}
JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id}
<if test="readFlag != null and readFlag != ''">
AND r.read_flag = #{readFlag}
</if>
Expand All @@ -94,7 +94,7 @@
</select>

<insert id="insert">
INSERT INTO OA_NOTIFY(
INSERT INTO oa_notify(
ID,
TYPE,
TITLE,
Expand Down Expand Up @@ -124,7 +124,7 @@
</insert>

<update id="update">
UPDATE OA_NOTIFY SET
UPDATE oa_notify SET
TYPE = #{type},
TITLE = #{title},
CONTENT = #{content},
Expand All @@ -137,7 +137,7 @@
</update>

<update id="delete">
UPDATE OA_NOTIFY SET
UPDATE oa_notify SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
</update>
Expand Down
16 changes: 8 additions & 8 deletions src/main/resources/mappings/modules/oa/OaNotifyRecordDao.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<select id="get" resultType="OaNotifyRecord">
SELECT
<include refid="oaNotifyRecordColumns"/>
FROM OA_NOTIFY_RECORD a
FROM oa_notify_record a
<include refid="oaNotifyRecordJoins"/>
WHERE a.id = #{id}
</select>

<select id="findList" resultType="OaNotifyRecord">
SELECT
<include refid="oaNotifyRecordColumns"/>
FROM OA_NOTIFY_RECORD a
FROM oa_notify_record a
<include refid="oaNotifyRecordJoins"/>
WHERE 1=1
<if test="oaNotify != null and oaNotify.id != null and oaNotify.id != ''">
Expand All @@ -40,14 +40,14 @@
<select id="findAllList" resultType="OaNotifyRecord">
SELECT
<include refid="oaNotifyRecordColumns"/>
FROM OA_NOTIFY_RECORD a
FROM oa_notify_record a
<include refid="oaNotifyRecordJoins"/>
WHERE 1=1
ORDER BY a.read_flag ASC
</select>

<insert id="insert">
INSERT INTO OA_NOTIFY_RECORD(
INSERT INTO oa_notify_record(
ID,
OA_NOTIFY_ID,
USER_ID,
Expand All @@ -63,7 +63,7 @@
</insert>

<insert id="insertAll" parameterType="List">
INSERT INTO OA_NOTIFY_RECORD(
INSERT INTO oa_notify_record(
ID,
OA_NOTIFY_ID,
USER_ID,
Expand Down Expand Up @@ -91,7 +91,7 @@
</insert>

<update id="update">
UPDATE OA_NOTIFY_RECORD SET
UPDATE oa_notify_record SET
READ_FLAG = #{readFlag},
READ_DATE = #{readDate}
WHERE OA_NOTIFY_ID = #{oaNotify.id}
Expand All @@ -100,12 +100,12 @@
</update>

<delete id="delete">
UPDATE FROM OA_NOTIFY_RECORD
UPDATE FROM oa_notify_record
WHERE id = #{id}
</delete>

<delete id="deleteByOaNotifyId">
DELETE FROM OA_NOTIFY_RECORD
DELETE FROM oa_notify_record
WHERE oa_notify_id = #{oaNotifyId}
</delete>

Expand Down

0 comments on commit 3c13716

Please sign in to comment.