Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
3d252dcb
Commit
3d252dcb
authored
Jul 18, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改mybatis配置和足迹表结构
parent
8757b2a1
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
81 deletions
+106
-81
ch-dao/mybatis-generator/generatorConfig_new.xml
ch-dao/mybatis-generator/generatorConfig_new.xml
+7
-7
ch-dao/pom.xml
ch-dao/pom.xml
+25
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Footprint.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Footprint.java
+14
-14
ch-dao/src/main/java/com/wwdz/ch/db/domain/FootprintExample.java
...src/main/java/com/wwdz/ch/db/domain/FootprintExample.java
+36
-36
ch-dao/src/main/java/com/wwdz/ch/db/mybatis/MyBatisGeneratorRun.java
...main/java/com/wwdz/ch/db/mybatis/MyBatisGeneratorRun.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFootprintService.java
...main/java/com/wwdz/ch/db/service/DtsFootprintService.java
+3
-3
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FootprintMapper.xml
...src/main/resources/com/wwdz/ch/db/dao/FootprintMapper.xml
+17
-17
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
...c/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
...i/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
+1
-1
No files found.
ch-dao/mybatis-generator/generatorConfig_new.xml
View file @
3d252dcb
...
...
@@ -50,9 +50,9 @@
<!--数据库链接地址账号密码-->
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://pc-bp1
8q94o1mukb67hy.mysql.polardb.rds.aliyuncs.com:3306/video_dev
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false"
userId=
"
video_dev
"
password=
"
VS1xaA37hyu1wJSw
"
/>
connectionURL=
"jdbc:mysql://pc-bp1
l2k9j6ck1gr923.mysql.polardb.rds.aliyuncs.com:3306/quanku
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false"
userId=
"
quanku
"
password=
"
3N0W8i0b1Wm35MJ5
"
/>
<!-- 类型转换 -->
<javaTypeResolver>
...
...
@@ -63,16 +63,16 @@
<!--生成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=
"trimStrings"
value=
"true"
/>
</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"
targetProject=
"src/main/java"
/>
targetProject=
"
ch-dao/
src/main/java"
/>
<table
tableName=
"
business_retur
n"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
favorites_coins_relatio
n"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
...
...
ch-dao/pom.xml
View file @
3d252dcb
...
...
@@ -61,6 +61,31 @@
</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>
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/Footprint.java
View file @
3d252dcb
...
...
@@ -44,11 +44,11 @@ public class Footprint {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dts_footprint.
good
s_id
* This field corresponds to the database column dts_footprint.
coin
s_id
*
* @mbg.generated
*/
private
Long
good
sId
;
private
Long
coin
sId
;
/**
*
...
...
@@ -127,26 +127,26 @@ public class Footprint {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dts_footprint.
good
s_id
* This method returns the value of the database column dts_footprint.
coin
s_id
*
* @return the value of dts_footprint.
good
s_id
* @return the value of dts_footprint.
coin
s_id
*
* @mbg.generated
*/
public
Long
get
Good
sId
()
{
return
good
sId
;
public
Long
get
Coin
sId
()
{
return
coin
sId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dts_footprint.
good
s_id
* This method sets the value of the database column dts_footprint.
coin
s_id
*
* @param
goodsId the value for dts_footprint.good
s_id
* @param
coinsId the value for dts_footprint.coin
s_id
*
* @mbg.generated
*/
public
void
set
GoodsId
(
Long
good
sId
)
{
this
.
goodsId
=
good
sId
;
public
void
set
CoinsId
(
Long
coin
sId
)
{
this
.
coinsId
=
coin
sId
;
}
/**
...
...
@@ -235,7 +235,7 @@ public class Footprint {
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
",
goodsId="
).
append
(
good
sId
);
sb
.
append
(
",
coinsId="
).
append
(
coin
sId
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", deleted="
).
append
(
deleted
);
...
...
@@ -263,7 +263,7 @@ public class Footprint {
Footprint
other
=
(
Footprint
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
get
GoodsId
()
==
null
?
other
.
getGoodsId
()
==
null
:
this
.
getGoodsId
().
equals
(
other
.
getGood
sId
()))
&&
(
this
.
get
CoinsId
()
==
null
?
other
.
getCoinsId
()
==
null
:
this
.
getCoinsId
().
equals
(
other
.
getCoin
sId
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getDeleted
()
==
null
?
other
.
getDeleted
()
==
null
:
this
.
getDeleted
().
equals
(
other
.
getDeleted
()));
...
...
@@ -281,7 +281,7 @@ public class Footprint {
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
get
GoodsId
()
==
null
)
?
0
:
getGood
sId
().
hashCode
());
result
=
prime
*
result
+
((
get
CoinsId
()
==
null
)
?
0
:
getCoin
sId
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getDeleted
()
==
null
)
?
0
:
getDeleted
().
hashCode
());
...
...
@@ -309,7 +309,7 @@ public class Footprint {
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
goodsId
(
"goods_id"
,
"good
sId"
,
"BIGINT"
,
false
),
coinsId
(
"coins_id"
,
"coin
sId"
,
"BIGINT"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
deleted
(
"deleted"
,
"deleted"
,
"BIT"
,
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/FootprintExample.java
View file @
3d252dcb
...
...
@@ -502,18 +502,18 @@ public class FootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdIsNull
()
{
addCriterion
(
"
good
s_id is null"
);
public
Criteria
and
Coin
sIdIsNull
()
{
addCriterion
(
"
coin
s_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdIsNotNull
()
{
addCriterion
(
"
good
s_id is not null"
);
public
Criteria
and
Coin
sIdIsNotNull
()
{
addCriterion
(
"
coin
s_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdEqualTo
(
Long
value
)
{
addCriterion
(
"
goods_id ="
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id ="
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -524,13 +524,13 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"
goods_id <>"
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id <>"
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -541,13 +541,13 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdNotEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdNotEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdGreaterThan
(
Long
value
)
{
addCriterion
(
"
goods_id >"
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdGreaterThan
(
Long
value
)
{
addCriterion
(
"
coins_id >"
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -558,13 +558,13 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdGreaterThanColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdGreaterThanColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
goods_id >="
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id >="
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -575,13 +575,13 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdGreaterThanOrEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdGreaterThanOrEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdLessThan
(
Long
value
)
{
addCriterion
(
"
goods_id <"
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdLessThan
(
Long
value
)
{
addCriterion
(
"
coins_id <"
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -592,13 +592,13 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdLessThanColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdLessThanColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
goods_id <="
,
value
,
"good
sId"
);
public
Criteria
and
Coin
sIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id <="
,
value
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -609,28 +609,28 @@ public class FootprintExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Good
sIdLessThanOrEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
good
s_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Coin
sIdLessThanOrEqualToColumn
(
Footprint
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coin
s_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
goods_id in"
,
values
,
"good
sId"
);
public
Criteria
and
Coin
sIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
coins_id in"
,
values
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
goods_id not in"
,
values
,
"good
sId"
);
public
Criteria
and
Coin
sIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
coins_id not in"
,
values
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
goods_id between"
,
value1
,
value2
,
"good
sId"
);
public
Criteria
and
Coin
sIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
coins_id between"
,
value1
,
value2
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Good
sIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
goods_id not between"
,
value1
,
value2
,
"good
sId"
);
public
Criteria
and
Coin
sIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
coins_id not between"
,
value1
,
value2
,
"coin
sId"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mybatis/MyBatisGeneratorRun.java
View file @
3d252dcb
...
...
@@ -19,7 +19,7 @@ public class MyBatisGeneratorRun {
public
void
generator
()
throws
Exception
{
List
<
String
>
warnings
=
new
ArrayList
<
String
>();
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
);
Configuration
config
=
cp
.
parseConfiguration
(
resourceAsStream
);
DefaultShellCallback
callback
=
new
DefaultShellCallback
(
overwrite
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFootprintService.java
View file @
3d252dcb
...
...
@@ -39,7 +39,7 @@ public class DtsFootprintService {
footprintMapper
.
insertSelective
(
footprint
);
}
public
List
<
Footprint
>
querySelective
(
String
userId
,
String
good
sId
,
Integer
page
,
Integer
size
,
String
sort
,
public
List
<
Footprint
>
querySelective
(
String
userId
,
String
coin
sId
,
Integer
page
,
Integer
size
,
String
sort
,
String
order
)
{
FootprintExample
example
=
new
FootprintExample
();
FootprintExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
...
@@ -47,8 +47,8 @@ public class DtsFootprintService {
if
(!
StringUtils
.
isEmpty
(
userId
))
{
criteria
.
andUserIdEqualTo
(
Long
.
valueOf
(
userId
));
}
if
(!
StringUtils
.
isEmpty
(
good
sId
))
{
criteria
.
and
GoodsIdEqualTo
(
Long
.
valueOf
(
good
sId
));
if
(!
StringUtils
.
isEmpty
(
coin
sId
))
{
criteria
.
and
CoinsIdEqualTo
(
Long
.
valueOf
(
coin
sId
));
}
criteria
.
andDeletedEqualTo
(
false
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FootprintMapper.xml
View file @
3d252dcb
...
...
@@ -8,7 +8,7 @@
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"
goods_id"
jdbcType=
"BIGINT"
property=
"good
sId"
/>
<result
column=
"
coins_id"
jdbcType=
"BIGINT"
property=
"coin
sId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"deleted"
jdbcType=
"BIT"
property=
"deleted"
/>
...
...
@@ -84,7 +84,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, user_id,
good
s_id, add_time, update_time, deleted
id, user_id,
coin
s_id, add_time, update_time, deleted
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FootprintExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -121,7 +121,7 @@
</foreach>
</when>
<otherwise>
id, user_id,
good
s_id, add_time, update_time, deleted
id, user_id,
coin
s_id, add_time, update_time, deleted
</otherwise>
</choose>
from footprint
...
...
@@ -180,7 +180,7 @@
</foreach>
</when>
<otherwise>
id, user_id,
good
s_id, add_time, update_time, deleted
id, user_id,
coin
s_id, add_time, update_time, deleted
</otherwise>
</choose>
from footprint
...
...
@@ -212,9 +212,9 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into footprint (user_id,
good
s_id, add_time,
insert into footprint (user_id,
coin
s_id, add_time,
update_time, deleted)
values (#{userId,jdbcType=BIGINT}, #{
good
sId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP},
values (#{userId,jdbcType=BIGINT}, #{
coin
sId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Footprint"
>
...
...
@@ -230,8 +230,8 @@
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"
good
sId != null"
>
good
s_id,
<if
test=
"
coin
sId != null"
>
coin
s_id,
</if>
<if
test=
"addTime != null"
>
add_time,
...
...
@@ -247,8 +247,8 @@
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"
good
sId != null"
>
#{
good
sId,jdbcType=BIGINT},
<if
test=
"
coin
sId != null"
>
#{
coin
sId,jdbcType=BIGINT},
</if>
<if
test=
"addTime != null"
>
#{addTime,jdbcType=TIMESTAMP},
...
...
@@ -284,8 +284,8 @@
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.
good
sId != null"
>
goods_id = #{record.good
sId,jdbcType=BIGINT},
<if
test=
"record.
coin
sId != null"
>
coins_id = #{record.coin
sId,jdbcType=BIGINT},
</if>
<if
test=
"record.addTime != null"
>
add_time = #{record.addTime,jdbcType=TIMESTAMP},
...
...
@@ -309,7 +309,7 @@
update footprint
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
goods_id = #{record.good
sId,jdbcType=BIGINT},
coins_id = #{record.coin
sId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}
...
...
@@ -327,8 +327,8 @@
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"
good
sId != null"
>
goods_id = #{good
sId,jdbcType=BIGINT},
<if
test=
"
coin
sId != null"
>
coins_id = #{coin
sId,jdbcType=BIGINT},
</if>
<if
test=
"addTime != null"
>
add_time = #{addTime,jdbcType=TIMESTAMP},
...
...
@@ -349,7 +349,7 @@
-->
update footprint
set user_id = #{userId,jdbcType=BIGINT},
goods_id = #{good
sId,jdbcType=BIGINT},
coins_id = #{coin
sId,jdbcType=BIGINT},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
...
...
@@ -386,7 +386,7 @@
</foreach>
</when>
<otherwise>
id, user_id,
good
s_id, add_time, update_time, deleted
id, user_id,
coin
s_id, add_time, update_time, deleted
</otherwise>
</choose>
from footprint
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
View file @
3d252dcb
...
...
@@ -107,10 +107,10 @@ public class WxFootprintController {
for
(
Footprint
footprint
:
footprintList
)
{
Map
<
String
,
Object
>
c
=
new
HashMap
<
String
,
Object
>();
c
.
put
(
"id"
,
footprint
.
getId
());
c
.
put
(
"
goodsId"
,
footprint
.
getGood
sId
());
c
.
put
(
"
coinsId"
,
footprint
.
getCoin
sId
());
c
.
put
(
"addTime"
,
footprint
.
getAddTime
());
Item
item
=
itemService
.
findById
(
footprint
.
get
Good
sId
().
longValue
());
Item
item
=
itemService
.
findById
(
footprint
.
get
Coin
sId
().
longValue
());
c
.
put
(
"name"
,
item
.
getName
());
c
.
put
(
"retailPrice"
,
item
.
getPrice
());
c
.
put
(
"image"
,
item
.
getImages
().
split
(
";"
)[
0
]);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
View file @
3d252dcb
...
...
@@ -110,7 +110,7 @@ public class WxGoodsController {
executorService
.
execute
(()
->
{
Footprint
footprint
=
new
Footprint
();
footprint
.
setUserId
(
userId
);
footprint
.
set
Good
sId
(
id
);
footprint
.
set
Coin
sId
(
id
);
footprintService
.
add
(
footprint
);
short
num
=
1
;
productService
.
addBrowse
(
id
.
intValue
(),
num
);
// 新增商品点击量
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment