From fd001c7fc3765a89fe56de4f5579d6aa93540334 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 Nov 2024 17:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=B4=E6=BB=B4=E7=BD=91=E7=BA=A6=E8=BD=A6?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-passenger/apipassenger.iml | 2 + api-passenger/pom.xml | 61 ++++++++++ .../apipassenger/ApiPassengerApplication.java | 25 +++++ .../Controller/ForecastPriceController.java | 32 ++++++ .../Controller/TestController.java | 21 ++++ .../Controller/TokenController.java | 28 +++++ .../Controller/UserController.java | 36 ++++++ .../VerificationCodeController.java | 41 +++++++ .../interceptor/InterceptorConfig.java | 33 ++++++ .../interceptor/JwtInterceptor.java | 71 ++++++++++++ .../remote/ServicePassengerUserClient.java | 27 +++++ .../remote/ServiceVerificationcodeClient.java | 23 ++++ .../service/ForecastPriceService.java | 26 +++++ .../apipassenger/service/TokenService.java | 62 ++++++++++ .../apipassenger/service/UserService.java | 42 +++++++ .../service/VerificationCodeService.java | 106 ++++++++++++++++++ .../src/main/resources/application.yml | 13 +++ pom.xml | 64 +++++++++++ service-map/pom.xml | 35 ++++++ .../servicemap/ServiceMapApplication.java | 28 +++++ .../controller/DirectionController.java | 28 +++++ .../servicemap/remote/MapDirectionClient.java | 88 +++++++++++++++ .../servicemap/service/DirectionService.java | 28 +++++ .../src/main/resources/application.yml | 15 +++ service-passenger-user/pom.xml | 39 +++++++ .../servicepassengeruser.iml | 2 + .../ServicePassengerUserApplication.java | 23 ++++ .../controller/UserController.java | 36 ++++++ .../mapper/PassengerUserMapper.java | 16 +++ .../service/UserService.java | 68 +++++++++++ .../src/main/resources/application.yml | 15 +++ .../target/classes/application.yml | 15 +++ .../ServicePassengerUserApplication.class | Bin 0 -> 1024 bytes .../controller/UserController.class | Bin 0 -> 1890 bytes .../dto/PassengerUser.class | Bin 0 -> 4161 bytes .../mapper/PassengerUserMapper.class | Bin 0 -> 448 bytes .../service/UserService.class | Bin 0 -> 2583 bytes service-price/pom.xml | 42 +++++++ service-price/serviceprice.iml | 2 + .../servicprice/ServicePriceApplication.java | 22 ++++ .../controller/ForecastPriceController.java | 33 ++++++ .../servicprice/remote/ServiceMapClient.java | 23 ++++ .../service/ForecastPriceService.java | 36 ++++++ .../src/main/resources/application.yml | 14 +++ service-verificationcode/pom.xml | 35 ++++++ .../ServiceVerificationcodeApplication.java | 21 ++++ .../controller/NumberCodeController.java | 33 ++++++ .../src/main/resources/application.yml | 9 ++ .../target/classes/application.yml | 9 ++ .../ServiceVerificationcodeApplication.class | Bin 0 -> 930 bytes .../controller/NumberCodeController.class | Bin 0 -> 1761 bytes .../target/maven-archiver/pom.properties | 3 + .../compile/default-compile/createdFiles.lst | 2 + .../compile/default-compile/inputFiles.lst | 2 + .../default-testCompile/createdFiles.lst | 0 .../default-testCompile/inputFiles.lst | 0 .../service-verificationcode-1.0-SNAPSHOT.jar | Bin 0 -> 4231 bytes 57 files changed, 1435 insertions(+) create mode 100644 api-passenger/apipassenger.iml create mode 100644 api-passenger/pom.xml create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/Controller/ForecastPriceController.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TestController.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TokenController.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/Controller/UserController.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/Controller/VerificationCodeController.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/InterceptorConfig.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/JwtInterceptor.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServicePassengerUserClient.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServiceVerificationcodeClient.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/service/ForecastPriceService.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/service/TokenService.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/service/UserService.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/service/VerificationCodeService.java create mode 100644 api-passenger/src/main/resources/application.yml create mode 100644 pom.xml create mode 100644 service-map/pom.xml create mode 100644 service-map/src/main/java/com/mashibing/servicemap/ServiceMapApplication.java create mode 100644 service-map/src/main/java/com/mashibing/servicemap/controller/DirectionController.java create mode 100644 service-map/src/main/java/com/mashibing/servicemap/remote/MapDirectionClient.java create mode 100644 service-map/src/main/java/com/mashibing/servicemap/service/DirectionService.java create mode 100644 service-map/src/main/resources/application.yml create mode 100644 service-passenger-user/pom.xml create mode 100644 service-passenger-user/servicepassengeruser.iml create mode 100644 service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.java create mode 100644 service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/controller/UserController.java create mode 100644 service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.java create mode 100644 service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/service/UserService.java create mode 100644 service-passenger-user/src/main/resources/application.yml create mode 100644 service-passenger-user/target/classes/application.yml create mode 100644 service-passenger-user/target/classes/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.class create mode 100644 service-passenger-user/target/classes/com/mashibing/servicepassengeruser/controller/UserController.class create mode 100644 service-passenger-user/target/classes/com/mashibing/servicepassengeruser/dto/PassengerUser.class create mode 100644 service-passenger-user/target/classes/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.class create mode 100644 service-passenger-user/target/classes/com/mashibing/servicepassengeruser/service/UserService.class create mode 100644 service-price/pom.xml create mode 100644 service-price/serviceprice.iml create mode 100644 service-price/src/main/java/com/mashibing/servicprice/ServicePriceApplication.java create mode 100644 service-price/src/main/java/com/mashibing/servicprice/controller/ForecastPriceController.java create mode 100644 service-price/src/main/java/com/mashibing/servicprice/remote/ServiceMapClient.java create mode 100644 service-price/src/main/java/com/mashibing/servicprice/service/ForecastPriceService.java create mode 100644 service-price/src/main/resources/application.yml create mode 100644 service-verificationcode/pom.xml create mode 100644 service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.java create mode 100644 service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/controller/NumberCodeController.java create mode 100644 service-verificationcode/src/main/resources/application.yml create mode 100644 service-verificationcode/target/classes/application.yml create mode 100644 service-verificationcode/target/classes/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.class create mode 100644 service-verificationcode/target/classes/com/mashibing/serviceverificationcode/controller/NumberCodeController.class create mode 100644 service-verificationcode/target/maven-archiver/pom.properties create mode 100644 service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst create mode 100644 service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst create mode 100644 service-verificationcode/target/service-verificationcode-1.0-SNAPSHOT.jar diff --git a/api-passenger/apipassenger.iml b/api-passenger/apipassenger.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/api-passenger/apipassenger.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/api-passenger/pom.xml b/api-passenger/pom.xml new file mode 100644 index 0000000..d90ed9d --- /dev/null +++ b/api-passenger/pom.xml @@ -0,0 +1,61 @@ + + + + online-taxi-public + com.mashibing + 1.0-SNAPSHOT + + 4.0.0 + + api-passenger + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.1.0 + + + + org.springframework.cloud + spring-cloud-starter-openfeign + 3.1.0 + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + 3.1.5 + + + + com.mashibing + internal-common + 1.0-SNAPSHOT + + + + org.springframework.boot + spring-boot-starter-data-redis + 2.4.13 + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + + + \ No newline at end of file diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java b/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java new file mode 100644 index 0000000..5e6ff8b --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java @@ -0,0 +1,25 @@ +package com.mashibing.apipassenger; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +import javax.swing.*; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-10-31-0:49 + * 5 @Modified By: + * 6 + */ +@SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +public class ApiPassengerApplication { + + public static void main(String[] args) { + SpringApplication.run(ApiPassengerApplication.class); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/ForecastPriceController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/ForecastPriceController.java new file mode 100644 index 0000000..de7a638 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/ForecastPriceController.java @@ -0,0 +1,32 @@ +package com.mashibing.apipassenger.Controller; + +import com.mashibing.apipassenger.service.ForecastPriceService; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.ForecastPriceDTO; +import lombok.extern.slf4j.Slf4j; +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; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-14:10 + * 5 @Modified By: + * 6 + */ +@RestController +@Slf4j +public class ForecastPriceController { + + @Autowired + private ForecastPriceService forecastPriceService; + + @PostMapping("/forecast-price") + public ResponseResult forecastPrice(@RequestBody ForecastPriceDTO forecastPriceDTO){ + forecastPriceService.forecastPrice(forecastPriceDTO.getDepLongitude(),forecastPriceDTO.getDepLongitude(),forecastPriceDTO.getDestLatitude(),forecastPriceDTO.getDestLongitude()); + + return null; + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TestController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TestController.java new file mode 100644 index 0000000..d16546d --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TestController.java @@ -0,0 +1,21 @@ +package com.mashibing.apipassenger.Controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-10-31-0:52 + * 5 @Modified By: + * 6 + */ +@RestController +public class TestController { + + @GetMapping("/test") + public String test(){ + + return "test api passenger"; + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TokenController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TokenController.java new file mode 100644 index 0000000..53cbb51 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/TokenController.java @@ -0,0 +1,28 @@ +package com.mashibing.apipassenger.Controller; + +import com.mashibing.apipassenger.service.TokenService; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.responese.TokenResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-21-17:00 + * 5 @Modified By: + * 6 + */ +@RestController +public class TokenController { + + @Autowired + private TokenService tokenService; + + public ResponseResult refreshToken(@RequestBody TokenResponse tokenResponse){ + + tokenService.refreshToken(tokenResponse.getRefreshToken()); + return null; + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/UserController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/UserController.java new file mode 100644 index 0000000..1dc47ab --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/UserController.java @@ -0,0 +1,36 @@ +package com.mashibing.apipassenger.Controller; + +import com.mashibing.apipassenger.service.UserService; +import com.mashibing.internalcommon.dto.ResponseResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-26-22:58 + * 5 @Modified By: + * 6 + */ +@RestController +public class UserController { + + @Autowired + private UserService userService; + + @GetMapping("/users") + public ResponseResult getUser(HttpServletRequest request){ + + //解析token中需要用的参数 + String accessToken = request.getHeader("Authorization"); + userService.getUserByAccessToken(accessToken); + + //用参数去查出用户 + + //把用户信息封装返回 + return userService.getUserByAccessToken(accessToken); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/VerificationCodeController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/VerificationCodeController.java new file mode 100644 index 0000000..3e49d1d --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/Controller/VerificationCodeController.java @@ -0,0 +1,41 @@ +package com.mashibing.apipassenger.Controller; + +import com.mashibing.internalcommon.request.VerificationCodeDTO; +import com.mashibing.apipassenger.service.VerificationCodeService; +import com.mashibing.internalcommon.dto.ResponseResult; +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; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-10-31-16:25 + * 5 @Modified By: + * 6 + */ +@RestController +public class VerificationCodeController { + + @Autowired + private VerificationCodeService verificationCodeService; + + @PostMapping("/verification-code") + public ResponseResult verificationCode(@RequestBody VerificationCodeDTO verificationCodeDTO){ + + String passengerPhone = verificationCodeDTO.getPassengerPhone(); + System.out.println("接受到的手机号参数:" +passengerPhone); + return verificationCodeService.generatorCode(passengerPhone); + + } + + @PostMapping("/check-code") + public ResponseResult checkVerificationCode(@RequestBody VerificationCodeDTO verificationCodeDTO){ + + String passengerPhone = verificationCodeDTO.getPassengerPhone(); + String verificationCode = verificationCodeDTO.getVerificationCode(); + + return verificationCodeService.checkCode(passengerPhone,verificationCode); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/InterceptorConfig.java b/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/InterceptorConfig.java new file mode 100644 index 0000000..42b0d6f --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/InterceptorConfig.java @@ -0,0 +1,33 @@ +package com.mashibing.apipassenger.interceptor; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-20-14:16 + * 5 @Modified By: + * 6 + */ +@Configuration +public class InterceptorConfig implements WebMvcConfigurer { + + @Bean + public JwtInterceptor jwtInterceptor(){ + return new JwtInterceptor(); + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(new JwtInterceptor()) + //拦截的路径 + .addPathPatterns("/**") + //不拦截的路径 + .excludePathPatterns("/noauthTest") + .excludePathPatterns("/verification-code") + .excludePathPatterns("/check-code"); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/JwtInterceptor.java b/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/JwtInterceptor.java new file mode 100644 index 0000000..b5a7d07 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/interceptor/JwtInterceptor.java @@ -0,0 +1,71 @@ +package com.mashibing.apipassenger.interceptor; + +import com.alibaba.nacos.common.utils.StringUtils; +import com.auth0.jwt.exceptions.AlgorithmMismatchException; +import com.auth0.jwt.exceptions.SignatureVerificationException; +import com.auth0.jwt.exceptions.TokenExpiredException; +import com.mashibing.internalcommon.constant.IdentityConstant; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.dto.TokenResult; +import com.mashibing.internalcommon.util.JwtUtils; +import com.mashibing.internalcommon.util.RedisPrefixUtils; +import net.sf.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; +import java.security.SignatureException; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-20-13:51 + * 5 @Modified By: + * 6 + */ +public class JwtInterceptor implements HandlerInterceptor { + + @Autowired + private StringRedisTemplate stringRedisTemplate; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + + String resultString =""; + boolean result = Boolean.parseBoolean(null); + String token = request.getHeader("Authorization"); + TokenResult tokenResult = JwtUtils.checkToken(token); + + + if(tokenResult == null){ + resultString = "token invalid"; + result = false; + }else{ + String phone = tokenResult.getPhone(); + String identity = tokenResult.getIdentity(); + + String tokenKey = RedisPrefixUtils.generatorTokenKey(phone,identity, IdentityConstant.ACCESS_TOKEN_TYPE); + + //取redis中存好的用户的token做对比 + String redistoken = stringRedisTemplate.opsForValue().get(tokenKey); + + if((StringUtils.isBlank(redistoken) || (!token.trim().equals(redistoken)))){ + resultString = "token invalid"; + result = false; + } + } + + if(!result){ + PrintWriter out = response.getWriter(); + out.print(JSONObject.fromObject(ResponseResult.fail(resultString).toString())); + } + + + + + return true; + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServicePassengerUserClient.java b/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServicePassengerUserClient.java new file mode 100644 index 0000000..ebd85d1 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServicePassengerUserClient.java @@ -0,0 +1,27 @@ +package com.mashibing.apipassenger.remote; + +import com.mashibing.internalcommon.dto.PassengerUser; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.VerificationCodeDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-19-15:46 + * 5 @Modified By: + * 6 + */ +@FeignClient("service-passenger-user") +public interface ServicePassengerUserClient { + + @RequestMapping(method = RequestMethod.POST,value = "/user") + public ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO); + + @RequestMapping(method = RequestMethod.GET,value = "/user/{phone}") + public ResponseResult getUserByPhone(@PathVariable String phone); +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServiceVerificationcodeClient.java b/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServiceVerificationcodeClient.java new file mode 100644 index 0000000..db9ef60 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/remote/ServiceVerificationcodeClient.java @@ -0,0 +1,23 @@ +package com.mashibing.apipassenger.remote; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.responese.NumberCodeResponese; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-02-17:57 + * 5 @Modified By: + * 6 + */ +@FeignClient("service-verificationcode") +public interface ServiceVerificationcodeClient { + + + @RequestMapping(method = RequestMethod.GET,value = "/numberCode/{size}") + ResponseResult getNumberCode(@PathVariable("size") int size); +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/service/ForecastPriceService.java b/api-passenger/src/main/java/com/mashibing/apipassenger/service/ForecastPriceService.java new file mode 100644 index 0000000..0d0134e --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/service/ForecastPriceService.java @@ -0,0 +1,26 @@ +package com.mashibing.apipassenger.service; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.responese.ForecastPriceResponese; +import org.springframework.stereotype.Service; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-14:29 + * 5 @Modified By: + * 6 + */ +@Service +public class ForecastPriceService { + + public ResponseResult forecastPrice(String depLongitude,String depLatitude,String destLongitude,String destLatitude){ + + + ForecastPriceResponese forecastPriceResponese = new ForecastPriceResponese(); + forecastPriceResponese.setPrice(14); + return ResponseResult.success(forecastPriceResponese); + + + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/service/TokenService.java b/api-passenger/src/main/java/com/mashibing/apipassenger/service/TokenService.java new file mode 100644 index 0000000..a7060f8 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/service/TokenService.java @@ -0,0 +1,62 @@ +package com.mashibing.apipassenger.service; + +import com.alibaba.nacos.common.utils.StringUtils; +import com.mashibing.internalcommon.constant.CommonStatusEnum; +import com.mashibing.internalcommon.constant.IdentityConstant; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.dto.TokenResult; +import com.mashibing.internalcommon.responese.TokenResponse; +import com.mashibing.internalcommon.util.JwtUtils; +import com.mashibing.internalcommon.util.RedisPrefixUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.stereotype.Service; + +import java.util.concurrent.TimeUnit; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-25-15:08 + * 5 @Modified By: + * 6 + */@Service +public class TokenService { + + @Autowired + private StringRedisTemplate stringRedisTemplate; + + public ResponseResult refreshToken(String refreshTokenSrc){ + //解析refreshToken + TokenResult tokenResult = JwtUtils.checkToken(refreshTokenSrc); + if(tokenResult == null){ + return ResponseResult.fail(CommonStatusEnum.TOKEN_ERROR.getCode(),CommonStatusEnum.TOKEN_ERROR.getValue()); + } + String phone = tokenResult.getPhone(); + String identity = tokenResult.getIdentity(); + + //读取redis中的refreshToken + String refreshTokenKey = RedisPrefixUtils.generatorTokenKey(phone,identity, IdentityConstant.REFRESH_TOKEN_TYPE); + String refreshTokenRedis = stringRedisTemplate.opsForValue().get(refreshTokenKey); + + //校验 + if((StringUtils.isBlank(refreshTokenRedis) || (!refreshTokenSrc.trim().equals(refreshTokenRedis)))){ + return ResponseResult.fail(CommonStatusEnum.TOKEN_ERROR.getCode(),CommonStatusEnum.TOKEN_ERROR.getValue()); + } + + //生成 + String refreshToken = JwtUtils.generatorToken(phone,identity,IdentityConstant.REFRESH_TOKEN_TYPE); + String accessToken = JwtUtils.generatorToken(phone,identity,IdentityConstant.ACCESS_TOKEN_TYPE); + + String accessTokenKey = RedisPrefixUtils.generatorTokenKey(phone,identity, IdentityConstant.ACCESS_TOKEN_TYPE); + + stringRedisTemplate.opsForValue().set(accessTokenKey,accessToken,30, TimeUnit.DAYS); + stringRedisTemplate.opsForValue().set(refreshTokenKey,refreshToken,31,TimeUnit.DAYS); + + TokenResponse tokenResponse = new TokenResponse(); + tokenResponse.setAccessToken(accessToken); + tokenResponse.setRefreshToken(refreshToken); + return ResponseResult.success(tokenResponse); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/service/UserService.java b/api-passenger/src/main/java/com/mashibing/apipassenger/service/UserService.java new file mode 100644 index 0000000..6de5e7d --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/service/UserService.java @@ -0,0 +1,42 @@ +package com.mashibing.apipassenger.service; + +import com.mashibing.apipassenger.remote.ServicePassengerUserClient; +import com.mashibing.internalcommon.dto.PassengerUser; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.dto.TokenResult; +import com.mashibing.internalcommon.request.VerificationCodeDTO; +import com.mashibing.internalcommon.util.JwtUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-26-22:59 + * 5 @Modified By: + * 6 + */ +@Service +@Slf4j +public class UserService { + + + @Autowired + private ServicePassengerUserClient servicePassengerUserClient; + + public ResponseResult getUserByAccessToken(String accessToken){ + + log.info("assessToken:" + accessToken); + + TokenResult tokenResult = JwtUtils.checkToken(accessToken); + String phone = tokenResult.getPhone(); + log.info("手机号:"+ phone); + + + ResponseResult userByPhone = servicePassengerUserClient.getUserByPhone(phone); + + + return ResponseResult.success(userByPhone.getData()); + } +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/service/VerificationCodeService.java b/api-passenger/src/main/java/com/mashibing/apipassenger/service/VerificationCodeService.java new file mode 100644 index 0000000..719c63c --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/service/VerificationCodeService.java @@ -0,0 +1,106 @@ +package com.mashibing.apipassenger.service; + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.common.utils.StringUtils; +import com.fasterxml.jackson.databind.util.JSONPObject; +import com.mashibing.apipassenger.remote.ServicePassengerUserClient; +import com.mashibing.apipassenger.remote.ServiceVerificationcodeClient; +import com.mashibing.internalcommon.constant.CommonStatusEnum; +import com.mashibing.internalcommon.constant.IdentityConstant; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.VerificationCodeDTO; +import com.mashibing.internalcommon.responese.NumberCodeResponese; +import com.mashibing.internalcommon.responese.TokenResponse; +import com.mashibing.internalcommon.util.JwtUtils; +import com.mashibing.internalcommon.util.RedisPrefixUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.stereotype.Service; + +import java.util.concurrent.TimeUnit; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-10-31-23:30 + * 5 @Modified By: + * 6 + */ +@Service +public class VerificationCodeService { + + @Autowired + private ServiceVerificationcodeClient serviceVerificationcodeClient; + + + + @Autowired + private StringRedisTemplate stringRedisTemplate; + + @Autowired + private ServicePassengerUserClient servicePassengerUserClient; + + + public ResponseResult generatorCode(String passengerPhone){ + //调用验证码服务,获取验证码 + System.out.println("调用验证码服务,获取验证码"); + + ResponseResult response = serviceVerificationcodeClient.getNumberCode(6); + int numberCode = response.getData().getNumberCode(); + + System.out.println("验证码"+ numberCode); + + //存入redis + System.out.println("存入redis"); + String key = RedisPrefixUtils.generatorKeyByPhone(passengerPhone); + stringRedisTemplate.opsForValue().set(key,numberCode+"",2, TimeUnit.MINUTES); + + //返回值 + JSONObject result = new JSONObject(); + result.put("code",1); + result.put("message","success"); + + return ResponseResult.success(""); + } + + + + public ResponseResult checkCode(String passengerPhone,String verificationCode){ + + String key = RedisPrefixUtils.generatorKeyByPhone(passengerPhone); + + String codeRedis = stringRedisTemplate.opsForValue().get(key); + + if(StringUtils.isBlank(codeRedis)){ + return ResponseResult.fail(CommonStatusEnum.VERIFICATION_CODE_ERROR.getCode(),CommonStatusEnum.VERIFICATION_CODE_ERROR.getValue()); + }else if(!verificationCode.trim().equals(codeRedis)){ + return ResponseResult.fail(CommonStatusEnum.VERIFICATION_CODE_ERROR.getCode(),CommonStatusEnum.VERIFICATION_CODE_ERROR.getValue()); + } + + VerificationCodeDTO verificationCodeDTO = new VerificationCodeDTO(); + verificationCodeDTO.setPassengerPhone(passengerPhone); + servicePassengerUserClient.loginOrRegister(verificationCodeDTO); + + //颁发令牌 + String accessToken = JwtUtils.generatorToken(passengerPhone, IdentityConstant.PASSENGER_INDENTITY,IdentityConstant.ACCESS_TOKEN_TYPE); + String refreshToken = JwtUtils.generatorToken(passengerPhone, IdentityConstant.PASSENGER_INDENTITY,IdentityConstant.REFRESH_TOKEN_TYPE); + + + + //token存入redis中 + String accesstokenKey = RedisPrefixUtils.generatorTokenKey(passengerPhone,IdentityConstant.PASSENGER_INDENTITY,IdentityConstant.ACCESS_TOKEN_TYPE); + stringRedisTemplate.opsForValue().set(accesstokenKey,accessToken,30,TimeUnit.DAYS); + + String refreshtokenKey = RedisPrefixUtils.generatorTokenKey(passengerPhone,IdentityConstant.PASSENGER_INDENTITY,IdentityConstant.REFRESH_TOKEN_TYPE); + stringRedisTemplate.opsForValue().set(refreshtokenKey,refreshToken,31,TimeUnit.DAYS); + + + + TokenResponse tokenResponse = new TokenResponse(); + tokenResponse.setAccessToken(accessToken); + tokenResponse.setRefreshToken(refreshToken); + + + return ResponseResult.success(tokenResponse); + } +} diff --git a/api-passenger/src/main/resources/application.yml b/api-passenger/src/main/resources/application.yml new file mode 100644 index 0000000..584f00c --- /dev/null +++ b/api-passenger/src/main/resources/application.yml @@ -0,0 +1,13 @@ +server: + port: 8081 +spring: + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + application: + name: api-passenger + redis: + host: 127.0.0.1 + port: 6379 + database: 0 \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..47dca81 --- /dev/null +++ b/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.7 + + + com.mashibing + online-taxi-public + 1.0-SNAPSHOT + + api-passenger + service-verificationcode + internal-common + service-passenger-user + service-price + service-map + + pom + + + + com.alibaba + fastjson + 1.2.58 + + + org.projectlombok + lombok + 1.18.4 + + + + com.mashibing + internal-common + 1.0-SNAPSHOT + + + + com.auth0 + java-jwt + 3.14.0 + + + + + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + 2021.0.1.0 + pom + import + + + + + + \ No newline at end of file diff --git a/service-map/pom.xml b/service-map/pom.xml new file mode 100644 index 0000000..8c48897 --- /dev/null +++ b/service-map/pom.xml @@ -0,0 +1,35 @@ + + + + online-taxi-public + com.mashibing + 1.0-SNAPSHOT + + 4.0.0 + + service-map + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.1.0 + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + \ No newline at end of file diff --git a/service-map/src/main/java/com/mashibing/servicemap/ServiceMapApplication.java b/service-map/src/main/java/com/mashibing/servicemap/ServiceMapApplication.java new file mode 100644 index 0000000..bbf9227 --- /dev/null +++ b/service-map/src/main/java/com/mashibing/servicemap/ServiceMapApplication.java @@ -0,0 +1,28 @@ +package com.mashibing.servicemap; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestTemplate; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:16 + * 5 @Modified By: + * 6 + */ +@SpringBootApplication +@EnableDiscoveryClient +public class ServiceMapApplication { + + public static void main(String[] args) { + SpringApplication.run(ServiceMapApplication.class); + } + + @Bean + public RestTemplate restTemplate(){ + return new RestTemplate(); + } +} diff --git a/service-map/src/main/java/com/mashibing/servicemap/controller/DirectionController.java b/service-map/src/main/java/com/mashibing/servicemap/controller/DirectionController.java new file mode 100644 index 0000000..b3d3b53 --- /dev/null +++ b/service-map/src/main/java/com/mashibing/servicemap/controller/DirectionController.java @@ -0,0 +1,28 @@ +package com.mashibing.servicemap.controller; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.ForecastPriceDTO; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:19 + * 5 @Modified By: + * 6 + */ +@RestController +public class DirectionController { + + @GetMapping("/driving") + public ResponseResult driving(@RequestBody ForecastPriceDTO forecastPriceDTO){ + String depLongitude = forecastPriceDTO.getDepLongitude(); + String depLatitude = forecastPriceDTO.getDepLatitude(); + String destLongitude = forecastPriceDTO.getDestLongitude(); + String destLatitude = forecastPriceDTO.getDestLatitude(); + + return ResponseResult.success(); + } +} diff --git a/service-map/src/main/java/com/mashibing/servicemap/remote/MapDirectionClient.java b/service-map/src/main/java/com/mashibing/servicemap/remote/MapDirectionClient.java new file mode 100644 index 0000000..76e11de --- /dev/null +++ b/service-map/src/main/java/com/mashibing/servicemap/remote/MapDirectionClient.java @@ -0,0 +1,88 @@ +package com.mashibing.servicemap.remote; + + + +import com.mashibing.internalcommon.constant.IdentityConstant; +import com.mashibing.internalcommon.responese.DirectionResponse; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:32 + * 5 @Modified By: + * 6 + */ +@Service +public class MapDirectionClient { + + @Value("${amap.key}") + private String amapKey; + + @Autowired + private RestTemplate restTemplate; + + public DirectionResponse direction(String depLongitude,String depLatitude,String destLongitude,String destLatitude){ + + StringBuilder urlBuild = new StringBuilder(); + urlBuild.append(IdentityConstant.DIRECTION_URL); + urlBuild.append("?"); + urlBuild.append("origin="+depLongitude+","+depLatitude); + urlBuild.append("&"); + urlBuild.append("destination="+destLongitude+","+destLatitude); + urlBuild.append("&"); + urlBuild.append("extensions=base"); + urlBuild.append("&"); + urlBuild.append("output=json"); + urlBuild.append("&"); + urlBuild.append("key="+amapKey); + + ResponseEntity directionEntity = restTemplate.getForEntity(urlBuild.toString(), String.class); + String directionString = directionEntity.getBody(); + + DirectionResponse directionResponse = parseDirectionEntity(directionString); + + + return directionResponse; + } + + private DirectionResponse parseDirectionEntity(String directionString){ + DirectionResponse directionResponse = null; + try { + // 最外层 + JSONObject result = JSONObject.fromObject(directionString); + if(result.has(IdentityConstant.STATUS)) { + int status = result.getInt(IdentityConstant.STATUS); + if (status == 1){ + if (result.has(IdentityConstant.ROUTE)){ + JSONObject routeObject = result.getJSONObject(IdentityConstant.ROUTE); + JSONArray pathsArray = routeObject.getJSONArray(IdentityConstant.PATHS); + JSONObject pathObject = pathsArray.getJSONObject(0); + directionResponse = new DirectionResponse(); + + if (pathObject.has(IdentityConstant.DISTANCE)){ + int distance = pathObject.getInt(IdentityConstant.DISTANCE); + directionResponse.setDistance(distance); + } + if (pathObject.has(IdentityConstant.DURATION)){ + int duration = pathObject.getInt(IdentityConstant.DURATION); + directionResponse.setDuration(duration); + } + } + } + } + + }catch (Exception e){ + + } + return directionResponse; + } + + +} diff --git a/service-map/src/main/java/com/mashibing/servicemap/service/DirectionService.java b/service-map/src/main/java/com/mashibing/servicemap/service/DirectionService.java new file mode 100644 index 0000000..da36988 --- /dev/null +++ b/service-map/src/main/java/com/mashibing/servicemap/service/DirectionService.java @@ -0,0 +1,28 @@ +package com.mashibing.servicemap.service; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.responese.DirectionResponse; +import com.mashibing.servicemap.remote.MapDirectionClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:22 + * 5 @Modified By: + * 6 + */@Service +public class DirectionService { + + @Autowired + private MapDirectionClient mapDirectionClient; + + + public ResponseResult driving(String depLongitude,String depLatitude,String destLongitude,String destLatitude){ + DirectionResponse directionResponse = mapDirectionClient.direction(depLongitude,depLatitude,destLongitude,destLatitude); + + + return ResponseResult.success(directionResponse); + } +} diff --git a/service-map/src/main/resources/application.yml b/service-map/src/main/resources/application.yml new file mode 100644 index 0000000..d3f298e --- /dev/null +++ b/service-map/src/main/resources/application.yml @@ -0,0 +1,15 @@ +server: + port: 8085 + +spring: + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + application: + name: service-map + + + +amap: + key: 54665674969040368450 \ No newline at end of file diff --git a/service-passenger-user/pom.xml b/service-passenger-user/pom.xml new file mode 100644 index 0000000..fc8fb1d --- /dev/null +++ b/service-passenger-user/pom.xml @@ -0,0 +1,39 @@ + + + + online-taxi-public + com.mashibing + 1.0-SNAPSHOT + + 4.0.0 + + service-passenger-user + + + + org.springframework.boot + spring-boot-starter-web + + + + com.baomidou + mybatis-plus-boot-starter + 3.4.3.1 + + + + mysql + mysql-connector-java + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.1.0 + + + + \ No newline at end of file diff --git a/service-passenger-user/servicepassengeruser.iml b/service-passenger-user/servicepassengeruser.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/service-passenger-user/servicepassengeruser.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.java b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.java new file mode 100644 index 0000000..19c91c1 --- /dev/null +++ b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.java @@ -0,0 +1,23 @@ +package com.mashibing.servicepassengeruser; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-07-16:03 + * 5 @Modified By: + * 6 + */ +@SpringBootApplication +@EnableDiscoveryClient +@MapperScan("com.mashibing.servicepassengeruser.mapper") +public class ServicePassengerUserApplication { + + public static void main(String[] args) { + SpringApplication.run(ServicePassengerUserApplication.class); + } +} diff --git a/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/controller/UserController.java b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/controller/UserController.java new file mode 100644 index 0000000..a0eed3d --- /dev/null +++ b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/controller/UserController.java @@ -0,0 +1,36 @@ +package com.mashibing.servicepassengeruser.controller; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.VerificationCodeDTO; +import com.mashibing.servicepassengeruser.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-07-16:15 + * 5 @Modified By: + * 6 + */ +@RestController +public class UserController { + + @Autowired + private UserService userService; + + @PostMapping("/user") + public ResponseResult loginOrReg(@RequestBody VerificationCodeDTO verificationCodeDTO){ + + String passenger = verificationCodeDTO.getPassengerPhone(); + userService.loginOrRegister(passenger); + System.out.println("手机号"+ passenger); + return ResponseResult.success(); + } + + @GetMapping("/user/{phone}") + public ResponseResult getUser(@PathVariable("phone") String passengerPhone){ + + return userService.getUserByPhone(passengerPhone); + } +} diff --git a/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.java b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.java new file mode 100644 index 0000000..3cb7cd6 --- /dev/null +++ b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.java @@ -0,0 +1,16 @@ +package com.mashibing.servicepassengeruser.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mashibing.internalcommon.dto.PassengerUser; +import org.springframework.stereotype.Repository; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-19-14:26 + * 5 @Modified By: + * 6 + */ +@Repository +public interface PassengerUserMapper extends BaseMapper { +} diff --git a/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/service/UserService.java b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/service/UserService.java new file mode 100644 index 0000000..f531afc --- /dev/null +++ b/service-passenger-user/src/main/java/com/mashibing/servicepassengeruser/service/UserService.java @@ -0,0 +1,68 @@ +package com.mashibing.servicepassengeruser.service; + +import com.mashibing.internalcommon.constant.CommonStatusEnum; +import com.mashibing.internalcommon.dto.PassengerUser; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.servicepassengeruser.mapper.PassengerUserMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-07-16:29 + * 5 @Modified By: + * 6 + */@Service +public class UserService { + + @Autowired + private PassengerUserMapper passengerUserMapper; + + public ResponseResult loginOrRegister(String passengerPhone){ + Map map = new HashMap<>(); + map.put("passenger_phone",passengerPhone); + List list = passengerUserMapper.selectByMap(map); + System.out.println(list.size()==0?"无记录":list.get(0).getPassengerPhone()); + if(list.size()==0){ + //新建用户 + PassengerUser passengerUser = new PassengerUser(); + passengerUser.setPassengerName("yonghu123"); + passengerUser.setPassengerGender((byte)0); + passengerUser.setPassengerPhone(passengerPhone); + passengerUser.setState((byte)0); + LocalDateTime now = LocalDateTime.now(); + passengerUser.setGmtCreate(now); + passengerUser.setGmtModified(now); + + passengerUserMapper.insert(passengerUser); + } + + + return ResponseResult.success(); + } + + /** + * 根据手机号查询用户信息 + * @param passengerPhone + * @return + */ + public ResponseResult getUserByPhone(String passengerPhone){ + Map map = new HashMap<>(); + map.put("passenger_phone",passengerPhone); + List list = passengerUserMapper.selectByMap(map); + if(list.size()==0){ + return ResponseResult.fail(CommonStatusEnum.USER_NOT_EXISITS.getCode(),CommonStatusEnum.USER_NOT_EXISITS.getValue()); + }else{ + PassengerUser passengerUser = list.get(0); + return ResponseResult.success(passengerUser); + } + + } + +} diff --git a/service-passenger-user/src/main/resources/application.yml b/service-passenger-user/src/main/resources/application.yml new file mode 100644 index 0000000..6d348a3 --- /dev/null +++ b/service-passenger-user/src/main/resources/application.yml @@ -0,0 +1,15 @@ +server: + port: 8083 +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/service-passenger-user?characterEncoding=utf-8&serverTimeZone=GMT%2B8 + username: root + password: root + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + + application: + name: service-passenger-user diff --git a/service-passenger-user/target/classes/application.yml b/service-passenger-user/target/classes/application.yml new file mode 100644 index 0000000..6d348a3 --- /dev/null +++ b/service-passenger-user/target/classes/application.yml @@ -0,0 +1,15 @@ +server: + port: 8083 +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/service-passenger-user?characterEncoding=utf-8&serverTimeZone=GMT%2B8 + username: root + password: root + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + + application: + name: service-passenger-user diff --git a/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.class b/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/ServicePassengerUserApplication.class new file mode 100644 index 0000000000000000000000000000000000000000..64679b657345285d5becf7324eafff532c18c9c7 GIT binary patch literal 1024 zcmbtTO>Yx15Ph4krAeSAg+TfKIwU>B7cMBMQj@|dg^EBp^yJ;RiOa6N@_GaPS)4#f z@B{c!i18*ZDFksKQatN7_M4eErf@gj=@VP5kfBBU|UA&*AfNVi{rB|DX=hrL0lV;1vtDg&t|EEQ%Z zLy_<_6>1_(MgSYm!Glxq4S~B!63LKTsa2O^$6P88&DP=In9n$iIB^ZFAYFBr}2y^CLZSoG-Aqk|2z9HfCWYg|cic(@@WZ zIbqL~6MFA--_QM|(soV~p9GXvy2ys{vpm^8PZD8dy6C(vqgtWHc&4YiUyY5sg-N z#c;G&%dV9bA1v!H+UC?=3PG@QcPZThy&Lx{fSwC{S})L!k@d)yw?D!An7h|#t>j<> zRr;>a51>Y0z#1;%5|OyePjWJ#)+iLeqWBr5x4$T=BzHfbpZ3T^qQowQw`ACx8yBx%c6Lad|&A%2b56KBeL$L!7~ z$|E3t@B%ypAmpGT@c_IBeGJ4IJ9Xm3jSR9p*Yk1DoqNx@+>|b)D*3q~_z;SZTG1QwM7j zg0&K2ZX~j)woUSFP*XBagAEy4lk5bt=Mcm70wd+hy1?k7sq>yE zmvpSY$eJ~kJd%tiFtKDp8Li7iyZPSYsNK{IKQ~NPp^0r`qKFB)#1?x~UZND4hK^T~ zRn-t^mJh+{*s3I!5lh!JageC*GL_n3T_t)$hn*U@Ti<`QGE+I;wQfzYs?rvVrf9Rs zGWg`yQ6Pc4$0Hqg34vmdP*=Fea!Ur0B;9M)F~pdsmX+N!^{RAaF*_FV)<6!oRV|=W z>Idnon$#}KR;vq@-;z;Ag7SeAkHF=Ao%BNV31;|UtKDiZnEH+*YRzOxs2*x3iOGH* zue&^-r^P{ekO6x@20kWn#>0${S={q+5~n=O`S=hYd6@UHfJK3Ghikcz>8S3~Emk!!^^N^P9@9sbWeo`VZ9K@bosk5_ry3%G*UI^iyMA@{-&ock9THjlS? r;&pmoq+ece8J)z&xp|4-%ilnxcmr>8-E&#J#UD9(x$#P`24&!1A#W{> literal 0 HcmV?d00001 diff --git a/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/dto/PassengerUser.class b/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/dto/PassengerUser.class new file mode 100644 index 0000000000000000000000000000000000000000..d1131c5e3dccc083886c46d92dd88e13beaa3f09 GIT binary patch literal 4161 zcmbVOTW=f375#&+T)P9y6Q*}0pt+{BLUs*z;XcAUgXTd%~mM28|3 za^*Iuo3xFcYn#>&MF68fUWytB{Lli8475ejz9c|_{sX`D7x=9Y&E-2Y%jJ?@G(rI4 z%$YOaIWy)4?SNmmR$2;BAq;dR9GGRv#M;im5ezJZcH4yvm@kC(jK(-fcLj<|l}<{Fji zxvEb?xizoV^6Sffb77@Xr)n`~`DDg1}| zTB$Db4U;Xud7--GNB6E%Fj)y2lMC(lKT8SSvzGl}hK?0S_QX61W90JiSSL)|+nB^a zrPcyv<7&T8rB4~_J`UP76l^MjQ} zWx;DQ4T0Zepj;}%T-p)pC3qwTavB};iGp6AhU0gKE~(q&*wCrCsO^+Fa!B9~&qA-# z{wwQVjj!!8eSGn}zZ6XEIm7a4bXQ(@#B?@-6{#;<%3`;azM~|H%_(85?g#Z*Op|>nSZ^-* zN2{t0qx?$?Jt%|4#e~S$FWDMgjCNOT`k#EwbE`ESH7mwmG z7qh}Wjwf8~7gENQivvQYanQxLh5Qg_4Q%TSJnhAy^=eIxoLVnHu z7~d5|ZJG_Bw(Yo4P#E9U9XZPKF`2}UqGC*>>s;OP8)k5PS4(=AAcLW)f8!-N)VEahZN|?h#=UGt6TMXCwUhMbER`JThrVmtps&c;ihW2=qt^XC|!;||SczMgg6cAL*L>85<(!_wSO zk7ROKlI`BHqXVG_hZP0FqWcnvaBwWBGUC4gia3jm|I(gAiy!5u4w%!bSa#&6R#+-d ze(W0Ti46>$75PBfl!KBPo;XrK`Y2bn)Dde(DLEypeKc53tD|&u#EQ~d`LeB!SWKao zt&T*<`wC~LL#{|JIq4_#(?ehT@H==|q+=GYVu@UeY5FZH^uLc2^CEn5CTF;ZbL1?h z?gtm;Rc3_TQ{&xieUqH6ib>P5dKch x=Y-#``9Utl9h%Pzzf<#t4ct|{Tk}QXcah(~J-y%Q_#c}}m`VfZ`I;17{tAvj`?>%C literal 0 HcmV?d00001 diff --git a/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.class b/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/mapper/PassengerUserMapper.class new file mode 100644 index 0000000000000000000000000000000000000000..760958b1d09527f68f7179b8f9ba94f349c4e877 GIT binary patch literal 448 zcmb7Bu};J=40R4@xdS9d_y#1huoaMCU@8LL3HG#SN{%Luob*t|pE2+Od=$c0U;rT@ zhS=7#;`jXg`u6++07tNs!z72T9JUpVXSVSsb&Lw0%7s}P-5THMt7?IDD$1Iit_(Rl zr%t=RGRel!c2U>FsGSJ`S)ZGTmqU3xd~hb-+sewAh`h8l1`{Lt2DuYJ&lBnEFXTp$ z;~4fq|^u0Qw$VsBJPFpWVPHMT0b}ZMUH~qpLQt_TmI!&ra-|+-kMwnB(6&w!3JbQ M&S6t>CjBwMJJFJnt^fc4 literal 0 HcmV?d00001 diff --git a/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/service/UserService.class b/service-passenger-user/target/classes/com/mashibing/servicepassengeruser/service/UserService.class new file mode 100644 index 0000000000000000000000000000000000000000..82b9654ca7e235ad669dcf7df8bba922d01c8551 GIT binary patch literal 2583 zcmbVOTXPge6#ja5!X%p^H*PKg6|Wm^BM>l>5bgwY6Ji31sECu@&Zc2^W}TT$45D~@ z@WEHhDxZAw%|goxL`utN|A&_U!7B0V*~wRrsm-RB0!8BgeUsv?0b_{Kk8Jg(ib?MFL)KZ z;skSQM!6-Ms(DqA4ci(8RBK~c`RG?_T|Asvy9XGINokHmOi?-9aV4tjo-h%RFk#08(DOZKV0_j}elz?&CD@uXR zymIAOtuiD1OAez6^yIyQQ=W2srO&a@2o*x*)26gcvb zk2s%(RrCVd(;E8eDD8R+q`#h(egQk8;*1l@OFYq{qv2$H&T}KOnjp{*pI0**scNAr z+bj;=Hp)aU(3Mc+DWPWTTFw`%E4&|0*wV>R{g`AdA-OnnT^7Q@VLCjYxTj+b{Xb5$ ztBsSPQ@Fw4Q7J^l|F#Lo#Egjo(TvJ)&MS^Px*GXdtdh*6SMv+ZdrI=FCXBxi4QG&gpXOT>qsH4;bc#d+SS^tKm8g}y`%Vk ztL#P0b*!FsWpIu~0>yq{3x>QV9Ws@!)~Fju_GnyR%@x%j<;A3);<)l$~8pW1+erqA>h78nAmM90}1+FEjO>-9>iKd&{ z#=MA|e{(Kr8c#3*Q%~ox>}qETVpb*`XKz=Ka5l!i;nYovMx=)CvU|u%!+$^Z$5#5WD!Z-^;%Rg8v0L1-L)X(+2KOa8GgP zIN|yfPd0bKy=C`Zi0>lx(_FPNum#U>wdw|V7SHh{@H}#K!pmYFX<7oG-$&}oU8G0% z_85DX(UQjW?jNvW?=s93#=b}EzGbute1+DY%s1%TmtIDD3ctWw!p0?ZtZ2{NhebD? zM~$q})3t=|tdU+qPuAG8giX=+=6l$3v?Xg~Tb8i3zHQTyvc@tVOJVvRvUiw|0gYi8 zom_j-N)mcV!%osLObSK_ew_JF)9NY_7Kls{n@eOhV!MUi_ze3a?8C%2jsf&hX3%0g zC)i%JXv{Gm`fDGp1><~5I$t0+JK^B~4w9WiwA@NbUDw~x9j5LGb^S;`;AO+aizWt4 mykz1igo(iiq@!D*&-NLzvi)M9d5kwao}%lOUXk3 literal 0 HcmV?d00001 diff --git a/service-price/pom.xml b/service-price/pom.xml new file mode 100644 index 0000000..055e630 --- /dev/null +++ b/service-price/pom.xml @@ -0,0 +1,42 @@ + + + + online-taxi-public + com.mashibing + 1.0-SNAPSHOT + + 4.0.0 + + service-price + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.1.0 + + + + org.springframework.cloud + spring-cloud-starter-openfeign + 3.1.0 + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + 3.1.5 + + + + + + \ No newline at end of file diff --git a/service-price/serviceprice.iml b/service-price/serviceprice.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/service-price/serviceprice.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/service-price/src/main/java/com/mashibing/servicprice/ServicePriceApplication.java b/service-price/src/main/java/com/mashibing/servicprice/ServicePriceApplication.java new file mode 100644 index 0000000..ce5ee91 --- /dev/null +++ b/service-price/src/main/java/com/mashibing/servicprice/ServicePriceApplication.java @@ -0,0 +1,22 @@ +package com.mashibing.servicprice; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-15:52 + * 5 @Modified By: + * 6 + */ +@SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +public class ServicePriceApplication { + public static void main(String[] args) { + SpringApplication.run(ServicePriceApplication.class); + } +} diff --git a/service-price/src/main/java/com/mashibing/servicprice/controller/ForecastPriceController.java b/service-price/src/main/java/com/mashibing/servicprice/controller/ForecastPriceController.java new file mode 100644 index 0000000..7473b8e --- /dev/null +++ b/service-price/src/main/java/com/mashibing/servicprice/controller/ForecastPriceController.java @@ -0,0 +1,33 @@ +package com.mashibing.servicprice.controller; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.ForecastPriceDTO; +import com.mashibing.servicprice.service.ForecastPriceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:00 + * 5 @Modified By: + * 6 + */ +@RestController +public class ForecastPriceController { + + @Autowired + private ForecastPriceService forecastPriceService; + + public ResponseResult forecastPrice(@RequestBody ForecastPriceDTO forecastPriceDTO){ + + String depLongitude = forecastPriceDTO.getDepLongitude(); + String depLatitude = forecastPriceDTO.getDepLatitude(); + String destLongitude = forecastPriceDTO.getDestLongitude(); + String destLatitude = forecastPriceDTO.getDestLatitude(); + + return forecastPriceService.forecastPrice(depLongitude,depLatitude,destLongitude,destLatitude); + + } +} diff --git a/service-price/src/main/java/com/mashibing/servicprice/remote/ServiceMapClient.java b/service-price/src/main/java/com/mashibing/servicprice/remote/ServiceMapClient.java new file mode 100644 index 0000000..f130da7 --- /dev/null +++ b/service-price/src/main/java/com/mashibing/servicprice/remote/ServiceMapClient.java @@ -0,0 +1,23 @@ +package com.mashibing.servicprice.remote; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.ForecastPriceDTO; +import com.mashibing.internalcommon.responese.DirectionResponse; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-29-16:18 + * 5 @Modified By: + * 6 + */ +@FeignClient("service-map") +public interface ServiceMapClient { + + @RequestMapping(method = RequestMethod.GET,value = "/direction") + public ResponseResult direction(@RequestBody ForecastPriceDTO forecastPriceDTO); +} diff --git a/service-price/src/main/java/com/mashibing/servicprice/service/ForecastPriceService.java b/service-price/src/main/java/com/mashibing/servicprice/service/ForecastPriceService.java new file mode 100644 index 0000000..f2c4071 --- /dev/null +++ b/service-price/src/main/java/com/mashibing/servicprice/service/ForecastPriceService.java @@ -0,0 +1,36 @@ +package com.mashibing.servicprice.service; + +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.request.ForecastPriceDTO; +import com.mashibing.internalcommon.responese.ForecastPriceResponese; +import com.mashibing.servicprice.remote.ServiceMapClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-28-16:02 + * 5 @Modified By: + * 6 + */ +@Service +public class ForecastPriceService { + + @Autowired + private ServiceMapClient serviceMapClient; + + public ResponseResult forecastPrice(String depLongitude,String depLatitude,String destLongitude,String destLatitude){ + + ForecastPriceDTO forecastPriceDTO = new ForecastPriceDTO(); + forecastPriceDTO.setDepLatitude(depLatitude); + forecastPriceDTO.setDepLongitude(depLongitude); + forecastPriceDTO.setDestLatitude(destLatitude); + forecastPriceDTO.setDestLongitude(destLongitude); + serviceMapClient.direction(forecastPriceDTO); + + ForecastPriceResponese forecastPriceResponese = new ForecastPriceResponese(); + forecastPriceResponese.setPrice(14); + return ResponseResult.success(forecastPriceResponese); + } +} diff --git a/service-price/src/main/resources/application.yml b/service-price/src/main/resources/application.yml new file mode 100644 index 0000000..8a210c7 --- /dev/null +++ b/service-price/src/main/resources/application.yml @@ -0,0 +1,14 @@ +server: + port: 8084 + +spring: + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + application: + name: service-price + +feign: + httpclient: + enabled: true \ No newline at end of file diff --git a/service-verificationcode/pom.xml b/service-verificationcode/pom.xml new file mode 100644 index 0000000..88ec1ef --- /dev/null +++ b/service-verificationcode/pom.xml @@ -0,0 +1,35 @@ + + + + online-taxi-public + com.mashibing + 1.0-SNAPSHOT + + 4.0.0 + + service-verificationcode + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.1.0 + + + + com.mashibing + internal-common + 1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.java b/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.java new file mode 100644 index 0000000..f51a282 --- /dev/null +++ b/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.java @@ -0,0 +1,21 @@ +package com.mashibing.serviceverificationcode; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-01-2:09 + * 5 @Modified By: + * 6 + */ +@SpringBootApplication +@EnableDiscoveryClient +public class ServiceVerificationcodeApplication { + + public static void main(String[] args) { + SpringApplication.run(ServiceVerificationcodeApplication.class); + } +} diff --git a/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/controller/NumberCodeController.java b/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/controller/NumberCodeController.java new file mode 100644 index 0000000..57f9baa --- /dev/null +++ b/service-verificationcode/src/main/java/com/mashibing/serviceverificationcode/controller/NumberCodeController.java @@ -0,0 +1,33 @@ +package com.mashibing.serviceverificationcode.controller; + +import com.alibaba.fastjson.JSONObject; +import com.mashibing.internalcommon.dto.ResponseResult; +import com.mashibing.internalcommon.responese.NumberCodeResponese; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 2 @Author: Joy + * 3 @Description: + * 4 @Date Created in 2024-11-01-19:34 + * 5 @Modified By: + * 6 + */ +@RestController +public class NumberCodeController { + + @GetMapping("/numberCode/{size}") + public ResponseResult numberCode(@PathVariable("size") int size){ + + System.out.println("size:" +size); + + double mathRandom = (Math.random()*9 +1)*(Math.pow(10,size-1)); + int resultInt = (int)mathRandom; + + NumberCodeResponese responese = new NumberCodeResponese(); + responese.setNumberCode(resultInt); + return ResponseResult.success(responese); + } +} diff --git a/service-verificationcode/src/main/resources/application.yml b/service-verificationcode/src/main/resources/application.yml new file mode 100644 index 0000000..28180e0 --- /dev/null +++ b/service-verificationcode/src/main/resources/application.yml @@ -0,0 +1,9 @@ +server: + port: 8082 +spring: + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + application: + name: service-verificationcode \ No newline at end of file diff --git a/service-verificationcode/target/classes/application.yml b/service-verificationcode/target/classes/application.yml new file mode 100644 index 0000000..28180e0 --- /dev/null +++ b/service-verificationcode/target/classes/application.yml @@ -0,0 +1,9 @@ +server: + port: 8082 +spring: + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + application: + name: service-verificationcode \ No newline at end of file diff --git a/service-verificationcode/target/classes/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.class b/service-verificationcode/target/classes/com/mashibing/serviceverificationcode/ServiceVerificationcodeApplication.class new file mode 100644 index 0000000000000000000000000000000000000000..89cef672654eda38d620bea4a2dd9e8393f76fdc GIT binary patch literal 930 zcmb_bO^?$s5PeQR!nTDiEi5eGoapWWU$~&6m39jVq3|J!%7K&Px~-SQt{kVp&*B6^ zf*-(-LQK*kx~n2CM2g3rnY@|zJo)kS>vsV6aI1kDE`_)pVz+@SxEkUbL;Zm^+8;1f zdV3>=>cEZ_!*-;NdY-4Ta<4_4kf#$_DUy+Jx;U?#RX@`i!_!FGl&2z_=~$a7&y-te zsTRuViI&1^Yb3$);nF`kdEvho?zRHc)sT%1_6X8Q+tS^}mL{Msgi)43zUlnf$O#lD@ literal 0 HcmV?d00001 diff --git a/service-verificationcode/target/classes/com/mashibing/serviceverificationcode/controller/NumberCodeController.class b/service-verificationcode/target/classes/com/mashibing/serviceverificationcode/controller/NumberCodeController.class new file mode 100644 index 0000000000000000000000000000000000000000..57f1388dedcf4a748d457d546c217c065f6848c9 GIT binary patch literal 1761 zcmbVMT~i!I6g|CP1M3iw50iyx3`Vm=!yv90S&W2_kkut25K+sg+1ZYCn4Q_0>4j3u zXW#rOmin-vOqD+%KPu(v9b|WbN=2t?dU|f3d(Z82Z};;TfBg-hgm3bgz}z4{#Jq)% z@>TY**$xvOGD!R`b>s5?q}q)??#x7)JZfp{zNSukN@fSZ71(O}E)3jx5;&*Ke6pI9-*TpUiH57MSkmJ4vOF zc;S_aw30sjT?<&&@h4YFx`@}tP1#Z1E1NGBAwYTvGE?QW%v4(Ylizb}o zyX>YNZFE{`DZefws$e#}XyYz6%y7>}1z%YB(nb}V7Vg`4fGryju`RIJ-h}n2wdB<7IQ8x(W0N%jE$bCMJRL;#nXOW9K9!V3|hNe!z^+ zONh71g)ZqP8;e_rjt?bo9UjYcGdyHvi)(AOq)S?ee_;3r;2&@Dqv!9 z%kyN+6Sv-*SRy=?`i}w2xQcP!#^y;un1xqfb^43S8%VfeuB!Gv7hPxPkX+vyB`d T7-LLa3O8v>F|5HGQ5@hOOH1Ew literal 0 HcmV?d00001 diff --git a/service-verificationcode/target/maven-archiver/pom.properties b/service-verificationcode/target/maven-archiver/pom.properties new file mode 100644 index 0000000..02127d5 --- /dev/null +++ b/service-verificationcode/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=service-verificationcode +groupId=com.mashibing +version=1.0-SNAPSHOT diff --git a/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..f8c07bb --- /dev/null +++ b/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,2 @@ +com\mashibing\serviceverificationcode\controller\NumberCodeController.class +com\mashibing\serviceverificationcode\ServiceVerificationcodeApplication.class diff --git a/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..a5e49f7 --- /dev/null +++ b/service-verificationcode/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,2 @@ +E:\mashibing_workspace\onlinetaxipublic\service-verificationcode\src\main\java\com\mashibing\serviceverificationcode\controller\NumberCodeController.java +E:\mashibing_workspace\onlinetaxipublic\service-verificationcode\src\main\java\com\mashibing\serviceverificationcode\ServiceVerificationcodeApplication.java diff --git a/service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/service-verificationcode/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/service-verificationcode/target/service-verificationcode-1.0-SNAPSHOT.jar b/service-verificationcode/target/service-verificationcode-1.0-SNAPSHOT.jar new file mode 100644 index 0000000000000000000000000000000000000000..b2f56bbd235e3a0e1e879aa43b85f092cf68a314 GIT binary patch literal 4231 zcmbtX2{@GN7axSsAlYt0N@N*hFI#b$VT>{MsL&W>nHh{VOCnruS|v-Uq=gWnL<_Rb zke&;>syyyHr6C~3Xb`WSQ2t+D%umP=D zY``7`v(SMcjNwodK#Ug<+xm}~tXX4t6!7H*ZQ&*%YOeh`?;jvx zOlBZ|)*CjvR;pzY;d#N4QrQNgR7L;;&F^0yZwufz)&u{~$$l-t`CS5!@pf@_a3!4F zKvv=>S#KwzpDWhM&xz>j?25(sxOxz<9*#~M*ihKC4Xg*jhvsu<*~qKyc(Xb9B}Jr}{k-kY9#kxu|M^+Jk8rZSeqX-2fh%?-)-{-1orAox>c@kbACnaoek)9liEr%ABCqVDuTK+&=Es zqG$6)*F%aAoVh~k9R_9VP=?f0#mcCN*7HoT-cDS`TE|xur)PqZtXDWoDoOLtXU52`LZ!fkTvwVdQ zAQ4PB(nUM0K-OpPP+BpRH<)%!Y&QdE=1xvT; zj6lcZoEFapMQW3g<0YSb@m-MkkKl(L8Dg%F7VO#`9^dPmT!NZe>D)JRn=!@g&4I$1mmy}ocZtuPQ{_+es zwARR6IPXzak;;ThqQUcy=C}OK&fGI#D1*ec!eDy|+~QPsrFum|_o7ufEOtyp6)hU! zYJFjFmP+JLDM+}Xy_iN2s2jN+emk+}qt7<^n28kT?y8_Xvq5{;gudWGu1PJ}K&fON z{1Lui;$7amj~>__?m2~&w?gAJ@&{d8Ll0Fp+C80p9X`eTO8Ia>BE+#KM-|TAp&R>+ zLcL+om(~}^sN|To*FEN$O!1`w<%ZzepsR5fKzTC~N)^u~76+LSCHk+d^Hp_E|5K6%rk+w&ztzW2_PHW2@H)%91Wr#4D z<%UtqNQf>9(&5Mj^PZDljAG?nJ^EtRi0va;(Hv@Zjsxf4*J(-~K7INtXO9SBzP$p* zm7qC1R~#!NlB-xKYOrsFLD$>!WM$)@lh*RM8nc)|r?jmT$&$Z01?C%{QtgG81SH`) zl4J$bsx#})rU)n{8K{8SG5m^r9GHH+yPbwPX6fK4-_t&OLJ!_J`C4AQJ_T8orx73| zI>F4PXdJ8S9(^!dqTkt2YeDElRO-o!`pMaS2Q&q&1f?hcC{fM~knJjavZPgEtN%K0 zCduJBtQ5-j<$oEQiVYJ)9N{I4D8GkfW9YSxK z7shZ3e%gIWsr?@NA=G2ref~XhBNXP3jY3Bti?Qp*3T6 z_2gW4{CNTcHUN){w?Lsk$#Xv&JQC4~zeg2LlRgm5!59P0JX5S*|5!!b&#@FWH-k$( zEzWF6`l~N>s;*vo(ZMo)j3?V1eld;#6(?Az9NARhHNNNr`z9%1Q|a#BtvxUJph!s4 z`^%^8*m&#kyXpKy&X)Gyf`W^&OD=!frUxuAlU=AS7bwbLd_5B;@h;PJpua{rXZ&tM z4QOG6Tvz60jwesx?4pj}=7Sf_tH^v1gWrX#yst#o1VCh6Zj9IsR0OKR9}}2J0GpgmlJXQ!7f%(2Y7{iw6cRA&zGMo zZkNPJPC)6HG}v&ROV{n-95zGjZnr{NYG~E*&-WfX%AoR*vEWFLy1M^pjmWTCRi@dI zV})u(>EYGw{>egpFBQJR>~3E6RVnYxVMXq&4HblZGVFMDGQvgd{N8?OR@+>(8Fi0< z#WiQs6uARezf2O6amu`8#M$O=v)#JTIgEPc=+KE&EOZ7-Kr8y;#yC+@=j96bv+>B> zMmL5yVqZ!h)~+DHwiEmo4wDZ3!zAepc&C3@wkeQ#GvLwtPZi)v^zd{d`nWoIBW0yY zMo1&MF{6BlF+}>ck#Q>o2_YK+8(C6a1F{~Cpi&K?WGDobWl-PH`Whu$Uu#6JLk?0I zrDa*N@>N=t8o|@v+qO=Ra($pO0*#M>k(cS$LT=M`r$I@$1Km#^dSABR?yz?oAu{LF4swQ~Mcz@?*8B zb=%xB#`-+}UzCinU;twc>tCr%`#@bw#Oca{z&u}F7whGAMIP3tFHrO@XM$t~0tNzc0>5~m L8FT`6L7=|@nc6Mv literal 0 HcmV?d00001