| | |
| | | <result column="ms_time_tag" property="timeTag" jdbcType="INTEGER" /> |
| | | <result column="ms_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="ms_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="ms_uid"> |
| | | <association property="user" column="ms_uid" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="ms_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <association property="systemZNX" column="ms_system_znx_id"> |
| | | <id column="ms_system_znx_id" property="id" jdbcType="BIGINT" /> |
| | | <association property="systemZNX" column="ms_system_znx_id" |
| | | select="com.yeshi.fanli.dao.mybatis.msg.SystemZnxMapper.selectByPrimaryKey"> |
| | | </association> |
| | | |
| | | </resultMap> |
| | |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | from yeshi_ec_user_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_user_msg_system where ms_uid = #{uid,jdbcType=BIGINT} |
| | | order by ms_create_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(ms_id) |
| | | from yeshi_ec_user_msg_system where |
| | | ms_uid = |
| | | #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectBySystemZNXId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_user_msg_system where ms_system_znx_id = |
| | | #{id,jdbcType=BIGINT} and ms_uid=#{uid} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectLatestUserSystemMsg" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_user_msg_system where ms_uid = #{uid} order by |
| | | ms_create_time desc limit 1 |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | yeshi_ec_user_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_system |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_user_msg_system |
| | | (ms_id,ms_uid,ms_type,ms_system_znx_id,ms_read,ms_solved,ms_title,ms_content,ms_time_tag,ms_create_time,ms_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{systemZNX.id,jdbcType=BIGINT},#{read,jdbcType=BOOLEAN},#{solved,jdbcType=BOOLEAN},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{timeTag,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_system |
| | | insert into yeshi_ec_user_msg_system |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">ms_id,</if> |
| | | <if test="user != null">ms_uid,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg">update |
| | | yeshi_ec_msg_system set ms_uid = #{user.id,jdbcType=BIGINT},ms_type = |
| | | yeshi_ec_user_msg_system set ms_uid = |
| | | #{user.id,jdbcType=BIGINT},ms_type = |
| | | #{type,jdbcType=VARCHAR},ms_system_znx_id = |
| | | #{systemZNX.id,jdbcType=BIGINT},ms_read = |
| | | #{read,jdbcType=BOOLEAN},ms_solved = |
| | |
| | | #{updateTime,jdbcType=TIMESTAMP} where ms_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg"> |
| | | update yeshi_ec_msg_system |
| | | update yeshi_ec_user_msg_system |
| | | <set> |
| | | <if test="user != null">ms_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">ms_type=#{type,jdbcType=VARCHAR},</if> |
| | |
| | | </set> |
| | | where ms_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <update id="setMsgReadByUid" parameterType="java.lang.Long"> |
| | | update |
| | | yeshi_ec_user_msg_system set ms_read=1 where ms_uid=#{0} |
| | | </update> |
| | | </mapper> |