Commit 3d252dcb authored by muhong's avatar muhong

修改mybatis配置和足迹表结构

parent 8757b2a1
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
<!--数据库链接地址账号密码--> <!--数据库链接地址账号密码-->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" <jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://pc-bp18q94o1mukb67hy.mysql.polardb.rds.aliyuncs.com:3306/video_dev?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=UTC&amp;verifyServerCertificate=false&amp;useSSL=false" connectionURL="jdbc:mysql://pc-bp1l2k9j6ck1gr923.mysql.polardb.rds.aliyuncs.com:3306/quanku?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=UTC&amp;verifyServerCertificate=false&amp;useSSL=false"
userId="video_dev" userId="quanku"
password="VS1xaA37hyu1wJSw"/> password="3N0W8i0b1Wm35MJ5"/>
<!-- 类型转换 --> <!-- 类型转换 -->
<javaTypeResolver> <javaTypeResolver>
...@@ -63,16 +63,16 @@ ...@@ -63,16 +63,16 @@
<!--生成Model类存放位置--> <!--生成Model类存放位置-->
<javaModelGenerator targetPackage="com.wwdz.ch.db.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="com.wwdz.ch.db.domain" targetProject="ch-dao/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<sqlMapGenerator targetPackage="com.wwdz.ch.db.dao" targetProject="src/main/resources"/> <sqlMapGenerator targetPackage="com.wwdz.ch.db.dao" targetProject="ch-dao/src/main/resources"/>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.dao" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.dao"
targetProject="src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="business_return" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="favorites_coins_relation" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
......
...@@ -61,6 +61,31 @@ ...@@ -61,6 +61,31 @@
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.2.12</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -44,11 +44,11 @@ public class Footprint { ...@@ -44,11 +44,11 @@ public class Footprint {
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dts_footprint.goods_id * This field corresponds to the database column dts_footprint.coins_id
* *
* @mbg.generated * @mbg.generated
*/ */
private Long goodsId; private Long coinsId;
/** /**
* *
...@@ -127,26 +127,26 @@ public class Footprint { ...@@ -127,26 +127,26 @@ public class Footprint {
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column dts_footprint.goods_id * This method returns the value of the database column dts_footprint.coins_id
* *
* @return the value of dts_footprint.goods_id * @return the value of dts_footprint.coins_id
* *
* @mbg.generated * @mbg.generated
*/ */
public Long getGoodsId() { public Long getCoinsId() {
return goodsId; return coinsId;
} }
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method sets the value of the database column dts_footprint.goods_id * This method sets the value of the database column dts_footprint.coins_id
* *
* @param goodsId the value for dts_footprint.goods_id * @param coinsId the value for dts_footprint.coins_id
* *
* @mbg.generated * @mbg.generated
*/ */
public void setGoodsId(Long goodsId) { public void setCoinsId(Long coinsId) {
this.goodsId = goodsId; this.coinsId = coinsId;
} }
/** /**
...@@ -235,7 +235,7 @@ public class Footprint { ...@@ -235,7 +235,7 @@ public class Footprint {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", userId=").append(userId); sb.append(", userId=").append(userId);
sb.append(", goodsId=").append(goodsId); sb.append(", coinsId=").append(coinsId);
sb.append(", addTime=").append(addTime); sb.append(", addTime=").append(addTime);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", deleted=").append(deleted); sb.append(", deleted=").append(deleted);
...@@ -263,7 +263,7 @@ public class Footprint { ...@@ -263,7 +263,7 @@ public class Footprint {
Footprint other = (Footprint) that; Footprint other = (Footprint) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) && (this.getCoinsId() == null ? other.getCoinsId() == null : this.getCoinsId().equals(other.getCoinsId()))
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime())) && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted())); && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
...@@ -281,7 +281,7 @@ public class Footprint { ...@@ -281,7 +281,7 @@ public class Footprint {
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); result = prime * result + ((getCoinsId() == null) ? 0 : getCoinsId().hashCode());
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
...@@ -309,7 +309,7 @@ public class Footprint { ...@@ -309,7 +309,7 @@ public class Footprint {
public enum Column { public enum Column {
id("id", "id", "BIGINT", false), id("id", "id", "BIGINT", false),
userId("user_id", "userId", "BIGINT", false), userId("user_id", "userId", "BIGINT", false),
goodsId("goods_id", "goodsId", "BIGINT", false), coinsId("coins_id", "coinsId", "BIGINT", false),
addTime("add_time", "addTime", "TIMESTAMP", false), addTime("add_time", "addTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
deleted("deleted", "deleted", "BIT", false); deleted("deleted", "deleted", "BIT", false);
......
...@@ -502,18 +502,18 @@ public class FootprintExample { ...@@ -502,18 +502,18 @@ public class FootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdIsNull() { public Criteria andCoinsIdIsNull() {
addCriterion("goods_id is null"); addCriterion("coins_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdIsNotNull() { public Criteria andCoinsIdIsNotNull() {
addCriterion("goods_id is not null"); addCriterion("coins_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdEqualTo(Long value) { public Criteria andCoinsIdEqualTo(Long value) {
addCriterion("goods_id =", value, "goodsId"); addCriterion("coins_id =", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -524,13 +524,13 @@ public class FootprintExample { ...@@ -524,13 +524,13 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdEqualToColumn(Footprint.Column column) { public Criteria andCoinsIdEqualToColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id = ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotEqualTo(Long value) { public Criteria andCoinsIdNotEqualTo(Long value) {
addCriterion("goods_id <>", value, "goodsId"); addCriterion("coins_id <>", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -541,13 +541,13 @@ public class FootprintExample { ...@@ -541,13 +541,13 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdNotEqualToColumn(Footprint.Column column) { public Criteria andCoinsIdNotEqualToColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id <> ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdGreaterThan(Long value) { public Criteria andCoinsIdGreaterThan(Long value) {
addCriterion("goods_id >", value, "goodsId"); addCriterion("coins_id >", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -558,13 +558,13 @@ public class FootprintExample { ...@@ -558,13 +558,13 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdGreaterThanColumn(Footprint.Column column) { public Criteria andCoinsIdGreaterThanColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id > ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { public Criteria andCoinsIdGreaterThanOrEqualTo(Long value) {
addCriterion("goods_id >=", value, "goodsId"); addCriterion("coins_id >=", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -575,13 +575,13 @@ public class FootprintExample { ...@@ -575,13 +575,13 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdGreaterThanOrEqualToColumn(Footprint.Column column) { public Criteria andCoinsIdGreaterThanOrEqualToColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id >= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdLessThan(Long value) { public Criteria andCoinsIdLessThan(Long value) {
addCriterion("goods_id <", value, "goodsId"); addCriterion("coins_id <", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -592,13 +592,13 @@ public class FootprintExample { ...@@ -592,13 +592,13 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdLessThanColumn(Footprint.Column column) { public Criteria andCoinsIdLessThanColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id < ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdLessThanOrEqualTo(Long value) { public Criteria andCoinsIdLessThanOrEqualTo(Long value) {
addCriterion("goods_id <=", value, "goodsId"); addCriterion("coins_id <=", value, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -609,28 +609,28 @@ public class FootprintExample { ...@@ -609,28 +609,28 @@ public class FootprintExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andGoodsIdLessThanOrEqualToColumn(Footprint.Column column) { public Criteria andCoinsIdLessThanOrEqualToColumn(Footprint.Column column) {
addCriterion(new StringBuilder("goods_id <= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("coins_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdIn(List<Long> values) { public Criteria andCoinsIdIn(List<Long> values) {
addCriterion("goods_id in", values, "goodsId"); addCriterion("coins_id in", values, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotIn(List<Long> values) { public Criteria andCoinsIdNotIn(List<Long> values) {
addCriterion("goods_id not in", values, "goodsId"); addCriterion("coins_id not in", values, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdBetween(Long value1, Long value2) { public Criteria andCoinsIdBetween(Long value1, Long value2) {
addCriterion("goods_id between", value1, value2, "goodsId"); addCriterion("coins_id between", value1, value2, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotBetween(Long value1, Long value2) { public Criteria andCoinsIdNotBetween(Long value1, Long value2) {
addCriterion("goods_id not between", value1, value2, "goodsId"); addCriterion("coins_id not between", value1, value2, "coinsId");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -19,7 +19,7 @@ public class MyBatisGeneratorRun { ...@@ -19,7 +19,7 @@ public class MyBatisGeneratorRun {
public void generator() throws Exception{ public void generator() throws Exception{
List<String> warnings = new ArrayList<String>(); List<String> warnings = new ArrayList<String>();
boolean overwrite = true; boolean overwrite = true;
InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream("mybatis-generator/generatorConfig_new.xml"); InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream("ch-dao/mybatis-generator/generatorConfig_new.xml");
ConfigurationParser cp = new ConfigurationParser(warnings); ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(resourceAsStream); Configuration config = cp.parseConfiguration(resourceAsStream);
DefaultShellCallback callback = new DefaultShellCallback(overwrite); DefaultShellCallback callback = new DefaultShellCallback(overwrite);
......
...@@ -39,7 +39,7 @@ public class DtsFootprintService { ...@@ -39,7 +39,7 @@ public class DtsFootprintService {
footprintMapper.insertSelective(footprint); footprintMapper.insertSelective(footprint);
} }
public List<Footprint> querySelective(String userId, String goodsId, Integer page, Integer size, String sort, public List<Footprint> querySelective(String userId, String coinsId, Integer page, Integer size, String sort,
String order) { String order) {
FootprintExample example = new FootprintExample(); FootprintExample example = new FootprintExample();
FootprintExample.Criteria criteria = example.createCriteria(); FootprintExample.Criteria criteria = example.createCriteria();
...@@ -47,8 +47,8 @@ public class DtsFootprintService { ...@@ -47,8 +47,8 @@ public class DtsFootprintService {
if (!StringUtils.isEmpty(userId)) { if (!StringUtils.isEmpty(userId)) {
criteria.andUserIdEqualTo(Long.valueOf(userId)); criteria.andUserIdEqualTo(Long.valueOf(userId));
} }
if (!StringUtils.isEmpty(goodsId)) { if (!StringUtils.isEmpty(coinsId)) {
criteria.andGoodsIdEqualTo(Long.valueOf(goodsId)); criteria.andCoinsIdEqualTo(Long.valueOf(coinsId));
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
--> -->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="goods_id" jdbcType="BIGINT" property="goodsId" /> <result column="coins_id" jdbcType="BIGINT" property="coinsId" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, user_id, goods_id, add_time, update_time, deleted id, user_id, coins_id, add_time, update_time, deleted
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.FootprintExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.FootprintExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, add_time, update_time, deleted id, user_id, coins_id, add_time, update_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from footprint from footprint
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, add_time, update_time, deleted id, user_id, coins_id, add_time, update_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from footprint from footprint
...@@ -212,9 +212,9 @@ ...@@ -212,9 +212,9 @@
<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 footprint (user_id, goods_id, add_time, insert into footprint (user_id, coins_id, add_time,
update_time, deleted) update_time, deleted)
values (#{userId,jdbcType=BIGINT}, #{goodsId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP}, values (#{userId,jdbcType=BIGINT}, #{coinsId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}) #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Footprint"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Footprint">
...@@ -230,8 +230,8 @@ ...@@ -230,8 +230,8 @@
<if test="userId != null"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="goodsId != null"> <if test="coinsId != null">
goods_id, coins_id,
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
add_time, add_time,
...@@ -247,8 +247,8 @@ ...@@ -247,8 +247,8 @@
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="goodsId != null"> <if test="coinsId != null">
#{goodsId,jdbcType=BIGINT}, #{coinsId,jdbcType=BIGINT},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP}, #{addTime,jdbcType=TIMESTAMP},
...@@ -284,8 +284,8 @@ ...@@ -284,8 +284,8 @@
<if test="record.userId != null"> <if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT},
</if> </if>
<if test="record.goodsId != null"> <if test="record.coinsId != null">
goods_id = #{record.goodsId,jdbcType=BIGINT}, coins_id = #{record.coinsId,jdbcType=BIGINT},
</if> </if>
<if test="record.addTime != null"> <if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
update footprint update footprint
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT},
goods_id = #{record.goodsId,jdbcType=BIGINT}, coins_id = #{record.coinsId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT} deleted = #{record.deleted,jdbcType=BIT}
...@@ -327,8 +327,8 @@ ...@@ -327,8 +327,8 @@
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=BIGINT}, user_id = #{userId,jdbcType=BIGINT},
</if> </if>
<if test="goodsId != null"> <if test="coinsId != null">
goods_id = #{goodsId,jdbcType=BIGINT}, coins_id = #{coinsId,jdbcType=BIGINT},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
--> -->
update footprint update footprint
set user_id = #{userId,jdbcType=BIGINT}, set user_id = #{userId,jdbcType=BIGINT},
goods_id = #{goodsId,jdbcType=BIGINT}, coins_id = #{coinsId,jdbcType=BIGINT},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, add_time, update_time, deleted id, user_id, coins_id, add_time, update_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from footprint from footprint
......
...@@ -107,10 +107,10 @@ public class WxFootprintController { ...@@ -107,10 +107,10 @@ public class WxFootprintController {
for (Footprint footprint : footprintList) { for (Footprint footprint : footprintList) {
Map<String, Object> c = new HashMap<String, Object>(); Map<String, Object> c = new HashMap<String, Object>();
c.put("id", footprint.getId()); c.put("id", footprint.getId());
c.put("goodsId", footprint.getGoodsId()); c.put("coinsId", footprint.getCoinsId());
c.put("addTime", footprint.getAddTime()); c.put("addTime", footprint.getAddTime());
Item item = itemService.findById(footprint.getGoodsId().longValue()); Item item = itemService.findById(footprint.getCoinsId().longValue());
c.put("name", item.getName()); c.put("name", item.getName());
c.put("retailPrice", item.getPrice()); c.put("retailPrice", item.getPrice());
c.put("image", item.getImages().split(";")[0]); c.put("image", item.getImages().split(";")[0]);
......
...@@ -110,7 +110,7 @@ public class WxGoodsController { ...@@ -110,7 +110,7 @@ public class WxGoodsController {
executorService.execute(() -> { executorService.execute(() -> {
Footprint footprint = new Footprint(); Footprint footprint = new Footprint();
footprint.setUserId(userId); footprint.setUserId(userId);
footprint.setGoodsId(id); footprint.setCoinsId(id);
footprintService.add(footprint); footprintService.add(footprint);
short num = 1; short num = 1;
productService.addBrowse(id.intValue(), num);// 新增商品点击量 productService.addBrowse(id.intValue(), num);// 新增商品点击量
......
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