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
a06674d3
Commit
a06674d3
authored
Apr 21, 2023
by
xiaoyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
155bd764
Changes
60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
1739 additions
and
575 deletions
+1739
-575
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/AdminFeedbackController.java
...n/java/com/wwdz/ch/admin/web/AdminFeedbackController.java
+1
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/BidRecordController.java
.../main/java/com/wwdz/ch/admin/web/BidRecordController.java
+1
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/UgcCoinController.java
...rc/main/java/com/wwdz/ch/admin/web/UgcCoinController.java
+0
-4
ch-core/pom.xml
ch-core/pom.xml
+11
-0
ch-core/src/main/java/com/wwdz/ch/core/type/SimpleResult.java
...ore/src/main/java/com/wwdz/ch/core/type/SimpleResult.java
+5
-0
ch-core/src/main/java/com/wwdz/ch/core/util/JacksonUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/JacksonUtil.java
+14
-0
ch-core/src/main/java/com/wwdz/ch/core/util/TimeUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/TimeUtil.java
+20
-0
ch-core/src/main/java/com/wwdz/ch/core/util/ZincUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/ZincUtil.java
+2
-1
ch-dao/mybatis-generator/generatorConfig.xml
ch-dao/mybatis-generator/generatorConfig.xml
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsCollectMapper.java
...ao/src/main/java/com/wwdz/ch/db/dao/DtsCollectMapper.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsFeedbackMapper.java
...o/src/main/java/com/wwdz/ch/db/dao/DtsFeedbackMapper.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsFootprintMapper.java
.../src/main/java/com/wwdz/ch/db/dao/DtsFootprintMapper.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.java
.../main/java/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsUserMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsUserMapper.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsCollect.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsCollect.java
+12
-12
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsCollectExample.java
...rc/main/java/com/wwdz/ch/db/domain/DtsCollectExample.java
+30
-30
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFeedback.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFeedback.java
+13
-13
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFeedbackExample.java
...c/main/java/com/wwdz/ch/db/domain/DtsFeedbackExample.java
+46
-80
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFootprint.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFootprint.java
+12
-12
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFootprintExample.java
.../main/java/com/wwdz/ch/db/domain/DtsFootprintExample.java
+30
-30
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsSearchHistory.java
...src/main/java/com/wwdz/ch/db/domain/DtsSearchHistory.java
+8
-8
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsSearchHistoryExample.java
...n/java/com/wwdz/ch/db/domain/DtsSearchHistoryExample.java
+20
-20
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsUser.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsUser.java
+8
-8
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsUserExample.java
...o/src/main/java/com/wwdz/ch/db/domain/DtsUserExample.java
+20
-20
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsCollectService.java
...c/main/java/com/wwdz/ch/db/service/DtsCollectService.java
+7
-7
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFeedbackService.java
.../main/java/com/wwdz/ch/db/service/DtsFeedbackService.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFootprintService.java
...main/java/com/wwdz/ch/db/service/DtsFootprintService.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsSearchHistoryService.java
.../java/com/wwdz/ch/db/service/DtsSearchHistoryService.java
+3
-3
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsUserService.java
.../src/main/java/com/wwdz/ch/db/service/DtsUserService.java
+3
-51
ch-dao/src/main/java/com/wwdz/ch/db/service/UgcCoinService.java
.../src/main/java/com/wwdz/ch/db/service/UgcCoinService.java
+13
-3
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsCollectMapper.xml
...rc/main/resources/com/wwdz/ch/db/dao/DtsCollectMapper.xml
+28
-28
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsFeedbackMapper.xml
...c/main/resources/com/wwdz/ch/db/dao/DtsFeedbackMapper.xml
+32
-72
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsFootprintMapper.xml
.../main/resources/com/wwdz/ch/db/dao/DtsFootprintMapper.xml
+28
-28
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.xml
...n/resources/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.xml
+22
-22
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsUserMapper.xml
...o/src/main/resources/com/wwdz/ch/db/dao/DtsUserMapper.xml
+22
-22
ch-wx-api/pom.xml
ch-wx-api/pom.xml
+12
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/annotation/support/LoginUserHandlerMethodArgumentResolver.java
...ation/support/LoginUserHandlerMethodArgumentResolver.java
+9
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/FastJson2JsonRedisSerializer.java
...a/com/wwdz/ch/wx/config/FastJson2JsonRedisSerializer.java
+60
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/RedisConfig.java
...-api/src/main/java/com/wwdz/ch/wx/config/RedisConfig.java
+38
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/SwaggerConfig.java
...pi/src/main/java/com/wwdz/ch/wx/config/SwaggerConfig.java
+53
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WxWebMvcConfiguration.java
...ain/java/com/wwdz/ch/wx/config/WxWebMvcConfiguration.java
+5
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UgcCoinVo.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UgcCoinVo.java
+162
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserInfo.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserInfo.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserToken.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserToken.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/WxLoginInfo.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/WxLoginInfo.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/UserInfoService.java
...src/main/java/com/wwdz/ch/wx/service/UserInfoService.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/UserTokenManager.java
...rc/main/java/com/wwdz/ch/wx/service/UserTokenManager.java
+49
-23
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
+572
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/UgcCoinController.java
...i/src/main/java/com/wwdz/ch/wx/web/UgcCoinController.java
+106
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxAuthController.java
...pi/src/main/java/com/wwdz/ch/wx/web/WxAuthController.java
+11
-8
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxCollectController.java
...src/main/java/com/wwdz/ch/wx/web/WxCollectController.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFeedbackController.java
...rc/main/java/com/wwdz/ch/wx/web/WxFeedbackController.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
...c/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
...i/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
+7
-5
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxHomeController.java
...pi/src/main/java/com/wwdz/ch/wx/web/WxHomeController.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxSearchController.java
.../src/main/java/com/wwdz/ch/wx/web/WxSearchController.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxStorageController.java
...src/main/java/com/wwdz/ch/wx/web/WxStorageController.java
+83
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
...pi/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
+89
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserFormId.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserFormId.java
+1
-1
ch-wx-api/src/main/resources/application.yml
ch-wx-api/src/main/resources/application.yml
+18
-2
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/AdminFeedbackController.java
View file @
a06674d3
...
...
@@ -41,7 +41,7 @@ public class AdminFeedbackController {
@RequiresPermissions
(
"admin:feedback:list"
)
@RequiresPermissionsDesc
(
menu
=
{
"用户管理"
,
"意见反馈"
},
button
=
"查询"
)
@GetMapping
(
"/list"
)
public
Object
list
(
Integer
userId
,
String
username
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
public
Object
list
(
Long
userId
,
String
username
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
@Sort
@RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/BidRecordController.java
View file @
a06674d3
...
...
@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
@Api
public
class
BidRecordController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Category
Controller
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BidRecord
Controller
.
class
);
@Autowired
private
BidRecordService
bidRecordService
;
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/web/UgcCoinController.java
deleted
100644 → 0
View file @
155bd764
package
com.wwdz.ch.admin.web
;
public
class
UgcCoinController
{
}
ch-core/pom.xml
View file @
a06674d3
...
...
@@ -94,6 +94,17 @@
<artifactId>
commons-email
</artifactId>
<version>
1.5
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-pool2
</artifactId>
<version>
2.0
</version>
</dependency>
</dependencies>
</project>
ch-core/src/main/java/com/wwdz/ch/core/type/SimpleResult.java
View file @
a06674d3
...
...
@@ -10,6 +10,11 @@ public class SimpleResult<T> extends BaseResult{
this
.
data
=
data
;
}
public
SimpleResult
(
String
msg
,
T
data
)
{
this
.
data
=
data
;
this
.
msg
=
msg
;
}
public
T
getData
()
{
return
data
;
}
...
...
ch-core/src/main/java/com/wwdz/ch/core/util/JacksonUtil.java
View file @
a06674d3
...
...
@@ -52,6 +52,20 @@ public class JacksonUtil {
return
null
;
}
public
static
Long
parseLong
(
String
body
,
String
field
)
{
ObjectMapper
mapper
=
new
ObjectMapper
();
JsonNode
node
=
null
;
try
{
node
=
mapper
.
readTree
(
body
);
JsonNode
leaf
=
node
.
get
(
field
);
if
(
leaf
!=
null
)
return
leaf
.
asLong
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
static
List
<
Integer
>
parseIntegerList
(
String
body
,
String
field
)
{
ObjectMapper
mapper
=
new
ObjectMapper
();
JsonNode
node
=
null
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/util/TimeUtil.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.core.util
;
import
java.time.Instant
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
public
final
class
TimeUtil
{
public
static
Long
localDateTimeToTimestamp
(
LocalDateTime
localDateTime
)
{
ZoneId
zone
=
ZoneId
.
systemDefault
();
Instant
instant
=
localDateTime
.
atZone
(
zone
).
toInstant
();
return
instant
.
toEpochMilli
();
}
public
static
LocalDateTime
timestampToLocalDateTime
(
long
timestamp
)
{
Instant
instant
=
Instant
.
ofEpochMilli
(
timestamp
);
ZoneId
zone
=
ZoneId
.
systemDefault
();
return
LocalDateTime
.
ofInstant
(
instant
,
zone
);
}
}
ch-core/src/main/java/com/wwdz/ch/core/util/ZincUtil.java
View file @
a06674d3
...
...
@@ -16,8 +16,9 @@ import java.util.*;
public
class
ZincUtil
{
private
static
final
String
BASE_URL
=
"http://172.16.48.14:4080/"
;
//
private static final String BASE_URL = "http://172.16.48.14:4080/";
private
static
final
String
BASE_URL
=
"https://zinc.wanwudezhi.com/"
;
private
static
final
String
USER_NAME
=
"wwdz"
;
private
static
final
String
PASSWD
=
"zhuangdian123"
;
...
...
ch-dao/mybatis-generator/generatorConfig.xml
View file @
a06674d3
...
...
@@ -56,7 +56,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.dao"
targetProject=
"src/main/java"
/>
<!--表名-->
<table
tableName=
"
ugc_coin
"
>
<table
tableName=
"
dts_feedback
"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<!-- <table tableName="book">-->
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsCollectMapper.java
View file @
a06674d3
...
...
@@ -28,7 +28,7 @@ public interface DtsCollectMapper {
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -88,7 +88,7 @@ public interface DtsCollectMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsCollect
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
DtsCollect
.
Column
...
selective
);
DtsCollect
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
DtsCollect
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -96,7 +96,7 @@ public interface DtsCollectMapper {
*
* @mbg.generated
*/
DtsCollect
selectByPrimaryKey
(
Integer
id
);
DtsCollect
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -105,7 +105,7 @@ public interface DtsCollectMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsCollect
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
DtsCollect
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -155,5 +155,5 @@ public interface DtsCollectMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Integer
id
);
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsFeedbackMapper.java
View file @
a06674d3
...
...
@@ -28,7 +28,7 @@ public interface DtsFeedbackMapper {
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -88,7 +88,7 @@ public interface DtsFeedbackMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsFeedback
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
DtsFeedback
.
Column
...
selective
);
DtsFeedback
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
DtsFeedback
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -96,7 +96,7 @@ public interface DtsFeedbackMapper {
*
* @mbg.generated
*/
DtsFeedback
selectByPrimaryKey
(
Integer
id
);
DtsFeedback
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -105,7 +105,7 @@ public interface DtsFeedbackMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsFeedback
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
DtsFeedback
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -155,5 +155,5 @@ public interface DtsFeedbackMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Integer
id
);
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsFootprintMapper.java
View file @
a06674d3
...
...
@@ -28,7 +28,7 @@ public interface DtsFootprintMapper {
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -88,7 +88,7 @@ public interface DtsFootprintMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsFootprint
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
DtsFootprint
.
Column
...
selective
);
DtsFootprint
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
DtsFootprint
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -96,7 +96,7 @@ public interface DtsFootprintMapper {
*
* @mbg.generated
*/
DtsFootprint
selectByPrimaryKey
(
Integer
id
);
DtsFootprint
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -105,7 +105,7 @@ public interface DtsFootprintMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsFootprint
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
DtsFootprint
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -155,5 +155,5 @@ public interface DtsFootprintMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Integer
id
);
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.java
View file @
a06674d3
...
...
@@ -28,7 +28,7 @@ public interface DtsSearchHistoryMapper {
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -88,7 +88,7 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsSearchHistory
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
DtsSearchHistory
.
Column
...
selective
);
DtsSearchHistory
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
DtsSearchHistory
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -96,7 +96,7 @@ public interface DtsSearchHistoryMapper {
*
* @mbg.generated
*/
DtsSearchHistory
selectByPrimaryKey
(
Integer
id
);
DtsSearchHistory
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -105,7 +105,7 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsSearchHistory
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
DtsSearchHistory
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -155,5 +155,5 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Integer
id
);
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/DtsUserMapper.java
View file @
a06674d3
...
...
@@ -28,7 +28,7 @@ public interface DtsUserMapper {
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -88,7 +88,7 @@ public interface DtsUserMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsUser
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
DtsUser
.
Column
...
selective
);
DtsUser
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
DtsUser
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -96,7 +96,7 @@ public interface DtsUserMapper {
*
* @mbg.generated
*/
DtsUser
selectByPrimaryKey
(
Integer
id
);
DtsUser
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -105,7 +105,7 @@ public interface DtsUserMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DtsUser
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
DtsUser
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
/**
* This method was generated by MyBatis Generator.
...
...
@@ -155,5 +155,5 @@ public interface DtsUserMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Integer
id
);
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsCollect.java
View file @
a06674d3
...
...
@@ -30,7 +30,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
private
Integer
id
;
private
Long
id
;
/**
*
...
...
@@ -39,7 +39,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
private
Integer
userId
;
private
Long
userId
;
/**
*
...
...
@@ -48,7 +48,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
private
Integer
valueId
;
private
Long
valueId
;
/**
*
...
...
@@ -94,7 +94,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
Integer
getId
()
{
public
Long
getId
()
{
return
id
;
}
...
...
@@ -106,7 +106,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
...
...
@@ -118,7 +118,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
...
...
@@ -130,7 +130,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
@@ -142,7 +142,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
Integer
getValueId
()
{
public
Long
getValueId
()
{
return
valueId
;
}
...
...
@@ -154,7 +154,7 @@ public class DtsCollect {
*
* @mbg.generated
*/
public
void
setValueId
(
Integer
valueId
)
{
public
void
setValueId
(
Long
valueId
)
{
this
.
valueId
=
valueId
;
}
...
...
@@ -343,9 +343,9 @@ public class DtsCollect {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"
INTEGER
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
INTEGER
"
,
false
),
valueId
(
"value_id"
,
"valueId"
,
"
INTEGER
"
,
false
),
id
(
"id"
,
"id"
,
"
BIGINT
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
BIGINT
"
,
false
),
valueId
(
"value_id"
,
"valueId"
,
"
BIGINT
"
,
false
),
type
(
"type"
,
"type"
,
"TINYINT"
,
true
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsCollectExample.java
View file @
a06674d3
...
...
@@ -248,7 +248,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -265,7 +265,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -282,7 +282,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -299,7 +299,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -316,7 +316,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -333,7 +333,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -350,22 +350,22 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -380,7 +380,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -397,7 +397,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -414,7 +414,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -431,7 +431,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -448,7 +448,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Integer
value
)
{
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -465,7 +465,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -482,22 +482,22 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -512,7 +512,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdEqualTo
(
Integer
value
)
{
public
Criteria
andValueIdEqualTo
(
Long
value
)
{
addCriterion
(
"value_id ="
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -529,7 +529,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andValueIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"value_id <>"
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -546,7 +546,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdGreaterThan
(
Integer
value
)
{
public
Criteria
andValueIdGreaterThan
(
Long
value
)
{
addCriterion
(
"value_id >"
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -563,7 +563,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andValueIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"value_id >="
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -580,7 +580,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdLessThan
(
Integer
value
)
{
public
Criteria
andValueIdLessThan
(
Long
value
)
{
addCriterion
(
"value_id <"
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -597,7 +597,7 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andValueIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"value_id <="
,
value
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -614,22 +614,22 @@ public class DtsCollectExample {
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andValueIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"value_id in"
,
values
,
"valueId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andValueIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"value_id not in"
,
values
,
"valueId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andValueIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"value_id between"
,
value1
,
value2
,
"valueId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValueIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andValueIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"value_id not between"
,
value1
,
value2
,
"valueId"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFeedback.java
View file @
a06674d3
...
...
@@ -30,7 +30,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
private
Integer
id
;
private
Long
id
;
/**
*
...
...
@@ -39,7 +39,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
private
Integer
userId
;
private
Long
userId
;
/**
*
...
...
@@ -102,7 +102,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
private
String
[]
picUrls
;
private
String
picUrls
;
/**
*
...
...
@@ -139,7 +139,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
Integer
getId
()
{
public
Long
getId
()
{
return
id
;
}
...
...
@@ -151,7 +151,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
...
...
@@ -163,7 +163,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
...
...
@@ -175,7 +175,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
@@ -331,7 +331,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
String
[]
getPicUrls
()
{
public
String
getPicUrls
()
{
return
picUrls
;
}
...
...
@@ -343,7 +343,7 @@ public class DtsFeedback {
*
* @mbg.generated
*/
public
void
setPicUrls
(
String
[]
picUrls
)
{
public
void
setPicUrls
(
String
picUrls
)
{
this
.
picUrls
=
picUrls
;
}
...
...
@@ -473,7 +473,7 @@ public class DtsFeedback {
&&
(
this
.
getContent
()
==
null
?
other
.
getContent
()
==
null
:
this
.
getContent
().
equals
(
other
.
getContent
()))
&&
(
this
.
getStatus
()
==
null
?
other
.
getStatus
()
==
null
:
this
.
getStatus
().
equals
(
other
.
getStatus
()))
&&
(
this
.
getHasPicture
()
==
null
?
other
.
getHasPicture
()
==
null
:
this
.
getHasPicture
().
equals
(
other
.
getHasPicture
()))
&&
(
Arrays
.
equals
(
this
.
getPicUrls
(),
other
.
getPicUrls
()))
&&
(
this
.
getPicUrls
()
==
null
?
other
.
getPicUrls
()
==
null
:
this
.
getPicUrls
().
equals
(
other
.
getPicUrls
()))
&&
(
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
()));
...
...
@@ -497,7 +497,7 @@ public class DtsFeedback {
result
=
prime
*
result
+
((
getContent
()
==
null
)
?
0
:
getContent
().
hashCode
());
result
=
prime
*
result
+
((
getStatus
()
==
null
)
?
0
:
getStatus
().
hashCode
());
result
=
prime
*
result
+
((
getHasPicture
()
==
null
)
?
0
:
getHasPicture
().
hashCode
());
result
=
prime
*
result
+
(
Arrays
.
hashCode
(
getPicUrls
()
));
result
=
prime
*
result
+
(
(
getPicUrls
()
==
null
)
?
0
:
getPicUrls
().
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
());
...
...
@@ -523,8 +523,8 @@ public class DtsFeedback {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"
INTEGER
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
INTEGER
"
,
false
),
id
(
"id"
,
"id"
,
"
BIGINT
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
BIGINT
"
,
false
),
username
(
"username"
,
"username"
,
"VARCHAR"
,
false
),
mobile
(
"mobile"
,
"mobile"
,
"VARCHAR"
,
false
),
feedType
(
"feed_type"
,
"feedType"
,
"VARCHAR"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFeedbackExample.java
View file @
a06674d3
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsFootprint.java
View file @
a06674d3
...
...
@@ -30,7 +30,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
private
Integer
id
;
private
Long
id
;
/**
*
...
...
@@ -39,7 +39,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
private
Integer
userId
;
private
Long
userId
;
/**
*
...
...
@@ -48,7 +48,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
private
Integer
goodsId
;
private
Long
goodsId
;
/**
*
...
...
@@ -85,7 +85,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
Integer
getId
()
{
public
Long
getId
()
{
return
id
;
}
...
...
@@ -97,7 +97,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
...
...
@@ -109,7 +109,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
...
...
@@ -121,7 +121,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
@@ -133,7 +133,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
Integer
getGoodsId
()
{
public
Long
getGoodsId
()
{
return
goodsId
;
}
...
...
@@ -145,7 +145,7 @@ public class DtsFootprint {
*
* @mbg.generated
*/
public
void
setGoodsId
(
Integer
goodsId
)
{
public
void
setGoodsId
(
Long
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
...
...
@@ -307,9 +307,9 @@ public class DtsFootprint {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"
INTEGER
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
INTEGER
"
,
false
),
goodsId
(
"goods_id"
,
"goodsId"
,
"
INTEGER
"
,
false
),
id
(
"id"
,
"id"
,
"
BIGINT
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
BIGINT
"
,
false
),
goodsId
(
"goods_id"
,
"goodsId"
,
"
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/DtsFootprintExample.java
View file @
a06674d3
...
...
@@ -248,7 +248,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -265,7 +265,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -282,7 +282,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -299,7 +299,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -316,7 +316,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -333,7 +333,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -350,22 +350,22 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -380,7 +380,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -397,7 +397,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -414,7 +414,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -431,7 +431,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -448,7 +448,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Integer
value
)
{
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -465,7 +465,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -482,22 +482,22 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -512,7 +512,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdEqualTo
(
Integer
value
)
{
public
Criteria
andGoodsIdEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id ="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -529,7 +529,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andGoodsIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id <>"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -546,7 +546,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdGreaterThan
(
Integer
value
)
{
public
Criteria
andGoodsIdGreaterThan
(
Long
value
)
{
addCriterion
(
"goods_id >"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -563,7 +563,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andGoodsIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id >="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -580,7 +580,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdLessThan
(
Integer
value
)
{
public
Criteria
andGoodsIdLessThan
(
Long
value
)
{
addCriterion
(
"goods_id <"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -597,7 +597,7 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andGoodsIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id <="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -614,22 +614,22 @@ public class DtsFootprintExample {
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andGoodsIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"goods_id in"
,
values
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andGoodsIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"goods_id not in"
,
values
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andGoodsIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"goods_id between"
,
value1
,
value2
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andGoodsIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"goods_id not between"
,
value1
,
value2
,
"goodsId"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsSearchHistory.java
View file @
a06674d3
...
...
@@ -30,7 +30,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
private
Integer
id
;
private
Long
id
;
/**
*
...
...
@@ -39,7 +39,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
private
Integer
userId
;
private
Long
userId
;
/**
*
...
...
@@ -94,7 +94,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
public
Integer
getId
()
{
public
Long
getId
()
{
return
id
;
}
...
...
@@ -106,7 +106,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
...
...
@@ -118,7 +118,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
...
...
@@ -130,7 +130,7 @@ public class DtsSearchHistory {
*
* @mbg.generated
*/
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
@@ -343,8 +343,8 @@ public class DtsSearchHistory {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"
INTEGER
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
INTEGER
"
,
false
),
id
(
"id"
,
"id"
,
"
BIGINT
"
,
false
),
userId
(
"user_id"
,
"userId"
,
"
BIGINT
"
,
false
),
keyword
(
"keyword"
,
"keyword"
,
"VARCHAR"
,
false
),
from
(
"from"
,
"from"
,
"VARCHAR"
,
true
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsSearchHistoryExample.java
View file @
a06674d3
...
...
@@ -248,7 +248,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -265,7 +265,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -282,7 +282,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -299,7 +299,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -316,7 +316,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -333,7 +333,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -350,22 +350,22 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -380,7 +380,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -397,7 +397,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -414,7 +414,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -431,7 +431,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -448,7 +448,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Integer
value
)
{
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -465,7 +465,7 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -482,22 +482,22 @@ public class DtsSearchHistoryExample {
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsUser.java
View file @
a06674d3
...
...
@@ -31,7 +31,7 @@ public class DtsUser {
*
* @mbg.generated
*/
private
Integer
id
;
private
Long
id
;
/**
*
...
...
@@ -175,7 +175,7 @@ public class DtsUser {
*
* @mbg.generated
*/
private
Integer
shareUserId
;
private
Long
shareUserId
;
/**
* This method was generated by MyBatis Generator.
...
...
@@ -185,7 +185,7 @@ public class DtsUser {
*
* @mbg.generated
*/
public
Integer
getId
()
{
public
Long
getId
()
{
return
id
;
}
...
...
@@ -197,7 +197,7 @@ public class DtsUser {
*
* @mbg.generated
*/
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
...
...
@@ -569,7 +569,7 @@ public class DtsUser {
*
* @mbg.generated
*/
public
Integer
getShareUserId
()
{
public
Long
getShareUserId
()
{
return
shareUserId
;
}
...
...
@@ -581,7 +581,7 @@ public class DtsUser {
*
* @mbg.generated
*/
public
void
setShareUserId
(
Integer
shareUserId
)
{
public
void
setShareUserId
(
Long
shareUserId
)
{
this
.
shareUserId
=
shareUserId
;
}
...
...
@@ -704,7 +704,7 @@ public class DtsUser {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"
INTEGER
"
,
false
),
id
(
"id"
,
"id"
,
"
BIGINT
"
,
false
),
username
(
"username"
,
"username"
,
"VARCHAR"
,
false
),
password
(
"password"
,
"password"
,
"VARCHAR"
,
true
),
gender
(
"gender"
,
"gender"
,
"TINYINT"
,
false
),
...
...
@@ -720,7 +720,7 @@ public class DtsUser {
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
deleted
(
"deleted"
,
"deleted"
,
"BIT"
,
false
),
shareUserId
(
"share_user_id"
,
"shareUserId"
,
"
INTEGER
"
,
false
);
shareUserId
(
"share_user_id"
,
"shareUserId"
,
"
BIGINT
"
,
false
);
/**
* This field was generated by MyBatis Generator.
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/DtsUserExample.java
View file @
a06674d3
...
...
@@ -249,7 +249,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -266,7 +266,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -283,7 +283,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -300,7 +300,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -317,7 +317,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -334,7 +334,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -351,22 +351,22 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2431,7 +2431,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdEqualTo
(
Integer
value
)
{
public
Criteria
andShareUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"share_user_id ="
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2448,7 +2448,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andShareUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"share_user_id <>"
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2465,7 +2465,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdGreaterThan
(
Integer
value
)
{
public
Criteria
andShareUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"share_user_id >"
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2482,7 +2482,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andShareUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"share_user_id >="
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2499,7 +2499,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdLessThan
(
Integer
value
)
{
public
Criteria
andShareUserIdLessThan
(
Long
value
)
{
addCriterion
(
"share_user_id <"
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2516,7 +2516,7 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andShareUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"share_user_id <="
,
value
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2533,22 +2533,22 @@ public class DtsUserExample {
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andShareUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"share_user_id in"
,
values
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andShareUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"share_user_id not in"
,
values
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andShareUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"share_user_id between"
,
value1
,
value2
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareUserIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andShareUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"share_user_id not between"
,
value1
,
value2
,
"shareUserId"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsCollectService.java
View file @
a06674d3
...
...
@@ -17,13 +17,13 @@ public class DtsCollectService {
@Resource
private
DtsCollectMapper
collectMapper
;
public
int
count
(
int
uid
,
Integer
gid
)
{
public
int
count
(
Long
uid
,
Long
gid
)
{
DtsCollectExample
example
=
new
DtsCollectExample
();
example
.
or
().
andUserIdEqualTo
(
uid
).
andValueIdEqualTo
(
gid
).
andDeletedEqualTo
(
false
);
return
(
int
)
collectMapper
.
countByExample
(
example
);
}
public
List
<
DtsCollect
>
queryByType
(
Integer
userId
,
Byte
type
,
Integer
page
,
Integer
size
)
{
public
List
<
DtsCollect
>
queryByType
(
Long
userId
,
Byte
type
,
Integer
page
,
Integer
size
)
{
DtsCollectExample
example
=
new
DtsCollectExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andTypeEqualTo
(
type
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
DtsCollect
.
Column
.
addTime
.
desc
());
...
...
@@ -31,19 +31,19 @@ public class DtsCollectService {
return
collectMapper
.
selectByExample
(
example
);
}
public
int
countByType
(
Integer
userId
,
Byte
type
)
{
public
int
countByType
(
Long
userId
,
Byte
type
)
{
DtsCollectExample
example
=
new
DtsCollectExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andTypeEqualTo
(
type
).
andDeletedEqualTo
(
false
);
return
(
int
)
collectMapper
.
countByExample
(
example
);
}
public
DtsCollect
queryByTypeAndValue
(
Integer
userId
,
Byte
type
,
Integer
valueId
)
{
public
DtsCollect
queryByTypeAndValue
(
Long
userId
,
Byte
type
,
Long
valueId
)
{
DtsCollectExample
example
=
new
DtsCollectExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andValueIdEqualTo
(
valueId
).
andTypeEqualTo
(
type
).
andDeletedEqualTo
(
false
);
return
collectMapper
.
selectOneByExample
(
example
);
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Long
id
)
{
collectMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
...
...
@@ -59,10 +59,10 @@ public class DtsCollectService {
DtsCollectExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
userId
))
{
criteria
.
andUserIdEqualTo
(
Integer
.
valueOf
(
userId
));
criteria
.
andUserIdEqualTo
(
Long
.
valueOf
(
userId
));
}
if
(!
StringUtils
.
isEmpty
(
valueId
))
{
criteria
.
andValueIdEqualTo
(
Integer
.
valueOf
(
valueId
));
criteria
.
andValueIdEqualTo
(
Long
.
valueOf
(
valueId
));
}
criteria
.
andDeletedEqualTo
(
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFeedbackService.java
View file @
a06674d3
...
...
@@ -27,7 +27,7 @@ public class DtsFeedbackService {
return
feedbackMapper
.
insertSelective
(
feedback
);
}
public
List
<
DtsFeedback
>
querySelective
(
Integer
userId
,
String
username
,
Integer
page
,
Integer
limit
,
String
sort
,
public
List
<
DtsFeedback
>
querySelective
(
Long
userId
,
String
username
,
Integer
page
,
Integer
limit
,
String
sort
,
String
order
)
{
DtsFeedbackExample
example
=
new
DtsFeedbackExample
();
DtsFeedbackExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsFootprintService.java
View file @
a06674d3
...
...
@@ -17,7 +17,7 @@ public class DtsFootprintService {
@Resource
private
DtsFootprintMapper
footprintMapper
;
public
List
<
DtsFootprint
>
queryByAddTime
(
Integer
userId
,
Integer
page
,
Integer
size
)
{
public
List
<
DtsFootprint
>
queryByAddTime
(
Long
userId
,
Integer
page
,
Integer
size
)
{
DtsFootprintExample
example
=
new
DtsFootprintExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
DtsFootprint
.
Column
.
addTime
.
desc
());
...
...
@@ -25,11 +25,11 @@ public class DtsFootprintService {
return
footprintMapper
.
selectByExample
(
example
);
}
public
DtsFootprint
findById
(
Integer
id
)
{
public
DtsFootprint
findById
(
Long
id
)
{
return
footprintMapper
.
selectByPrimaryKey
(
id
);
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Long
id
)
{
footprintMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
...
...
@@ -45,10 +45,10 @@ public class DtsFootprintService {
DtsFootprintExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
userId
))
{
criteria
.
andUserIdEqualTo
(
Integer
.
valueOf
(
userId
));
criteria
.
andUserIdEqualTo
(
Long
.
valueOf
(
userId
));
}
if
(!
StringUtils
.
isEmpty
(
goodsId
))
{
criteria
.
andGoodsIdEqualTo
(
Integer
.
valueOf
(
goodsId
));
criteria
.
andGoodsIdEqualTo
(
Long
.
valueOf
(
goodsId
));
}
criteria
.
andDeletedEqualTo
(
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsSearchHistoryService.java
View file @
a06674d3
...
...
@@ -23,14 +23,14 @@ public class DtsSearchHistoryService {
searchHistoryMapper
.
insertSelective
(
searchHistory
);
}
public
List
<
DtsSearchHistory
>
queryByUid
(
int
uid
)
{
public
List
<
DtsSearchHistory
>
queryByUid
(
Long
uid
)
{
DtsSearchHistoryExample
example
=
new
DtsSearchHistoryExample
();
example
.
or
().
andUserIdEqualTo
(
uid
).
andDeletedEqualTo
(
false
);
example
.
setDistinct
(
true
);
return
searchHistoryMapper
.
selectByExampleSelective
(
example
,
DtsSearchHistory
.
Column
.
keyword
);
}
public
void
deleteByUid
(
int
uid
)
{
public
void
deleteByUid
(
Long
uid
)
{
DtsSearchHistoryExample
example
=
new
DtsSearchHistoryExample
();
example
.
or
().
andUserIdEqualTo
(
uid
);
searchHistoryMapper
.
logicalDeleteByExample
(
example
);
...
...
@@ -42,7 +42,7 @@ public class DtsSearchHistoryService {
DtsSearchHistoryExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
userId
))
{
criteria
.
andUserIdEqualTo
(
Integer
.
valueOf
(
userId
));
criteria
.
andUserIdEqualTo
(
Long
.
valueOf
(
userId
));
}
if
(!
StringUtils
.
isEmpty
(
keyword
))
{
criteria
.
andKeywordLike
(
"%"
+
keyword
+
"%"
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/DtsUserService.java
View file @
a06674d3
...
...
@@ -31,11 +31,11 @@ public class DtsUserService {
@Resource
private
StatMapper
statMapper
;
public
DtsUser
findById
(
Integer
userId
)
{
public
DtsUser
findById
(
Long
userId
)
{
return
userMapper
.
selectByPrimaryKey
(
userId
);
}
public
UserVo
findUserVoById
(
Integer
userId
)
{
public
UserVo
findUserVoById
(
Long
userId
)
{
DtsUser
user
=
findById
(
userId
);
UserVo
userVo
=
new
UserVo
();
userVo
.
setNickname
(
user
.
getNickname
());
...
...
@@ -112,59 +112,11 @@ public class DtsUserService {
return
userMapper
.
selectByExample
(
example
);
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Long
id
)
{
userMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
/**
* 审批代理申请
* @param userAccount
*/
public
void
approveAgency
(
Integer
userId
,
Integer
settlementRate
,
String
shareUrl
)
{
//获取账户数据
DtsUserAccountExample
example
=
new
DtsUserAccountExample
();
example
.
or
().
andUserIdEqualTo
(
userId
);
DtsUserAccount
dbAccount
=
userAccountMapper
.
selectOneByExample
(
example
);
if
(
dbAccount
==
null
)
{
throw
new
RuntimeException
(
"申请账户不存在"
);
}
dbAccount
.
setShareUrl
(
shareUrl
);
if
(!
StringUtils
.
isEmpty
(
settlementRate
))
{
dbAccount
.
setSettlementRate
(
settlementRate
);
}
dbAccount
.
setModifyTime
(
LocalDateTime
.
now
());
userAccountMapper
.
updateByPrimaryKey
(
dbAccount
);
//更新会员状态和类型
DtsUser
user
=
findById
(
userId
);
user
.
setUserLevel
((
byte
)
2
);
//区域代理用户
user
.
setStatus
((
byte
)
0
);
//正常状态
updateById
(
user
);
}
public
DtsUserAccount
detailApproveByUserId
(
Integer
userId
)
{
// 获取账户数据
DtsUserAccountExample
example
=
new
DtsUserAccountExample
();
example
.
or
().
andUserIdEqualTo
(
userId
);
DtsUserAccount
dbAccount
=
userAccountMapper
.
selectOneByExample
(
example
);
return
dbAccount
;
}
public
List
<
DtsUser
>
queryDtsUserListByNickname
(
String
username
,
String
mobile
)
{
DtsUserExample
example
=
new
DtsUserExample
();
DtsUserExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
username
))
{
criteria
.
andNicknameLike
(
"%"
+
username
+
"%"
);
}
if
(!
StringUtils
.
isEmpty
(
mobile
))
{
criteria
.
andMobileEqualTo
(
mobile
);
}
criteria
.
andDeletedEqualTo
(
false
);
return
userMapper
.
selectByExample
(
example
);
}
public
List
<
DayStatis
>
recentCount
(
int
statisDaysRang
)
{
return
statMapper
.
statisIncreaseUserCnt
(
statisDaysRang
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/service/UgcCoinService.java
View file @
a06674d3
...
...
@@ -15,19 +15,25 @@ public class UgcCoinService {
@Resource
private
UgcCoinMapper
ugcCoinMapper
;
public
List
<
UgcCoin
>
queryByUserId
(
Long
userId
,
Integer
page
,
Integer
size
)
{
public
List
<
UgcCoin
WithBLOBs
>
queryByUserId
(
Long
userId
,
Integer
page
,
Integer
size
)
{
UgcCoinExample
example
=
new
UgcCoinExample
();
example
.
or
().
andUidEqualTo
(
userId
).
andIsDeletedEqualTo
(
false
);
page
=
null
!=
page
?
page
:
1
;
size
=
null
!=
size
?
size
:
10
;
PageHelper
.
startPage
(
page
,
size
);
return
ugcCoinMapper
.
selectByExample
(
example
);
return
ugcCoinMapper
.
selectByExampleWithBLOBs
(
example
);
}
public
Long
countByUserId
(
Long
userId
)
{
UgcCoinExample
example
=
new
UgcCoinExample
();
example
.
or
().
andUidEqualTo
(
userId
).
andIsDeletedEqualTo
(
false
);
return
ugcCoinMapper
.
countByExample
(
example
);
}
public
void
add
(
UgcCoinWithBLOBs
coin
)
{
coin
.
setCreated
(
LocalDateTime
.
now
());
coin
.
setUpdated
(
LocalDateTime
.
now
());
ugcCoinMapper
.
insert
Selective
(
coin
);
ugcCoinMapper
.
insert
(
coin
);
}
public
int
updateById
(
UgcCoinWithBLOBs
coin
)
{
...
...
@@ -38,4 +44,8 @@ public class UgcCoinService {
public
void
deleteById
(
Long
id
)
{
ugcCoinMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
public
UgcCoinWithBLOBs
getById
(
Long
id
)
{
return
ugcCoinMapper
.
selectByPrimaryKey
(
id
);
}
}
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsCollectMapper.xml
View file @
a06674d3
...
...
@@ -6,9 +6,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"
INTEGER
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
INTEGER
"
property=
"userId"
/>
<result
column=
"value_id"
jdbcType=
"
INTEGER
"
property=
"valueId"
/>
<id
column=
"id"
jdbcType=
"
BIGINT
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
BIGINT
"
property=
"userId"
/>
<result
column=
"value_id"
jdbcType=
"
BIGINT
"
property=
"valueId"
/>
<result
column=
"type"
jdbcType=
"TINYINT"
property=
"type"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
...
...
@@ -133,7 +133,7 @@
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Integer
"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
...
...
@@ -141,7 +141,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_collect
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<select
id=
"selectByPrimaryKeyWithLogicalDelete"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -156,7 +156,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_collect
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
and deleted =
<choose>
<when
test=
"andLogicalDeleted"
>
...
...
@@ -185,15 +185,15 @@
</otherwise>
</choose>
from dts_collect
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dts_collect
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsCollectExample"
>
<!--
...
...
@@ -210,13 +210,13 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_collect (user_id, value_id, `type`,
add_time, update_time, deleted
)
values (#{userId,jdbcType=
INTEGER}, #{valueId,jdbcType=INTEGER
}, #{type,jdbcType=TINYINT},
values (#{userId,jdbcType=
BIGINT}, #{valueId,jdbcType=BIGINT
}, #{type,jdbcType=TINYINT},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
)
</insert>
...
...
@@ -225,7 +225,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_collect
...
...
@@ -251,10 +251,10 @@
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=
INTEGER
},
#{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"valueId != null"
>
#{valueId,jdbcType=
INTEGER
},
#{valueId,jdbcType=
BIGINT
},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=TINYINT},
...
...
@@ -288,13 +288,13 @@
update dts_collect
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=
INTEGER
},
id = #{record.id,jdbcType=
BIGINT
},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.valueId != null"
>
value_id = #{record.valueId,jdbcType=
INTEGER
},
value_id = #{record.valueId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=TINYINT},
...
...
@@ -319,9 +319,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_collect
set id = #{record.id,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
INTEGER
},
value_id = #{record.valueId,jdbcType=
INTEGER
},
set id = #{record.id,jdbcType=
BIGINT
},
user_id = #{record.userId,jdbcType=
BIGINT
},
value_id = #{record.valueId,jdbcType=
BIGINT
},
`type` = #{record.type,jdbcType=TINYINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
...
...
@@ -338,10 +338,10 @@
update dts_collect
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=
INTEGER
},
user_id = #{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"valueId != null"
>
value_id = #{valueId,jdbcType=
INTEGER
},
value_id = #{valueId,jdbcType=
BIGINT
},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=TINYINT},
...
...
@@ -356,7 +356,7 @@
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.DtsCollect"
>
<!--
...
...
@@ -364,13 +364,13 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_collect
set user_id = #{userId,jdbcType=
INTEGER
},
value_id = #{valueId,jdbcType=
INTEGER
},
set user_id = #{userId,jdbcType=
BIGINT
},
value_id = #{valueId,jdbcType=
BIGINT
},
`type` = #{type,jdbcType=TINYINT},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsCollectExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -426,13 +426,13 @@
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update dts_collect set deleted = 1
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsFeedbackMapper.xml
View file @
a06674d3
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsFootprintMapper.xml
View file @
a06674d3
...
...
@@ -6,9 +6,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"
INTEGER
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
INTEGER
"
property=
"userId"
/>
<result
column=
"goods_id"
jdbcType=
"
INTEGER
"
property=
"goodsId"
/>
<id
column=
"id"
jdbcType=
"
BIGINT
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
BIGINT
"
property=
"userId"
/>
<result
column=
"goods_id"
jdbcType=
"
BIGINT
"
property=
"goodsId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"deleted"
jdbcType=
"BIT"
property=
"deleted"
/>
...
...
@@ -132,7 +132,7 @@
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Integer
"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
...
...
@@ -140,7 +140,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_footprint
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<select
id=
"selectByPrimaryKeyWithLogicalDelete"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -155,7 +155,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_footprint
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
and deleted =
<choose>
<when
test=
"andLogicalDeleted"
>
...
...
@@ -184,15 +184,15 @@
</otherwise>
</choose>
from dts_footprint
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dts_footprint
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsFootprintExample"
>
<!--
...
...
@@ -209,12 +209,12 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_footprint (user_id, goods_id, add_time,
update_time, deleted)
values (#{userId,jdbcType=
INTEGER}, #{goodsId,jdbcType=INTEGER
}, #{addTime,jdbcType=TIMESTAMP},
values (#{userId,jdbcType=
BIGINT}, #{goodsId,jdbcType=BIGINT
}, #{addTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.DtsFootprint"
>
...
...
@@ -222,7 +222,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_footprint
...
...
@@ -245,10 +245,10 @@
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=
INTEGER
},
#{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"goodsId != null"
>
#{goodsId,jdbcType=
INTEGER
},
#{goodsId,jdbcType=
BIGINT
},
</if>
<if
test=
"addTime != null"
>
#{addTime,jdbcType=TIMESTAMP},
...
...
@@ -279,13 +279,13 @@
update dts_footprint
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=
INTEGER
},
id = #{record.id,jdbcType=
BIGINT
},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.goodsId != null"
>
goods_id = #{record.goodsId,jdbcType=
INTEGER
},
goods_id = #{record.goodsId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.addTime != null"
>
add_time = #{record.addTime,jdbcType=TIMESTAMP},
...
...
@@ -307,9 +307,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_footprint
set id = #{record.id,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
INTEGER
},
goods_id = #{record.goodsId,jdbcType=
INTEGER
},
set id = #{record.id,jdbcType=
BIGINT
},
user_id = #{record.userId,jdbcType=
BIGINT
},
goods_id = #{record.goodsId,jdbcType=
BIGINT
},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}
...
...
@@ -325,10 +325,10 @@
update dts_footprint
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=
INTEGER
},
user_id = #{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"goodsId != null"
>
goods_id = #{goodsId,jdbcType=
INTEGER
},
goods_id = #{goodsId,jdbcType=
BIGINT
},
</if>
<if
test=
"addTime != null"
>
add_time = #{addTime,jdbcType=TIMESTAMP},
...
...
@@ -340,7 +340,7 @@
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.DtsFootprint"
>
<!--
...
...
@@ -348,12 +348,12 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_footprint
set user_id = #{userId,jdbcType=
INTEGER
},
goods_id = #{goodsId,jdbcType=
INTEGER
},
set user_id = #{userId,jdbcType=
BIGINT
},
goods_id = #{goodsId,jdbcType=
BIGINT
},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsFootprintExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -409,13 +409,13 @@
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update dts_footprint set deleted = 1
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsSearchHistoryMapper.xml
View file @
a06674d3
...
...
@@ -6,8 +6,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"
INTEGER
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
INTEGER
"
property=
"userId"
/>
<id
column=
"id"
jdbcType=
"
BIGINT
"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"
BIGINT
"
property=
"userId"
/>
<result
column=
"keyword"
jdbcType=
"VARCHAR"
property=
"keyword"
/>
<result
column=
"from"
jdbcType=
"VARCHAR"
property=
"from"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
...
...
@@ -133,7 +133,7 @@
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Integer
"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
...
...
@@ -141,7 +141,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_search_history
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<select
id=
"selectByPrimaryKeyWithLogicalDelete"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -156,7 +156,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_search_history
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
and deleted =
<choose>
<when
test=
"andLogicalDeleted"
>
...
...
@@ -185,15 +185,15 @@
</otherwise>
</choose>
from dts_search_history
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dts_search_history
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsSearchHistoryExample"
>
<!--
...
...
@@ -210,13 +210,13 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_search_history (user_id, keyword, `from`,
add_time, update_time, deleted
)
values (#{userId,jdbcType=
INTEGER
}, #{keyword,jdbcType=VARCHAR}, #{from,jdbcType=VARCHAR},
values (#{userId,jdbcType=
BIGINT
}, #{keyword,jdbcType=VARCHAR}, #{from,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
)
</insert>
...
...
@@ -225,7 +225,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_search_history
...
...
@@ -251,7 +251,7 @@
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=
INTEGER
},
#{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"keyword != null"
>
#{keyword,jdbcType=VARCHAR},
...
...
@@ -288,10 +288,10 @@
update dts_search_history
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=
INTEGER
},
id = #{record.id,jdbcType=
BIGINT
},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.keyword != null"
>
keyword = #{record.keyword,jdbcType=VARCHAR},
...
...
@@ -319,8 +319,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_search_history
set id = #{record.id,jdbcType=
INTEGER
},
user_id = #{record.userId,jdbcType=
INTEGER
},
set id = #{record.id,jdbcType=
BIGINT
},
user_id = #{record.userId,jdbcType=
BIGINT
},
keyword = #{record.keyword,jdbcType=VARCHAR},
`from` = #{record.from,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
...
...
@@ -338,7 +338,7 @@
update dts_search_history
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=
INTEGER
},
user_id = #{userId,jdbcType=
BIGINT
},
</if>
<if
test=
"keyword != null"
>
keyword = #{keyword,jdbcType=VARCHAR},
...
...
@@ -356,7 +356,7 @@
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.DtsSearchHistory"
>
<!--
...
...
@@ -364,13 +364,13 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_search_history
set user_id = #{userId,jdbcType=
INTEGER
},
set user_id = #{userId,jdbcType=
BIGINT
},
keyword = #{keyword,jdbcType=VARCHAR},
`from` = #{from,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsSearchHistoryExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -426,13 +426,13 @@
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update dts_search_history set deleted = 1
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/dao/DtsUserMapper.xml
View file @
a06674d3
...
...
@@ -6,7 +6,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"
INTEGER
"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"
BIGINT
"
property=
"id"
/>
<result
column=
"username"
jdbcType=
"VARCHAR"
property=
"username"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"gender"
jdbcType=
"TINYINT"
property=
"gender"
/>
...
...
@@ -22,7 +22,7 @@
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"deleted"
jdbcType=
"BIT"
property=
"deleted"
/>
<result
column=
"share_user_id"
jdbcType=
"
INTEGER
"
property=
"shareUserId"
/>
<result
column=
"share_user_id"
jdbcType=
"
BIGINT
"
property=
"shareUserId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -147,7 +147,7 @@
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Integer
"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
...
...
@@ -155,7 +155,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_user
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<select
id=
"selectByPrimaryKeyWithLogicalDelete"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -170,7 +170,7 @@
select
<include
refid=
"Base_Column_List"
/>
from dts_user
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
and deleted =
<choose>
<when
test=
"andLogicalDeleted"
>
...
...
@@ -201,15 +201,15 @@
</otherwise>
</choose>
from dts_user
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dts_user
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsUserExample"
>
<!--
...
...
@@ -226,7 +226,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_user (username, `password`, gender,
...
...
@@ -240,14 +240,14 @@
#{userLevel,jdbcType=TINYINT}, #{nickname,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{avatar,jdbcType=VARCHAR}, #{weixinOpenid,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{shareUserId,jdbcType=
INTEGER
})
#{shareUserId,jdbcType=
BIGINT
})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.DtsUser"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Integer
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dts_user
...
...
@@ -348,7 +348,7 @@
#{deleted,jdbcType=BIT},
</if>
<if
test=
"shareUserId != null"
>
#{shareUserId,jdbcType=
INTEGER
},
#{shareUserId,jdbcType=
BIGINT
},
</if>
</trim>
</insert>
...
...
@@ -370,7 +370,7 @@
update dts_user
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=
INTEGER
},
id = #{record.id,jdbcType=
BIGINT
},
</if>
<if
test=
"record.username != null"
>
username = #{record.username,jdbcType=VARCHAR},
...
...
@@ -418,7 +418,7 @@
deleted = #{record.deleted,jdbcType=BIT},
</if>
<if
test=
"record.shareUserId != null"
>
share_user_id = #{record.shareUserId,jdbcType=
INTEGER
},
share_user_id = #{record.shareUserId,jdbcType=
BIGINT
},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -431,7 +431,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dts_user
set id = #{record.id,jdbcType=
INTEGER
},
set id = #{record.id,jdbcType=
BIGINT
},
username = #{record.username,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR},
gender = #{record.gender,jdbcType=TINYINT},
...
...
@@ -447,7 +447,7 @@
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT},
share_user_id = #{record.shareUserId,jdbcType=
INTEGER
}
share_user_id = #{record.shareUserId,jdbcType=
BIGINT
}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -505,10 +505,10 @@
deleted = #{deleted,jdbcType=BIT},
</if>
<if
test=
"shareUserId != null"
>
share_user_id = #{shareUserId,jdbcType=
INTEGER
},
share_user_id = #{shareUserId,jdbcType=
BIGINT
},
</if>
</set>
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.DtsUser"
>
<!--
...
...
@@ -531,8 +531,8 @@
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT},
share_user_id = #{shareUserId,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
INTEGER
}
share_user_id = #{shareUserId,jdbcType=
BIGINT
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.DtsUserExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -590,13 +590,13 @@
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update dts_user set deleted = 1
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
</mapper>
\ No newline at end of file
ch-wx-api/pom.xml
View file @
a06674d3
...
...
@@ -54,6 +54,18 @@
<artifactId>
weixin-java-miniapp
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
2.9.2
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.9.2
</version>
</dependency>
</dependencies>
<build>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/annotation/support/LoginUserHandlerMethodArgumentResolver.java
View file @
a06674d3
package
com.wwdz.ch.wx.annotation.support
;
import
com.wwdz.ch.wx.service.UserTokenManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.support.WebDataBinderFactory
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.method.support.ModelAndViewContainer
;
import
com.wwdz.ch.wx.annotation.LoginUser
;
import
com.wwdz.ch.wx.service.UserTokenManager
;
@Component
public
class
LoginUserHandlerMethodArgumentResolver
implements
HandlerMethodArgumentResolver
{
public
static
final
String
LOGIN_TOKEN_KEY
=
"X-Dts-Token"
;
@Autowired
private
UserTokenManager
userTokenManager
;
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
return
parameter
.
getParameterType
().
isAssignableFrom
(
Integer
.
class
)
return
parameter
.
getParameterType
().
isAssignableFrom
(
Long
.
class
)
&&
parameter
.
hasParameterAnnotation
(
LoginUser
.
class
);
}
...
...
@@ -28,6 +34,6 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu
return
null
;
}
return
U
serTokenManager
.
getUserId
(
token
);
return
u
serTokenManager
.
getUserId
(
token
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/FastJson2JsonRedisSerializer.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.config
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.fasterxml.jackson.databind.JavaType
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.type.TypeFactory
;
import
org.springframework.data.redis.serializer.RedisSerializer
;
import
org.springframework.data.redis.serializer.SerializationException
;
import
com.alibaba.fastjson.parser.ParserConfig
;
import
org.springframework.util.Assert
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
/**
* FastJson2JsonRedisSerializer
* Redis使用FastJson序列化
* by zhengkai.blog.csdn.net
*/
public
class
FastJson2JsonRedisSerializer
<
T
>
implements
RedisSerializer
<
T
>
{
private
ObjectMapper
objectMapper
=
new
ObjectMapper
();
public
static
final
Charset
DEFAULT_CHARSET
=
Charset
.
forName
(
"UTF-8"
);
private
Class
<
T
>
clazz
;
static
{
ParserConfig
.
getGlobalInstance
().
setAutoTypeSupport
(
true
);
//如果遇到反序列化autoType is not support错误,请添加并修改一下包名到bean文件路径
// ParserConfig.getGlobalInstance().addAccept("com.xxxxx.xxx");
}
public
FastJson2JsonRedisSerializer
(
Class
<
T
>
clazz
)
{
super
();
this
.
clazz
=
clazz
;
}
public
byte
[]
serialize
(
T
t
)
throws
SerializationException
{
if
(
t
==
null
)
{
return
new
byte
[
0
];
}
return
JSON
.
toJSONString
(
t
,
SerializerFeature
.
WriteClassName
).
getBytes
(
DEFAULT_CHARSET
);
}
public
T
deserialize
(
byte
[]
bytes
)
throws
SerializationException
{
if
(
bytes
==
null
||
bytes
.
length
<=
0
)
{
return
null
;
}
String
str
=
new
String
(
bytes
,
DEFAULT_CHARSET
);
return
JSON
.
parseObject
(
str
,
clazz
);
}
public
void
setObjectMapper
(
ObjectMapper
objectMapper
)
{
Assert
.
notNull
(
objectMapper
,
"'objectMapper' must not be null"
);
this
.
objectMapper
=
objectMapper
;
}
protected
JavaType
getJavaType
(
Class
<?>
clazz
)
{
return
TypeFactory
.
defaultInstance
().
constructType
(
clazz
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/RedisConfig.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.config
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.springframework.cache.annotation.CachingConfigurerSupport
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
@Configuration
@EnableCaching
public
class
RedisConfig
extends
CachingConfigurerSupport
{
@Bean
@SuppressWarnings
(
value
=
{
"unchecked"
,
"rawtypes"
})
public
RedisTemplate
<
Object
,
Object
>
redisTemplate
(
RedisConnectionFactory
connectionFactory
)
{
RedisTemplate
<
Object
,
Object
>
template
=
new
RedisTemplate
<>();
template
.
setConnectionFactory
(
connectionFactory
);
FastJson2JsonRedisSerializer
serializer
=
new
FastJson2JsonRedisSerializer
(
Object
.
class
);
ObjectMapper
mapper
=
new
ObjectMapper
();
mapper
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
mapper
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
serializer
.
setObjectMapper
(
mapper
);
template
.
setValueSerializer
(
serializer
);
// 使用StringRedisSerializer来序列化和反序列化redis的key值
template
.
setKeySerializer
(
new
StringRedisSerializer
());
template
.
afterPropertiesSet
();
return
template
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/SwaggerConfig.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.Environment
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.ArrayList
;
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
@Bean
public
Docket
docket
(
Environment
environment
)
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
//指定包名 basePackage
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.wwdz.ch.wx.web"
))
//再次过滤(根据接口过滤)
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
//contact 维护接口人信息
Contact
contact
=
new
Contact
(
"xiaoyao"
,
""
,
""
);
return
new
ApiInfo
(
//标题
"泉库小程序接口文档"
,
//描述
"增加注释,实时更新,在线测试"
,
//版本
"v1.0"
,
//服务条款网址
"urn:tos"
,
//维护人信息
contact
,
//许可
"Apache 2.0"
,
//许可链接
"http://www.apache.org/licenses/LICENSE-2.0"
,
new
ArrayList
());
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WxWebMvcConfiguration.java
View file @
a06674d3
...
...
@@ -3,14 +3,18 @@ package com.wwdz.ch.wx.config;
import
java.util.List
;
import
com.wwdz.ch.wx.annotation.support.LoginUserHandlerMethodArgumentResolver
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@Configuration
public
class
WxWebMvcConfiguration
implements
WebMvcConfigurer
{
@Autowired
private
LoginUserHandlerMethodArgumentResolver
loginUserHandlerMethodArgumentResolver
;
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
argumentResolvers
.
add
(
new
LoginUserHandlerMethodArgumentResolver
()
);
argumentResolvers
.
add
(
loginUserHandlerMethodArgumentResolver
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UgcCoinVo.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.dao
;
import
com.google.common.collect.Lists
;
import
com.qiniu.util.StringUtils
;
import
com.wwdz.ch.core.util.TimeUtil
;
import
com.wwdz.ch.db.domain.BidRecord
;
import
com.wwdz.ch.db.domain.UgcCoin
;
import
com.wwdz.ch.db.domain.UgcCoinWithBLOBs
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.sql.Time
;
import
java.time.LocalDateTime
;
import
java.util.Arrays
;
import
java.util.List
;
@ApiModel
(
value
=
"UgcCoinVo"
,
description
=
"用户钱币前端交互VO"
)
public
class
UgcCoinVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7621695618641670201L
;
@ApiModelProperty
(
value
=
"钱币id"
,
name
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"uid"
)
private
Long
uid
;
@ApiModelProperty
(
value
=
"钱币名称"
,
name
=
"name"
)
private
String
name
;
@ApiModelProperty
(
value
=
"标签"
,
name
=
"tags"
)
private
List
<
String
>
tags
;
@ApiModelProperty
(
value
=
"价格"
,
name
=
"price"
)
private
Long
price
;
@ApiModelProperty
(
value
=
"购买时间"
,
name
=
"bidTime"
)
private
Long
bidTime
;
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"created"
)
private
Long
created
;
@ApiModelProperty
(
value
=
"更新时间"
,
name
=
"updated"
)
private
Long
updated
;
@ApiModelProperty
(
value
=
"图片"
,
name
=
"images"
)
private
List
<
String
>
images
;
@ApiModelProperty
(
value
=
"详情"
,
name
=
"detail"
)
private
String
detail
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getUid
()
{
return
uid
;
}
public
void
setUid
(
Long
uid
)
{
this
.
uid
=
uid
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
List
<
String
>
getTags
()
{
return
tags
;
}
public
void
setTags
(
List
<
String
>
tags
)
{
this
.
tags
=
tags
;
}
public
Long
getPrice
()
{
return
price
;
}
public
void
setPrice
(
Long
price
)
{
this
.
price
=
price
;
}
public
Long
getBidTime
()
{
return
bidTime
;
}
public
void
setBidTime
(
Long
bidTime
)
{
this
.
bidTime
=
bidTime
;
}
public
Long
getCreated
()
{
return
created
;
}
public
void
setCreated
(
Long
created
)
{
this
.
created
=
created
;
}
public
Long
getUpdated
()
{
return
updated
;
}
public
void
setUpdated
(
Long
updated
)
{
this
.
updated
=
updated
;
}
public
List
<
String
>
getImages
()
{
return
images
;
}
public
void
setImages
(
List
<
String
>
images
)
{
this
.
images
=
images
;
}
public
String
getDetail
()
{
return
detail
;
}
public
void
setDetail
(
String
detail
)
{
this
.
detail
=
detail
;
}
public
UgcCoinVo
()
{}
public
UgcCoinVo
(
UgcCoinWithBLOBs
coin
)
{
this
.
id
=
coin
.
getId
();
this
.
bidTime
=
TimeUtil
.
localDateTimeToTimestamp
(
coin
.
getBidTime
());
this
.
created
=
TimeUtil
.
localDateTimeToTimestamp
(
coin
.
getCreated
());
this
.
updated
=
TimeUtil
.
localDateTimeToTimestamp
(
coin
.
getUpdated
());
this
.
detail
=
coin
.
getDetail
();
this
.
images
=
Arrays
.
asList
(
coin
.
getImages
().
split
(
";"
));
this
.
price
=
coin
.
getPrice
();
this
.
name
=
coin
.
getName
();
this
.
tags
=
Arrays
.
asList
(
coin
.
getTags
().
split
(
"|"
));
}
public
UgcCoinWithBLOBs
toDO
()
{
UgcCoinWithBLOBs
finalCoin
=
new
UgcCoinWithBLOBs
();
finalCoin
.
setId
(
this
.
id
);
finalCoin
.
setDetail
(
this
.
detail
);
finalCoin
.
setBidTime
(
TimeUtil
.
timestampToLocalDateTime
(
this
.
bidTime
));
finalCoin
.
setImages
(
StringUtils
.
join
(
this
.
images
,
";"
));
finalCoin
.
setTags
(
StringUtils
.
join
(
this
.
tags
,
"|"
));
finalCoin
.
setPrice
(
this
.
price
);
finalCoin
.
setUid
(
this
.
uid
);
finalCoin
.
setName
(
this
.
name
);
finalCoin
.
setExtra
(
""
);
return
finalCoin
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserInfo.java
View file @
a06674d3
...
...
@@ -12,7 +12,7 @@ public class UserInfo implements Serializable {
private
static
final
long
serialVersionUID
=
-
5813029516433359765L
;
private
Integer
userId
;
private
Long
userId
;
private
String
nickName
;
private
String
avatarUrl
;
private
String
country
;
...
...
@@ -83,11 +83,11 @@ public class UserInfo implements Serializable {
this
.
avatarUrl
=
avatarUrl
;
}
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/UserToken.java
View file @
a06674d3
...
...
@@ -3,7 +3,7 @@ package com.wwdz.ch.wx.dao;
import
java.time.LocalDateTime
;
public
class
UserToken
{
private
Integer
userId
;
private
Long
userId
;
private
String
token
;
private
String
sessionKey
;
private
LocalDateTime
expireTime
;
...
...
@@ -17,11 +17,11 @@ public class UserToken {
this
.
sessionKey
=
sessionKey
;
}
public
Integer
getUserId
()
{
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/dao/WxLoginInfo.java
View file @
a06674d3
...
...
@@ -8,7 +8,7 @@ public class WxLoginInfo implements Serializable {
private
String
code
;
private
UserInfo
userInfo
;
private
Integer
shareUserId
;
private
Long
shareUserId
;
public
String
getCode
()
{
return
code
;
...
...
@@ -26,11 +26,11 @@ public class WxLoginInfo implements Serializable {
this
.
userInfo
=
userInfo
;
}
public
Integer
getShareUserId
()
{
public
Long
getShareUserId
()
{
return
shareUserId
;
}
public
void
setShareUserId
(
Integer
shareUserId
)
{
public
void
setShareUserId
(
Long
shareUserId
)
{
this
.
shareUserId
=
shareUserId
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/UserInfoService.java
View file @
a06674d3
...
...
@@ -13,7 +13,7 @@ public class UserInfoService {
@Autowired
private
DtsUserService
userService
;
public
UserInfo
getInfo
(
Integer
userId
)
{
public
UserInfo
getInfo
(
Long
userId
)
{
DtsUser
user
=
userService
.
findById
(
userId
);
Assert
.
state
(
user
!=
null
,
"用户不存在"
);
UserInfo
userInfo
=
new
UserInfo
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/UserTokenManager.java
View file @
a06674d3
package
com.wwdz.ch.wx.service
;
import
com.google.gson.Gson
;
import
com.wwdz.ch.core.util.CharUtil
;
import
com.wwdz.ch.wx.dao.UserToken
;
import
com.wwdz.ch.wx.util.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.wwdz.ch.core.util.CharUtil
;
import
com.wwdz.ch.wx.dao.UserToken
;
/**
* 维护用户token
*/
@Component
public
class
UserTokenManager
{
@Autowired
private
RedisUtil
redisUtil
;
private
Gson
gson
=
new
Gson
();
private
static
final
String
TOKEN_PREFIX
=
"token_prefix:"
;
private
static
final
String
TOKEN_ID_PREFIX
=
"token_id_prefix:"
;
private
static
Map
<
String
,
UserToken
>
tokenMap
=
new
HashMap
<>();
private
static
Map
<
Integer
,
UserToken
>
idMap
=
new
HashMap
<>();
private
static
Map
<
Long
,
UserToken
>
idMap
=
new
HashMap
<>();
public
static
Integer
getUserId
(
String
token
)
{
UserToken
userToken
=
tokenMap
.
get
(
token
);
if
(
userToken
==
null
)
{
public
Long
getUserId
(
String
token
)
{
String
key
=
TOKEN_PREFIX
+
token
;
Object
tokenObj
=
redisUtil
.
get
(
key
);
if
(
null
==
tokenObj
)
{
return
null
;
}
UserToken
userToken
=
gson
.
fromJson
(
tokenObj
.
toString
(),
UserToken
.
class
);
if
(
userToken
.
getExpireTime
().
isBefore
(
LocalDateTime
.
now
()))
{
tokenMap
.
remove
(
token
);
idMap
.
remove
(
userToken
.
getUserId
());
redisUtil
.
del
(
key
);
String
idKey
=
TOKEN_ID_PREFIX
+
userToken
.
getUserId
();
redisUtil
.
del
(
idKey
);
return
null
;
}
return
userToken
.
getUserId
();
}
public
static
UserToken
generateToken
(
Integer
id
)
{
public
UserToken
generateToken
(
Long
id
)
{
UserToken
userToken
=
null
;
// userToken = idMap.get(id);
...
...
@@ -39,8 +56,10 @@ public class UserTokenManager {
// }
String
token
=
CharUtil
.
getRandomString
(
32
);
while
(
tokenMap
.
containsKey
(
token
))
{
String
key
=
TOKEN_PREFIX
+
token
;
while
(
null
!=
redisUtil
.
get
(
key
))
{
token
=
CharUtil
.
getRandomString
(
32
);
key
=
TOKEN_PREFIX
+
token
;
}
LocalDateTime
update
=
LocalDateTime
.
now
();
...
...
@@ -51,18 +70,20 @@ public class UserTokenManager {
userToken
.
setUpdateTime
(
update
);
userToken
.
setExpireTime
(
expire
);
userToken
.
setUserId
(
id
);
tokenMap
.
put
(
token
,
userToken
);
idMap
.
put
(
id
,
userToken
);
String
data
=
gson
.
toJson
(
userToken
);
redisUtil
.
set
(
key
,
data
);
String
idKey
=
TOKEN_ID_PREFIX
+
id
;
redisUtil
.
set
(
idKey
,
data
);
return
userToken
;
}
public
static
String
getSessionKey
(
Integer
userId
)
{
UserToken
userToken
=
idMap
.
get
(
userId
);
if
(
userToken
==
null
)
{
public
String
getSessionKey
(
Long
userId
)
{
String
idKey
=
TOKEN_ID_PREFIX
+
userId
;
Object
data
=
redisUtil
.
get
(
idKey
);
if
(
null
==
data
)
{
return
null
;
}
UserToken
userToken
=
gson
.
fromJson
(
data
.
toString
(),
UserToken
.
class
);
if
(
userToken
.
getExpireTime
().
isBefore
(
LocalDateTime
.
now
()))
{
tokenMap
.
remove
(
userToken
.
getToken
());
idMap
.
remove
(
userId
);
...
...
@@ -72,10 +93,15 @@ public class UserTokenManager {
return
userToken
.
getSessionKey
();
}
public
static
void
removeToken
(
Integer
userId
)
{
UserToken
userToken
=
idMap
.
get
(
userId
);
String
token
=
userToken
.
getToken
();
idMap
.
remove
(
userId
);
tokenMap
.
remove
(
token
);
public
void
removeToken
(
Long
userId
)
{
String
idKey
=
TOKEN_ID_PREFIX
+
userId
;
Object
data
=
redisUtil
.
get
(
idKey
);
if
(
null
!=
data
)
{
UserToken
userToken
=
gson
.
fromJson
(
data
.
toString
(),
UserToken
.
class
);
String
token
=
userToken
.
getToken
();
String
key
=
TOKEN_PREFIX
+
token
;
redisUtil
.
del
(
key
);
redisUtil
.
del
(
idKey
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
0 → 100644
View file @
a06674d3
This diff is collapsed.
Click to expand it.
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/UgcCoinController.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.web
;
import
com.alibaba.druid.support.json.JSONUtils
;
import
com.mysql.jdbc.StringUtils
;
import
com.wwdz.ch.core.type.ListResult
;
import
com.wwdz.ch.core.type.SimpleResult
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.ResponseUtil
;
import
com.wwdz.ch.db.domain.*
;
import
com.wwdz.ch.db.service.BidRecordService
;
import
com.wwdz.ch.db.service.UgcCoinService
;
import
com.wwdz.ch.wx.annotation.LoginUser
;
import
com.wwdz.ch.wx.dao.UgcCoinVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotNull
;
import
java.time.LocalDateTime
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
"/wx/ugc_coin"
)
@Validated
@Api
public
class
UgcCoinController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UgcCoinController
.
class
);
@Autowired
private
UgcCoinService
ugcCoinService
;
// @RequiresPermissions("admin:category:list")
// @RequiresPermissionsDesc(menu = { "商场管理", "成交记录管理" }, button = "查询")
@GetMapping
(
"/list"
)
@ApiOperation
(
value
=
"钱币列表"
)
public
ListResult
<
UgcCoinVo
>
list
(
@LoginUser
Long
userId
,
@ApiParam
(
"page"
)
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@ApiParam
(
"size"
)
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
)
{
List
<
UgcCoinWithBLOBs
>
coins
=
ugcCoinService
.
queryByUserId
(
userId
,
page
,
size
);
List
<
UgcCoinVo
>
data
=
coins
.
parallelStream
().
map
(
a
->
new
UgcCoinVo
(
a
)).
collect
(
Collectors
.
toList
());
Long
total
=
ugcCoinService
.
countByUserId
(
userId
);
return
new
ListResult
<>(
data
,
total
.
intValue
());
}
/**
* 商品详情
* <p>
* 用户可以不登录。 如果用户登录,则记录用户足迹以及返回用户收藏信息。
*
* @param userId
* 用户ID
* @param id
* 商品ID
* @return 商品详情
*/
@SuppressWarnings
(
"rawtypes"
)
@GetMapping
(
"detail"
)
@ApiOperation
(
value
=
"钱币详情"
)
public
SimpleResult
<
UgcCoinVo
>
detail
(
@LoginUser
Long
userId
,
@NotNull
Long
id
)
{
logger
.
info
(
"【请求开始】钱币详情,请求参数,userId:{},id:{}"
,
userId
,
id
);
// 商品信息
UgcCoinWithBLOBs
rawCoin
=
ugcCoinService
.
getById
(
id
);
if
(
null
==
rawCoin
)
{
return
new
SimpleResult
<>(
"钱币不存在"
,
null
);
}
return
new
SimpleResult
<>(
new
UgcCoinVo
(
rawCoin
));
}
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"添加钱币"
)
public
SimpleResult
<
Boolean
>
add
(
@LoginUser
Long
userId
,
@ApiParam
(
"钱币数据"
)
@RequestBody
UgcCoinVo
coin
)
{
coin
.
setUid
(
userId
);
UgcCoinWithBLOBs
cb
=
coin
.
toDO
();
cb
.
setIsDeleted
(
false
);
ugcCoinService
.
add
(
cb
);
return
new
SimpleResult
<>(
true
);
}
@PostMapping
(
"/update"
)
@ApiOperation
(
value
=
"更新钱币"
)
public
SimpleResult
<
Boolean
>
update
(
@LoginUser
Long
userId
,
@ApiParam
(
"钱币数据"
)
@RequestBody
UgcCoinVo
coin
)
{
coin
.
setUid
(
userId
);
UgcCoinWithBLOBs
cb
=
coin
.
toDO
();
cb
.
setIsDeleted
(
false
);
ugcCoinService
.
updateById
(
cb
);
return
new
SimpleResult
<>(
true
);
}
@GetMapping
(
"/delete"
)
@ApiOperation
(
value
=
"删除钱币"
)
public
SimpleResult
<
Boolean
>
delete
(
@ApiParam
(
"钱币ID"
)
@NotNull
Long
id
)
{
ugcCoinService
.
deleteById
(
id
);
return
new
SimpleResult
<>(
true
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxAuthController.java
View file @
a06674d3
...
...
@@ -64,6 +64,9 @@ public class WxAuthController {
@Autowired
private
NotifyService
notifyService
;
@Autowired
private
UserTokenManager
userTokenManager
;
/**
* 账号登录
...
...
@@ -122,7 +125,7 @@ public class WxAuthController {
// token
UserToken
userToken
=
null
;
try
{
userToken
=
U
serTokenManager
.
generateToken
(
user
.
getId
());
userToken
=
u
serTokenManager
.
generateToken
(
user
.
getId
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"账户登录失败,生成token失败:{}"
,
user
.
getId
());
e
.
printStackTrace
();
...
...
@@ -157,7 +160,7 @@ public class WxAuthController {
return
ResponseUtil
.
badArgument
();
}
Integer
shareUserId
=
wxLoginInfo
.
getShareUserId
();
Long
shareUserId
=
wxLoginInfo
.
getShareUserId
();
String
sessionKey
=
null
;
String
openId
=
null
;
try
{
...
...
@@ -202,7 +205,7 @@ public class WxAuthController {
// token
UserToken
userToken
=
null
;
try
{
userToken
=
U
serTokenManager
.
generateToken
(
user
.
getId
());
userToken
=
u
serTokenManager
.
generateToken
(
user
.
getId
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"微信登录失败,生成token失败:{}"
,
user
.
getId
());
e
.
printStackTrace
();
...
...
@@ -369,7 +372,7 @@ public class WxAuthController {
// token
UserToken
userToken
=
null
;
try
{
userToken
=
U
serTokenManager
.
generateToken
(
user
.
getId
());
userToken
=
u
serTokenManager
.
generateToken
(
user
.
getId
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"账号注册失败,生成token失败:{}"
,
user
.
getId
());
e
.
printStackTrace
();
...
...
@@ -448,10 +451,10 @@ public class WxAuthController {
* @return
*/
@PostMapping
(
"bindPhone"
)
public
Object
bindPhone
(
@LoginUser
Integer
userId
,
@RequestBody
String
body
)
{
public
Object
bindPhone
(
@LoginUser
Long
userId
,
@RequestBody
String
body
)
{
logger
.
info
(
"【请求开始】绑定手机号码,请求参数,body:{}"
,
body
);
String
sessionKey
=
U
serTokenManager
.
getSessionKey
(
userId
);
String
sessionKey
=
u
serTokenManager
.
getSessionKey
(
userId
);
String
encryptedData
=
JacksonUtil
.
parseString
(
body
,
"encryptedData"
);
String
iv
=
JacksonUtil
.
parseString
(
body
,
"iv"
);
WxMaPhoneNumberInfo
phoneNumberInfo
=
null
;
...
...
@@ -483,13 +486,13 @@ public class WxAuthController {
* @return
*/
@PostMapping
(
"logout"
)
public
Object
logout
(
@LoginUser
Integer
userId
)
{
public
Object
logout
(
@LoginUser
Long
userId
)
{
logger
.
info
(
"【请求开始】注销登录,请求参数,userId:{}"
,
userId
);
if
(
userId
==
null
)
{
return
ResponseUtil
.
unlogin
();
}
try
{
U
serTokenManager
.
removeToken
(
userId
);
u
serTokenManager
.
removeToken
(
userId
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"注销登录出错:userId:{}"
,
userId
);
e
.
printStackTrace
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxCollectController.java
View file @
a06674d3
...
...
@@ -57,7 +57,7 @@ public class WxCollectController {
* @return 用户收藏列表
*/
@GetMapping
(
"list"
)
public
Object
list
(
@LoginUser
Integer
userId
,
@NotNull
Byte
type
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
public
Object
list
(
@LoginUser
Long
userId
,
@NotNull
Byte
type
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
)
{
logger
.
info
(
"【请求开始】用户收藏列表查询,请求参数,userId:{}"
,
userId
);
if
(
userId
==
null
)
{
...
...
@@ -104,7 +104,7 @@ public class WxCollectController {
* @return 操作结果
*/
@PostMapping
(
"addordelete"
)
public
Object
addordelete
(
@LoginUser
Integer
userId
,
@RequestBody
String
body
)
{
public
Object
addordelete
(
@LoginUser
Long
userId
,
@RequestBody
String
body
)
{
logger
.
info
(
"【请求开始】用户收藏添加或删除,请求参数,userId:{},body:{}"
,
userId
,
body
);
if
(
userId
==
null
)
{
...
...
@@ -113,7 +113,7 @@ public class WxCollectController {
}
Byte
type
=
JacksonUtil
.
parseByte
(
body
,
"type"
);
Integer
valueId
=
JacksonUtil
.
parseInteger
(
body
,
"valueId"
);
Long
valueId
=
JacksonUtil
.
parseLong
(
body
,
"valueId"
);
if
(!
ObjectUtils
.
allNotNull
(
type
,
valueId
))
{
return
ResponseUtil
.
badArgument
();
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFeedbackController.java
View file @
a06674d3
...
...
@@ -50,7 +50,7 @@ public class WxFeedbackController {
Boolean
hasPicture
=
feedback
.
getHasPicture
();
if
(
hasPicture
==
null
||
!
hasPicture
)
{
feedback
.
setPicUrls
(
new
String
[
0
]
);
feedback
.
setPicUrls
(
""
);
}
// 测试手机号码是否正确
...
...
@@ -74,7 +74,7 @@ public class WxFeedbackController {
* @return 操作结果
*/
@PostMapping
(
"submit"
)
public
Object
submit
(
@LoginUser
Integer
userId
,
@RequestBody
DtsFeedback
feedback
)
{
public
Object
submit
(
@LoginUser
Long
userId
,
@RequestBody
DtsFeedback
feedback
)
{
logger
.
info
(
"【请求开始】添加意见反馈,请求参数,userId:{},size:{}"
,
userId
,
JSONObject
.
toJSONString
(
feedback
));
if
(
userId
==
null
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFootprintController.java
View file @
a06674d3
...
...
@@ -51,7 +51,7 @@ public class WxFootprintController {
* @return 删除操作结果
*/
@PostMapping
(
"delete"
)
public
Object
delete
(
@LoginUser
Integer
userId
,
@RequestBody
String
body
)
{
public
Object
delete
(
@LoginUser
Long
userId
,
@RequestBody
String
body
)
{
logger
.
info
(
"【请求开始】删除用户足迹,请求参数,userId:{},body:{}"
,
userId
,
body
);
if
(
userId
==
null
)
{
...
...
@@ -62,7 +62,7 @@ public class WxFootprintController {
return
ResponseUtil
.
badArgument
();
}
Integer
footprintId
=
JacksonUtil
.
parseInteger
(
body
,
"id"
);
Long
footprintId
=
JacksonUtil
.
parseLong
(
body
,
"id"
);
if
(
footprintId
==
null
)
{
return
ResponseUtil
.
badArgument
();
}
...
...
@@ -91,7 +91,7 @@ public class WxFootprintController {
* @return 用户足迹列表
*/
@GetMapping
(
"list"
)
public
Object
list
(
@LoginUser
Integer
userId
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
public
Object
list
(
@LoginUser
Long
userId
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
)
{
logger
.
info
(
"【请求开始】用户足迹列表查询,请求参数,userId:{}"
,
userId
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxGoodsController.java
View file @
a06674d3
...
...
@@ -74,6 +74,7 @@ public class WxGoodsController {
private
DtsGoodsSpecificationService
goodsSpecificationService
;
private
final
static
ArrayBlockingQueue
<
Runnable
>
WORK_QUEUE
=
new
ArrayBlockingQueue
<>(
9
);
private
final
static
RejectedExecutionHandler
HANDLER
=
new
ThreadPoolExecutor
.
CallerRunsPolicy
();
...
...
@@ -94,17 +95,16 @@ public class WxGoodsController {
*/
@SuppressWarnings
(
"rawtypes"
)
@GetMapping
(
"detail"
)
public
Object
detail
(
@LoginUser
Integer
userId
,
@NotNull
Long
id
)
{
public
Object
detail
(
@LoginUser
Long
userId
,
@NotNull
Long
id
)
{
logger
.
info
(
"【请求开始】商品详情,请求参数,userId:{},id:{}"
,
userId
,
id
);
// 商品信息
Item
item
=
itemService
.
findById
(
id
);
// 用户收藏
int
userHasCollect
=
0
;
if
(
userId
!=
null
)
{
userHasCollect
=
collectService
.
count
(
userId
,
id
.
intValue
()
);
userHasCollect
=
collectService
.
count
(
userId
,
id
);
}
// 记录用户的足迹 异步处理
...
...
@@ -112,7 +112,7 @@ public class WxGoodsController {
executorService
.
execute
(()
->
{
DtsFootprint
footprint
=
new
DtsFootprint
();
footprint
.
setUserId
(
userId
);
footprint
.
setGoodsId
(
id
.
intValue
()
);
footprint
.
setGoodsId
(
id
);
footprintService
.
add
(
footprint
);
short
num
=
1
;
productService
.
addBrowse
(
id
.
intValue
(),
num
);
// 新增商品点击量
...
...
@@ -227,7 +227,7 @@ public class WxGoodsController {
*/
@GetMapping
(
"list"
)
public
Object
list
(
Integer
categoryId
,
String
keyword
,
@LoginUser
Integer
userId
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@LoginUser
Long
userId
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
,
@Sort
(
accepts
=
{
"sort"
,
"bid_time"
,
"price"
,
"name"
})
@RequestParam
(
defaultValue
=
"sort"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"asc"
)
String
order
)
{
...
...
@@ -315,6 +315,8 @@ public class WxGoodsController {
}
public
class
ItemVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
549032631978075796L
;
/**
* 商品ID
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxHomeController.java
View file @
a06674d3
...
...
@@ -77,7 +77,7 @@ public class WxHomeController {
*/
@SuppressWarnings
(
"rawtypes"
)
@GetMapping
(
"/index"
)
public
Object
index
(
@LoginUser
Integer
userId
)
{
public
Object
index
(
@LoginUser
Long
userId
)
{
logger
.
info
(
"【请求开始】访问首页,请求参数,userId:{}"
,
userId
);
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxSearchController.java
View file @
a06674d3
...
...
@@ -51,7 +51,7 @@ public class WxSearchController {
* @return 搜索页面信息
*/
@GetMapping
(
"index"
)
public
Object
index
(
@LoginUser
Integer
userId
)
{
public
Object
index
(
@LoginUser
Long
userId
)
{
logger
.
info
(
"【请求开始】搜索页面信息展示,请求参数,userId:{}"
,
userId
);
// 取出输入框默认的关键词
...
...
@@ -110,7 +110,7 @@ public class WxSearchController {
* @return 清理是否成功
*/
@PostMapping
(
"clearhistory"
)
public
Object
clearhistory
(
@LoginUser
Integer
userId
)
{
public
Object
clearhistory
(
@LoginUser
Long
userId
)
{
logger
.
info
(
"【请求开始】清除用户搜索历史,请求参数,userId:{}"
,
userId
);
if
(
userId
==
null
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxStorageController.java
View file @
a06674d3
package
com.wwdz.ch.wx.web
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -33,6 +38,7 @@ import com.wwdz.ch.db.service.DtsStorageService;
@RestController
@RequestMapping
(
"/wx/storage"
)
@Validated
@Api
public
class
WxStorageController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WxStorageController
.
class
);
...
...
@@ -42,6 +48,8 @@ public class WxStorageController {
@Autowired
private
DtsStorageService
DtsStorageService
;
private
ExecutorService
threadPool
=
Executors
.
newFixedThreadPool
(
20
);
@SuppressWarnings
(
"unused"
)
private
String
generateKey
(
String
originalFilename
)
{
int
index
=
originalFilename
.
lastIndexOf
(
'.'
);
...
...
@@ -66,6 +74,7 @@ public class WxStorageController {
* @throws IOException
*/
@PostMapping
(
"/upload"
)
@ApiOperation
(
"上传文件"
)
public
Object
upload
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
IOException
{
logger
.
info
(
"【请求开始】上传文件,请求参数,file:{}"
,
file
.
getOriginalFilename
());
...
...
@@ -80,6 +89,45 @@ public class WxStorageController {
return
ResponseUtil
.
ok
(
data
);
}
/**
* 批量上传文件
*
* @param files
* @return
* @throws IOException
*/
@PostMapping
(
"/uploadMulti"
)
@ApiOperation
(
"批量上传文件"
)
public
Object
uploadMulti
(
@RequestParam
(
"files"
)
MultipartFile
[]
files
)
throws
IOException
{
logger
.
info
(
"【请求开始】上传文件,请求参数,files:{}"
,
files
.
length
);
CountDownLatch
latch
=
new
CountDownLatch
(
files
.
length
);
Map
<
Integer
,
String
>
resultMap
=
Collections
.
synchronizedMap
(
new
HashMap
<>());
Integer
count
=
0
;
for
(
MultipartFile
file
:
files
)
{
this
.
threadPool
.
submit
(
new
UploadRunnable
(
this
.
storageService
,
file
.
getInputStream
(),
file
.
getSize
(),
file
.
getContentType
(),
file
.
getOriginalFilename
(),
latch
,
resultMap
,
count
));
count
++;
}
try
{
latch
.
wait
(
3000
);
}
catch
(
InterruptedException
e
)
{
logger
.
error
(
"upload images failed, {}"
,
e
);
return
ResponseUtil
.
fail
(
998
,
"批量上传图片失败"
);
}
List
<
String
>
images
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
String
url
=
resultMap
.
get
(
i
);
if
(
null
==
url
)
{
return
ResponseUtil
.
fail
(
998
,
"批量上传图片失败"
);
}
images
.
add
(
url
);
}
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"urls"
,
images
);
logger
.
info
(
"【请求结束】上传文件,响应结果:{}"
,
JSONObject
.
toJSONString
(
data
));
return
ResponseUtil
.
ok
(
data
);
}
/**
* 访问存储对象
*
...
...
@@ -140,4 +188,36 @@ public class WxStorageController {
.
body
(
file
);
}
private
static
class
UploadRunnable
implements
Runnable
{
private
final
String
fileName
;
private
final
InputStream
inputStream
;
private
final
long
contentLength
;
private
final
String
contentType
;
private
CountDownLatch
latch
;
private
StorageService
storageService
;
private
Map
<
Integer
,
String
>
resultMap
;
private
Integer
sort
;
public
UploadRunnable
(
StorageService
storageService
,
InputStream
inputStream
,
long
contentLength
,
String
contentType
,
String
fileName
,
CountDownLatch
latch
,
Map
<
Integer
,
String
>
resultMap
,
Integer
sort
)
{
this
.
storageService
=
storageService
;
this
.
fileName
=
fileName
;
this
.
inputStream
=
inputStream
;
this
.
contentLength
=
contentLength
;
this
.
contentType
=
contentType
;
this
.
latch
=
latch
;
this
.
resultMap
=
resultMap
;
this
.
sort
=
sort
;
}
@Override
public
void
run
()
{
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
0 → 100644
View file @
a06674d3
package
com.wwdz.ch.wx.web
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.wwdz.ch.core.util.ResponseUtil
;
import
com.wwdz.ch.db.domain.DtsUserAccount
;
import
com.wwdz.ch.db.service.DtsAccountService
;
import
com.wwdz.ch.db.service.DtsUserService
;
import
com.wwdz.ch.wx.annotation.LoginUser
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
/**
* 用户服务
*/
@RestController
@RequestMapping
(
"/wx/user"
)
@Validated
public
class
WxUserController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WxUserController
.
class
);
@Autowired
private
DtsAccountService
accountService
;
@Autowired
private
DtsUserService
userService
;
/**
* 用户个人页面数据
* <p>
* @param userId
* 用户ID
* @return 用户个人页面数据
*/
@GetMapping
(
"index"
)
public
Object
list
(
@LoginUser
Long
userId
)
{
logger
.
info
(
"【请求开始】用户个人页面数据,请求参数,userId:{}"
,
userId
);
if
(
userId
==
null
)
{
logger
.
error
(
"用户个人页面数据查询失败:用户未登录!!!"
);
return
ResponseUtil
.
unlogin
();
}
Map
<
Object
,
Object
>
data
=
new
HashMap
<
Object
,
Object
>();
logger
.
info
(
"【请求结束】用户个人页面数据,响应结果:{}"
,
JSONObject
.
toJSONString
(
data
));
return
ResponseUtil
.
ok
(
data
);
}
/**
* 获取用户
* <p>
* @param userId
* 用户ID
* @return 用户个人页面数据
*/
@GetMapping
(
"getSharedUrl"
)
public
Object
getSharedUrl
(
@LoginUser
Integer
userId
)
{
logger
.
info
(
"【请求开始】获取用户推广二维码图片URL,请求参数,userId:{}"
,
userId
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"userSharedUrl"
,
""
);
//默认设置没有
if
(
userId
==
null
)
{
logger
.
error
(
"获取用户推广二维码图片URL:用户未登录!!!"
);
}
else
{
DtsUserAccount
userAccount
=
accountService
.
findShareUserAccountByUserId
(
userId
);
//如果没申请,数据则不存在,存在数据且审批通过则会形成推广二维码
if
(
userAccount
!=
null
&&
StringUtils
.
isNotBlank
(
userAccount
.
getShareUrl
()))
{
data
.
put
(
"userSharedUrl"
,
userAccount
.
getShareUrl
());
}
}
logger
.
info
(
"【请求结束】获取用户推广二维码图片URL,响应结果:{}"
,
JSONObject
.
toJSONString
(
data
));
return
ResponseUtil
.
ok
(
data
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserFormId.java
View file @
a06674d3
...
...
@@ -40,7 +40,7 @@ public class WxUserFormId {
* @return
*/
@GetMapping
(
"create"
)
public
Object
create
(
@LoginUser
Integer
userId
,
@NotNull
String
formId
)
{
public
Object
create
(
@LoginUser
Long
userId
,
@NotNull
String
formId
)
{
logger
.
info
(
"【请求开始】创建微信访问fromID,请求参数,userId:{}"
,
userId
);
if
(
userId
==
null
)
{
...
...
ch-wx-api/src/main/resources/application.yml
View file @
a06674d3
spring
:
profiles
:
active
:
@
profile.active@
active
:
prod
messages
:
encoding
:
UTF-8
servlet
:
...
...
@@ -10,7 +10,7 @@ spring:
location
:
/tmp/tomcat_upload
datasource
:
druid
:
url
:
jdbc:mysql://1
72.16.48.14
:3306/dts-shop?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false
url
:
jdbc:mysql://1
01.37.172.120
:3306/dts-shop?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
zhuangdian123
...
...
@@ -26,6 +26,22 @@ spring:
test-while-idle
:
true
time-between-eviction-runs-millis
:
60000
filters
:
stat,wall
# redis 配置
redis
:
# 地址
host
:
101.37.172.120
# 端口,默认为6379
port
:
6379
# 密码
password
:
zhuangdian123
# 连接超时时间
timeout
:
10s
lettuce
:
pool
:
max-active
:
8
#最大连接数据库连接数,设 0 为没有限制
max-idle
:
8
#最大等待连接中的数量,设 0 为没有限制
max-wait
:
-1ms
#最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle
:
0
#最小等待连接中的数量,设 0 为没有限制
server
:
port
:
8383
...
...
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