OCR
parent
ff022d0e90
commit
443da9c4a6
|
@ -4,6 +4,9 @@
|
|||
<file url="file://$PROJECT_DIR$/bwie-auth/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-gateway/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-alipay/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-authentication/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-kill/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-system/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/bwie-modules/bwie-team/src/main/java" charset="UTF-8" />
|
||||
|
@ -12,5 +15,6 @@
|
|||
<file url="file://$PROJECT_DIR$/bwie-modules/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../../maven_repository/org/springframework/boot/spring-boot-starter-parent/2.6.2/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
|
@ -5,6 +6,7 @@
|
|||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/bwie-modules/bwie-alipay/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/bwie-modules/bwie-kill/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
|
|
|
@ -5,15 +5,38 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="7a302432-88ff-4688-b881-940ab700167c" name="Changes" comment="OCR">
|
||||
<change afterPath="$PROJECT_DIR$/bwie-modules/bwie-team/src/main/java/com/bwie/team/controller/TeamController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/bwie-modules/bwie-team/src/main/java/com/bwie/team/mapper/TeamMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/bwie-modules/bwie-team/src/main/java/com/bwie/team/service/TeamService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/controller/AuthenController.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/controller/AuthenController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenService.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/OCRUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/OCRUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AuthenReq.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AuthenReq.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRReq.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRReq.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRResponse.java" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRResponse.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/pom.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/AuthenApp.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/controller/AuthenController.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenService.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/service/AuthenServiceImpl.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/AliveUtil.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/IdCheckUtil.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/OCRUtil.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/OSSupload.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/util/ThreadPoolExecutorConfig.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AliveData.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AliveMotions.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AliveReq.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AliveRes.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/AuthenReq.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/IdCheckReq.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/IdCheckResponse.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/IdData.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRConfig.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRReq.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/java/com/bwie/authen/vo/OCRResponse.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/resources/bootstrap.yml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-authen/src/main/resources/mapper/SysMapper.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-system/src/main/resources/mapper/MonitorPer.xml" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-system/src/main/resources/mapper/AuthenticationService.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/bwie-team/src/main/resources/mapper/MonitorPer.xml" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/bwie-team/src/main/resources/mapper/AuthenticationService.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bwie-modules/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/bwie-modules/pom.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -54,6 +77,7 @@
|
|||
"associatedIndex": 5
|
||||
}</component>
|
||||
<component name="ProjectId" id="2fRB8DjXoWB3AzOp9L7KqviKSmR" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="showLibraryContents" value="true" />
|
||||
<option name="showVisibilityIcons" value="true" />
|
||||
|
@ -115,11 +139,11 @@
|
|||
</component>
|
||||
<component name="RunManager" selected="Spring Boot.AuthenApp">
|
||||
<configuration name="AuthenApp" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
|
||||
<module name="bwie-authen" />
|
||||
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bwie.authen.AuthenApp" />
|
||||
<module name="bwie-authentication" />
|
||||
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bwie.authentication.AuthenApp" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.bwie.authen.*" />
|
||||
<option name="PATTERN" value="com.bwie.authentication.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
|
@ -185,6 +209,8 @@
|
|||
<workItem from="1714440386335" duration="3954000" />
|
||||
<workItem from="1714526011728" duration="11554000" />
|
||||
<workItem from="1714610383772" duration="2746000" />
|
||||
<workItem from="1714652333306" duration="125000" />
|
||||
<workItem from="1714652508342" duration="1031000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="拼团">
|
||||
<option name="closed" value="true" />
|
||||
|
@ -210,7 +236,15 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1714529580181</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="4" />
|
||||
<task id="LOCAL-00004" summary="登录">
|
||||
<option name="closed" value="true" />
|
||||
<created>1714648968077</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1714648968077</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="5" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@ -286,6 +320,7 @@
|
|||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="拼团" />
|
||||
<MESSAGE value="OCR" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="OCR" />
|
||||
<MESSAGE value="登录" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="登录" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,74 +0,0 @@
|
|||
<?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.bwie</groupId>
|
||||
<artifactId>bwie-modules</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>bwie-authen</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- 系统公共 依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.bwie</groupId>
|
||||
<artifactId>bwie-common</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringBoot Web-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.2.8</version>
|
||||
</dependency>
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!-- Mybatis 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Pagehelper -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<!-- test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- oss sdk-->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.10.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,14 +0,0 @@
|
|||
package com.bwie.authen;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
||||
@EnableDiscoveryClient
|
||||
public class AuthenApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AuthenApp.class);
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package com.bwie.authen.controller;
|
||||
|
||||
import com.bwie.authen.service.AuthenService;
|
||||
import com.bwie.authen.vo.AliveReq;
|
||||
import com.bwie.authen.vo.AuthenReq;
|
||||
import com.bwie.authen.vo.IdCheckReq;
|
||||
import com.bwie.authen.vo.OCRReq;
|
||||
import com.bwie.common.result.Result;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@RestController
|
||||
public class AuthenController {
|
||||
private final AuthenService authenService;
|
||||
|
||||
public AuthenController(AuthenService authenService) {
|
||||
this.authenService = authenService;
|
||||
}
|
||||
|
||||
@PostMapping("ocrScan")
|
||||
public Result ocrScan(@RequestParam String side,@RequestParam("file") MultipartFile url) throws IOException {
|
||||
Result result = authenService.ocrScan(side,url);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("commitAuthen")
|
||||
public Result commitAuthen(@RequestParam("face") MultipartFile img1,
|
||||
@RequestParam("back") MultipartFile img2,
|
||||
@RequestParam("file") MultipartFile movie,
|
||||
AuthenReq authenReq) throws ExecutionException, InterruptedException {
|
||||
Result result = authenService.commitAuthen(img1,img2,movie,authenReq);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("upload")
|
||||
public Result upload(@RequestParam("file")MultipartFile multipartFile) throws IOException {
|
||||
String upload = authenService.upload(multipartFile);
|
||||
return Result.success(upload);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("idCheck")
|
||||
public Result idCheck(@RequestBody IdCheckReq ocrReq) {
|
||||
Result result = authenService.idCheck(ocrReq);
|
||||
return result;
|
||||
}
|
||||
@PostMapping("alive")
|
||||
public Result alive(@RequestBody AliveReq ocrReq) {
|
||||
Result result = authenService.alive(ocrReq);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package com.bwie.authen.service;
|
||||
|
||||
import com.bwie.authen.vo.AliveReq;
|
||||
import com.bwie.authen.vo.AuthenReq;
|
||||
import com.bwie.authen.vo.IdCheckReq;
|
||||
import com.bwie.common.result.Result;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
public interface AuthenService {
|
||||
Result ocrScan(String side, MultipartFile url) throws IOException;
|
||||
Result commitAuthen(MultipartFile img1, MultipartFile img2, MultipartFile movie, AuthenReq authenReq) throws ExecutionException, InterruptedException;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String upload(MultipartFile multipartFile) throws IOException;
|
||||
|
||||
|
||||
Result idCheck(IdCheckReq ocrReq);
|
||||
|
||||
Result alive(AliveReq ocrReq);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
package com.bwie.authen.service;
|
||||
|
||||
import com.bwie.authen.util.*;
|
||||
import com.bwie.authen.vo.*;
|
||||
import com.bwie.common.result.Result;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Service
|
||||
@Log4j2
|
||||
public class AuthenServiceImpl implements AuthenService{
|
||||
|
||||
private final OSSupload osSupload;
|
||||
private final IdCheckUtil idCheckUtil;
|
||||
private final OCRUtil ocrUtil;
|
||||
private final AliveUtil aliveUtil;
|
||||
private final ThreadPoolExecutorConfig config;
|
||||
|
||||
public AuthenServiceImpl(OSSupload osSupload, IdCheckUtil idCheckUtil, OCRUtil ocrUtil, AliveUtil aliveUtil, ThreadPoolExecutorConfig config) {
|
||||
this.osSupload = osSupload;
|
||||
this.idCheckUtil = idCheckUtil;
|
||||
this.ocrUtil = ocrUtil;
|
||||
this.aliveUtil = aliveUtil;
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result ocrScan( String side, MultipartFile url) throws IOException {
|
||||
OCRResponse send = ocrUtil.send(side,url);
|
||||
return Result.success(send);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result commitAuthen(MultipartFile img1, MultipartFile img2, MultipartFile movie, AuthenReq authenReq) throws ExecutionException, InterruptedException {
|
||||
ThreadPoolExecutor threadPoolExecutor = config.threadPoolExecutor();
|
||||
CompletableFuture<Integer> f1 = CompletableFuture.supplyAsync(() -> {
|
||||
IdCheckReq idCheckReq = new IdCheckReq();
|
||||
idCheckReq.setName(authenReq.getName());
|
||||
idCheckReq.setIdCardNo(authenReq.getIdCord());
|
||||
IdCheckResponse idcheck = idCheckUtil.idcheck(idCheckReq);
|
||||
Integer result = idcheck.getIdData().getResult();
|
||||
if(result!=0){
|
||||
return 1;
|
||||
}
|
||||
try {
|
||||
OCRResponse send = ocrUtil.send("face", img1);
|
||||
if(send.getNum().equals(authenReq.getIdCord())&&send.getName().equals(authenReq.getName())){
|
||||
return 0;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return 1;
|
||||
},threadPoolExecutor);
|
||||
|
||||
CompletableFuture<? extends Serializable> f2= CompletableFuture.supplyAsync(() -> {
|
||||
|
||||
String upload = null;
|
||||
try {
|
||||
upload = osSupload.upload(movie);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
if(upload==null){
|
||||
return false;
|
||||
}
|
||||
//url添加数据库
|
||||
AliveReq aliveReq = new AliveReq();
|
||||
aliveReq.setUrl(upload);
|
||||
aliveReq.setMotions(authenReq.getMotions());
|
||||
AliveRes alive = aliveUtil.alive(aliveReq);
|
||||
String success = alive.getSuccess();
|
||||
return success;
|
||||
},threadPoolExecutor);
|
||||
|
||||
CompletableFuture<Integer> f3 = CompletableFuture.supplyAsync(() -> {
|
||||
String upload = null;
|
||||
try {
|
||||
upload = osSupload.upload(img2);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String upload2 = null;
|
||||
try {
|
||||
upload2 = osSupload.upload(movie);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if(upload==null ||upload2==null){
|
||||
return 1;
|
||||
}
|
||||
//存入数据库
|
||||
return 0;
|
||||
},threadPoolExecutor);
|
||||
|
||||
Integer i = f1.get();
|
||||
Serializable serializable = f2.get();
|
||||
Integer b1 = f3.get();
|
||||
|
||||
if ((i == 0) && serializable.equals("true")||b1==0) {
|
||||
return Result.success();
|
||||
}
|
||||
return Result.error();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String upload(MultipartFile multipartFile) throws IOException {
|
||||
return osSupload.upload(multipartFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Result idCheck(IdCheckReq ocrReq) {
|
||||
IdCheckResponse idcheck = idCheckUtil.idcheck(ocrReq);
|
||||
return Result.success(idcheck);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result alive(AliveReq ocrReq) {
|
||||
AliveRes alive = aliveUtil.alive(ocrReq);
|
||||
return Result.success(alive);
|
||||
}
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
package com.bwie.authen.util;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bwie.authen.vo.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class AliveUtil {
|
||||
@Value("${alive.appcode}")
|
||||
private String appcode;
|
||||
@Value("${alive.host}")
|
||||
private String host;
|
||||
|
||||
public AliveRes alive(AliveReq aliveReq){
|
||||
Map stringStringMap = new HashMap<>();
|
||||
stringStringMap.put("url", aliveReq.getUrl());
|
||||
stringStringMap.put("motions", aliveReq.getMotions());
|
||||
String result = HttpUtil.createPost(host ) // 不在URL中拼接查询参数,因为我们将它们放在请求体中
|
||||
.header("Authorization", "APPCODE " + appcode)
|
||||
.form(stringStringMap)
|
||||
.execute()
|
||||
.body();
|
||||
System.out.println("result = " + result);
|
||||
AliveRes aliveRes = JSON.parseObject(result, AliveRes.class);
|
||||
AliveData aliveData = JSON.parseObject(aliveRes.getData(), AliveData.class);
|
||||
AliveMotions aliveMotions = JSON.parseObject(aliveData.getMotions(), AliveMotions.class);
|
||||
aliveData.setAliveMotions(aliveMotions);
|
||||
aliveRes.setAliveData(aliveData);
|
||||
// msgResponse.setIdData(idData);
|
||||
if(aliveRes.getCode()!=200){
|
||||
System.out.println("msgResponse = -------------------" + aliveRes.getMsg());
|
||||
throw new RuntimeException(aliveRes.getMsg());
|
||||
}
|
||||
return aliveRes;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
package com.bwie.authen.util;
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bwie.authen.vo.IdCheckReq;
|
||||
import com.bwie.authen.vo.IdCheckResponse;
|
||||
|
||||
import com.bwie.authen.vo.IdData;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
public class IdCheckUtil {
|
||||
@Value("${idcheck.appcode}")
|
||||
private String appcode;
|
||||
@Value("${idcheck.host}")
|
||||
private String host;
|
||||
@Value("${idcheck.path}")
|
||||
private String path;
|
||||
|
||||
|
||||
public IdCheckResponse idcheck(IdCheckReq idCheckReq){
|
||||
|
||||
Map stringStringMap = new HashMap<>();
|
||||
stringStringMap.put("name", idCheckReq.getName());
|
||||
stringStringMap.put("idCardNo", idCheckReq.getIdCardNo());
|
||||
String result = HttpUtil.createPost(host + path) // 不在URL中拼接查询参数,因为我们将它们放在请求体中
|
||||
.header("Authorization", "APPCODE " + appcode)
|
||||
.form(stringStringMap)
|
||||
.execute()
|
||||
.body();
|
||||
System.out.println("result = " + result);
|
||||
IdCheckResponse msgResponse = JSON.parseObject(result, IdCheckResponse.class);
|
||||
IdData idData = JSON.parseObject(msgResponse.getData(), IdData.class);
|
||||
msgResponse.setIdData(idData);
|
||||
if(msgResponse.getCode()!=200){
|
||||
System.out.println("msgResponse = -------------------" + msgResponse);
|
||||
throw new RuntimeException(msgResponse.getMsg());
|
||||
}
|
||||
return msgResponse;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package com.bwie.authen.util;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bwie.authen.vo.OCRReq;
|
||||
import com.bwie.authen.vo.OCRResponse;
|
||||
|
||||
|
||||
import com.bwie.common.result.Result;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class OCRUtil {
|
||||
@Value("${ocr.appcode}")
|
||||
private String appcode;
|
||||
@Value("${ocr.host}")
|
||||
private String host;
|
||||
@Value("${ocr.Content-Type}")
|
||||
private String contentType;
|
||||
@Value("${ocr.path}")
|
||||
private String path;
|
||||
|
||||
public OCRResponse send(String side, MultipartFile url) throws IOException {
|
||||
|
||||
|
||||
// 对图像进行base64编码
|
||||
|
||||
String encode = Base64.encode(url.getBytes());
|
||||
|
||||
// 拼装请求body的json字符串
|
||||
JSONObject requestObj = new JSONObject();
|
||||
requestObj.put("image", encode);
|
||||
requestObj.put("side", side); // 假设ocrReq有getSide()方法返回要识别的身份证面(正/反)
|
||||
// 如果API还有其他配置参数,可以从ocrReq中获取并添加到requestObj中
|
||||
|
||||
String bodys = requestObj.toString();
|
||||
|
||||
try {
|
||||
// 创建并执行POST请求
|
||||
String result = HttpUtil.createPost(host + path) // 不在URL中拼接查询参数,因为我们将它们放在请求体中
|
||||
.header("Authorization", "APPCODE " + appcode)
|
||||
.header("Content-Type", contentType) // 确保这里与headers中的Content-Type一致
|
||||
.body(bodys) // 设置请求体
|
||||
.execute()
|
||||
.body();
|
||||
|
||||
System.out.println("result = " + result);
|
||||
|
||||
OCRResponse msgResponse = JSON.parseObject(result, OCRResponse.class);
|
||||
|
||||
// 检查是否成功,而不是使用Assert(Assert通常用于测试)
|
||||
if (!msgResponse.getSuccess().equals("true")) {
|
||||
// 处理失败情况,例如记录日志或返回错误信息给调用者
|
||||
throw new RuntimeException("扫描失败" ); // 假设OCRResponse有一个getErrorMessage方法
|
||||
}
|
||||
|
||||
// 成功处理逻辑
|
||||
return msgResponse;
|
||||
} catch (Exception e) {
|
||||
// 处理异常,例如记录日志或返回错误信息给调用者
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("请求OCR服务时发生异常", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
package com.bwie.authen.util;
|
||||
|
||||
import com.aliyun.oss.OSSClient;
|
||||
import com.aliyun.oss.model.ObjectMetadata;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.security.SecureRandom;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@Log4j2
|
||||
@Configuration
|
||||
public class OSSupload {
|
||||
@Value("${aliyun.end-point}")
|
||||
private String endPoint;
|
||||
|
||||
|
||||
@Value("${aliyun.access-key-id}")
|
||||
private String accessKeyId;
|
||||
|
||||
@Value("${aliyun.access-key-secret}")
|
||||
private String accesskeySecret;
|
||||
|
||||
// @Value("${aliyun.access-pre}")
|
||||
// private String accessPre;
|
||||
|
||||
@Value("${aliyun.bucket-name}")
|
||||
private String bucketName;
|
||||
|
||||
public String upload(MultipartFile multipartFile) throws IOException {
|
||||
|
||||
|
||||
OSSClient ossClient = new OSSClient(endPoint, accessKeyId, accesskeySecret);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
||||
// 获取文件名
|
||||
String fileName = multipartFile.getOriginalFilename();
|
||||
// 获取文件后缀名
|
||||
String suffixName = fileName.substring(fileName.lastIndexOf("."));
|
||||
// 最后上传生成的文件名
|
||||
String finalFileName = System.currentTimeMillis() + "" + new SecureRandom().nextInt(0x0400) + suffixName;
|
||||
// oss中的文件夹名
|
||||
String objectName = sdf.format(new Date()) + "/" + finalFileName;
|
||||
// 创建上传文件的元信息,可以通过文件元信息设置HTTP header(设置了才能通过返回的链接直接访问)。
|
||||
ObjectMetadata objectMetadata = new ObjectMetadata();
|
||||
String contentType = getcontentType(suffixName.substring(suffixName.lastIndexOf("."))); // 注意这里加1
|
||||
objectMetadata.setContentType(contentType);
|
||||
// 设置Content-Disposition为inline
|
||||
objectMetadata.setContentDisposition("inline");
|
||||
// 文件上传
|
||||
ossClient.putObject(bucketName, objectName, new ByteArrayInputStream(multipartFile.getBytes()), objectMetadata);
|
||||
//// 设置URL过期时间为1小时。
|
||||
// Date expiration = new Date(System.currentTimeMillis() + 3600 * 1000);
|
||||
// 构造对象的完整URL
|
||||
String url = "http://" + bucketName + "." + endPoint + "/" + objectName;
|
||||
|
||||
log.info("阿里云OSS的文件url:{}", url);
|
||||
ossClient.shutdown();
|
||||
return url;
|
||||
}
|
||||
public static String getcontentType(String FilenameExtension) {
|
||||
if (FilenameExtension.equalsIgnoreCase(".bmp")) {
|
||||
return "image/bmp";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".gif")) {
|
||||
return "image/gif";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".jpeg") ||
|
||||
FilenameExtension.equalsIgnoreCase(".jpg") ||
|
||||
FilenameExtension.equalsIgnoreCase(".png")) {
|
||||
return "image/jpg";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".html")) {
|
||||
return "text/html";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".txt")) {
|
||||
return "text/plain";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".vsd")) {
|
||||
return "application/vnd.visio";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".pptx") ||
|
||||
FilenameExtension.equalsIgnoreCase(".ppt")) {
|
||||
return "application/vnd.ms-powerpoint";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".docx") ||
|
||||
FilenameExtension.equalsIgnoreCase(".doc")) {
|
||||
return "application/msword";
|
||||
}
|
||||
if (FilenameExtension.equalsIgnoreCase(".xml")) {
|
||||
return "text/xml";
|
||||
}
|
||||
return "image/jpg";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package com.bwie.authen.util;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Configuration
|
||||
@Log4j2
|
||||
public class ThreadPoolExecutorConfig {
|
||||
@Value("${authen.coreSize}")
|
||||
private Integer coreSize;
|
||||
@Value("${authen.coreMax}")
|
||||
private Integer coreMax;
|
||||
|
||||
|
||||
|
||||
@Bean
|
||||
public ThreadPoolExecutor threadPoolExecutor(){
|
||||
// int coreSize = 3 * Runtime.getRuntime().availableProcessors();
|
||||
// int coreMax = coreSize + 30;
|
||||
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(coreSize, coreMax, 5, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<>(100));
|
||||
return threadPoolExecutor;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AliveData{
|
||||
private boolean passed;
|
||||
private String feature_image_id;
|
||||
private String hack_score;
|
||||
private String order_no;
|
||||
private String motions;
|
||||
private AliveMotions aliveMotions;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AliveMotions{
|
||||
private Double score;
|
||||
private String motion;
|
||||
private boolean passed;
|
||||
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AliveReq {
|
||||
private String url;
|
||||
private String motions;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AliveRes {
|
||||
|
||||
private Integer code;
|
||||
private String msg;
|
||||
private String data;
|
||||
private String success;
|
||||
private AliveData aliveData;
|
||||
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AuthenReq {
|
||||
|
||||
private String motions;
|
||||
private String name;
|
||||
private String idCord;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IdCheckReq {
|
||||
private String name;
|
||||
private String idCardNo;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IdCheckResponse {
|
||||
|
||||
private Integer code;
|
||||
private String msg;
|
||||
private String taskNo; // 本次请求号
|
||||
private IdData idData;
|
||||
private String data;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IdData {
|
||||
private Integer result;// 0: 一致,1: 不一致
|
||||
private String desc;//描述
|
||||
private String sex;//性别
|
||||
private String birthday;
|
||||
private String address;//地址
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OCRConfig {
|
||||
private String side;
|
||||
private String url;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class OCRReq {
|
||||
private String side;
|
||||
private MultipartFile url;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package com.bwie.authen.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OCRResponse {
|
||||
private String address;
|
||||
private String name;
|
||||
private String sex;
|
||||
private String num;
|
||||
private String birth;
|
||||
private String success;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9004
|
||||
# Spring
|
||||
spring:
|
||||
main:
|
||||
allow-circular-references: true
|
||||
allow-bean-definition-overriding: true
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
application:
|
||||
# 应用名称
|
||||
name: bwie-authen
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 124.221.177.197:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.221.177.197:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
|
||||
aliyun:
|
||||
end-point: oss-cn-shanghai.aliyuncs.com
|
||||
access-key-id: LTAI5tEoxVDPCxDpxXLRjUuz
|
||||
access-key-secret: 503OGWrDojxpI5fNrojaXaRJC6ya6y
|
||||
# access-pre: https://dongxiaojie.oss-cn-shanghai.aliyuncs.com
|
||||
bucket-name: ueana
|
||||
|
||||
ocr:
|
||||
host: https://cardnumber.market.alicloudapi.com
|
||||
path: /rest/160601/ocr/ocr_idcard.json
|
||||
appcode: 13a8b5b781bc4c458ce2de65ed79be80
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
|
||||
idcheck:
|
||||
host: https://jumdata.market.alicloudapi.com
|
||||
path: /idcard/validate
|
||||
appcode: 13a8b5b781bc4c458ce2de65ed79be80
|
||||
|
||||
alive:
|
||||
appcode: 13a8b5b781bc4c458ce2de65ed79be80
|
||||
host: https://life.shumaidata.com/checklife
|
||||
|
||||
|
||||
authen:
|
||||
coreSize: 21
|
||||
coreMax: 51
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bwie.system.mapper.SysMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,22 @@
|
|||
package com.bwie.team.controller;
|
||||
|
||||
import com.bwie.common.result.Result;
|
||||
import com.bwie.team.service.TeamService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class TeamController {
|
||||
private final TeamService teamService;
|
||||
|
||||
public TeamController(TeamService teamService) {
|
||||
this.teamService = teamService;
|
||||
}
|
||||
|
||||
@GetMapping("show")
|
||||
public Result show(){
|
||||
return Result.success(teamService.show());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.bwie.team.mapper;
|
||||
|
||||
import com.bwie.common.domain.Team;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TeamMapper {
|
||||
List<Team> show();
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.bwie.team.service;
|
||||
|
||||
import com.aliyun.tea.Tea;
|
||||
import com.bwie.common.domain.Team;
|
||||
import com.bwie.team.vo.GroupSku;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TeamService {
|
||||
// 查询商品信息
|
||||
List<Team> show();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -13,9 +13,8 @@
|
|||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>bwie-system</module>
|
||||
<module>bwie-xxl</module>
|
||||
<module>bwie-team</module>
|
||||
<module>bwie-authen</module>
|
||||
<module>bwie-authentication</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
Loading…
Reference in New Issue