feat(2.6): 数据资产,字典功能
parent
28d6400be9
commit
f3b13ba059
|
@ -0,0 +1,39 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 资产数据字典对象 asset_data_dict
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class AssetDataDict extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 数据接入id */
|
||||
@Excel(name = "数据接入id")
|
||||
private Long basicId;
|
||||
|
||||
/** 字典名称 */
|
||||
@Excel(name = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
/** 字典类型 */
|
||||
@Excel(name = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 字典详细内容对象 dict_info
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DictInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 接入id */
|
||||
@Excel(name = "接入id")
|
||||
private Long dictId;
|
||||
|
||||
/** 字典名称 */
|
||||
@Excel(name = "字典名称")
|
||||
private String infoName;
|
||||
|
||||
/** 字典类型 */
|
||||
@Excel(name = "字典类型")
|
||||
private String infoValue;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.etl.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.etl.domain.AssetDataDict;
|
||||
|
||||
/**
|
||||
* 资产数据字典Mapper接口
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface AssetDataDictMapper extends BaseMapper<AssetDataDict>
|
||||
{
|
||||
/**
|
||||
* 查询资产数据字典
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 资产数据字典
|
||||
*/
|
||||
public AssetDataDict selectAssetDataDictById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资产数据字典列表
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 资产数据字典集合
|
||||
*/
|
||||
public List<AssetDataDict> selectAssetDataDictList(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 新增资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAssetDataDict(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 修改资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAssetDataDict(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 删除资产数据字典
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAssetDataDictById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资产数据字典
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAssetDataDictByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.etl.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.etl.domain.DictInfo;
|
||||
|
||||
/**
|
||||
* 字典详细内容Mapper接口
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface DictInfoMapper extends BaseMapper<DictInfo>
|
||||
{
|
||||
/**
|
||||
* 查询字典详细内容
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 字典详细内容
|
||||
*/
|
||||
public DictInfo selectDictInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询字典详细内容列表
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 字典详细内容集合
|
||||
*/
|
||||
public List<DictInfo> selectDictInfoList(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 新增字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictInfo(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 修改字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictInfo(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 删除字典详细内容
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除字典详细内容
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictInfoByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.etl.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.etl.domain.AssetDataDict;
|
||||
|
||||
/**
|
||||
* 资产数据字典Service接口
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface AssetDataDictService extends IService<AssetDataDict>
|
||||
{
|
||||
/**
|
||||
* 查询资产数据字典
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 资产数据字典
|
||||
*/
|
||||
public AssetDataDict selectAssetDataDictById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资产数据字典列表
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 资产数据字典集合
|
||||
*/
|
||||
public List<AssetDataDict> selectAssetDataDictList(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 新增资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAssetDataDict(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 修改资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAssetDataDict(AssetDataDict assetDataDict);
|
||||
|
||||
/**
|
||||
* 批量删除资产数据字典
|
||||
*
|
||||
* @param ids 需要删除的资产数据字典主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAssetDataDictByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除资产数据字典信息
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAssetDataDictById(Long id);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.etl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.etl.domain.DictInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典详细内容Service接口
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface DictInfoService extends IService<DictInfo>
|
||||
{
|
||||
/**
|
||||
* 查询字典详细内容
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 字典详细内容
|
||||
*/
|
||||
public DictInfo selectDictInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询字典详细内容列表
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 字典详细内容集合
|
||||
*/
|
||||
public List<DictInfo> selectDictInfoList(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 新增字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictInfo(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 修改字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictInfo(DictInfo dictInfo);
|
||||
|
||||
/**
|
||||
* 批量删除字典详细内容
|
||||
*
|
||||
* @param ids 需要删除的字典详细内容主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除字典详细内容信息
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictInfoById(Long id);
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.muyu.etl.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.etl.mapper.AssetDataDictMapper;
|
||||
import com.muyu.etl.domain.AssetDataDict;
|
||||
import com.muyu.etl.service.AssetDataDictService;
|
||||
|
||||
/**
|
||||
* 资产数据字典Service业务层处理
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Service
|
||||
public class AssetDataDictServiceImpl extends ServiceImpl<AssetDataDictMapper,AssetDataDict> implements AssetDataDictService
|
||||
{
|
||||
@Autowired
|
||||
private AssetDataDictMapper assetDataDictMapper;
|
||||
|
||||
/**
|
||||
* 查询资产数据字典
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 资产数据字典
|
||||
*/
|
||||
@Override
|
||||
public AssetDataDict selectAssetDataDictById(Long id)
|
||||
{
|
||||
return assetDataDictMapper.selectAssetDataDictById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产数据字典列表
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 资产数据字典
|
||||
*/
|
||||
@Override
|
||||
public List<AssetDataDict> selectAssetDataDictList(AssetDataDict assetDataDict)
|
||||
{
|
||||
return assetDataDictMapper.selectAssetDataDictList(assetDataDict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAssetDataDict(AssetDataDict assetDataDict)
|
||||
{
|
||||
assetDataDict.setCreateTime(DateUtils.getNowDate());
|
||||
return assetDataDictMapper.insertAssetDataDict(assetDataDict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产数据字典
|
||||
*
|
||||
* @param assetDataDict 资产数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAssetDataDict(AssetDataDict assetDataDict)
|
||||
{
|
||||
assetDataDict.setUpdateTime(DateUtils.getNowDate());
|
||||
return assetDataDictMapper.updateAssetDataDict(assetDataDict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资产数据字典
|
||||
*
|
||||
* @param ids 需要删除的资产数据字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAssetDataDictByIds(Long[] ids)
|
||||
{
|
||||
return assetDataDictMapper.deleteAssetDataDictByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产数据字典信息
|
||||
*
|
||||
* @param id 资产数据字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAssetDataDictById(Long id)
|
||||
{
|
||||
return assetDataDictMapper.deleteAssetDataDictById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.muyu.etl.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.etl.mapper.DictInfoMapper;
|
||||
import com.muyu.etl.domain.DictInfo;
|
||||
import com.muyu.etl.service.DictInfoService;
|
||||
|
||||
/**
|
||||
* 字典详细内容Service业务层处理
|
||||
*
|
||||
* @author Saisai
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Service
|
||||
public class DictInfoServiceImpl extends ServiceImpl<DictInfoMapper,DictInfo> implements DictInfoService
|
||||
{
|
||||
@Autowired
|
||||
private DictInfoMapper dictInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询字典详细内容
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 字典详细内容
|
||||
*/
|
||||
@Override
|
||||
public DictInfo selectDictInfoById(Long id)
|
||||
{
|
||||
return dictInfoMapper.selectDictInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典详细内容列表
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 字典详细内容
|
||||
*/
|
||||
@Override
|
||||
public List<DictInfo> selectDictInfoList(DictInfo dictInfo)
|
||||
{
|
||||
return dictInfoMapper.selectDictInfoList(dictInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictInfo(DictInfo dictInfo)
|
||||
{
|
||||
dictInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return dictInfoMapper.insertDictInfo(dictInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典详细内容
|
||||
*
|
||||
* @param dictInfo 字典详细内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDictInfo(DictInfo dictInfo)
|
||||
{
|
||||
dictInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return dictInfoMapper.updateDictInfo(dictInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典详细内容
|
||||
*
|
||||
* @param ids 需要删除的字典详细内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDictInfoByIds(Long[] ids)
|
||||
{
|
||||
return dictInfoMapper.deleteDictInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典详细内容信息
|
||||
*
|
||||
* @param id 字典详细内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDictInfoById(Long id)
|
||||
{
|
||||
return dictInfoMapper.deleteDictInfoById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<?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.muyu.etl.mapper.AssetDataDictMapper">
|
||||
|
||||
<resultMap type="com.muyu.etl.domain.AssetDataDict" id="AssetDataDictResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="basicId" column="basic_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAssetDataDictVo">
|
||||
select id, basic_id, dict_name, dict_type, remark, create_by, create_time, update_by, update_time from asset_data_dict
|
||||
</sql>
|
||||
|
||||
<select id="selectAssetDataDictList" parameterType="com.muyu.etl.domain.AssetDataDict" resultMap="AssetDataDictResult">
|
||||
<include refid="selectAssetDataDictVo"/>
|
||||
<where>
|
||||
<if test="basicId != null "> and basic_id = #{basicId}</if>
|
||||
<if test="dictName != null and dictName != ''"> and dict_name like concat('%', #{dictName}, '%')</if>
|
||||
<if test="dictType != null and dictType != ''"> and dict_type = #{dictType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAssetDataDictById" parameterType="Long" resultMap="AssetDataDictResult">
|
||||
<include refid="selectAssetDataDictVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAssetDataDict" parameterType="com.muyu.etl.domain.AssetDataDict">
|
||||
insert into asset_data_dict
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="basicId != null">basic_id,</if>
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="basicId != null">#{basicId},</if>
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAssetDataDict" parameterType="com.muyu.etl.domain.AssetDataDict">
|
||||
update asset_data_dict
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="basicId != null">basic_id = #{basicId},</if>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAssetDataDictById" parameterType="Long">
|
||||
delete from asset_data_dict where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAssetDataDictByIds" parameterType="String">
|
||||
delete from asset_data_dict where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,88 @@
|
|||
<?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.muyu.etl.mapper.DictInfoMapper">
|
||||
|
||||
<resultMap type="com.muyu.etl.domain.DictInfo" id="DictInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dictId" column="dict_id" />
|
||||
<result property="infoName" column="info_name" />
|
||||
<result property="infoValue" column="info_value" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictInfoVo">
|
||||
select id, dict_id, info_name, info_value, remark, create_by, update_by, create_time, update_time from dict_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDictInfoList" parameterType="com.muyu.etl.domain.DictInfo" resultMap="DictInfoResult">
|
||||
<include refid="selectDictInfoVo"/>
|
||||
<where>
|
||||
<if test="dictId != null "> and dict_id = #{dictId}</if>
|
||||
<if test="infoName != null and infoName != ''"> and info_name like concat('%', #{infoName}, '%')</if>
|
||||
<if test="infoValue != null and infoValue != ''"> and info_value = #{infoValue}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictInfoById" parameterType="Long" resultMap="DictInfoResult">
|
||||
<include refid="selectDictInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDictInfo" parameterType="com.muyu.etl.domain.DictInfo">
|
||||
insert into dict_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="dictId != null">dict_id,</if>
|
||||
<if test="infoName != null and infoName != ''">info_name,</if>
|
||||
<if test="infoValue != null and infoValue != ''">info_value,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="dictId != null">#{dictId},</if>
|
||||
<if test="infoName != null and infoName != ''">#{infoName},</if>
|
||||
<if test="infoValue != null and infoValue != ''">#{infoValue},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDictInfo" parameterType="com.muyu.etl.domain.DictInfo">
|
||||
update dict_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dictId != null">dict_id = #{dictId},</if>
|
||||
<if test="infoName != null and infoName != ''">info_name = #{infoName},</if>
|
||||
<if test="infoValue != null and infoValue != ''">info_value = #{infoValue},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDictInfoById" parameterType="Long">
|
||||
delete from dict_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictInfoByIds" parameterType="String">
|
||||
delete from dict_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue