更改拉黑和就诊卡sql语句,添加deleted=0字段
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
<if test="cardNo != null and cardNo != null">
|
<if test="cardNo != null and cardNo != null">
|
||||||
or card_no = #{cardNo}
|
or card_no = #{cardNo}
|
||||||
</if>
|
</if>
|
||||||
|
AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectAllCardCount" parameterType="com.guahao.h5.user.model.UserCardVo" resultType="java.lang.Integer">
|
<select id="selectAllCardCount" parameterType="com.guahao.h5.user.model.UserCardVo" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
FROM
|
FROM
|
||||||
user_card
|
user_card
|
||||||
WHERE user_id = #{userId}
|
WHERE user_id = #{userId}
|
||||||
|
AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--根据用户id查询所有就诊卡-->
|
<!--根据用户id查询所有就诊卡-->
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
user_card
|
user_card
|
||||||
WHERE
|
WHERE
|
||||||
user_id =#{userId}
|
user_id =#{userId}
|
||||||
|
AND deleted = 0
|
||||||
<if test="id != null and id !=''">
|
<if test="id != null and id !=''">
|
||||||
AND id = #{id}
|
AND id = #{id}
|
||||||
</if>
|
</if>
|
||||||
@@ -87,6 +90,7 @@
|
|||||||
<if test="cardNo != null and cardNo !=''">
|
<if test="cardNo != null and cardNo !=''">
|
||||||
AND card_no = #{cardNo}
|
AND card_no = #{cardNo}
|
||||||
</if>
|
</if>
|
||||||
|
AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--根据用户id查询所有就诊卡-->
|
<!--根据用户id查询所有就诊卡-->
|
||||||
@@ -112,6 +116,7 @@
|
|||||||
user_card
|
user_card
|
||||||
WHERE
|
WHERE
|
||||||
user_id =#{userId}
|
user_id =#{userId}
|
||||||
|
AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="queryUserCardListByPatientid" resultType="com.guahao.h5.user.model.UserCardVo">
|
<select id="queryUserCardListByPatientid" resultType="com.guahao.h5.user.model.UserCardVo">
|
||||||
SELECT
|
SELECT
|
||||||
@@ -137,16 +142,17 @@
|
|||||||
<if test="cardNo != null and cardNo !=''">
|
<if test="cardNo != null and cardNo !=''">
|
||||||
AND card_no = #{patientid}
|
AND card_no = #{patientid}
|
||||||
</if>
|
</if>
|
||||||
|
AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryUserCardDefaltByOpenid" resultType="com.guahao.h5.yb.model.IDVO">
|
<select id="queryUserCardDefaltByOpenid" resultType="com.guahao.h5.yb.model.IDVO">
|
||||||
SELECT c.id_no,c.name from user_card c,user_info i where i.openid = #{openid} AND c.user_id = i.user_id and c.is_yes = '0'
|
SELECT c.id_no,c.name from user_card c,user_info i where i.openid = #{openid} AND c.user_id = i.user_id and c.is_yes = '0' AND c.deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPatientId" resultType="com.guahao.h5.user.model.UserCardVo">
|
<select id="selectByPatientId" resultType="com.guahao.h5.user.model.UserCardVo">
|
||||||
select * from user_card where patient_id = #{patientId}
|
select * from user_card where patient_id = #{patientId} AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByUserId" resultType="java.lang.String">
|
<select id="selectByUserId" resultType="java.lang.String">
|
||||||
select card_no from user_card where user_id = #{uid}
|
select card_no from user_card where user_id = #{uid} AND deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--新增就诊卡-->
|
<!--新增就诊卡-->
|
||||||
@@ -278,6 +284,7 @@
|
|||||||
c.utime = now()
|
c.utime = now()
|
||||||
WHERE c.user_id = #{userId}
|
WHERE c.user_id = #{userId}
|
||||||
AND c.is_yes = '0'
|
AND c.is_yes = '0'
|
||||||
|
AND c.deleted = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!--设置默认卡-->
|
<!--设置默认卡-->
|
||||||
@@ -287,6 +294,7 @@
|
|||||||
c.utime = now()
|
c.utime = now()
|
||||||
WHERE c.user_id = #{userId}
|
WHERE c.user_id = #{userId}
|
||||||
AND c.is_yes = '1'
|
AND c.is_yes = '1'
|
||||||
|
AND c.deleted = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!--设置默认卡-->
|
<!--设置默认卡-->
|
||||||
@@ -297,6 +305,7 @@
|
|||||||
WHERE c.user_id = #{userId}
|
WHERE c.user_id = #{userId}
|
||||||
AND c.is_yes = '1'
|
AND c.is_yes = '1'
|
||||||
AND c.card_no = #{cardNo}
|
AND c.card_no = #{cardNo}
|
||||||
|
AND c.deleted = 0
|
||||||
</update>
|
</update>
|
||||||
<!--不设置默认卡-->
|
<!--不设置默认卡-->
|
||||||
<update id="updateIsYesAll" parameterType="com.guahao.h5.user.model.UserCardVo">
|
<update id="updateIsYesAll" parameterType="com.guahao.h5.user.model.UserCardVo">
|
||||||
@@ -304,7 +313,7 @@
|
|||||||
SET c.is_yes = '1',
|
SET c.is_yes = '1',
|
||||||
c.utime = now()
|
c.utime = now()
|
||||||
WHERE c.user_id = #{userId}
|
WHERE c.user_id = #{userId}
|
||||||
|
AND c.deleted = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!--删除就诊卡-->
|
<!--删除就诊卡-->
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
WHERE user_id = #{userId}
|
WHERE user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
<select id="isBlack" resultType="java.lang.Integer">
|
<select id="isBlack" resultType="java.lang.Integer">
|
||||||
select black from blacklist where user_id = #{userId}
|
select black from blacklist where user_id = #{userId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user