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
8153a221
Commit
8153a221
authored
Mar 12, 2020
by
吴学德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增根据学校名称后缀
parent
de1bb3bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
apply-net/src/main/java/com/winsun/controller/DankuanController.java
+28
-5
No files found.
apply-net/src/main/java/com/winsun/controller/DankuanController.java
View file @
8153a221
package
com
.
winsun
.
controller
;
package
com
.
winsun
.
controller
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.bean.Product
;
import
com.winsun.bean.Product
;
import
com.winsun.bean.School
;
import
com.winsun.bean.School
;
import
com.winsun.mapper.AppMapper
;
import
com.winsun.bean.UniversityInfo
;
import
com.winsun.mapper.ProductMapper
;
import
com.winsun.mapper.*
;
import
com.winsun.mapper.SchoolMapper
;
import
com.winsun.mapper.SchoolPackageMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 单宽办理接口
* 单宽办理接口
...
@@ -32,12 +33,15 @@ public class DankuanController {
...
@@ -32,12 +33,15 @@ public class DankuanController {
private
static
AppMapper
appMapper
;
private
static
AppMapper
appMapper
;
private
static
UniversityInfoMapper
universityInfoMapper
;
@Autowired
@Autowired
public
DankuanController
(
ProductMapper
productMapper
,
SchoolMapper
schoolMapper
,
AppMapper
appMapper
){
public
DankuanController
(
ProductMapper
productMapper
,
SchoolMapper
schoolMapper
,
AppMapper
appMapper
,
UniversityInfoMapper
universityInfoMapper
){
this
.
productMapper
=
productMapper
;
this
.
productMapper
=
productMapper
;
this
.
schoolMapper
=
schoolMapper
;
this
.
schoolMapper
=
schoolMapper
;
this
.
appMapper
=
appMapper
;
this
.
appMapper
=
appMapper
;
this
.
universityInfoMapper
=
universityInfoMapper
;
}
}
/**
/**
...
@@ -59,4 +63,23 @@ public class DankuanController {
...
@@ -59,4 +63,23 @@ public class DankuanController {
Product
product
=
productMapper
.
selectById
(
bandproductId
);
Product
product
=
productMapper
.
selectById
(
bandproductId
);
return
ResponseData
.
success
(
product
);
return
ResponseData
.
success
(
product
);
}
}
@RequestMapping
(
"/DomainName"
)
public
ResponseData
<
String
>
getDomainName
(
@RequestParam
(
"schoolName"
)
String
schoolName
){
//空,直接返回
if
(
StringUtils
.
isBlank
(
schoolName
)){
return
ResponseData
.
error
(
"请输入学校名称"
);
}
EntityWrapper
<
UniversityInfo
>
universityInfowrapper
=
new
EntityWrapper
<>();
universityInfowrapper
.
setSqlSelect
(
"university_domain_name as domainName"
,
schoolName
);
universityInfowrapper
.
eq
(
"university_name"
,
schoolName
);
List
<
Map
<
String
,
Object
>>
universityInfos
=
universityInfoMapper
.
selectMaps
(
universityInfowrapper
);
if
(
CollectionUtils
.
isEmpty
(
universityInfos
)){
return
ResponseData
.
error
(
"查找不到学校相应数据"
);
}
if
(
universityInfos
.
get
(
0
).
get
(
"domainName"
)==
null
){
return
ResponseData
.
error
(
"查找不到学校相应数据"
);
}
return
ResponseData
.
success
(
universityInfos
.
get
(
0
).
get
(
"domainName"
).
toString
());
}
}
}
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