Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
吴学德
gdtel-gztel-school-center
Commits
55a627c0
Commit
55a627c0
authored
Mar 09, 2020
by
吴学德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单宽办理接口
parent
5513dbc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
apply-net/src/main/java/com/winsun/controller/DankuanController.java
+62
-0
No files found.
apply-net/src/main/java/com/winsun/controller/DankuanController.java
0 → 100644
View file @
55a627c0
package
com
.
winsun
.
controller
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.bean.Product
;
import
com.winsun.bean.School
;
import
com.winsun.mapper.AppMapper
;
import
com.winsun.mapper.ProductMapper
;
import
com.winsun.mapper.SchoolMapper
;
import
com.winsun.mapper.SchoolPackageMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 单宽办理接口
* @Author xuede
* @Date 2020/3/9 16:52
* @Version 1.0
*/
@Slf4j
@RestController
@RequestMapping
(
"/dankuan"
)
public
class
DankuanController
{
private
static
ProductMapper
productMapper
;
private
static
SchoolMapper
schoolMapper
;
private
static
AppMapper
appMapper
;
@Autowired
public
DankuanController
(
ProductMapper
productMapper
,
SchoolMapper
schoolMapper
,
AppMapper
appMapper
){
this
.
productMapper
=
productMapper
;
this
.
schoolMapper
=
schoolMapper
;
this
.
appMapper
=
appMapper
;
}
/**
* 查询单宽办理接口
* @return
*/
@RequestMapping
(
"/data"
)
public
ResponseData
<
Product
>
getdankuanData
(
@RequestParam
(
"id"
)
Integer
id
){
//空,直接返回
if
(
id
==
null
){
return
ResponseData
.
error
(
"请输入合伙人id"
);
}
String
schoolId
=
appMapper
.
selectSchoolId
(
id
.
toString
());
School
school
=
schoolMapper
.
selectById
(
schoolId
);
String
bandproductId
=
school
.
getBandproductId
();
if
(
StringUtils
.
isBlank
(
bandproductId
)){
return
ResponseData
.
error
(
"敬请期待"
);
}
Product
product
=
productMapper
.
selectById
(
bandproductId
);
return
ResponseData
.
success
(
product
);
}
}
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