Oss上传测试类

master
Qin Dong Ming 2024-09-03 17:40:24 +08:00
parent 02eab98b09
commit 157e41c3bd
2 changed files with 19 additions and 14 deletions

View File

@ -177,6 +177,7 @@ public class EngineVersionController extends BaseController {
@PostMapping("/insertVersion")
public boolean insertVersion(@RequestBody EngineVersion engineVersion) {
OssUpload.uploadFiles(engineVersion.getRuleContent(), engineVersion.getVersionCode());
engineVersion.setEngineMaintenanceId(null);
boolean insert = engineVersionService.insert(engineVersion);
return insert;
}

View File

@ -4,20 +4,22 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.mapper.EngineMapper">
<insert id="add">
INSERT INTO `text`.`engine_maintenance` (`name`, `type`, `scope`, `engine_code`, `is_activate`, `status`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `version_id`)
VALUES
(#{name}, #{type}, #{scope}, #{engineCode}, #{isActivate}, #{status}, #{description}, #{createTime}, #{createTime}, #{updateTime}, #{updateTime}, #{remark}, #{versionId});
INSERT INTO `text`.`engine_maintenance` (`name`, `type`, `scope`, `engine_code`, `is_activate`, `status`,
`description`, `create_by`, `create_time`, `update_by`, `update_time`,
`remark`, `version_id`)
VALUES (#{name}, #{type}, #{scope}, #{engineCode}, #{isActivate}, #{status}, #{description}, #{createTime},
#{createTime}, #{updateTime}, #{updateTime}, #{remark}, #{versionId});
</insert>
<!-- <update id="forbiddenEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 2-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <update id="onEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 1-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <update id="forbiddenEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 2-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <update id="onEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 1-->
<!-- where id = #{id}-->
<!-- </update>-->
<update id="closeEngine">
update engine_maintenance
set isActivate = 2
@ -60,6 +62,8 @@
</where>
</select>
<select id="select" resultType="com.muyu.domain.EngineMaintenance">
select * from engine_maintenance where id = #{id}
select *
from engine_maintenance
where id = #{id}
</select>
</mapper>