下载文件管理列表
parent
8b019a4f44
commit
4aa2040982
@ -0,0 +1,49 @@
|
||||
package com.ruoyi.web.controller.pc;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.TDownloadZip;
|
||||
import com.ruoyi.system.domain.THospital;
|
||||
import com.ruoyi.system.domain.resp.THospitalPageResp;
|
||||
import com.ruoyi.system.service.ITDownloadZipService;
|
||||
import com.ruoyi.system.service.ITHospitalService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 医院信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-03
|
||||
*/
|
||||
@Api("pc-下载列表")
|
||||
@RestController
|
||||
@RequestMapping("/system/downloadZip")
|
||||
public class TDownloadZipController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITDownloadZipService itDownloadZipService;
|
||||
|
||||
/**
|
||||
* 查询医院信息列表
|
||||
*/
|
||||
@ApiOperation("查询医院信息列表")
|
||||
@PostMapping("/list")
|
||||
@Log(title = "查询医院信息列表", businessType = BusinessType.OTHER)
|
||||
public TableDataInfo list(@RequestBody TDownloadZip tDownloadZip)
|
||||
{
|
||||
startPage();
|
||||
List<TDownloadZip> list = itDownloadZipService.queryByPage(tDownloadZip);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.TDownloadZip;
|
||||
import com.ruoyi.system.domain.THospital;
|
||||
import com.ruoyi.system.domain.resp.THospitalPageResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-03
|
||||
*/
|
||||
public interface TDownloadZipMapper
|
||||
{
|
||||
/**
|
||||
* 分页查询
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
List<TDownloadZip> queryByPage(TDownloadZip tDownloadZip);
|
||||
|
||||
|
||||
/**
|
||||
* 新增下载信息
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
int insertTDownloadZip(TDownloadZip tDownloadZip);
|
||||
|
||||
/**
|
||||
* 修改下载信息
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
int updateTDownloadZip(TDownloadZip tDownloadZip);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.TDownloadZip;
|
||||
import com.ruoyi.system.domain.THospital;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-03
|
||||
*/
|
||||
public interface ITDownloadZipService
|
||||
{
|
||||
/**
|
||||
* 分页查询
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
List<TDownloadZip> queryByPage(TDownloadZip tDownloadZip);
|
||||
|
||||
/**
|
||||
* 新增下载信息
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
int insertTDownloadZip(TDownloadZip tDownloadZip);
|
||||
|
||||
/**
|
||||
* 修改下载信息
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
int updateTDownloadZip(TDownloadZip tDownloadZip);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.domain.TDownloadZip;
|
||||
import com.ruoyi.system.mapper.TDownloadZipMapper;
|
||||
import com.ruoyi.system.service.ITDownloadZipService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-03
|
||||
*/
|
||||
@Service
|
||||
public class TDownloadZipServiceImpl implements ITDownloadZipService
|
||||
{
|
||||
@Autowired
|
||||
private TDownloadZipMapper tDownloadZipMapper;
|
||||
|
||||
@Override
|
||||
public List<TDownloadZip> queryByPage(TDownloadZip tDownloadZip) {
|
||||
return tDownloadZipMapper.queryByPage(tDownloadZip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增下载信息
|
||||
*
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertTDownloadZip(TDownloadZip tDownloadZip) {
|
||||
return tDownloadZipMapper.insertTDownloadZip(tDownloadZip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改下载信息
|
||||
*
|
||||
* @param tDownloadZip
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateTDownloadZip(TDownloadZip tDownloadZip) {
|
||||
return tDownloadZipMapper.updateTDownloadZip(tDownloadZip);
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<?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.system.mapper.TDownloadZipMapper">
|
||||
|
||||
<resultMap type="TDownloadZip" id="TDownloadZipResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="path" column="path" />
|
||||
<result property="name" column="name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTHospitalVo">
|
||||
select id, path, name, status, user_id, create_time from t_download_zip
|
||||
</sql>
|
||||
|
||||
<insert id="insertTDownloadZip" parameterType="TDownloadZip" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_download_zip
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="path != null and path != ''">path,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="path != null and path != ''">#{path},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTDownloadZip" parameterType="TDownloadZip">
|
||||
update t_download_zip
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="path != null and path != ''">path = #{path},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="queryByPage" resultMap="TDownloadZipResult">
|
||||
select
|
||||
id,
|
||||
path,
|
||||
name,
|
||||
status,
|
||||
user_id,
|
||||
create_time
|
||||
from t_download_zip
|
||||
where user_id = #{userId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue