parent
fab989642f
commit
29f9b6a6a1
@ -0,0 +1,37 @@
|
|||||||
|
package com.mashibing.internalcommon.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DriverUser {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String address;
|
||||||
|
private String driverName;
|
||||||
|
private String driverPhone;
|
||||||
|
private Integer driverGender;
|
||||||
|
private Date driverBirthday;
|
||||||
|
private String driverNation;
|
||||||
|
private String driverContactAddress;
|
||||||
|
private String licenseId;
|
||||||
|
private Date getDriverLicenseDate;
|
||||||
|
private Date driverLicenseOn;
|
||||||
|
private Date driverLicenseOff;
|
||||||
|
private Integer taxiDriver;
|
||||||
|
private String certificateNo;
|
||||||
|
private String networkCarIssueOrganization;
|
||||||
|
private Date networkCarIssueDate;
|
||||||
|
private Date getNetworkCarProofDate;
|
||||||
|
private Date networkCarProofOn;
|
||||||
|
private Date networkCarProofOff;
|
||||||
|
private Date registerDate;
|
||||||
|
private Integer commercialType;
|
||||||
|
private String contractCompany;
|
||||||
|
private Date contractOn;
|
||||||
|
private Date contractOff;
|
||||||
|
private Integer state;
|
||||||
|
private Date gmtCreate;
|
||||||
|
private Date gmtModified;
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
# .gitignore
|
||||||
|
|
||||||
|
### IntelliJ IDEA Project ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
/.idea
|
||||||
|
target
|
||||||
|
src/test/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
#!**/src/main/**/target/
|
||||||
|
|
||||||
|
### Maven template
|
||||||
|
HELP.md
|
||||||
|
README.md
|
||||||
|
.mvn
|
||||||
|
mvnw
|
||||||
|
mvnw.cmd
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
timing.properties
|
||||||
|
#.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
@ -0,0 +1,36 @@
|
|||||||
|
<?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">
|
||||||
|
<parent>
|
||||||
|
<artifactId>online-taxi-public</artifactId>
|
||||||
|
<groupId>com.mashibing</groupId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>service-driver-user</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.mashibing.servicedriveruser;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@MapperScan("com.mashibing.servicedriveruser.mapper")
|
||||||
|
public class ServiceDriverUserApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServiceDriverUserApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.mashibing.servicedriveruser.controller;
|
||||||
|
|
||||||
|
import com.mashibing.internalcommon.dto.DriverUser;
|
||||||
|
import com.mashibing.internalcommon.dto.ResponseResult;
|
||||||
|
import com.mashibing.servicedriveruser.service.DriverUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class TestControler {
|
||||||
|
|
||||||
|
@Value("${spring.application.name}")
|
||||||
|
private String serviceName;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DriverUserService service;
|
||||||
|
|
||||||
|
@GetMapping("/")
|
||||||
|
public String test() {
|
||||||
|
return serviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/test_db")
|
||||||
|
public ResponseResult<DriverUser> test_db() {
|
||||||
|
return service.testGetDriverUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.mashibing.servicedriveruser.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mashibing.internalcommon.dto.DriverUser;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DriverUserMapper extends BaseMapper<DriverUser> {
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.mashibing.servicedriveruser.service;
|
||||||
|
|
||||||
|
import com.mashibing.internalcommon.dto.DriverUser;
|
||||||
|
import com.mashibing.internalcommon.dto.ResponseResult;
|
||||||
|
import com.mashibing.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<DriverUser> testGetDriverUser(){
|
||||||
|
DriverUser driverUser = driverUserMapper.selectById(1);
|
||||||
|
return ResponseResult.success(driverUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
server:
|
||||||
|
port: 8086
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: service-driver-user
|
||||||
|
# cloud:
|
||||||
|
# nacos:
|
||||||
|
# discovery:
|
||||||
|
# server-addr: 127.0.0.1:8848
|
||||||
|
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: 123456
|
Loading…
Reference in new issue