|
@@ -16,15 +16,15 @@
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="sort" column="sort" />
|
|
|
<result property="publisherId" column="publisher_id" />
|
|
|
- <result property="userId" column="user_id" />
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
<result property="image" column="image"/>
|
|
|
<result property="newsTime" column="news_time"/>
|
|
|
+ <result property="phonenumber" column="phonenumber"/>
|
|
|
</resultMap>
|
|
|
<!--查询po_news表所有-->
|
|
|
<sql id="selectPoNewsVo">
|
|
|
select news_id, news_title, news_content, status, create_by, create_time, update_by, update_time,
|
|
|
- remark, sort, publisher_id, user_id ,del_flag ,image ,news_time from po_news
|
|
|
+ remark, sort, publisher_id, del_flag ,image ,news_time ,phonenumber from po_news
|
|
|
</sql>
|
|
|
|
|
|
<!-- 分页查询-->
|
|
@@ -36,10 +36,10 @@
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
<if test="sort != null "> and sort = #{sort}</if>
|
|
|
<if test="publisherId != null "> and publisher_id = #{publisherId}</if>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="delFlag != null and delFlag != ''">and del_flag = #{delFlag}</if>
|
|
|
<if test="image != null and image != ''">and image = #{image}</if>
|
|
|
<if test="newsTime != null ">and news_time = #{newsTime}</if>
|
|
|
+ <if test="phonenumber != null ">and phonenumber = #{phonenumber}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -64,10 +64,10 @@
|
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="sort != null">sort,</if>
|
|
|
<if test="publisherId != null">publisher_id,</if>
|
|
|
- <if test="userId != null">user_id,</if>
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
|
<if test="image != null and image != ''">image,</if>
|
|
|
<if test="newsTime != null">news_time,</if>
|
|
|
+ <if test="phonenumber != null">phonenumber,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="newsId != null">#{newsId},</if>
|
|
@@ -81,10 +81,10 @@
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="sort != null">#{sort},</if>
|
|
|
<if test="publisherId != null">#{publisherId},</if>
|
|
|
- <if test="userId != null">#{userId},</if>
|
|
|
<if test="delFlag != null and delFlag != '' ">#{delFlag},</if>
|
|
|
<if test="image != null and image != ''">#{image},</if>
|
|
|
<if test="newsTime != null">#{newsTime},</if>
|
|
|
+ <if test="phonenumber != null ">#{phonenumber},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -102,10 +102,10 @@
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="sort != null">sort = #{sort},</if>
|
|
|
<if test="publisherId != null">publisher_id = #{publisherId},</if>
|
|
|
- <if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag}</if>
|
|
|
<if test="image != null and image != ''">image = #{image}</if>
|
|
|
<if test="newsTime != null">news_time = #{newsTime}</if>
|
|
|
+ <if test="phonenumber != null">phonenumber = #{phonenumber}</if>
|
|
|
</trim>
|
|
|
where news_id = #{newsId}
|
|
|
</update>
|
|
@@ -167,7 +167,7 @@
|
|
|
|
|
|
<!-- 通过消息Id查询用户Id-->
|
|
|
<select id="selectUserByNewsId" resultType="String">
|
|
|
- select u.user_id from po_news n LEFT JOIN po_user u ON n.user_id = u.user_id
|
|
|
+ select u.phonenumber from po_news n LEFT JOIN po_user u ON n.phonenumber = u.phonenumber
|
|
|
where n.news_id = #{newsId}
|
|
|
</select>
|
|
|
<!-- 校验时间是否相同-->
|