Oss上传测试类
parent
54ce3c73d7
commit
580074173d
|
@ -1,6 +1,5 @@
|
||||||
package com.muyu.Engineclient;
|
package com.muyu.Engineclient;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.domain.EngineVersion;
|
import com.muyu.domain.EngineVersion;
|
||||||
import com.muyu.remote.RemoteVersionService;
|
import com.muyu.remote.RemoteVersionService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
|
|
@ -18,14 +18,17 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>cloud-common-core</artifactId>
|
<artifactId>cloud-common-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>cloud-common-security</artifactId>
|
<artifactId>cloud-common-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.aliyun.oss</groupId>
|
<groupId>com.aliyun.oss</groupId>
|
||||||
<artifactId>aliyun-sdk-oss</artifactId>
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.muyu.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:qdm
|
||||||
|
* @Package:com.muyu.domain
|
||||||
|
* @Project:cloud-etl-engine
|
||||||
|
* @name:JavaClass
|
||||||
|
* @Date:2024/9/3 19:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class JavaClass {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String desc;
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
private Double score;
|
||||||
|
/**
|
||||||
|
* 身份证
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
/**
|
||||||
|
* 年龄
|
||||||
|
*/
|
||||||
|
private Integer age;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private Integer createBy;
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
private Integer updateBy;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -19,7 +19,6 @@
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
@ -44,7 +43,6 @@
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- //创建测试工程,引入依赖-->
|
<!-- //创建测试工程,引入依赖-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.aliyun.oss</groupId>
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
@ -57,6 +55,7 @@
|
||||||
<artifactId>jaxb-api</artifactId>
|
<artifactId>jaxb-api</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.activation</groupId>
|
<groupId>javax.activation</groupId>
|
||||||
<artifactId>activation</artifactId>
|
<artifactId>activation</artifactId>
|
||||||
|
@ -114,8 +113,6 @@
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <!– XllJob定时任务 –>-->
|
<!-- <!– XllJob定时任务 –>-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.muyu</groupId>-->
|
<!-- <groupId>com.muyu</groupId>-->
|
||||||
|
@ -132,7 +129,6 @@
|
||||||
<build>
|
<build>
|
||||||
<finalName>cloud-engine</finalName>
|
<finalName>cloud-engine</finalName>
|
||||||
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class EngIneController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询版本version信息 传入id 和 versionId
|
* 通过id查询版本version信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/findVersionById/{id}")
|
@GetMapping("/findVersionById/{id}")
|
||||||
public Result findVersionById(@PathVariable("id") Long id) {
|
public Result findVersionById(@PathVariable("id") Long id) {
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.domain.EngineLevelEntity;
|
import com.muyu.domain.EngineLevelEntity;
|
||||||
import com.muyu.domain.EngineMaintenance;
|
|
||||||
import com.muyu.domain.EngineVersion;
|
|
||||||
import com.muyu.domain.constants.Result;
|
import com.muyu.domain.constants.Result;
|
||||||
import com.muyu.service.EngineLevelService;
|
import com.muyu.service.EngineLevelService;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,7 @@ public class EngineVersionController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/insertVersion")
|
@PostMapping("/insertVersion")
|
||||||
public boolean insertVersion(@RequestBody EngineVersion engineVersion) {
|
public boolean insertVersion(@RequestBody EngineVersion engineVersion) {
|
||||||
|
System.out.println("88888888888888888888888888888"+engineVersion.getRuleContent());
|
||||||
OssUpload.uploadFiles(engineVersion.getRuleContent(), engineVersion.getVersionCode());
|
OssUpload.uploadFiles(engineVersion.getRuleContent(), engineVersion.getVersionCode());
|
||||||
engineVersion.setId(null);
|
engineVersion.setId(null);
|
||||||
boolean insert = engineVersionService.insert(engineVersion);
|
boolean insert = engineVersionService.insert(engineVersion);
|
||||||
|
|
|
@ -2,5 +2,4 @@ package com.muyu.engine.value;
|
||||||
|
|
||||||
public class ENGINE_PHONE_TEST_V1 {
|
public class ENGINE_PHONE_TEST_V1 {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,9 @@ import com.muyu.abstracts.DataValue;
|
||||||
|
|
||||||
public class DataEngineDataSetHandler {
|
public class DataEngineDataSetHandler {
|
||||||
|
|
||||||
public static void set(DataValue[][] dataDescribe){DataEngineHandler.set(dataDescribe);}
|
public static void set(DataValue[][] dataDescribe) {
|
||||||
|
DataEngineHandler.set(dataDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
public static DataValue[][] get() {
|
public static DataValue[][] get() {
|
||||||
return DataEngineHandler.get();
|
return DataEngineHandler.get();
|
||||||
|
|
|
@ -20,9 +20,4 @@ public static void remove(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,9 @@ import com.muyu.abstracts.DataValue;
|
||||||
|
|
||||||
public class DataEngineRowHandler {
|
public class DataEngineRowHandler {
|
||||||
|
|
||||||
public static void set(DataValue[] dataDescribe){DataEngineHandler.set(dataDescribe);}
|
public static void set(DataValue[] dataDescribe) {
|
||||||
|
DataEngineHandler.set(dataDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
public static DataValue[] get() {
|
public static DataValue[] get() {
|
||||||
return DataEngineHandler.get();
|
return DataEngineHandler.get();
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.muyu.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.EngineMaintenance;
|
import com.muyu.domain.EngineMaintenance;
|
||||||
import com.muyu.domain.EngineVersion;
|
|
||||||
import com.muyu.req.EngineMaintenanceQueryReq;
|
import com.muyu.req.EngineMaintenanceQueryReq;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -21,9 +21,11 @@
|
||||||
<module>cloud-etl-remote</module>
|
<module>cloud-etl-remote</module>
|
||||||
<module>cloud-etl-server</module>
|
<module>cloud-etl-server</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<maven.compiler.parameters>true</maven.compiler.parameters>
|
<maven.compiler.parameters>true</maven.compiler.parameters>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue