Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-oss
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c6a68a2e
authored
Mar 13, 2020
by
wangming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangming' into '105'
初始化 See merge request
!2
2 parents
65f22f20
1430e9be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
13 deletions
src/main/java/com/server/web/controller/SjUserController.java → src/main/java/com/server/web/controller/KzyUserController.java
src/main/resources/mybatis/mapping/queryModel.xml
src/main/resources/servers/105/application.properties
src/main/java/com/server/web/controller/
Sj
UserController.java
→
src/main/java/com/server/web/controller/
Kzy
UserController.java
View file @
c6a68a2
...
...
@@ -13,15 +13,14 @@ import java.util.Map;
* 用户管理
*/
@RestController
@RequestMapping
(
BaseController
.
OSS_NAMESPACE
+
"/
sju
ser"
)
public
class
Sj
UserController
extends
BaseController
{
@RequestMapping
(
BaseController
.
OSS_NAMESPACE
+
"/
kzyU
ser"
)
public
class
Kzy
UserController
extends
BaseController
{
/**
* 用户列表
* @param fullName
* @param nickName
* @param department
* @param duty
* @param phone
* @param pageNo
* @param pageSize
...
...
@@ -29,19 +28,16 @@ public class SjUserController extends BaseController {
*/
@ResponseBody
@RequestMapping
(
path
=
"/list"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
list
(
@RequestParam
(
defaultValue
=
""
)
String
fullName
,
@RequestParam
(
defaultValue
=
""
)
String
nickName
,
@RequestParam
(
defaultValue
=
""
)
String
d
epartment
,
@RequestParam
(
defaultValue
=
""
)
String
phone
public
Map
list
(
@RequestParam
(
defaultValue
=
""
)
String
fullName
,
@RequestParam
(
defaultValue
=
""
)
String
d
uty
,
@RequestParam
(
defaultValue
=
""
)
String
phone
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageSize
)
{
try
{
Map
paramMap
=
new
HashMap
<>();
if
(!(
""
).
equals
(
fullName
)){
paramMap
.
put
(
"fullName"
,
"%"
+
fullName
+
"%"
);
}
if
(!(
""
).
equals
(
nickName
)){
paramMap
.
put
(
"nickName"
,
"%"
+
nickName
+
"%"
);
}
if
(!(
""
).
equals
(
department
)){
paramMap
.
put
(
"department"
,
"%"
+
department
+
"%"
);
if
(!(
""
).
equals
(
duty
)){
paramMap
.
put
(
"duty"
,
"%"
+
duty
+
"%"
);
}
if
(!(
""
).
equals
(
phone
)){
paramMap
.
put
(
"phone"
,
phone
);
...
...
@@ -59,4 +55,31 @@ public class SjUserController extends BaseController {
}
}
/**
* 积分列表
* @param id
* @param pageNo
* @param pageSize
* @return
*/
@ResponseBody
@RequestMapping
(
path
=
"/integralList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
integralList
(
@RequestParam
(
defaultValue
=
""
)
Long
id
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageSize
)
{
try
{
Map
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"id"
,
id
);
PageHelper
.
startPage
(
pageNo
,
pageSize
,
true
,
false
);
List
list
=
openSqlRingsService
.
selectList_Rings
(
"com.mapping.queryModel.queryUserIntegral"
,
paramMap
);
PageInfo
pageInfo
=
new
PageInfo
(
list
);
PageModel
model
=
new
PageModel
();
model
.
setTotal
(
pageInfo
.
getTotal
());
model
.
setList
(
list
);
return
success
(
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
error
(
"0"
,
"系统异常"
,
null
);
}
}
}
src/main/resources/mybatis/mapping/queryModel.xml
View file @
c6a68a2
...
...
@@ -21,6 +21,44 @@
</select>
<select
id=
"queryUser"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.full_name as fullName,
t.phone,
t.duty,
t.integral,
t.user_category as userCategory,
t.head_photo as headPhoto,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_kzy_user t
WHERE
1 = 1
<if
test=
"fullName != null"
>
AND t.full_name LIKE #{fullName}
</if>
<if
test=
"duty != null"
>
AND t.duty LIKE #{duty}
</if>
<if
test=
"phone != null"
>
AND t.phone = #{phone}
</if>
ORDER BY t.create_dt DESC
</select>
<select
id=
"queryUserIntegral"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.integral,
t.source_type as sourceType,
t.remark,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_kzy_user_integral_flowing t
WHERE
t.user_id = #{id,jdbcType=BIGINT}
ORDER BY t.create_dt DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/servers/105/application.properties
View file @
c6a68a2
...
...
@@ -2,7 +2,8 @@ server.port=${port:8081}
server.tomcat.max-
threads
=
1000
spring.application.name
=
kzy-oss
spring.datasource.driverClassName
=
com.mysql.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=true&characterEncoding=utf-8
#spring.datasource.url = jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=true&characterEncoding=utf-8
spring.datasource.url
=
jdbc:mysql://192.168.20.183:3306/kzy_db_test?useUnicode=yes&characterEncoding=utf-8
spring.datasource.username
=
kzy_user
spring.datasource.password
=
Kzy2020#yY
...
...
@@ -22,7 +23,8 @@ mybatis.config-location=classpath:mybatis/mybatis-config.xml
# Redis数据库索引(默认为0)
spring.redis.database
=
0
# Redis服务器地址
spring.redis.host
=
192.168.0.105
spring.redis.host
=
192.168.20.183
#spring.redis.host=39.97.246.118
# Redis服务器连接端口
spring.redis.port
=
6379
# Redis服务器连接密码(默认为空)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment