提交 95240669 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 abe193df
......@@ -13,12 +13,14 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
......@@ -27,11 +29,28 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_161">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
差异被折叠。
eclipse.preferences.version=1
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations
......@@ -9,4 +9,6 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
#Generated by Maven
#Tue Jul 14 11:35:29 CST 2020
version=4.0.0
groupId=com.zrqx
artifactId=com.zrqx.core
E:\workspace\scsm\com.zrqx.core\src\test\java\com\zrqx\core\test\BaseServiceTest.java
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="0" failures="0" name="com.zrqx.core.test.BaseServiceTest" time="0" errors="0" skipped="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="D:\Java\jdk1.8.0_161\jre\bin"/>
<property name="java.vm.version" value="25.161-b12"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="E:\workspace\scsm\com.zrqx.core"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.script" value=""/>
<property name="user.country" value="CN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value=""/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="E:\workspace\scsm\com.zrqx.core"/>
<property name="java.runtime.version" value="1.8.0_161-b12"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="D:\Java\jdk1.8.0_161\jre\lib\endorsed"/>
<property name="os.arch" value="amd64"/>
<property name="java.io.tmpdir" value="C:\Users\ADMINI~1\AppData\Local\Temp\"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="user.variant" value=""/>
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="E:\workspace\scsm\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf8050634420166237721.tmp"/>
<property name="sun.jnu.encoding" value="GBK"/>
<property name="java.library.path" value="D:\Java\jdk1.8.0_161\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/Java/jre1.8.0_161/bin/server;D:/Java/jre1.8.0_161/bin;D:/Java/jre1.8.0_161/lib/amd64;C:\Program Files (x86)\Common Files\NetSarang;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\Java\jdk1.8.0_161\bin;D:\Java\jdk1.8.0_161\jre\bin;D:\apache-maven-3.2.2\bin;\;D:\Yozosoft\Yozo_Office\Lib\xuggler\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\ffmpeg;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;D:\SSH Secure Shell;C:\Python27;C:\Python27\Scripts;C:\Python27\Lib\site-packages\django;C:\Python27\Lib\site-packages\django\bin;;E:\sts-4.0.1.RELEASE;;."/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.0"/>
<property name="user.home" value="C:\Users\Administrator"/>
<property name="user.timezone" value="Asia/Shanghai"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="GBK"/>
<property name="user.name" value="Administrator"/>
<property name="java.class.path" value="E:\sts-4.0.1.RELEASE\plugins\org.eclipse.m2e.maven.runtime_1.9.1.20180912-1600\jars\plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="D:\Java\jdk1.8.0_161\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs D:\apache-maven-3.2.2\conf\settings.xml install"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="zh"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_161"/>
<property name="java.ext.dirs" value="D:\Java\jdk1.8.0_161\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="D:\Java\jdk1.8.0_161\jre\lib\resources.jar;D:\Java\jdk1.8.0_161\jre\lib\rt.jar;D:\Java\jdk1.8.0_161\jre\lib\sunrsasign.jar;D:\Java\jdk1.8.0_161\jre\lib\jsse.jar;D:\Java\jdk1.8.0_161\jre\lib\jce.jar;D:\Java\jdk1.8.0_161\jre\lib\charsets.jar;D:\Java\jdk1.8.0_161\jre\lib\jfr.jar;D:\Java\jdk1.8.0_161\jre\classes"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="E:\workspace\scsm\com.zrqx.core\EMBEDDED"/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value="amd64"/>
</properties>
</testsuite>
\ No newline at end of file
-------------------------------------------------------------------------------
Test set: com.zrqx.core.test.BaseServiceTest
-------------------------------------------------------------------------------
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
......@@ -15,11 +15,13 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
......@@ -32,5 +34,22 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
差异被折叠。
......@@ -21,12 +21,12 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
......
......@@ -2,6 +2,7 @@ eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/main/resources/application.properties=UTF-8
encoding//src/test/java=UTF8
encoding//src/main/resources/static/ueditor/upload/config.json=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
......@@ -112,6 +112,18 @@ public class FileController {
}
// 处理文件上传
@ApiOperation(value = "文件上传 路径版本")
@RequestMapping(value = "/uploadlu", method = RequestMethod.POST)
public String uploadImglU(String path) throws Exception {
return path;
//FileInfo entity = service.uploadFileLu(path);
// if(!service.insert(entity)){
// throw new BaseException("上传失败!");
// }
// return entity.getFileName();
}
// 处理文件上传
@ApiOperation(value = "文件上传 返回唯一标识")
@RequestMapping(value = "/upload", method = RequestMethod.POST)
public String uploadImg(@RequestParam("file") MultipartFile file, HttpServletRequest request) throws Exception {
......
package com.zrqx.file.service;
import java.io.File;
import org.springframework.web.multipart.MultipartFile;
import com.zrqx.core.form.file.CreatreQRCodeForm;
......@@ -8,5 +10,6 @@ import com.zrqx.core.service.BaseService;
public interface FileService extends BaseService<FileInfo, Integer>{
public FileInfo uploadFile(MultipartFile file);
//public FileInfo uploadFileLu(String file);
public FileInfo createFile(CreatreQRCodeForm form);
}
......@@ -105,6 +105,59 @@ public class FileServiceImpl extends BaseServiceImpl<FileInfo, Integer> implemen
return entity;
}
// @Override
// public FileInfo uploadFileLu(String file) {
//
// File file = new File(file);
// String contentType = ((MultipartFile) file).getContentType();
// // 获取文件名
// String fileName = ((MultipartFile) file).getOriginalFilename();
// // 获取文件的后缀名
// String suffixName = fileName.substring(fileName.lastIndexOf("."));
// // 解决中文问题,liunx下中文路径,图片显示问题
// String uuid = UUIDUtil.getUUID();
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
// String path = sdf.format(new Date());
// String filePath = rootPath + path + "/";
// File targetFile = new File(filePath);
// if (!targetFile.exists()) {
// targetFile.mkdirs();
// }
// filePath = filePath + uuid + suffixName;
// FileOutputStream fos = null;
// BufferedOutputStream bos = null;
// FileInfo entity = new FileInfo();
// try {
// fos = new FileOutputStream(filePath);
// bos = new BufferedOutputStream(fos);
// bos.write(((MultipartFile) file).getBytes());
// entity.setFileName(uuid);
// entity.setOriginalFileName(fileName);
// entity.setSuffixName(suffixName);
// entity.setPath(path);
// entity.setContentType(contentType);
// entity.setSize(((MultipartFile) file).getSize());
// entity.setCreateTime(new Date());
// if(entity.getOriginalFileName().contains(".pdf")) {
// String param="pdfFilename="+entity.getPath()+"/"+entity.getFileName()+".pdf"+"&pdfSlice=10";
// String url="http://test16.zhongdianyun.com/pdf/file/dividePDFByPage?"+param;
// HttpClientUtil.doGet(url,"utf-8");
// }
// } catch (Exception e) {
// logger.error("上传异常:" + e);
// e.printStackTrace();
// } finally {
// try {
// if (null != fos)
// fos.flush();
// if (null != bos)
// bos.close();
// } catch (IOException e) {
// }
// }
// return entity;
// }
@Override
public FileInfo createFile(CreatreQRCodeForm form) {
......
......@@ -190,8 +190,6 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/webjars/jquery/2.1.1/jquery-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/webjars/d3js/3.4.11/d3js-3.4.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.0.19/druid-1.0.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="E:\Program Files\Java\jdk1.8.0_161\jre\..\lib\jconsole.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="E:\Program Files\Java\jdk1.8.0_161\jre\..\lib\tools.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/5.1.47/mysql-connector-java-5.1.47.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger2/2.7.0/springfox-swagger2-2.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.13/swagger-annotations-1.5.13.jar" enabled="true" runInBatchMode="false"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
......@@ -15,11 +15,13 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
......@@ -32,5 +34,22 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
差异被折叠。
......@@ -26,12 +26,12 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
......
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
......@@ -15,11 +15,13 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
......@@ -32,5 +34,22 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
差异被折叠。
......@@ -21,12 +21,12 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
......
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
......@@ -49,16 +49,8 @@ public class WeChatLoginWapController {
}
//唯一标识用户的 openId
String openId=object.get("openid").toString();
//凭证
String access_token=object.get("access_token").toString();
//调用微信接口获得用户信息
String param1="access_token="+access_token+"&openid="+openId;
String result1=HttpsUtils.sendGet("https://api.weixin.qq.com/sns/userinfo", param1);
JSONObject object1=(JSONObject)JSON.parse(result1);
//判断接口是否调用成功
if(object1.containsKey("errcode")){
throw new BaseException(ResponseCodeEnum.EXCEPTION.getCode(),object1.get("errcode").toString());
}
//用户昵称
String nickname=object1.get("nickname").toString();
//用户头像
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论