Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
7cb014f7
Commit
7cb014f7
authored
Apr 01, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新数据库小写
parent
f940da5a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/DictService.java
+8
-8
src/main/java/cn/stylefeng/guns/modular/system/service/DictTypeService.java
+7
-7
No files found.
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
View file @
7cb014f7
...
...
@@ -285,7 +285,7 @@ public class ConstantFactory implements IConstantFactory {
return
null
;
}
else
{
QueryWrapper
<
Dict
>
wrapper
=
new
QueryWrapper
<>();
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
wrapper
.
eq
(
"
PID
"
,
id
));
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
wrapper
.
eq
(
"
pid
"
,
id
));
if
(
dicts
==
null
||
dicts
.
size
()
==
0
)
{
return
null
;
}
else
{
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/DictService.java
View file @
7cb014f7
...
...
@@ -43,8 +43,8 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//判断是否已经存在同编码或同名称字典
QueryWrapper
<
Dict
>
dictQueryWrapper
=
new
QueryWrapper
<>();
dictQueryWrapper
.
and
(
i
->
i
.
eq
(
"
CODE"
,
param
.
getCode
()).
or
().
eq
(
"NAME
"
,
param
.
getName
()))
.
and
(
i
->
i
.
eq
(
"
DICT_TYPE_ID
"
,
param
.
getDictTypeId
()));
.
and
(
i
->
i
.
eq
(
"
code"
,
param
.
getCode
()).
or
().
eq
(
"name
"
,
param
.
getName
()))
.
and
(
i
->
i
.
eq
(
"
dict_type_id
"
,
param
.
getDictTypeId
()));
List
<
Dict
>
list
=
this
.
list
(
dictQueryWrapper
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
throw
new
ServiceException
(
BizExceptionEnum
.
DICT_EXISTED
);
...
...
@@ -91,9 +91,9 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//判断编码是否重复
QueryWrapper
<
Dict
>
wrapper
=
new
QueryWrapper
<
Dict
>()
.
and
(
i
->
i
.
eq
(
"
CODE"
,
newEntity
.
getCode
()).
or
().
eq
(
"NAME
"
,
newEntity
.
getName
()))
.
and
(
i
->
i
.
ne
(
"
DICT_ID
"
,
newEntity
.
getDictId
()))
.
and
(
i
->
i
.
eq
(
"
DICT_TYPE_ID
"
,
param
.
getDictTypeId
()));
.
and
(
i
->
i
.
eq
(
"
code"
,
newEntity
.
getCode
()).
or
().
eq
(
"name
"
,
newEntity
.
getName
()))
.
and
(
i
->
i
.
ne
(
"
dict_id
"
,
newEntity
.
getDictId
()))
.
and
(
i
->
i
.
eq
(
"
dict_type_id
"
,
param
.
getDictTypeId
()));
int
dicts
=
this
.
count
(
wrapper
);
if
(
dicts
>
0
)
{
throw
new
ServiceException
(
BizExceptionEnum
.
DICT_EXISTED
);
...
...
@@ -133,13 +133,13 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
*/
public
LayuiPageInfo
findPageBySpec
(
DictParam
param
)
{
QueryWrapper
<
Dict
>
objectQueryWrapper
=
new
QueryWrapper
<>();
objectQueryWrapper
.
eq
(
"
DICT_TYPE_ID
"
,
param
.
getDictTypeId
());
objectQueryWrapper
.
eq
(
"
dict_type_id
"
,
param
.
getDictTypeId
());
if
(
ToolUtil
.
isNotEmpty
(
param
.
getCondition
()))
{
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
CODE"
,
param
.
getCondition
()).
or
().
eq
(
"NAME
"
,
param
.
getCondition
()));
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
code"
,
param
.
getCondition
()).
or
().
eq
(
"name
"
,
param
.
getCondition
()));
}
objectQueryWrapper
.
orderByAsc
(
"
SORT
"
);
objectQueryWrapper
.
orderByAsc
(
"
sort
"
);
List
<
Dict
>
list
=
this
.
list
(
objectQueryWrapper
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/DictTypeService.java
View file @
7cb014f7
...
...
@@ -40,7 +40,7 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
//判断是否已经存在同编码或同名称字典
QueryWrapper
<
DictType
>
dictQueryWrapper
=
new
QueryWrapper
<>();
dictQueryWrapper
.
eq
(
"
CODE"
,
param
.
getCode
()).
or
().
eq
(
"NAME
"
,
param
.
getName
());
dictQueryWrapper
.
eq
(
"
code"
,
param
.
getCode
()).
or
().
eq
(
"name
"
,
param
.
getName
());
List
<
DictType
>
list
=
this
.
list
(
dictQueryWrapper
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
throw
new
ServiceException
(
BizExceptionEnum
.
DICT_EXISTED
);
...
...
@@ -77,8 +77,8 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
//判断编码是否重复
QueryWrapper
<
DictType
>
wrapper
=
new
QueryWrapper
<
DictType
>()
.
and
(
i
->
i
.
eq
(
"
CODE"
,
newEntity
.
getCode
()).
or
().
eq
(
"NAME
"
,
newEntity
.
getName
()))
.
and
(
i
->
i
.
ne
(
"
DICT_TYPE_ID
"
,
newEntity
.
getDictTypeId
()));
.
and
(
i
->
i
.
eq
(
"
code"
,
newEntity
.
getCode
()).
or
().
eq
(
"name
"
,
newEntity
.
getName
()))
.
and
(
i
->
i
.
ne
(
"
dict_type_id
"
,
newEntity
.
getDictTypeId
()));
int
dicts
=
this
.
count
(
wrapper
);
if
(
dicts
>
0
)
{
throw
new
ServiceException
(
BizExceptionEnum
.
DICT_EXISTED
);
...
...
@@ -117,16 +117,16 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
Page
pageContext
=
getPageContext
();
QueryWrapper
<
DictType
>
objectQueryWrapper
=
new
QueryWrapper
<>();
if
(
ToolUtil
.
isNotEmpty
(
param
.
getCondition
()))
{
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
CODE"
,
param
.
getCondition
()).
or
().
eq
(
"NAME
"
,
param
.
getCondition
()));
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
code"
,
param
.
getCondition
()).
or
().
eq
(
"name
"
,
param
.
getCondition
()));
}
if
(
ToolUtil
.
isNotEmpty
(
param
.
getStatus
()))
{
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
STATUS
"
,
param
.
getStatus
()));
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
status
"
,
param
.
getStatus
()));
}
if
(
ToolUtil
.
isNotEmpty
(
param
.
getSystemFlag
()))
{
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
SYSTEM_FLAG
"
,
param
.
getSystemFlag
()));
objectQueryWrapper
.
and
(
i
->
i
.
eq
(
"
system_flag
"
,
param
.
getSystemFlag
()));
}
pageContext
.
setAsc
(
"
SORT
"
);
pageContext
.
setAsc
(
"
sort
"
);
IPage
page
=
this
.
page
(
pageContext
,
objectQueryWrapper
);
return
LayuiPageFactory
.
createPageInfo
(
page
);
...
...
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