Commit ffa3217a authored by m1991's avatar m1991

资讯模块数据——视频功能修复

parent 23e46b09
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
<id column="zx_id" property="zxid"/> <id column="zx_id" property="zxid"/>
<result column="zx_url" property="zxUrl"/> <result column="zx_url" property="zxUrl"/>
<result column="zx_likes" property="zxLikes"/> <result column="zx_likes" property="zxLikes"/>
<result column="user_id" property="userid"/>
<result column="user_name" property="userName"/>
<result column="invite_code" property="inviteCode"/> <result column="invite_code" property="inviteCode"/>
<result column="zx_name" property="zxName"/>
<result column="zx_to_examine" property="zxToExamine"/> <result column="zx_to_examine" property="zxToExamine"/>
<result column="zx_field" property="zxField"/> <result column="zx_field" property="zxField"/>
<result column="zx_address" property="zxAddress"/> <result column="zx_address" property="zxAddress"/>
<result column="img_url" property="imgUrl"/>
<result column="zx_date" property="zxDate"/> <result column="zx_date" property="zxDate"/>
</resultMap> </resultMap>
<sql id="table"> <sql id="table">
...@@ -25,11 +21,11 @@ ...@@ -25,11 +21,11 @@
</sql> </sql>
<sql id="cols_exclude_id"> <sql id="cols_exclude_id">
zxUrl,userId,zxName,zxField,imgUrl,zxAddress,inviteCode,userName zxUrl,zxField,zxAddress,inviteCode
</sql> </sql>
<sql id="vals"> <sql id="vals">
#{zxUrl},#{userId},#{zxName},#{zxField},#{imgUrl},#{zxAddress},#{inviteCode},#{userName} #{zxUrl},#{zxField},#{imgUrl},#{zxAddress},#{inviteCode}
</sql> </sql>
<!--资讯内容插入--> <!--资讯内容插入-->
<insert id="zxadd" parameterType="cn.wisenergy.model.app.shopZx"> <insert id="zxadd" parameterType="cn.wisenergy.model.app.shopZx">
...@@ -43,21 +39,23 @@ ...@@ -43,21 +39,23 @@
<!--资讯内容倒叙查询--> <!--资讯内容倒叙查询-->
<select id="findAll" parameterType="java.lang.Integer" resultType="cn.wisenergy.model.app.shopZx"> <select id="findAll" parameterType="java.lang.Integer" resultType="cn.wisenergy.model.app.shopZx">
select zx_id as zxid,zx_url as zxUrl, select
zx_likes as zxLikes,user_id as userId,zx_name as zxName, b.zx_id as zxid,
zx_to_examine as zxToExamine,zx_field as zxField,zx_date as zxDate, b.zx_url as zxUrl,
zx_img_url as imgUrl,zx_address as zxAddress from shop_zx order by zxid desc limit #{pageNum},#{pageSize} b.zx_likes as zxLikes,
b.zx_field as zxField,
b.zx_date as zxDate,
b.zx_address as zxAddress,
b.invite_code as inviteCode,
a.user_id as userId,
a.head_image as headImage
from shop_zx b inner join user_info a ON a.invite_code=b.inviteCode
WHERE zx_to_examine!=0
order by zxid desc limit #{pageNum},#{pageSize}
</select> </select>
<!--资讯总记录数查询--> <!--资讯总记录数查询-->
<select id="selectAllNum" parameterType="cn.wisenergy.model.app.shopZx" > <select id="selectAllNum" parameterType="cn.wisenergy.model.app.shopZx" >
select count (*) from shop_zx select count (*) from shop_zx
</select> </select>
<select id="selectPage" resultType="cn.wisenergy.model.app.shopZx">
select zxid as zxid,zxUrl as zxUrl,
zxLikes as zxLikes,userid as userid,zxName as zxName,
zxShenHe as zxShenHe,zxField as zxField,zxDate as zxDate,
imgUrl as imgUrl,zxAddress as zxAddress from shop_zx order by zxid desc limit #{pageNum},#{pageSize}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<id column="id" property="id"/> <id column="id" property="id"/>
<result column="user_id" property="userId"/> <result column="user_id" property="userId"/>
<result column="password" property="password"/> <result column="password" property="password"/>
<result column="user_name" property="userName"/>
<result column="head_image" property="headImage"/> <result column="head_image" property="headImage"/>
<result column="user_level" property="userLevel"/> <result column="user_level" property="userLevel"/>
<result column="cross_border_line" property="crossBorderLine"/> <result column="cross_border_line" property="crossBorderLine"/>
...@@ -34,13 +33,12 @@ ...@@ -34,13 +33,12 @@
</sql> </sql>
<sql id="vals"> <sql id="vals">
#{userId},#{password},#{userName},#{headImage},#{userLevel},#{crossBorderLine},#{idCardNumber},#{fansNickname},#{fansId},#{inviteCode}, #{userId},#{password},#{headImage},#{userLevel},#{crossBorderLine},#{idCardNumber},#{fansNickname},#{fansId},#{inviteCode},
#{beInvitedCode},now(),now() #{beInvitedCode},now(),now()
</sql> </sql>
<sql id="updateCondition"> <sql id="updateCondition">
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_id = #{userName},</if>
<if test="password != null">password =#{password},</if> <if test="password != null">password =#{password},</if>
<if test="headImage != null">head_image =#{headImage},</if> <if test="headImage != null">head_image =#{headImage},</if>
<if test="userLevel != null">user_level =#{userLevel},</if> <if test="userLevel != null">user_level =#{userLevel},</if>
...@@ -56,7 +54,6 @@ ...@@ -56,7 +54,6 @@
<sql id="criteria"> <sql id="criteria">
<if test="id != null">id = #{id}</if> <if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if> <if test="userId != null">and user_id = #{userId}</if>
<if test="userName != null">and user_id = #{userName}</if>
<if test="password != null">and password =#{password}</if> <if test="password != null">and password =#{password}</if>
<if test="headImage != null">and head_image =#{headImage}</if> <if test="headImage != null">and head_image =#{headImage}</if>
<if test="userLevel != null">and user_level =#{userLevel}</if> <if test="userLevel != null">and user_level =#{userLevel}</if>
......
...@@ -28,11 +28,6 @@ public class User extends Model<User> implements Serializable{ ...@@ -28,11 +28,6 @@ public class User extends Model<User> implements Serializable{
@ApiModelProperty(name = "id", value = "用户主键id") @ApiModelProperty(name = "id", value = "用户主键id")
private Integer id; private Integer id;
/**
* 用户名称
*/
@ApiModelProperty(name = "user_name", value = "用户名称")
private Integer userName;
/** /**
* 手机号作为用户账号 * 手机号作为用户账号
......
...@@ -30,25 +30,11 @@ public class shopZx extends Model<shopZx> implements Serializable { ...@@ -30,25 +30,11 @@ public class shopZx extends Model<shopZx> implements Serializable {
*/ */
@ApiModelProperty(name = "zx_id", value = "资讯主键id") @ApiModelProperty(name = "zx_id", value = "资讯主键id")
private Integer zxid; private Integer zxid;
/** /**
* 视频存放地址 * 视频存放地址
*/ */
@ApiModelProperty(name = "zx_url", value = "视频/图片存放地址") @ApiModelProperty(name = "zx_url", value = "视频/图片存放地址")
private String zxUrl; private String zxUrl;
/**
* 用户id(作者id
*/
@ApiModelProperty(name = "user_id", value = "用户id(作者id)")
private String userId;
/**
* 用户名称
*/
@ApiModelProperty(name = "user_name", value = "用户id(作者id)")
private String userName;
/** /**
* 用户本人邀请码 * 用户本人邀请码
*/ */
...@@ -60,41 +46,28 @@ public class shopZx extends Model<shopZx> implements Serializable { ...@@ -60,41 +46,28 @@ public class shopZx extends Model<shopZx> implements Serializable {
@ApiModelProperty(name = "zx_likes", value = "获赞数") @ApiModelProperty(name = "zx_likes", value = "获赞数")
private Integer zxLikes; private Integer zxLikes;
/**
* 视频/图片名称
*/
@ApiModelProperty(name = "zx_name", value = "视频/图片名称")
private String zxName;
/** /**
* 审核字段 * 审核字段
*/ */
@ApiModelProperty(name = "zx_shenHe", value = "审核字段") @ApiModelProperty(name = "zx_to_examine", value = "审核字段")
private Integer zxShenHe; private Integer zxToExamine;
/** /**
* 资讯文字输入字段 * 资讯文字输入字段
*/ */
@ApiModelProperty(name = "zx_field", value = "资讯文字输入字段") @ApiModelProperty(name = "zx_field", value = "资讯文字输入字段")
private String zxField; private String zxField;
/**
* 用户发布地址
*/
@ApiModelProperty(name = "zx_address", value = "用户发布地址")
private String zxAddress;
/** /**
* 资讯数据创建时间 * 资讯数据创建时间
*/ */
@ApiModelProperty(name = "zx_date", value = "资讯数据创建时间") @ApiModelProperty(name = "zx_date", value = "资讯数据创建时间")
private BigInteger zxDate; private BigInteger zxDate;
/**
* 图片存放地址imgUrl,zxAddress,zxField,zxName,userid,zxUrl
*/
@ApiModelProperty(name = "img_url", value = "图片存放地址")
private String imgUrl;
/**
* 用户发布地址
*/
@ApiModelProperty(name = "zx_address", value = "用户发布地址")
private String zxAddress;
@TableField(exist = false) @TableField(exist = false)
private List<String> askImgList; private List<String> askImgList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment