Commit 1b6865e3 by HaoN

添加客户标签接口

1 parent 27580fc1
package com.linkwechat.web.controller.wecom;
import java.util.List;
import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.utils.poi.ExcelUtil;
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.linkwechat.wecom.domain.WeTag;
import com.linkwechat.wecom.service.IWeTagService;
/**
* 企业微信标签Controller
*
* @author ruoyi
* @date 2020-09-07
*/
@RestController
@RequestMapping("/wecom/tag")
public class WeTagController extends BaseController
{
@Autowired
private IWeTagService weTagService;
/**
* 查询企业微信标签列表
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:list')")
@GetMapping("/list")
public TableDataInfo list(WeTag weTag)
{
startPage();
List<WeTag> list = weTagService.selectWeTagList(weTag);
return getDataTable(list);
}
/**
* 导出企业微信标签列表
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:export')")
@Log(title = "企业微信标签", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(WeTag weTag)
{
List<WeTag> list = weTagService.selectWeTagList(weTag);
ExcelUtil<WeTag> util = new ExcelUtil<WeTag>(WeTag.class);
return util.exportExcel(list, "tag");
}
/**
* 获取企业微信标签详细信息
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(weTagService.selectWeTagById(id));
}
/**
* 新增企业微信标签
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:add')")
@Log(title = "企业微信标签", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WeTag weTag)
{
return toAjax(weTagService.insertWeTag(weTag));
}
/**
* 修改企业微信标签
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:edit')")
@Log(title = "企业微信标签", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WeTag weTag)
{
return toAjax(weTagService.updateWeTag(weTag));
}
/**
* 删除企业微信标签
*/
@PreAuthorize("@ss.hasPermi('wecom:tag:remove')")
@Log(title = "企业微信标签", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(weTagService.deleteWeTagByIds(ids));
}
}
package com.linkwechat.web.controller.wecom;
import java.util.List;
import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.utils.poi.ExcelUtil;
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.linkwechat.wecom.domain.WeTagGroup;
import com.linkwechat.wecom.service.IWeTagGroupService;
/**
* 标签组Controller
*
* @author ruoyi
* @date 2020-09-07
*/
@RestController
@RequestMapping("/wecom/group")
public class WeTagGroupController extends BaseController
{
@Autowired
private IWeTagGroupService weTagGroupService;
/**
* 查询标签组列表
*/
@PreAuthorize("@ss.hasPermi('wecom:group:list')")
@GetMapping("/list")
public TableDataInfo list(WeTagGroup weTagGroup)
{
startPage();
List<WeTagGroup> list = weTagGroupService.selectWeTagGroupList(weTagGroup);
return getDataTable(list);
}
/**
* 导出标签组列表
*/
@PreAuthorize("@ss.hasPermi('wecom:group:export')")
@Log(title = "标签组", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(WeTagGroup weTagGroup)
{
List<WeTagGroup> list = weTagGroupService.selectWeTagGroupList(weTagGroup);
ExcelUtil<WeTagGroup> util = new ExcelUtil<WeTagGroup>(WeTagGroup.class);
return util.exportExcel(list, "group");
}
/**
* 获取标签组详细信息
*/
@PreAuthorize("@ss.hasPermi('wecom:group:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(weTagGroupService.selectWeTagGroupById(id));
}
/**
* 新增标签组
*/
@PreAuthorize("@ss.hasPermi('wecom:group:add')")
@Log(title = "标签组", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WeTagGroup weTagGroup)
{
return toAjax(weTagGroupService.insertWeTagGroup(weTagGroup));
}
/**
* 修改标签组
*/
@PreAuthorize("@ss.hasPermi('wecom:group:edit')")
@Log(title = "标签组", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WeTagGroup weTagGroup)
{
return toAjax(weTagGroupService.updateWeTagGroup(weTagGroup));
}
/**
* 删除标签组
*/
@PreAuthorize("@ss.hasPermi('wecom:group:remove')")
@Log(title = "标签组", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(weTagGroupService.deleteWeTagGroupByIds(ids));
}
}
......@@ -47,28 +47,17 @@ public class WeUserController extends BaseController
// return getDataTable(list);
// }
/**
* 导出通讯录相关客户列表
*/
@PreAuthorize("@ss.hasPermi('wecom:user:export')")
@Log(title = "通讯录相关客户", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(WeUser weUser)
{
List<WeUser> list = weUserService.selectWeUserList(weUser);
ExcelUtil<WeUser> util = new ExcelUtil<WeUser>(WeUser.class);
return util.exportExcel(list, "user");
}
/**
* 获取通讯录相关客户详细信息
*/
@PreAuthorize("@ss.hasPermi('wecom:user:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(weUserService.selectWeUserById(id));
}
// /**
// * 获取通讯录相关客户详细信息
// */
// @PreAuthorize("@ss.hasPermi('wecom:user:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return AjaxResult.success(weUserService.selectWeUserById(id));
// }
/**
* 新增通讯录相关客户
......@@ -92,14 +81,14 @@ public class WeUserController extends BaseController
return toAjax(weUserService.updateWeUser(weUser));
}
/**
* 删除通讯录相关客户
*/
@PreAuthorize("@ss.hasPermi('wecom:user:remove')")
@Log(title = "通讯录相关客户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(weUserService.deleteWeUserByIds(ids));
}
// /**
// * 删除通讯录相关客户
// */
// @PreAuthorize("@ss.hasPermi('wecom:user:remove')")
// @Log(title = "通讯录相关客户", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(weUserService.deleteWeUserByIds(ids));
// }
}
package com.linkwechat.wecom.domain;
import com.linkwechat.common.annotation.Excel;
import com.linkwechat.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 企业微信标签对象 we_tag
*
* @author ruoyi
* @date 2020-09-07
*/
public class WeTag extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 标签组id */
@Excel(name = "标签组id")
private Long groupId;
/** 标签名 */
@Excel(name = "标签名")
private String name;
/** 标签排序的次序值,order值大的排序靠前。 */
@Excel(name = "标签排序的次序值,order值大的排序靠前。")
private Long order;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setGroupId(Long groupId)
{
this.groupId = groupId;
}
public Long getGroupId()
{
return groupId;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setOrder(Long order)
{
this.order = order;
}
public Long getOrder()
{
return order;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("groupId", getGroupId())
.append("name", getName())
.append("createTime", getCreateTime())
.append("order", getOrder())
.toString();
}
}
package com.linkwechat.wecom.domain;
import com.linkwechat.common.annotation.Excel;
import com.linkwechat.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 标签组对象 we_tag_group
*
* @author ruoyi
* @date 2020-09-07
*/
public class WeTagGroup extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 标签组id */
private Long id;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String gourpName;
/** 标签组排序的次序值,order值大的排序靠前 */
@Excel(name = "标签组排序的次序值,order值大的排序靠前")
private Long order;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setGourpName(String gourpName)
{
this.gourpName = gourpName;
}
public String getGourpName()
{
return gourpName;
}
public void setOrder(Long order)
{
this.order = order;
}
public Long getOrder()
{
return order;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("gourpName", getGourpName())
.append("createTime", getCreateTime())
.append("order", getOrder())
.toString();
}
}
package com.linkwechat.wecom.mapper;
import java.util.List;
import com.linkwechat.wecom.domain.WeTagGroup;
/**
* 标签组Mapper接口
*
* @author ruoyi
* @date 2020-09-07
*/
public interface WeTagGroupMapper
{
/**
* 查询标签组
*
* @param id 标签组ID
* @return 标签组
*/
public WeTagGroup selectWeTagGroupById(Long id);
/**
* 查询标签组列表
*
* @param weTagGroup 标签组
* @return 标签组集合
*/
public List<WeTagGroup> selectWeTagGroupList(WeTagGroup weTagGroup);
/**
* 新增标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
public int insertWeTagGroup(WeTagGroup weTagGroup);
/**
* 修改标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
public int updateWeTagGroup(WeTagGroup weTagGroup);
/**
* 删除标签组
*
* @param id 标签组ID
* @return 结果
*/
public int deleteWeTagGroupById(Long id);
/**
* 批量删除标签组
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWeTagGroupByIds(Long[] ids);
}
package com.linkwechat.wecom.mapper;
import java.util.List;
import com.linkwechat.wecom.domain.WeTag;
/**
* 企业微信标签Mapper接口
*
* @author ruoyi
* @date 2020-09-07
*/
public interface WeTagMapper
{
/**
* 查询企业微信标签
*
* @param id 企业微信标签ID
* @return 企业微信标签
*/
public WeTag selectWeTagById(Long id);
/**
* 查询企业微信标签列表
*
* @param weTag 企业微信标签
* @return 企业微信标签集合
*/
public List<WeTag> selectWeTagList(WeTag weTag);
/**
* 新增企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
public int insertWeTag(WeTag weTag);
/**
* 修改企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
public int updateWeTag(WeTag weTag);
/**
* 删除企业微信标签
*
* @param id 企业微信标签ID
* @return 结果
*/
public int deleteWeTagById(Long id);
/**
* 批量删除企业微信标签
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWeTagByIds(Long[] ids);
}
package com.linkwechat.wecom.service;
import java.util.List;
import com.linkwechat.wecom.domain.WeTagGroup;
/**
* 标签组Service接口
*
* @author ruoyi
* @date 2020-09-07
*/
public interface IWeTagGroupService
{
/**
* 查询标签组
*
* @param id 标签组ID
* @return 标签组
*/
public WeTagGroup selectWeTagGroupById(Long id);
/**
* 查询标签组列表
*
* @param weTagGroup 标签组
* @return 标签组集合
*/
public List<WeTagGroup> selectWeTagGroupList(WeTagGroup weTagGroup);
/**
* 新增标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
public int insertWeTagGroup(WeTagGroup weTagGroup);
/**
* 修改标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
public int updateWeTagGroup(WeTagGroup weTagGroup);
/**
* 批量删除标签组
*
* @param ids 需要删除的标签组ID
* @return 结果
*/
public int deleteWeTagGroupByIds(Long[] ids);
/**
* 删除标签组信息
*
* @param id 标签组ID
* @return 结果
*/
public int deleteWeTagGroupById(Long id);
}
package com.linkwechat.wecom.service;
import java.util.List;
import com.linkwechat.wecom.domain.WeTag;
/**
* 企业微信标签Service接口
*
* @author ruoyi
* @date 2020-09-07
*/
public interface IWeTagService
{
/**
* 查询企业微信标签
*
* @param id 企业微信标签ID
* @return 企业微信标签
*/
public WeTag selectWeTagById(Long id);
/**
* 查询企业微信标签列表
*
* @param weTag 企业微信标签
* @return 企业微信标签集合
*/
public List<WeTag> selectWeTagList(WeTag weTag);
/**
* 新增企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
public int insertWeTag(WeTag weTag);
/**
* 修改企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
public int updateWeTag(WeTag weTag);
/**
* 批量删除企业微信标签
*
* @param ids 需要删除的企业微信标签ID
* @return 结果
*/
public int deleteWeTagByIds(Long[] ids);
/**
* 删除企业微信标签信息
*
* @param id 企业微信标签ID
* @return 结果
*/
public int deleteWeTagById(Long id);
}
package com.linkwechat.wecom.service.impl;
import java.util.List;
import com.linkwechat.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linkwechat.wecom.mapper.WeTagGroupMapper;
import com.linkwechat.wecom.domain.WeTagGroup;
import com.linkwechat.wecom.service.IWeTagGroupService;
/**
* 标签组Service业务层处理
*
* @author ruoyi
* @date 2020-09-07
*/
@Service
public class WeTagGroupServiceImpl implements IWeTagGroupService
{
@Autowired
private WeTagGroupMapper weTagGroupMapper;
/**
* 查询标签组
*
* @param id 标签组ID
* @return 标签组
*/
@Override
public WeTagGroup selectWeTagGroupById(Long id)
{
return weTagGroupMapper.selectWeTagGroupById(id);
}
/**
* 查询标签组列表
*
* @param weTagGroup 标签组
* @return 标签组
*/
@Override
public List<WeTagGroup> selectWeTagGroupList(WeTagGroup weTagGroup)
{
return weTagGroupMapper.selectWeTagGroupList(weTagGroup);
}
/**
* 新增标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
@Override
public int insertWeTagGroup(WeTagGroup weTagGroup)
{
weTagGroup.setCreateTime(DateUtils.getNowDate());
return weTagGroupMapper.insertWeTagGroup(weTagGroup);
}
/**
* 修改标签组
*
* @param weTagGroup 标签组
* @return 结果
*/
@Override
public int updateWeTagGroup(WeTagGroup weTagGroup)
{
return weTagGroupMapper.updateWeTagGroup(weTagGroup);
}
/**
* 批量删除标签组
*
* @param ids 需要删除的标签组ID
* @return 结果
*/
@Override
public int deleteWeTagGroupByIds(Long[] ids)
{
return weTagGroupMapper.deleteWeTagGroupByIds(ids);
}
/**
* 删除标签组信息
*
* @param id 标签组ID
* @return 结果
*/
@Override
public int deleteWeTagGroupById(Long id)
{
return weTagGroupMapper.deleteWeTagGroupById(id);
}
}
package com.linkwechat.wecom.service.impl;
import java.util.List;
import com.linkwechat.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linkwechat.wecom.mapper.WeTagMapper;
import com.linkwechat.wecom.domain.WeTag;
import com.linkwechat.wecom.service.IWeTagService;
/**
* 企业微信标签Service业务层处理
*
* @author ruoyi
* @date 2020-09-07
*/
@Service
public class WeTagServiceImpl implements IWeTagService
{
@Autowired
private WeTagMapper weTagMapper;
/**
* 查询企业微信标签
*
* @param id 企业微信标签ID
* @return 企业微信标签
*/
@Override
public WeTag selectWeTagById(Long id)
{
return weTagMapper.selectWeTagById(id);
}
/**
* 查询企业微信标签列表
*
* @param weTag 企业微信标签
* @return 企业微信标签
*/
@Override
public List<WeTag> selectWeTagList(WeTag weTag)
{
return weTagMapper.selectWeTagList(weTag);
}
/**
* 新增企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
@Override
public int insertWeTag(WeTag weTag)
{
weTag.setCreateTime(DateUtils.getNowDate());
return weTagMapper.insertWeTag(weTag);
}
/**
* 修改企业微信标签
*
* @param weTag 企业微信标签
* @return 结果
*/
@Override
public int updateWeTag(WeTag weTag)
{
return weTagMapper.updateWeTag(weTag);
}
/**
* 批量删除企业微信标签
*
* @param ids 需要删除的企业微信标签ID
* @return 结果
*/
@Override
public int deleteWeTagByIds(Long[] ids)
{
return weTagMapper.deleteWeTagByIds(ids);
}
/**
* 删除企业微信标签信息
*
* @param id 企业微信标签ID
* @return 结果
*/
@Override
public int deleteWeTagById(Long id)
{
return weTagMapper.deleteWeTagById(id);
}
}
<?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.linkwechat.wecom.mapper.WeTagGroupMapper">
<resultMap type="WeTagGroup" id="WeTagGroupResult">
<result property="id" column="id" />
<result property="gourpName" column="gourp_name" />
<result property="createTime" column="create_time" />
<result property="order" column="order" />
</resultMap>
<sql id="selectWeTagGroupVo">
select id, gourp_name, create_time, order from we_tag_group
</sql>
<select id="selectWeTagGroupList" parameterType="WeTagGroup" resultMap="WeTagGroupResult">
<include refid="selectWeTagGroupVo"/>
<where>
<if test="gourpName != null and gourpName != ''"> and gourp_name like concat('%', #{gourpName}, '%')</if>
<if test="order != null "> and order = #{order}</if>
</where>
</select>
<select id="selectWeTagGroupById" parameterType="Long" resultMap="WeTagGroupResult">
<include refid="selectWeTagGroupVo"/>
where id = #{id}
</select>
<insert id="insertWeTagGroup" parameterType="WeTagGroup">
insert into we_tag_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="gourpName != null">gourp_name,</if>
<if test="createTime != null">create_time,</if>
<if test="order != null">order,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="gourpName != null">#{gourpName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="order != null">#{order},</if>
</trim>
</insert>
<update id="updateWeTagGroup" parameterType="WeTagGroup">
update we_tag_group
<trim prefix="SET" suffixOverrides=",">
<if test="gourpName != null">gourp_name = #{gourpName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="order != null">order = #{order},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWeTagGroupById" parameterType="Long">
delete from we_tag_group where id = #{id}
</delete>
<delete id="deleteWeTagGroupByIds" parameterType="String">
delete from we_tag_group where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.linkwechat.wecom.mapper.WeTagMapper">
<resultMap type="WeTag" id="WeTagResult">
<result property="id" column="id" />
<result property="groupId" column="group_id" />
<result property="name" column="name" />
<result property="createTime" column="create_time" />
<result property="order" column="order" />
</resultMap>
<sql id="selectWeTagVo">
select id, group_id, name, create_time, order from we_tag
</sql>
<select id="selectWeTagList" parameterType="WeTag" resultMap="WeTagResult">
<include refid="selectWeTagVo"/>
<where>
<if test="groupId != null "> and group_id = #{groupId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="order != null "> and order = #{order}</if>
</where>
</select>
<select id="selectWeTagById" parameterType="Long" resultMap="WeTagResult">
<include refid="selectWeTagVo"/>
where id = #{id}
</select>
<insert id="insertWeTag" parameterType="WeTag">
insert into we_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="groupId != null">group_id,</if>
<if test="name != null">name,</if>
<if test="createTime != null">create_time,</if>
<if test="order != null">order,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="groupId != null">#{groupId},</if>
<if test="name != null">#{name},</if>
<if test="createTime != null">#{createTime},</if>
<if test="order != null">#{order},</if>
</trim>
</insert>
<update id="updateWeTag" parameterType="WeTag">
update we_tag
<trim prefix="SET" suffixOverrides=",">
<if test="groupId != null">group_id = #{groupId},</if>
<if test="name != null">name = #{name},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="order != null">order = #{order},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWeTagById" parameterType="Long">
delete from we_tag where id = #{id}
</delete>
<delete id="deleteWeTagByIds" parameterType="String">
delete from we_tag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
File mode changed
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!