This commit is contained in:
parent
95b8c54d0a
commit
1b3aea2059
18
pom.xml
18
pom.xml
|
|
@ -71,6 +71,24 @@
|
||||||
<artifactId>ruoyi-common-swagger</artifactId>
|
<artifactId>ruoyi-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Tuoheng MEDIA API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>tuoheng-api-media</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Flyway Database Migration -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Flyway MySQL Support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-mysql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.ruoyi.media.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.security.annotation.InnerAuth;
|
||||||
|
import com.ruoyi.media.api.domain.MediaTempVO;
|
||||||
|
import com.ruoyi.media.controller.convert.MediaTempControllerConvert;
|
||||||
|
import com.ruoyi.media.service.api.IMediaTempService;
|
||||||
|
import com.ruoyi.media.service.dto.MediaTempDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/media/temp")
|
||||||
|
public class MediaTempController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMediaTempService mediaTempService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询媒体临时表列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MediaTempVO mediaTemp)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
// API Domain → Service DTO
|
||||||
|
MediaTempDTO dto = MediaTempControllerConvert.toDTO(mediaTemp);
|
||||||
|
List<MediaTempDTO> dtoList = mediaTempService.selectMediaTempList(dto);
|
||||||
|
// Service DTO → API Domain
|
||||||
|
List<MediaTempVO> list = MediaTempControllerConvert.toApiDomainList(dtoList);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取媒体临时表详细信息(内部调用)
|
||||||
|
*/
|
||||||
|
@InnerAuth
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public R<MediaTempVO> getMediaById(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
MediaTempDTO dto = mediaTempService.selectMediaTempById(id);
|
||||||
|
MediaTempVO mediaTemp = MediaTempControllerConvert.toVO(dto);
|
||||||
|
return R.ok(mediaTemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取媒体临时表详细信息(外部调用)
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/info/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
MediaTempDTO dto = mediaTempService.selectMediaTempById(id);
|
||||||
|
MediaTempVO mediaTemp = MediaTempControllerConvert.toVO(dto);
|
||||||
|
return success(mediaTemp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.media.controller.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.media.api.domain.MediaTempVO;
|
||||||
|
import com.ruoyi.media.service.dto.MediaTempDTO;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Controller层转换器
|
||||||
|
* API Domain ↔ Service DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTempControllerConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* DTO 转 API Domain
|
||||||
|
*/
|
||||||
|
public static MediaTempVO toVO(MediaTempDTO dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTempVO apiDomain = new MediaTempVO();
|
||||||
|
BeanUtils.copyProperties(dto, apiDomain);
|
||||||
|
return apiDomain;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Domain 转 DTO
|
||||||
|
*/
|
||||||
|
public static MediaTempDTO toDTO(MediaTempVO apiDomain)
|
||||||
|
{
|
||||||
|
if (apiDomain == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTempDTO dto = new MediaTempDTO();
|
||||||
|
BeanUtils.copyProperties(apiDomain, dto);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO List 转 API Domain List
|
||||||
|
*/
|
||||||
|
public static List<MediaTempVO> toApiDomainList(List<MediaTempDTO> dtoList)
|
||||||
|
{
|
||||||
|
if (dtoList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return dtoList.stream().map(MediaTempControllerConvert::toVO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.media.domain.api;
|
||||||
|
|
||||||
|
import com.ruoyi.media.domain.model.MediaTemp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Domain接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface IMediaTempDomain
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询媒体临时表列表
|
||||||
|
*
|
||||||
|
* @param mediaTemp 媒体临时表
|
||||||
|
* @return 媒体临时表集合
|
||||||
|
*/
|
||||||
|
List<MediaTemp> selectMediaTempList(MediaTemp mediaTemp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询媒体临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 媒体临时表
|
||||||
|
*/
|
||||||
|
MediaTemp selectMediaTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.media.domain.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.media.domain.model.MediaTemp;
|
||||||
|
import com.ruoyi.media.mapper.entity.MediaTempEntity;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Domain层转换器
|
||||||
|
* Domain Model ↔ Mapper Entity
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTempDomainConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Entity 转 Model
|
||||||
|
*/
|
||||||
|
public static MediaTemp toModel(MediaTempEntity entity)
|
||||||
|
{
|
||||||
|
if (entity == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTemp model = new MediaTemp();
|
||||||
|
BeanUtils.copyProperties(entity, model);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model 转 Entity
|
||||||
|
*/
|
||||||
|
public static MediaTempEntity toEntity(MediaTemp model)
|
||||||
|
{
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTempEntity entity = new MediaTempEntity();
|
||||||
|
BeanUtils.copyProperties(model, entity);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity List 转 Model List
|
||||||
|
*/
|
||||||
|
public static List<MediaTemp> toModelList(List<MediaTempEntity> entityList)
|
||||||
|
{
|
||||||
|
if (entityList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return entityList.stream().map(MediaTempDomainConvert::toModel).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.ruoyi.media.domain.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.media.domain.api.IMediaTempDomain;
|
||||||
|
import com.ruoyi.media.domain.convert.MediaTempDomainConvert;
|
||||||
|
import com.ruoyi.media.domain.model.MediaTemp;
|
||||||
|
import com.ruoyi.media.mapper.MediaTempMapper;
|
||||||
|
import com.ruoyi.media.mapper.entity.MediaTempEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Domain实现
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class MediaTempDomainImpl implements IMediaTempDomain
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MediaTempMapper mediaTempMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MediaTemp> selectMediaTempList(MediaTemp mediaTempModel)
|
||||||
|
{
|
||||||
|
MediaTempEntity entity = MediaTempDomainConvert.toEntity(mediaTempModel);
|
||||||
|
List<MediaTempEntity> entityList = mediaTempMapper.selectMediaTempList(entity);
|
||||||
|
return MediaTempDomainConvert.toModelList(entityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MediaTemp selectMediaTempById(String id)
|
||||||
|
{
|
||||||
|
MediaTempEntity entity = mediaTempMapper.selectMediaTempById(id);
|
||||||
|
return MediaTempDomainConvert.toModel(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ruoyi.media.domain.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表领域模型
|
||||||
|
* Domain 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTemp implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.media.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.media.mapper.entity.MediaTempEntity;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface MediaTempMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询媒体临时表列表
|
||||||
|
*
|
||||||
|
* @param mediaTempEntity 媒体临时表
|
||||||
|
* @return 媒体临时表集合
|
||||||
|
*/
|
||||||
|
public List<MediaTempEntity> selectMediaTempList(MediaTempEntity mediaTempEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询媒体临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 媒体临时表
|
||||||
|
*/
|
||||||
|
public MediaTempEntity selectMediaTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ruoyi.media.mapper.entity;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表实体对象 tuoheng_media_temp
|
||||||
|
* Mapper 层实体,对应数据库表
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTempEntity extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "MediaTempEntity{" +
|
||||||
|
"id='" + id + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.media.service.api;
|
||||||
|
|
||||||
|
import com.ruoyi.media.service.dto.MediaTempDTO;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface IMediaTempService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询媒体临时表列表
|
||||||
|
*
|
||||||
|
* @param mediaTempDTO 媒体临时表
|
||||||
|
* @return 媒体临时表集合
|
||||||
|
*/
|
||||||
|
List<MediaTempDTO> selectMediaTempList(MediaTempDTO mediaTempDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询媒体临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 媒体临时表
|
||||||
|
*/
|
||||||
|
MediaTempDTO selectMediaTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.media.service.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.media.domain.model.MediaTemp;
|
||||||
|
import com.ruoyi.media.service.dto.MediaTempDTO;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Service层转换器
|
||||||
|
* Service DTO ↔ Domain Model
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTempServiceConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Model 转 DTO
|
||||||
|
*/
|
||||||
|
public static MediaTempDTO toDTO(MediaTemp model)
|
||||||
|
{
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTempDTO dto = new MediaTempDTO();
|
||||||
|
BeanUtils.copyProperties(model, dto);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO 转 Model
|
||||||
|
*/
|
||||||
|
public static MediaTemp toModel(MediaTempDTO dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MediaTemp model = new MediaTemp();
|
||||||
|
BeanUtils.copyProperties(dto, model);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model List 转 DTO List
|
||||||
|
*/
|
||||||
|
public static List<MediaTempDTO> toDTOList(List<MediaTemp> modelList)
|
||||||
|
{
|
||||||
|
if (modelList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return modelList.stream().map(MediaTempServiceConvert::toDTO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ruoyi.media.service.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表服务层DTO
|
||||||
|
* Service 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class MediaTempDTO implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.ruoyi.media.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.media.domain.api.IMediaTempDomain;
|
||||||
|
import com.ruoyi.media.domain.model.MediaTemp;
|
||||||
|
import com.ruoyi.media.service.api.IMediaTempService;
|
||||||
|
import com.ruoyi.media.service.convert.MediaTempServiceConvert;
|
||||||
|
import com.ruoyi.media.service.dto.MediaTempDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体临时表Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MediaTempServiceImpl implements IMediaTempService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMediaTempDomain mediaTempDomain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询媒体临时表列表
|
||||||
|
*
|
||||||
|
* @param mediaTempDTO 媒体临时表
|
||||||
|
* @return 媒体临时表集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MediaTempDTO> selectMediaTempList(MediaTempDTO mediaTempDTO)
|
||||||
|
{
|
||||||
|
MediaTemp model = MediaTempServiceConvert.toModel(mediaTempDTO);
|
||||||
|
List<MediaTemp> modelList = mediaTempDomain.selectMediaTempList(model);
|
||||||
|
return MediaTempServiceConvert.toDTOList(modelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询媒体临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 媒体临时表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MediaTempDTO selectMediaTempById(String id)
|
||||||
|
{
|
||||||
|
MediaTemp model = mediaTempDomain.selectMediaTempById(id);
|
||||||
|
return MediaTempServiceConvert.toDTO(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9201
|
port: 9205
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
@ -10,6 +10,10 @@ spring:
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: prod
|
active: prod
|
||||||
|
flyway:
|
||||||
|
table: flyway_media_schema_history # 自定义历史表名
|
||||||
|
baseline-on-migrate: true # 在nocos中也有配置
|
||||||
|
baseline-version: 0 # 在nocos中也有配置
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
-- ============================================================
|
||||||
|
-- Flyway Migration Script
|
||||||
|
-- ============================================================
|
||||||
|
-- Version: V1
|
||||||
|
-- Description: Create tuoheng_media_temp table
|
||||||
|
-- Author: ruoyi
|
||||||
|
-- Date: 2026-01-17
|
||||||
|
-- ============================================================
|
||||||
|
|
||||||
|
-- 创建媒体临时表
|
||||||
|
CREATE TABLE IF NOT EXISTS tuoheng_media_temp (
|
||||||
|
id VARCHAR(64) NOT NULL COMMENT '主键ID',
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='媒体临时表';
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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.ruoyi.media.mapper.MediaTempMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.media.mapper.entity.MediaTempEntity" id="MediaTempResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMediaTempVo">
|
||||||
|
select id from tuoheng_media_temp
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMediaTempList" parameterType="com.ruoyi.media.mapper.entity.MediaTempEntity" resultMap="MediaTempResult">
|
||||||
|
<include refid="selectMediaTempVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMediaTempById" parameterType="String" resultMap="MediaTempResult">
|
||||||
|
<include refid="selectMediaTempVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue