Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beijing-vehicleflow
Project
Project
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
zhangzhenbang
beijing-vehicleflow
Commits
23346127
Commit
23346127
authored
Feb 24, 2020
by
zhangzhenbang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试探性写了一两个接口
parent
940b7ab0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
5 deletions
+28
-5
IdentityInfoController.java
...beijingvehicleflow/controller/IdentityInfoController.java
+8
-0
ReservationsDisplayDTO.java
...ingxin/beijingvehicleflow/dto/ReservationsDisplayDTO.java
+2
-0
IdentityInformationMapper.java
.../beijingvehicleflow/mapper/IdentityInformationMapper.java
+7
-0
ReservationMapper.java
.../yingxin/beijingvehicleflow/mapper/ReservationMapper.java
+0
-5
IdentityInformationService.java
...eijingvehicleflow/service/IdentityInformationService.java
+5
-0
IdentityInformationServiceImpl.java
...icleflow/service/impl/IdentityInformationServiceImpl.java
+6
-0
No files found.
src/main/java/com/yingxin/beijingvehicleflow/controller/IdentityInfoController.java
View file @
23346127
package
com
.
yingxin
.
beijingvehicleflow
.
controller
;
import
com.yingxin.beijingvehicleflow.dto.ReservationsDisplayDTO
;
import
com.yingxin.beijingvehicleflow.entity.IdentityInformation
;
import
com.yingxin.beijingvehicleflow.response.Response
;
import
com.yingxin.beijingvehicleflow.service.IdentityInformationService
;
...
...
@@ -10,6 +11,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* description //TODO
*
...
...
@@ -95,4 +98,9 @@ public class IdentityInfoController {
}
@PostMapping
(
"/identity/reservation/display"
)
public
List
<
ReservationsDisplayDTO
>
selectReservatinsByIdentityId
(
@RequestBody
IdentityInformation
info
)
{
return
identityInformationService
.
selectReservatinsByIdentityId
(
info
);
}
}
src/main/java/com/yingxin/beijingvehicleflow/dto/ReservationsDisplayDTO.java
View file @
23346127
...
...
@@ -13,4 +13,6 @@ import lombok.Data;
public
class
ReservationsDisplayDTO
{
private
String
name
;
private
String
toBeijingDate
;
private
String
submitCoordinate
;
}
src/main/java/com/yingxin/beijingvehicleflow/mapper/IdentityInformationMapper.java
View file @
23346127
package
com
.
yingxin
.
beijingvehicleflow
.
mapper
;
import
com.yingxin.beijingvehicleflow.dto.ReservationsDisplayDTO
;
import
com.yingxin.beijingvehicleflow.entity.IdentityInformation
;
import
com.yingxin.beijingvehicleflow.entity.Reservation
;
import
org.apache.ibatis.annotations.*
;
import
java.util.List
;
/**
* 数据库表单对应Mapper
*
...
...
@@ -39,4 +43,7 @@ public interface IdentityInformationMapper {
@Select
(
"select * from identity_information where wechat_openid = #{openid}"
)
IdentityInformation
getAllInfoByOpenid
(
String
openid
);
@Select
(
"select info.name,info.toBeijing_date,r.submit_coordinate from identity_information AS info LEFT JOIN reservation AS r ON info.id=r.identity_id WHERE info.id = #{id} "
)
List
<
ReservationsDisplayDTO
>
selectReservatinsByIdentityId
(
IdentityInformation
info
);
}
src/main/java/com/yingxin/beijingvehicleflow/mapper/ReservationMapper.java
View file @
23346127
...
...
@@ -3,11 +3,8 @@ package com.yingxin.beijingvehicleflow.mapper;
import
com.yingxin.beijingvehicleflow.entity.Reservation
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
java.util.List
;
/**
* 数据库表单对应Mapper
*
...
...
@@ -39,6 +36,4 @@ public interface ReservationMapper {
@Update
(
"update reservation set auth_coordinate=#{authCoordinate},auth_time=#{authTime} where id = #{id}"
)
int
updateAuthInfo
(
Reservation
reservation
);
@Select
(
"select * "
)
List
<
Reservation
>
selectReservatinsByIdentityId
(
Reservation
reservation
);
}
src/main/java/com/yingxin/beijingvehicleflow/service/IdentityInformationService.java
View file @
23346127
package
com
.
yingxin
.
beijingvehicleflow
.
service
;
import
com.yingxin.beijingvehicleflow.dto.ReservationsDisplayDTO
;
import
com.yingxin.beijingvehicleflow.entity.IdentityInformation
;
import
net.sf.json.JSONObject
;
import
java.util.List
;
/**
* description //TODO
*
...
...
@@ -34,4 +37,6 @@ public interface IdentityInformationService {
IdentityInformation
getAllInfoByOpenid
(
String
openid
);
List
<
ReservationsDisplayDTO
>
selectReservatinsByIdentityId
(
IdentityInformation
info
);
}
src/main/java/com/yingxin/beijingvehicleflow/service/impl/IdentityInformationServiceImpl.java
View file @
23346127
package
com
.
yingxin
.
beijingvehicleflow
.
service
.
impl
;
import
com.yingxin.beijingvehicleflow.constant.Const
;
import
com.yingxin.beijingvehicleflow.dto.ReservationsDisplayDTO
;
import
com.yingxin.beijingvehicleflow.entity.IdentityInformation
;
import
com.yingxin.beijingvehicleflow.mapper.IdentityInformationMapper
;
import
com.yingxin.beijingvehicleflow.service.IdentityInformationService
;
...
...
@@ -17,6 +18,7 @@ import java.io.InputStreamReader;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.util.List
;
/**
* description //TODO
...
...
@@ -89,4 +91,8 @@ public class IdentityInformationServiceImpl implements IdentityInformationServic
return
identityInformationMapper
.
getAllInfoByOpenid
(
openid
);
}
@Override
public
List
<
ReservationsDisplayDTO
>
selectReservatinsByIdentityId
(
IdentityInformation
info
)
{
return
identityInformationMapper
.
selectReservatinsByIdentityId
(
info
);
}
}
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