Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
46a7bb79
Commit
46a7bb79
authored
Mar 26, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典
parent
f05cdc43
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
0 deletions
+73
-0
DictApiService.java
...ava/com/gic/haoban/manage/api/service/DictApiService.java
+10
-0
DictMapper.java
.../com/gic/haoban/manage/service/dao/mapper/DictMapper.java
+5
-0
DictApiServiceImpl.java
...n/manage/service/service/out/impl/DictApiServiceImpl.java
+8
-0
DictMapper.xml
...-manage3-service/src/main/resources/mapper/DictMapper.xml
+13
-0
DictController.java
.../com/gic/haoban/manage/web/controller/DictController.java
+35
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+2
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DictApiService.java
View file @
46a7bb79
...
...
@@ -4,6 +4,8 @@ import com.gic.api.base.commons.Page;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
import
java.util.List
;
/**
* Created by tgs on 2020/2/9.
*/
...
...
@@ -15,4 +17,12 @@ public interface DictApiService {
Page
<
DictDTO
>
pageList
(
BasePageInfo
pageInfo
);
void
deleteOne
(
String
dictId
);
/**
* 根据key 获取列表
*
* @param dictKeys
* @return
*/
List
<
DictDTO
>
queryList
(
List
<
String
>
dictKeys
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/DictMapper.java
View file @
46a7bb79
...
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.dao.mapper;
import
com.gic.haoban.manage.service.entity.TabHaobanDict
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
public
interface
DictMapper
{
int
deleteByPrimaryKey
(
String
dictId
);
...
...
@@ -18,4 +20,6 @@ public interface DictMapper {
Page
<
TabHaobanDict
>
pageList
();
List
<
TabHaobanDict
>
queryList
(
List
<
String
>
keys
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DictApiServiceImpl.java
View file @
46a7bb79
...
...
@@ -16,6 +16,8 @@ import com.gic.haoban.manage.service.dao.mapper.DictMapper;
import
com.gic.haoban.manage.service.entity.TabHaobanDict
;
import
com.github.pagehelper.PageHelper
;
import
java.util.List
;
/**
* Created by tgs on 2020/2/9.
*/
...
...
@@ -56,4 +58,10 @@ public class DictApiServiceImpl implements DictApiService{
public
void
deleteOne
(
String
dictId
)
{
dictMapper
.
deleteByPrimaryKey
(
dictId
);
}
@Override
public
List
<
DictDTO
>
queryList
(
List
<
String
>
dictKeys
)
{
List
<
TabHaobanDict
>
list
=
dictMapper
.
queryList
(
dictKeys
);
return
EntityUtil
.
changeEntityListByJSON
(
DictDTO
.
class
,
list
);
}
}
haoban-manage3-service/src/main/resources/mapper/DictMapper.xml
View file @
46a7bb79
...
...
@@ -120,4 +120,16 @@
<include
refid=
"Base_Column_List"
/>
from tab_haoban_dict
</select>
<select
id=
"queryList"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_dict
WHERE
status_flag = 1
AND dict_key in
<foreach
collection=
"keys"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/DictController.java
0 → 100644
View file @
46a7bb79
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
import
com.gic.haoban.manage.api.service.DictApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* Created 2020/3/26.
*
* @author hua
*/
@Controller
public
class
DictController
extends
WebBaseController
{
@Autowired
private
DictApiService
dictApiService
;
@RequestMapping
(
"/dict-list"
)
public
HaobanResponse
queryDictList
(
String
dictKeys
)
{
if
(
StringUtils
.
isBlank
(
dictKeys
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_5
);
}
String
[]
split
=
dictKeys
.
split
(
","
);
List
<
DictDTO
>
ret
=
dictApiService
.
queryList
(
Arrays
.
asList
(
split
));
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
ret
);
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
46a7bb79
...
...
@@ -38,4 +38,6 @@
<dubbo:reference
interface=
"com.gic.thirdparty.api.service.QQCloudPicService"
id=
"qqCloudPicServiceImpl"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DictApiService"
id=
"dictApiService"
/>
</beans>
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