模式管理的关联标签开发
parent
f441055b92
commit
460f45d881
@ -0,0 +1,71 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxModeTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模式与标签关联Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-18
|
||||
*/
|
||||
public interface WxModeTagMapper
|
||||
{
|
||||
/**
|
||||
* 查询模式与标签关联
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 模式与标签关联
|
||||
*/
|
||||
public WxModeTag selectWxModeTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模式与标签关联列表
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 模式与标签关联集合
|
||||
*/
|
||||
public List<WxModeTag> selectWxModeTagList(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 新增模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxModeTag(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 修改模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxModeTag(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 删除模式与标签关联
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeTagById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除模式与标签关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeTagByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除模式与标签关联
|
||||
*
|
||||
* @param modeId 模式ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeTagByModeId(Long modeId);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
<?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.flossom.common.core.mapper.WxModeTagMapper">
|
||||
|
||||
<resultMap type="WxModeTag" id="WxModeTagResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="modeId" column="mode_id" />
|
||||
<result property="tagId" column="tag_id" />
|
||||
<result property="tagType" column="tag_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxModeTagVo">
|
||||
select id, mode_id, tag_id, tag_type, status, create_by, create_time, update_by, update_time, remark from wx_mode_tag
|
||||
</sql>
|
||||
|
||||
<select id="selectWxModeTagList" parameterType="WxModeTag" resultMap="WxModeTagResult">
|
||||
<include refid="selectWxModeTagVo"/>
|
||||
<where>
|
||||
<if test="modeId != null "> and mode_id = #{modeId}</if>
|
||||
<if test="tagId != null "> and tag_id = #{tagId}</if>
|
||||
<if test="tagType != null "> and tag_type = #{tagType}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxModeTagById" parameterType="Long" resultMap="WxModeTagResult">
|
||||
<include refid="selectWxModeTagVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxModeTag" parameterType="WxModeTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_mode_tag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="modeId != null">mode_id,</if>
|
||||
<if test="tagId != null">tag_id,</if>
|
||||
<if test="tagType != null">tag_type,</if>
|
||||
<if test="status != null">status,</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>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modeId != null">#{modeId},</if>
|
||||
<if test="tagId != null">#{tagId},</if>
|
||||
<if test="tagType != null">#{tagType},</if>
|
||||
<if test="status != null">#{status},</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>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxModeTag" parameterType="WxModeTag">
|
||||
update wx_mode_tag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="modeId != null">mode_id = #{modeId},</if>
|
||||
<if test="tagId != null">tag_id = #{tagId},</if>
|
||||
<if test="tagType != null">tag_type = #{tagType},</if>
|
||||
<if test="status != null">status = #{status},</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>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxModeTagById" parameterType="Long">
|
||||
delete from wx_mode_tag where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxModeTagByModeId" parameterType="Long">
|
||||
delete from wx_mode_tag where mode_id = #{modeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxModeTagByIds" parameterType="String">
|
||||
delete from wx_mode_tag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxModeTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模式与标签关联Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-18
|
||||
*/
|
||||
public interface IWxModeTagService
|
||||
{
|
||||
/**
|
||||
* 查询模式与标签关联
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 模式与标签关联
|
||||
*/
|
||||
public WxModeTag selectWxModeTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模式与标签关联列表
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 模式与标签关联集合
|
||||
*/
|
||||
public List<WxModeTag> selectWxModeTagList(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 新增模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxModeTag(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 修改模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxModeTag(WxModeTag wxModeTag);
|
||||
|
||||
/**
|
||||
* 批量删除模式与标签关联
|
||||
*
|
||||
* @param ids 需要删除的模式与标签关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeTagByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除模式与标签关联信息
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeTagById(Long id);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxModeTag;
|
||||
import com.flossom.common.core.mapper.WxModeTagMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxModeTagService;
|
||||
|
||||
/**
|
||||
* 模式与标签关联Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-18
|
||||
*/
|
||||
@Service
|
||||
public class WxModeTagServiceImpl implements IWxModeTagService
|
||||
{
|
||||
@Autowired
|
||||
private WxModeTagMapper wxModeTagMapper;
|
||||
|
||||
/**
|
||||
* 查询模式与标签关联
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 模式与标签关联
|
||||
*/
|
||||
@Override
|
||||
public WxModeTag selectWxModeTagById(Long id)
|
||||
{
|
||||
return wxModeTagMapper.selectWxModeTagById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询模式与标签关联列表
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 模式与标签关联
|
||||
*/
|
||||
@Override
|
||||
public List<WxModeTag> selectWxModeTagList(WxModeTag wxModeTag)
|
||||
{
|
||||
return wxModeTagMapper.selectWxModeTagList(wxModeTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxModeTag(WxModeTag wxModeTag)
|
||||
{
|
||||
wxModeTag.setCreateTime(DateUtils.getNowDate());
|
||||
return wxModeTagMapper.insertWxModeTag(wxModeTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模式与标签关联
|
||||
*
|
||||
* @param wxModeTag 模式与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxModeTag(WxModeTag wxModeTag)
|
||||
{
|
||||
wxModeTag.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxModeTagMapper.updateWxModeTag(wxModeTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除模式与标签关联
|
||||
*
|
||||
* @param ids 需要删除的模式与标签关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxModeTagByIds(Long[] ids)
|
||||
{
|
||||
return wxModeTagMapper.deleteWxModeTagByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模式与标签关联信息
|
||||
*
|
||||
* @param id 模式与标签关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxModeTagById(Long id)
|
||||
{
|
||||
return wxModeTagMapper.deleteWxModeTagById(id);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue