Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
2c5ebb54
Commit
2c5ebb54
authored
Dec 08, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】分支机构详情描述接口
parent
1e90dda6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
5 deletions
+86
-5
BranchController.java
...io/office/modules/manage/controller/BranchController.java
+3
-5
BranchDao.java
src/main/java/io/office/modules/manage/dao/BranchDao.java
+6
-0
BranchService.java
.../java/io/office/modules/manage/service/BranchService.java
+5
-0
BranchServiceImpl.java
...office/modules/manage/service/impl/BranchServiceImpl.java
+7
-0
BranchEntityVo.java
.../io/office/modules/manage/vo/response/BranchEntityVo.java
+51
-0
BranchDao.xml
src/main/resources/mapper/manage/BranchDao.xml
+14
-0
No files found.
src/main/java/io/office/modules/manage/controller/BranchController.java
View file @
2c5ebb54
...
@@ -92,12 +92,10 @@ public class BranchController {
...
@@ -92,12 +92,10 @@ public class BranchController {
@Login
@Login
@RequestMapping
(
"/api/get
List
"
)
@RequestMapping
(
"/api/get
BranchDetail
"
)
// @RequiresPermissions("manage:shortcode:delete")
// @RequiresPermissions("manage:shortcode:delete")
public
R
getList
(){
public
R
getBranchDetail
(
@RequestBody
Map
<
String
,
String
>
params
){
return
R
.
ok
().
put
(
"data"
,
branchService
.
getBranchDetail
(
params
.
get
(
"branchCode"
)));
return
R
.
ok
().
put
(
"data"
,
branchService
.
list
());
}
}
}
}
src/main/java/io/office/modules/manage/dao/BranchDao.java
View file @
2c5ebb54
...
@@ -2,7 +2,9 @@ package io.office.modules.manage.dao;
...
@@ -2,7 +2,9 @@ package io.office.modules.manage.dao;
import
io.office.modules.manage.entity.BranchEntity
;
import
io.office.modules.manage.entity.BranchEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.vo.response.BranchEntityVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* ${comments}
* ${comments}
...
@@ -13,5 +15,9 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,5 +15,9 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
BranchDao
extends
BaseMapper
<
BranchEntity
>
{
public
interface
BranchDao
extends
BaseMapper
<
BranchEntity
>
{
BranchEntityVo
getBranchDetail
(
@Param
(
"branchCode"
)
String
branchCode
);
}
}
src/main/java/io/office/modules/manage/service/BranchService.java
View file @
2c5ebb54
...
@@ -3,6 +3,8 @@ package io.office.modules.manage.service;
...
@@ -3,6 +3,8 @@ package io.office.modules.manage.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.BranchEntity
;
import
io.office.modules.manage.entity.BranchEntity
;
import
io.office.modules.manage.vo.response.BranchEntityVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -16,5 +18,8 @@ import java.util.Map;
...
@@ -16,5 +18,8 @@ import java.util.Map;
public
interface
BranchService
extends
IService
<
BranchEntity
>
{
public
interface
BranchService
extends
IService
<
BranchEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
BranchEntityVo
getBranchDetail
(
String
branchCode
);
}
}
src/main/java/io/office/modules/manage/service/impl/BranchServiceImpl.java
View file @
2c5ebb54
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.modules.manage.vo.response.BranchEntityVo
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -26,4 +27,9 @@ public class BranchServiceImpl extends ServiceImpl<BranchDao, BranchEntity> impl
...
@@ -26,4 +27,9 @@ public class BranchServiceImpl extends ServiceImpl<BranchDao, BranchEntity> impl
return
new
PageUtils
(
page
);
return
new
PageUtils
(
page
);
}
}
@Override
public
BranchEntityVo
getBranchDetail
(
String
branchCode
)
{
return
baseMapper
.
getBranchDetail
(
branchCode
);
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/vo/response/BranchEntityVo.java
0 → 100644
View file @
2c5ebb54
package
io
.
office
.
modules
.
manage
.
vo
.
response
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
*
* @description:
*
* @author wudi
* @date 11:39 2021/12/8
*/
@Data
public
class
BranchEntityVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
branchCode
;
private
String
branchName
;
private
String
branchAddress
;
private
String
branchPostcode
;
private
String
branchContact
;
private
String
tel1
;
private
String
tel2
;
private
String
fax
;
private
String
rockkey
;
private
String
branchSimname
;
private
String
description
;
private
String
mail
;
private
String
website
;
private
String
addressDescription
;
private
String
personname
;
}
src/main/resources/mapper/manage/BranchDao.xml
View file @
2c5ebb54
...
@@ -18,6 +18,20 @@
...
@@ -18,6 +18,20 @@
</resultMap>
</resultMap>
<select
id=
"getBranchDetail"
parameterType=
"string"
resultType=
"io.office.modules.manage.vo.response.BranchEntityVo"
>
SELECT
a.*, b.description,
b.mail,
b.website,
b.address_description,
c.personname
FROM
center_outer.dbo.branch a
LEFT JOIN codeagent b ON a.branch_code = b.Id
LEFT JOIN center_outer.dbo.person c ON a.branch_contact = c.personid
WHERE
branch_code = #{branchCode}
</select>
...
...
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