删除文件 src/main

This commit is contained in:
jakcic 2021-12-21 04:02:45 +00:00 committed by Gitee
parent 1f2b7958a5
commit 9901f1adcd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 0 additions and 463 deletions

View File

@ -1,103 +0,0 @@
package com.ruoyi.system.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.FactorIcon;
import com.ruoyi.system.service.IFactorIconService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 因子图标Controller
*
* @author ruoyi
* @date 2021-12-17
*/
@RestController
@RequestMapping("/system/icon")
public class FactorIconController extends BaseController
{
@Autowired
private IFactorIconService factorIconService;
/**
* 查询因子图标列表
*/
@PreAuthorize("@ss.hasPermi('system:icon:list')")
@GetMapping("/list")
public TableDataInfo list(FactorIcon factorIcon)
{
startPage();
List<FactorIcon> list = factorIconService.selectFactorIconList(factorIcon);
return getDataTable(list);
}
/**
* 导出因子图标列表
*/
@PreAuthorize("@ss.hasPermi('system:icon:export')")
@Log(title = "因子图标", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(FactorIcon factorIcon)
{
List<FactorIcon> list = factorIconService.selectFactorIconList(factorIcon);
ExcelUtil<FactorIcon> util = new ExcelUtil<FactorIcon>(FactorIcon.class);
return util.exportExcel(list, "因子图标数据");
}
/**
* 获取因子图标详细信息
*/
@PreAuthorize("@ss.hasPermi('system:icon:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(factorIconService.selectFactorIconById(id));
}
/**
* 新增因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:add')")
@Log(title = "因子图标", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FactorIcon factorIcon)
{
return toAjax(factorIconService.insertFactorIcon(factorIcon));
}
/**
* 修改因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:edit')")
@Log(title = "因子图标", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FactorIcon factorIcon)
{
return toAjax(factorIconService.updateFactorIcon(factorIcon));
}
/**
* 删除因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:remove')")
@Log(title = "因子图标", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(factorIconService.deleteFactorIconByIds(ids));
}
}

View File

@ -1,79 +0,0 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 因子图标对象 factor_icon
*
* @author ruoyi
* @date 2021-12-17
*/
public class FactorIcon extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 类型 */
@Excel(name = "类型")
private Long type;
/** 图片 */
@Excel(name = "图片")
private String icon;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setType(Long type)
{
this.type = type;
}
public Long getType()
{
return type;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getIcon()
{
return icon;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("icon", getIcon())
.toString();
}
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.FactorIcon;
/**
* 因子图标Mapper接口
*
* @author ruoyi
* @date 2021-12-17
*/
public interface FactorIconMapper
{
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
public FactorIcon selectFactorIconById(Long id);
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标集合
*/
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon);
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int insertFactorIcon(FactorIcon factorIcon);
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int updateFactorIcon(FactorIcon factorIcon);
/**
* 删除因子图标
*
* @param id 因子图标主键
* @return 结果
*/
public int deleteFactorIconById(Long id);
/**
* 批量删除因子图标
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteFactorIconByIds(Long[] ids);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.FactorIcon;
/**
* 因子图标Service接口
*
* @author ruoyi
* @date 2021-12-17
*/
public interface IFactorIconService
{
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
public FactorIcon selectFactorIconById(Long id);
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标集合
*/
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon);
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int insertFactorIcon(FactorIcon factorIcon);
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int updateFactorIcon(FactorIcon factorIcon);
/**
* 批量删除因子图标
*
* @param ids 需要删除的因子图标主键集合
* @return 结果
*/
public int deleteFactorIconByIds(Long[] ids);
/**
* 删除因子图标信息
*
* @param id 因子图标主键
* @return 结果
*/
public int deleteFactorIconById(Long id);
}

View File

@ -1,93 +0,0 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FactorIconMapper;
import com.ruoyi.system.domain.FactorIcon;
import com.ruoyi.system.service.IFactorIconService;
/**
* 因子图标Service业务层处理
*
* @author ruoyi
* @date 2021-12-17
*/
@Service
public class FactorIconServiceImpl implements IFactorIconService
{
@Autowired
private FactorIconMapper factorIconMapper;
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
@Override
public FactorIcon selectFactorIconById(Long id)
{
return factorIconMapper.selectFactorIconById(id);
}
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标
*/
@Override
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon)
{
return factorIconMapper.selectFactorIconList(factorIcon);
}
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
@Override
public int insertFactorIcon(FactorIcon factorIcon)
{
return factorIconMapper.insertFactorIcon(factorIcon);
}
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
@Override
public int updateFactorIcon(FactorIcon factorIcon)
{
return factorIconMapper.updateFactorIcon(factorIcon);
}
/**
* 批量删除因子图标
*
* @param ids 需要删除的因子图标主键
* @return 结果
*/
@Override
public int deleteFactorIconByIds(Long[] ids)
{
return factorIconMapper.deleteFactorIconByIds(ids);
}
/**
* 删除因子图标信息
*
* @param id 因子图标主键
* @return 结果
*/
@Override
public int deleteFactorIconById(Long id)
{
return factorIconMapper.deleteFactorIconById(id);
}
}

View File

@ -1,66 +0,0 @@
<?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.FactorIconMapper">
<resultMap type="FactorIcon" id="FactorIconResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="icon" column="icon" />
</resultMap>
<sql id="selectFactorIconVo">
select id, name, type, icon from factor_icon
</sql>
<select id="selectFactorIconList" parameterType="FactorIcon" resultMap="FactorIconResult">
<include refid="selectFactorIconVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null "> and type = #{type}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
</where>
</select>
<select id="selectFactorIconById" parameterType="Long" resultMap="FactorIconResult">
<include refid="selectFactorIconVo"/>
where id = #{id}
</select>
<insert id="insertFactorIcon" parameterType="FactorIcon" useGeneratedKeys="true" keyProperty="id">
insert into factor_icon
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="type != null">type,</if>
<if test="icon != null">icon,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="type != null">#{type},</if>
<if test="icon != null">#{icon},</if>
</trim>
</insert>
<update id="updateFactorIcon" parameterType="FactorIcon">
update factor_icon
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="icon != null">icon = #{icon},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFactorIconById" parameterType="Long">
delete from factor_icon where id = #{id}
</delete>
<delete id="deleteFactorIconByIds" parameterType="String">
delete from factor_icon where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>