Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
eac58a08
Commit
eac58a08
authored
Nov 30, 2020
by
zhangc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.ioubuy.cn:yaobenzhang/dm_project
parents
50e9202a
460ae521
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
233 additions
and
28 deletions
+233
-28
CommonConstant.java
.../src/main/java/com/jz/common/Constant/CommonConstant.java
+1
-1
AuditStatusEnum.java
...mon/src/main/java/com/jz/common/Enum/AuditStatusEnum.java
+63
-0
DelFlagEnum.java
...-common/src/main/java/com/jz/common/Enum/DelFlagEnum.java
+58
-0
GoodsDataEnum.java
...ommon/src/main/java/com/jz/common/Enum/GoodsDataEnum.java
+59
-0
TestUserController.java
...va/com/jz/manage/admin/controller/TestUserController.java
+15
-6
TestUserMapper.java
...src/main/java/com/jz/manage/admin/dao/TestUserMapper.java
+1
-1
User.java
...manage/src/main/java/com/jz/manage/admin/entity/User.java
+11
-0
UserService.java
...rc/main/java/com/jz/manage/admin/service/UserService.java
+0
-15
UserServiceImpl.java
...ava/com/jz/manage/admin/service/impl/UserServiceImpl.java
+13
-4
SpringApplicationProvider.java
...com/jz/manage/commonsUtils/SpringApplicationProvider.java
+11
-0
TestUserMapper.xml
...-manage/src/main/resources/mapper/test/TestUserMapper.xml
+1
-1
No files found.
jz-dm-common/src/main/java/com/jz/common/Constant/CommonConstant.java
View file @
eac58a08
...
...
@@ -2,7 +2,7 @@ package com.jz.common.Constant;
/**
* @ClassName: CommonConstant
* @Description:
* @Description:
Bellamy
* @Author
* @Date 2020/11/27
* @Version 1.0
...
...
jz-dm-common/src/main/java/com/jz/common/Enum/AuditStatusEnum.java
0 → 100644
View file @
eac58a08
package
com
.
jz
.
common
.
Enum
;
/**
* 审核状态
*
* @author Bellamy
* @since 2020-11-30 14:30:23
*/
public
enum
AuditStatusEnum
{
/**
* 待审核
*/
DSH
(
"DSH"
,
"01"
),
/**
* 已审核
*/
YSH
(
"YSH"
,
"02"
),
/**
* 未通过
*/
WTG
(
"WTG"
,
"03"
),
;
private
String
code
;
private
String
value
;
AuditStatusEnum
(
String
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
static
AuditStatusEnum
get
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
AuditStatusEnum
status
:
values
())
{
if
(
status
.
getCode
().
equalsIgnoreCase
(
code
))
{
return
status
;
}
}
return
null
;
}
}
jz-dm-common/src/main/java/com/jz/common/Enum/DelFlagEnum.java
0 → 100644
View file @
eac58a08
package
com
.
jz
.
common
.
Enum
;
/**
* 删除标识
*
* @author Bellamy
* @since 2020-11-30 14:30:23
*/
public
enum
DelFlagEnum
{
/**
* 删除
*/
YES
(
"YES"
,
"Y"
),
/**
* 未删除
*/
NO
(
"NO"
,
"N"
),
;
private
String
code
;
private
String
value
;
private
DelFlagEnum
(
String
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
static
DelFlagEnum
get
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
DelFlagEnum
status
:
values
())
{
if
(
status
.
getCode
().
equalsIgnoreCase
(
code
))
{
return
status
;
}
}
return
null
;
}
}
jz-dm-common/src/main/java/com/jz/common/Enum/GoodsDataEnum.java
0 → 100644
View file @
eac58a08
package
com
.
jz
.
common
.
Enum
;
/**
* 商品数据类型
*
* @author Bellamy
* @since 2020-11-30 14:30:23
*/
public
enum
GoodsDataEnum
{
/**
* api
*/
GOODS_API
(
"api"
,
"01"
),
/**
* pack
*/
GOODS_DATA_PACK
(
"pack"
,
"02"
),
;
private
String
code
;
private
String
value
;
GoodsDataEnum
(
String
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
static
GoodsDataEnum
get
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
GoodsDataEnum
status
:
values
())
{
if
(
status
.
getCode
().
equalsIgnoreCase
(
code
))
{
return
status
;
}
}
return
null
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/admin/controller/UserController.java
→
jz-dm-manage/src/main/java/com/jz/manage/admin/controller/
Test
UserController.java
View file @
eac58a08
...
...
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.jz.common.utils.Result
;
import
com.jz.manage.admin.controller.BaseController
;
import
com.jz.manage.admin.entity.User
;
import
com.jz.manage.admin.service.UserService
;
import
com.jz.manage.admin.service.
Test
UserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -26,25 +26,34 @@ import java.util.Map;
@RestController
@RequestMapping
(
"/user"
)
@Api
(
tags
=
"测试样例API"
)
public
class
UserController
extends
BaseController
{
public
class
Test
UserController
extends
BaseController
{
@Autowired
private
UserService
u
serService
;
private
TestUserService
testU
serService
;
@PostMapping
(
"/getTest"
)
public
List
<
Map
>
getTest
()
{
System
.
out
.
print
(
"117576575"
+
u
serService
.
getTest
().
toString
());
return
u
serService
.
getTest
();
System
.
out
.
print
(
"117576575"
+
testU
serService
.
getTest
().
toString
());
return
testU
serService
.
getTest
();
}
@GetMapping
(
value
=
"/events"
)
@ApiOperation
(
value
=
"测试样例列表(分页查询)"
,
notes
=
"事件列表(分页查询)"
)
public
Result
<
IPage
<
User
>>
queryPageList
(
User
event
,
HttpServletRequest
req
)
throws
Exception
{
Result
<
IPage
<
User
>>
result
=
new
Result
<
IPage
<
User
>>();
IPage
<
User
>
pageList
=
u
serService
.
queryPage
(
new
Page
<
User
>(
1
,
2
),
event
);
IPage
<
User
>
pageList
=
testU
serService
.
queryPage
(
new
Page
<
User
>(
1
,
2
),
event
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
@GetMapping
(
value
=
"/queryPageListSff"
)
@ApiOperation
(
value
=
"测试样例列表(分页查询)"
,
notes
=
"事件列表(分页查询)"
)
public
Result
<
IPage
<
Map
>>
queryPageListSff
(
User
event
,
HttpServletRequest
req
)
throws
Exception
{
Result
<
IPage
<
Map
>>
result
=
new
Result
<
IPage
<
Map
>>();
IPage
<
Map
>
pageList
=
testUserService
.
queryListPage
(
new
Page
<
Map
>(
1
,
2
),
event
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/admin/dao/UserMapper.java
→
jz-dm-manage/src/main/java/com/jz/manage/admin/dao/
Test
UserMapper.java
View file @
eac58a08
...
...
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import
java.util.List
;
import
java.util.Map
;
public
interface
UserMapper
extends
BaseMapper
<
User
>
{
public
interface
Test
UserMapper
extends
BaseMapper
<
User
>
{
List
<
Map
>
getTest
();
...
...
jz-dm-manage/src/main/java/com/jz/manage/admin/entity/User.java
View file @
eac58a08
...
...
@@ -3,12 +3,15 @@ package com.jz.manage.admin.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.HashSet
;
import
java.util.Set
;
@TableName
(
"tb_user"
)
@ApiModel
public
class
User
implements
Serializable
{
/**
* id
...
...
@@ -19,26 +22,31 @@ public class User implements Serializable {
/**
* 用户名
*/
@ApiModelProperty
(
value
=
"用户名"
,
required
=
true
)
private
String
username
;
/**
* 密码
*/
@ApiModelProperty
(
value
=
"密码"
)
private
String
password
;
/**
* 年龄
*/
@ApiModelProperty
(
value
=
"年龄"
)
private
Integer
age
;
/**
* 电话
*/
@ApiModelProperty
(
value
=
"电话"
)
private
Integer
telphone
;
/**
* 地址
*/
@ApiModelProperty
(
value
=
"地址"
)
private
String
addres
;
/**
...
...
@@ -48,16 +56,19 @@ public class User implements Serializable {
/**
* 组织机构ID
*/
@ApiModelProperty
(
value
=
"组织机构ID"
)
private
Integer
orgId
;
/*
* 姓名
* */
@ApiModelProperty
(
value
=
"姓名"
)
private
String
account
;
/**
* 性别
*/
@ApiModelProperty
(
value
=
"性别"
)
private
String
gender
;
public
String
getAccount
()
{
...
...
jz-dm-manage/src/main/java/com/jz/manage/admin/service/UserService.java
deleted
100644 → 0
View file @
50e9202a
package
com
.
jz
.
manage
.
admin
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.jz.manage.admin.entity.User
;
import
java.util.List
;
import
java.util.Map
;
public
interface
UserService
{
List
<
Map
>
getTest
();
IPage
<
User
>
queryPage
(
Page
<
User
>
userPage
,
User
event
);
}
jz-dm-manage/src/main/java/com/jz/manage/admin/service/impl/UserServiceImpl.java
View file @
eac58a08
...
...
@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.jz.manage.admin.dao.UserMapper
;
import
com.jz.manage.admin.dao.TestMapper
;
import
com.jz.manage.admin.dao.TestUserMapper
;
import
com.jz.manage.admin.entity.User
;
import
com.jz.manage.admin.service.UserService
;
import
com.jz.manage.admin.service.
Test
UserService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,12 +22,15 @@ import java.util.List;
import
java.util.Map
;
@Service
public
class
UserServiceImpl
implements
UserService
{
public
class
UserServiceImpl
implements
Test
UserService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UserServiceImpl
.
class
);
@Autowired
private
UserMapper
userMapper
;
private
TestUserMapper
userMapper
;
@Autowired
private
TestMapper
testMapper
;
@Autowired
RedisTemplate
redisTemplate
;
...
...
@@ -61,4 +65,9 @@ public class UserServiceImpl implements UserService {
public
IPage
<
User
>
queryPage
(
Page
<
User
>
userPage
,
User
event
)
{
return
userMapper
.
queryPage
(
userPage
,
event
);
}
@Override
public
IPage
<
Map
>
queryListPage
(
Page
<
Map
>
mapPage
,
User
event
)
{
return
testMapper
.
queryListPage
(
mapPage
,
event
);
}
}
jz-dm-manage/src/main/java/com/jz/manage/commonsUtils/SpringApplicationProvider.java
View file @
eac58a08
...
...
@@ -4,6 +4,10 @@ import org.springframework.beans.BeansException;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
/**
* spring 获取上下文工具类
...
...
@@ -62,4 +66,11 @@ public class SpringApplicationProvider implements ApplicationContextAware {
public
static
<
T
>
T
getBean
(
String
name
,
Class
<
T
>
clazz
)
{
return
getApplicationContext
().
getBean
(
name
,
clazz
);
}
/**
* 获取HttpServletRequest
*/
public
static
HttpServletRequest
getHttpServletRequest
()
{
return
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
}
}
jz-dm-manage/src/main/resources/mapper/UserMapper.xml
→
jz-dm-manage/src/main/resources/mapper/
test/Test
UserMapper.xml
View file @
eac58a08
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.manage.admin.dao.UserMapper"
>
<mapper
namespace=
"com.jz.manage.admin.dao.
Test
UserMapper"
>
<select
id=
"getTest"
resultType=
"map"
>
select * from tb_user;
...
...
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