Compare commits

...

3 Commits

@ -9,10 +9,11 @@
<outputRelativeToContentRoot value="true" />
<module name="internal-common" />
<module name="servcie-price" />
<module name="service-map" />
<module name="api-passenger" />
<module name="service-passenger-user" />
<module name="service-driver-user" />
<module name="service-verificationcode" />
<module name="service-map" />
<module name="service-passenger-user" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="8" />
@ -22,6 +23,7 @@
<module name="api-passenger" options="-parameters" />
<module name="internal-common" options="-parameters" />
<module name="servcie-price" options="-parameters" />
<module name="service-driver-user" options="-parameters" />
<module name="service-map" options="-parameters" />
<module name="service-passenger-user" options="-parameters" />
<module name="service-verificationcode" options="-parameters" />

@ -5,6 +5,7 @@
<file url="file://$PROJECT_DIR$/api-passenger/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/internal-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/servcie-price/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-driver-user/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-map/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-passenger-user/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-verificationcode/src/main/java" charset="UTF-8" />

@ -0,0 +1,70 @@
package com.internal.dto;
import lombok.Data;
import java.time.LocalDate;
import java.util.Date;
@Data
public class DriverUser {
/**
{
"address":"地址",
"driverName":"司机姓名",
"driverPhone":"phone",
"driverGender":1,
"driverBrithday":"2020-01-02",
"driverNation":"01",
"driverContactAddress":"通信地址",
"licenseId":"机动车驾驶证号",
"getDriverLicenseDate":"2019-01-02",
"driverLicenseOn":"2019-01-02",
"driverLicenseOff":"2025-01-01",
"taxiDriver":1,
"certificateNo":"网络预约出租汽车驾驶员资格证号",
"networkCarIssueOrganization":"网络预约出租车驾驶员发证机构",
"networkCarIssueDate":"2020-01-02",
"getNetworkCarProofDate":"2020-01-02",
"networkCarProofOn":"2020-01-02",
"networkCarProofOff":"2025-01-02",
"registerDate":"2020-01-02",
"commercialType":1,
"contractCompany":"合约公司",
"contractOn":"2020-01-02",
"contractOff":"2020-01-02",
"state":1
}
**/
private Long id;
private String address;
private String driverName;
private String driverPhone;
private Integer driverGender;
private LocalDate driverBrithday;
private String driverNation;
private String driverContactAddress;
private String licenseId;
private LocalDate getDriverLicenseDate;
private LocalDate driverLicenseOn;
private LocalDate driverLicenseOff;
private Integer taxiDriver;
private String certificateNo;
private String networkCarIssueOrganization;
private LocalDate networkCarIssueDate;
private LocalDate getNetworkCarProofDate;
private LocalDate networkCarProofOn;
private LocalDate networkCarProofOff;
private LocalDate registerDate;
private Integer commercialType;
private String contractCompany;
private LocalDate contractOn;
private LocalDate contractOff;
private Integer state;
private Date gmtCreate;
private Date gmtModified;
}

@ -21,6 +21,7 @@
<module>service-passenger-user</module>
<module>servcie-price</module>
<module>service-map</module>
<module>service-driver-user</module>
</modules>
<properties>

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.taxi</groupId>
<artifactId>online-taxi-public</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>service-driver-user</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.3.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,14 @@
package com.taxi.servicedriveruser;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.taxi.servicedriveruser.mapper")
public class ServiceDriverUserApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceDriverUserApplication.class);
}
}

@ -0,0 +1,24 @@
package com.taxi.servicedriveruser.controller;
import com.internal.dto.DriverUser;
import com.internal.dto.ResponseResult;
import com.taxi.servicedriveruser.service.DriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class DriverUserController {
@Autowired
private DriverUserService driverUserService;
@PostMapping("/users")
public ResponseResult addDriverUser(@RequestBody DriverUser driverUser){
return driverUserService.addDriverUser(driverUser);
}
}

@ -0,0 +1,13 @@
package com.taxi.servicedriveruser.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestController {
@GetMapping("/test")
public String test(){
return "service-driver-user";
}
}

@ -0,0 +1,9 @@
package com.taxi.servicedriveruser.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.internal.dto.DriverUser;
import org.springframework.stereotype.Repository;
@Repository
public interface DriverUserMapper extends BaseMapper<DriverUser> {
}

@ -0,0 +1,21 @@
package com.taxi.servicedriveruser.service;
import com.internal.dto.DriverUser;
import com.internal.dto.ResponseResult;
import com.taxi.servicedriveruser.mapper.DriverUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DriverUserService {
@Autowired
private DriverUserMapper driverUserMapper;
public ResponseResult addDriverUser(DriverUser driverUser){
driverUserMapper.insert(driverUser);
return ResponseResult.success();
}
}

@ -0,0 +1,15 @@
server:
port: 8086
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/service-driver-user?characterEncoding=utf-8&serverTimezone=GMT%2B8
username: root
password: topsun123
# cloud:
# nacos:
# discovery:
# server-addr: 127.0.0.1:8848
application:
name: service-driver-user

@ -0,0 +1,15 @@
server:
port: 8086
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/service-driver-user?characterEncoding=utf-8&serverTimezone=GMT%2B8
username: root
password: topsun123
# cloud:
# nacos:
# discovery:
# server-addr: 127.0.0.1:8848
application:
name: service-driver-user

@ -0,0 +1,18 @@
服务名|端口号
---- | ----
api-passenger|8081
service-verificationcode|8082
service-passenger-user|8083
service-price|8084
service-map|8085
service-driver-user|8086
Loading…
Cancel
Save