update
This commit is contained in:
parent
b2cff4c97a
commit
b9256af4e8
@ -14,21 +14,69 @@ public class CollectIconList implements Serializable {
|
||||
/**
|
||||
* 网址id
|
||||
*/
|
||||
private String urlid;
|
||||
private String url_id;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String iconUrl;
|
||||
private String icon_url;
|
||||
|
||||
/**
|
||||
* 二维码地址
|
||||
*/
|
||||
private String qrUrl;
|
||||
private String qr_url;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private int status;
|
||||
private Integer status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CollectIconList other = (CollectIconList) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getUrl_id() == null ? other.getUrl_id() == null : this.getUrl_id().equals(other.getUrl_id()))
|
||||
&& (this.getIcon_url() == null ? other.getIcon_url() == null : this.getIcon_url().equals(other.getIcon_url()))
|
||||
&& (this.getQr_url() == null ? other.getQr_url() == null : this.getQr_url().equals(other.getQr_url()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getUrl_id() == null) ? 0 : getUrl_id().hashCode());
|
||||
result = prime * result + ((getIcon_url() == null) ? 0 : getIcon_url().hashCode());
|
||||
result = prime * result + ((getQr_url() == null) ? 0 : getQr_url().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", url_id=").append(url_id);
|
||||
sb.append(", icon_url=").append(icon_url);
|
||||
sb.append(", qr_url=").append(qr_url);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/love-nav
|
||||
username: root
|
||||
password: Cheng123...
|
||||
password: 1611
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
redis:
|
||||
host: localhost
|
||||
|
@ -3,13 +3,13 @@
|
||||
<mapper namespace="com.lovenav.dao.CollectIconListDao">
|
||||
<resultMap id="BaseResultMap" type="com.lovenav.entity.CollectIconList">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="url_id" jdbcType="VARCHAR" property="urlid" />
|
||||
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
|
||||
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
|
||||
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
|
||||
<result column="url_id" jdbcType="VARCHAR" property="url_id" />
|
||||
<result column="icon_url" jdbcType="VARCHAR" property="icon_url" />
|
||||
<result column="qr_url" jdbcType="VARCHAR" property="qr_url" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, url_id, icon_url,qrUrl,status
|
||||
id, url_id, icon_url, qr_url, `status`
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -22,44 +22,66 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.CollectIconList" useGeneratedKeys="true">
|
||||
insert into ln_collect_icon_list (url_md5, icon_url)
|
||||
values (#{urlMd5,jdbcType=VARCHAR}, #{iconUrl,jdbcType=VARCHAR})
|
||||
insert into ln_collect_icon_list (url_id, icon_url, qr_url,
|
||||
`status`)
|
||||
values (#{url_id,jdbcType=VARCHAR}, #{icon_url,jdbcType=VARCHAR}, #{qr_url,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.CollectIconList" useGeneratedKeys="true">
|
||||
insert into ln_collect_icon_list
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="urlMd5 != null">
|
||||
url_md5,
|
||||
<if test="url_id != null">
|
||||
url_id,
|
||||
</if>
|
||||
<if test="iconUrl != null">
|
||||
<if test="icon_url != null">
|
||||
icon_url,
|
||||
</if>
|
||||
<if test="qr_url != null">
|
||||
qr_url,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="urlMd5 != null">
|
||||
#{urlMd5,jdbcType=VARCHAR},
|
||||
<if test="url_id != null">
|
||||
#{url_id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="iconUrl != null">
|
||||
#{iconUrl,jdbcType=VARCHAR},
|
||||
<if test="icon_url != null">
|
||||
#{icon_url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qr_url != null">
|
||||
#{qr_url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.CollectIconList">
|
||||
update ln_collect_icon_list
|
||||
<set>
|
||||
<if test="urlMd5 != null">
|
||||
url_md5 = #{urlMd5,jdbcType=VARCHAR},
|
||||
<if test="url_id != null">
|
||||
url_id = #{url_id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="iconUrl != null">
|
||||
icon_url = #{iconUrl,jdbcType=VARCHAR},
|
||||
<if test="icon_url != null">
|
||||
icon_url = #{icon_url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qr_url != null">
|
||||
qr_url = #{qr_url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.CollectIconList">
|
||||
update ln_collect_icon_list
|
||||
set url_md5 = #{urlMd5,jdbcType=VARCHAR},
|
||||
icon_url = #{iconUrl,jdbcType=VARCHAR}
|
||||
set url_id = #{url_id,jdbcType=VARCHAR},
|
||||
icon_url = #{icon_url,jdbcType=VARCHAR},
|
||||
qr_url = #{qr_url,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user