|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="createTime" column="create_time"/> |
|
|
|
<result property="updateBy" column="update_by"/> |
|
|
|
<result property="updateTime" column="update_time"/> |
|
|
|
<result property="userId" column="user_id"/> |
|
|
|
<result property="orderId" column="order_id"/> |
|
|
|
<result property="createBy" column="create_by"/> |
|
|
|
<result property="createTime" column="create_time"/> |
|
|
|
<result property="updateBy" column="update_by"/> |
|
|
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectAppletPetVo"> |
|
|
|
select id, head_image, nick_name, sex, type, birthday, weight, personality, vaccine, deworm, neutered, pet_type, health, pet_card, health_other, del_flag, create_by, create_time, update_by, update_time, user_id , create_by, create_time, update_by, update_time from applet_pet |
|
|
|
select id, head_image, nick_name, sex, type, birthday, weight, personality, vaccine, deworm, neutered, pet_type, health, pet_card, health_other, del_flag, create_by, create_time, update_by, update_time, order_id , create_by, create_time, update_by, update_time from applet_pet |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectAppletPetList" parameterType="AppletPet" resultMap="AppletPetResult"> |
|
|
@ -53,9 +53,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="health != null "> and health = #{health}</if> |
|
|
|
<if test="petCard != null "> and pet_card = #{petCard}</if> |
|
|
|
<if test="healthOther != null and healthOther != ''"> and health_other = #{healthOther}</if> |
|
|
|
<if test="userId != null "> and user_id = #{userId}</if> |
|
|
|
<if test="orderId != null "> and order_id = #{orderId}</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAppletPetListByOrderId" parameterType="AppletPet" resultMap="AppletPetResult"> |
|
|
|
<include refid="selectAppletPetVo"/> |
|
|
|
where order_id = #{orderId} |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAppletPetById" parameterType="AppletPet" resultMap="AppletPetResult"> |
|
|
|
<include refid="selectAppletPetVo"/> |
|
|
@ -85,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="createTime != null">create_time,</if> |
|
|
|
<if test="updateBy != null">update_by,</if> |
|
|
|
<if test="updateTime != null">update_time,</if> |
|
|
|
<if test="userId != null">user_id,</if> |
|
|
|
<if test="orderId != null">order_id,</if> |
|
|
|
<if test="createBy != null">create_by,</if> |
|
|
|
<if test="createTime != null">create_time,</if> |
|
|
|
<if test="updateBy != null">update_by,</if> |
|
|
@ -112,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
|
<if test="updateTime != null">#{updateTime},</if> |
|
|
|
<if test="userId != null">#{userId},</if> |
|
|
|
<if test="orderId != null">#{orderId},</if> |
|
|
|
<if test="createBy != null">#{createBy},</if> |
|
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
@ -142,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="createTime != null">create_time = #{createTime},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
|
|
<if test="userId != null">user_id = #{userId},</if> |
|
|
|
<if test="orderId != null">order_id = #{orderId},</if> |
|
|
|
<if test="createBy != null">create_by = #{createBy},</if> |
|
|
|
<if test="createTime != null">create_time = #{createTime},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
|