Commit 7b9dff6c authored by shiyu's avatar shiyu

数据同步

parent aab021b6
...@@ -110,7 +110,7 @@ public class ShiroConfig { ...@@ -110,7 +110,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/admin/auth/index", "anon"); filterChainDefinitionMap.put("/admin/auth/index", "anon");
filterChainDefinitionMap.put("/admin/auth/403", "anon"); filterChainDefinitionMap.put("/admin/auth/403", "anon");
filterChainDefinitionMap.put("/actuator/health", "anon"); filterChainDefinitionMap.put("/actuator/health", "anon");
// filterChainDefinitionMap.put("/admin/item/syn", "anon"); filterChainDefinitionMap.put("/admin/item/syn", "anon");
// filterChainDefinitionMap.put("/admin/**", "anon"); // filterChainDefinitionMap.put("/admin/**", "anon");
filterChainDefinitionMap.put("/admin/**", "authc"); filterChainDefinitionMap.put("/admin/**", "authc");
......
...@@ -49,7 +49,7 @@ public class ItemController { ...@@ -49,7 +49,7 @@ public class ItemController {
return result; return result;
} }
// @GetMapping("/syn") @GetMapping("/syn")
public void syn() { public void syn() {
synCoinJob.execute(); synCoinJob.execute();
} }
......
package com.wwdz.ch.admin.job; package com.wwdz.ch.admin.job;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.wwdz.ch.admin.controller.AdminCollectController;
import com.wwdz.ch.core.consts.CommonEnum; import com.wwdz.ch.core.consts.CommonEnum;
import com.wwdz.ch.db.dao.CoinsDao; import com.wwdz.ch.db.dao.CoinsDao;
import com.wwdz.ch.db.dao.ItemManager; import com.wwdz.ch.db.dao.ItemManager;
import com.wwdz.ch.db.domain.Coins; import com.wwdz.ch.db.domain.Coins;
import com.wwdz.ch.db.domain.Item; import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.dto.request.CoinRequestDto; import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.mapper.ItemMapper;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.stream.IntStream; import java.util.stream.IntStream;
...@@ -33,6 +26,7 @@ public class SynCoinJob { ...@@ -33,6 +26,7 @@ public class SynCoinJob {
CoinsDao coinsDao; CoinsDao coinsDao;
public void execute() { public void execute() {
logger.info(">>>>>>>>>>>>>>>>>>>>>>> 同步coins表数据到item表, 开始执行 <<<<<<<<<<<<<<<<<<<<<"); logger.info(">>>>>>>>>>>>>>>>>>>>>>> 同步coins表数据到item表, 开始执行 <<<<<<<<<<<<<<<<<<<<<");
try { try {
...@@ -48,7 +42,6 @@ public class SynCoinJob { ...@@ -48,7 +42,6 @@ public class SynCoinJob {
dto.setPage(i); dto.setPage(i);
dto.setLimit(100); dto.setLimit(100);
List<Coins> coinsList = coinsDao.findList(dto); List<Coins> coinsList = coinsDao.findList(dto);
// for (Coins coins : coinsList) {
coinsList.parallelStream().forEach(coins -> { coinsList.parallelStream().forEach(coins -> {
Item item = new Item(); Item item = new Item();
item.setId(coins.getId()); item.setId(coins.getId());
...@@ -71,20 +64,16 @@ public class SynCoinJob { ...@@ -71,20 +64,16 @@ public class SynCoinJob {
item.setIsSetted(0); item.setIsSetted(0);
item.setOriginalExtra(coins.getExtra()); item.setOriginalExtra(coins.getExtra());
item.setOriginalSourceUrl(coins.getSourceUrl()); item.setOriginalSourceUrl(coins.getSourceUrl());
item.setSource(coins.getSource());
itemManager.insert(item); itemManager.insert(item);
}); });
logger.info(">>>>>>>>>>>>>>>>> 同步数据的页码: {}, 同步成功 <<<<<<<<<<<<<<<<<", i); logger.info(">>>>>>>>>>>>>>>>> 同步数据的页码: {}, 同步成功 <<<<<<<<<<<<<<<<<", i);
/*try {
Thread.sleep(500);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}*/
}); });
logger.info(">>>>>>>>>>>>>>>>>>>>>>> 同步coins表数据到item表, 执行完毕 <<<<<<<<<<<<<<<<<<<<<");
} catch (Exception e) { } catch (Exception e) {
logger.error("同步coins表数据到item表 error {}", e); logger.error("同步coins表数据到item表 error {}", e);
} }
logger.info(">>>>>>>>>>>>>>>>>>>>>>> 同步coins表数据到item表, 执行完毕 <<<<<<<<<<<<<<<<<<<<<");
} }
} }
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2023/07/26 * @date 2023/07/27
*/ */
@Data @Data
public class Item implements Entity { public class Item implements Entity {
...@@ -96,6 +96,11 @@ public class Item implements Entity { ...@@ -96,6 +96,11 @@ public class Item implements Entity {
*/ */
private String originalSourceUrl; private String originalSourceUrl;
/**
* 来源(1,2,3,7,8,10,11):中国的
*/
private Integer source;
/** /**
* 钱币额外信息 * 钱币额外信息
*/ */
...@@ -141,6 +146,7 @@ public class Item implements Entity { ...@@ -141,6 +146,7 @@ public class Item implements Entity {
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);
sb.append(", isSetted=").append(isSetted); sb.append(", isSetted=").append(isSetted);
sb.append(", originalSourceUrl=").append(originalSourceUrl); sb.append(", originalSourceUrl=").append(originalSourceUrl);
sb.append(", source=").append(source);
sb.append(", extra=").append(extra); sb.append(", extra=").append(extra);
sb.append(", images=").append(images); sb.append(", images=").append(images);
sb.append(", detail=").append(detail); sb.append(", detail=").append(detail);
...@@ -179,6 +185,7 @@ public class Item implements Entity { ...@@ -179,6 +185,7 @@ public class Item implements Entity {
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted())) && (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted()))
&& (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl())) && (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl()))
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
&& (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra())) && (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
&& (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages())) && (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
&& (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail())) && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
...@@ -206,6 +213,7 @@ public class Item implements Entity { ...@@ -206,6 +213,7 @@ public class Item implements Entity {
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode()); result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode());
result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode()); result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode());
result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode()); result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode());
result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode()); result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode()); result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
...@@ -238,6 +246,7 @@ public class Item implements Entity { ...@@ -238,6 +246,7 @@ public class Item implements Entity {
remark("remark", "remark", "VARCHAR", false), remark("remark", "remark", "VARCHAR", false),
isSetted("is_setted", "isSetted", "INTEGER", false), isSetted("is_setted", "isSetted", "INTEGER", false),
originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false), originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false),
source("source", "source", "INTEGER", true),
extra("extra", "extra", "LONGVARCHAR", false), extra("extra", "extra", "LONGVARCHAR", false),
images("images", "images", "LONGVARCHAR", false), images("images", "images", "LONGVARCHAR", false),
detail("detail", "detail", "LONGVARCHAR", false), detail("detail", "detail", "LONGVARCHAR", false),
......
...@@ -2451,6 +2451,138 @@ public class ItemExample { ...@@ -2451,6 +2451,138 @@ public class ItemExample {
addCriterion("original_source_url not between", value1, value2, "originalSourceUrl"); addCriterion("original_source_url not between", value1, value2, "originalSourceUrl");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andSourceIsNull() {
addCriterion("`source` is null");
return (Criteria) this;
}
public Criteria andSourceIsNotNull() {
addCriterion("`source` is not null");
return (Criteria) this;
}
public Criteria andSourceEqualTo(Integer value) {
addCriterion("`source` =", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceNotEqualTo(Integer value) {
addCriterion("`source` <>", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceGreaterThan(Integer value) {
addCriterion("`source` >", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceGreaterThanOrEqualTo(Integer value) {
addCriterion("`source` >=", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceLessThan(Integer value) {
addCriterion("`source` <", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceLessThanOrEqualTo(Integer value) {
addCriterion("`source` <=", value, "source");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSourceLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`source` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSourceIn(List<Integer> values) {
addCriterion("`source` in", values, "source");
return (Criteria) this;
}
public Criteria andSourceNotIn(List<Integer> values) {
addCriterion("`source` not in", values, "source");
return (Criteria) this;
}
public Criteria andSourceBetween(Integer value1, Integer value2) {
addCriterion("`source` between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andSourceNotBetween(Integer value1, Integer value2) {
addCriterion("`source` not between", value1, value2, "source");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
...@@ -38,6 +38,11 @@ public class CoinRequestDto extends BaseRequestDto implements Entity { ...@@ -38,6 +38,11 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
*/ */
private Integer isStd; private Integer isStd;
/**
* 原始图片,以分号分割
*/
private String images;
/** /**
* 图片 * 图片
*/ */
......
...@@ -6,6 +6,7 @@ import java.util.List; ...@@ -6,6 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface ItemMapper { public interface ItemMapper {
long countByExample(ItemExample example); long countByExample(ItemExample example);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="is_setted" jdbcType="INTEGER" property="isSetted" /> <result column="is_setted" jdbcType="INTEGER" property="isSetted" />
<result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" /> <result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" />
<result column="source" jdbcType="INTEGER" property="source" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.Item"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.Item">
<result column="extra" jdbcType="LONGVARCHAR" property="extra" /> <result column="extra" jdbcType="LONGVARCHAR" property="extra" />
...@@ -86,7 +87,8 @@ ...@@ -86,7 +87,8 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
extra, images, detail, original_extra extra, images, detail, original_extra
...@@ -143,7 +145,7 @@ ...@@ -143,7 +145,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
extra, images, detail, original_extra `source`, extra, images, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -178,7 +180,7 @@ ...@@ -178,7 +180,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
extra, images, detail, original_extra `source`, extra, images, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -198,20 +200,22 @@ ...@@ -198,20 +200,22 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into item (`name`, cid, is_on_sale, insert into item_temp (`name`, cid, is_on_sale,
is_std, sort, share_image, is_std, sort, share_image,
top_image, price, create_time, top_image, price, create_time,
source_type, update_time, is_deleted, source_type, update_time, is_deleted,
bid_time, remark, is_setted, bid_time, remark, is_setted,
original_source_url, extra, images, original_source_url, `source`, extra,
detail, original_extra) images, detail, original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT}, values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR}, #{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}, #{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER}, #{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{extra,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}) #{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
...@@ -267,6 +271,9 @@ ...@@ -267,6 +271,9 @@
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
original_source_url, original_source_url,
</if> </if>
<if test="source != null">
`source`,
</if>
<if test="extra != null"> <if test="extra != null">
extra, extra,
</if> </if>
...@@ -329,6 +336,9 @@ ...@@ -329,6 +336,9 @@
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
#{originalSourceUrl,jdbcType=VARCHAR}, #{originalSourceUrl,jdbcType=VARCHAR},
</if> </if>
<if test="source != null">
#{source,jdbcType=INTEGER},
</if>
<if test="extra != null"> <if test="extra != null">
#{extra,jdbcType=LONGVARCHAR}, #{extra,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -403,6 +413,9 @@ ...@@ -403,6 +413,9 @@
<if test="record.originalSourceUrl != null"> <if test="record.originalSourceUrl != null">
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
</if> </if>
<if test="record.source != null">
`source` = #{record.source,jdbcType=INTEGER},
</if>
<if test="record.extra != null"> <if test="record.extra != null">
extra = #{record.extra,jdbcType=LONGVARCHAR}, extra = #{record.extra,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -439,6 +452,7 @@ ...@@ -439,6 +452,7 @@
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}, is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR}, extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR}, images = #{record.images,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR}, detail = #{record.detail,jdbcType=LONGVARCHAR},
...@@ -465,7 +479,8 @@ ...@@ -465,7 +479,8 @@
bid_time = #{record.bidTime,jdbcType=VARCHAR}, bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}, is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR} original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -521,6 +536,9 @@ ...@@ -521,6 +536,9 @@
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
</if> </if>
<if test="source != null">
`source` = #{source,jdbcType=INTEGER},
</if>
<if test="extra != null"> <if test="extra != null">
extra = #{extra,jdbcType=LONGVARCHAR}, extra = #{extra,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -554,6 +572,7 @@ ...@@ -554,6 +572,7 @@
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}, is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR}, extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR}, images = #{images,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR}, detail = #{detail,jdbcType=LONGVARCHAR},
...@@ -577,7 +596,8 @@ ...@@ -577,7 +596,8 @@
bid_time = #{bidTime,jdbcType=VARCHAR}, bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}, is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR} original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="BaseResultMap">
...@@ -635,7 +655,7 @@ ...@@ -635,7 +655,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
extra, images, detail, original_extra `source`, extra, images, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -647,5 +667,4 @@ ...@@ -647,5 +667,4 @@
</if> </if>
limit 1 limit 1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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