合伙人模块,初版

This commit is contained in:
kuang.yife 2023-12-15 11:42:17 +08:00
parent e01499c62e
commit 48fbaf151a
9 changed files with 887 additions and 0 deletions

View File

@ -0,0 +1,127 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TbUserMatch;
import com.ruoyi.system.service.ITbUserMatchService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 合伙人信息Controller
*
* @author ruoyi
* @date 2023-12-15
*/
@Controller
@RequestMapping("/system/match")
public class TbUserMatchController extends BaseController
{
private String prefix = "system/match";
@Autowired
private ITbUserMatchService tbUserMatchService;
@RequiresPermissions("system:match:view")
@GetMapping()
public String match()
{
return prefix + "/match";
}
/**
* 查询合伙人信息列表
*/
@RequiresPermissions("system:match:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TbUserMatch tbUserMatch)
{
startPage();
List<TbUserMatch> list = tbUserMatchService.selectTbUserMatchList(tbUserMatch);
return getDataTable(list);
}
/**
* 导出合伙人信息列表
*/
@RequiresPermissions("system:match:export")
@Log(title = "合伙人信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TbUserMatch tbUserMatch)
{
List<TbUserMatch> list = tbUserMatchService.selectTbUserMatchList(tbUserMatch);
ExcelUtil<TbUserMatch> util = new ExcelUtil<TbUserMatch>(TbUserMatch.class);
return util.exportExcel(list, "合伙人信息数据");
}
/**
* 新增合伙人信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存合伙人信息
*/
@RequiresPermissions("system:match:add")
@Log(title = "合伙人信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TbUserMatch tbUserMatch)
{
return toAjax(tbUserMatchService.insertTbUserMatch(tbUserMatch));
}
/**
* 修改合伙人信息
*/
@RequiresPermissions("system:match:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
TbUserMatch tbUserMatch = tbUserMatchService.selectTbUserMatchById(id);
mmap.put("tbUserMatch", tbUserMatch);
return prefix + "/edit";
}
/**
* 修改保存合伙人信息
*/
@RequiresPermissions("system:match:edit")
@Log(title = "合伙人信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TbUserMatch tbUserMatch)
{
return toAjax(tbUserMatchService.updateTbUserMatch(tbUserMatch));
}
/**
* 删除合伙人信息
*/
@RequiresPermissions("system:match:remove")
@Log(title = "合伙人信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tbUserMatchService.deleteTbUserMatchByIds(ids));
}
}

View File

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增合伙人信息')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-match-add">
<div class="form-group">
<label class="col-sm-3 control-label">用户id</label>
<div class="col-sm-8">
<input name="userId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">绑定手机号:</label>
<div class="col-sm-8">
<input name="phone" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台昵称:</label>
<div class="col-sm-8">
<input name="nickName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">真是姓名:</label>
<div class="col-sm-8">
<input name="realName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">职业:</label>
<div class="col-sm-8">
<input name="matchJob" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝账户:</label>
<div class="col-sm-8">
<input name="zfbNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资源群体:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" name="matchContent">
<div class="summernote" id="matchContent"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "system/match"
$("#form-match-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-match-add').serialize());
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改合伙人信息')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-match-edit" th:object="${tbUserMatch}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">用户id</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">绑定手机号:</label>
<div class="col-sm-8">
<input name="phone" th:field="*{phone}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台昵称:</label>
<div class="col-sm-8">
<input name="nickName" th:field="*{nickName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">真是姓名:</label>
<div class="col-sm-8">
<input name="realName" th:field="*{realName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">职业:</label>
<div class="col-sm-8">
<input name="matchJob" th:field="*{matchJob}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝账户:</label>
<div class="col-sm-8">
<input name="zfbNumber" th:field="*{zfbNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资源群体:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" th:field="*{matchContent}">
<div class="summernote" id="matchContent"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "system/match";
$("#form-match-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-match-edit').serialize());
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
</script>
</body>
</html>

View File

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('合伙人信息列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>用户id</label>
<input type="text" name="userId"/>
</li>
<li>
<label>绑定手机号:</label>
<input type="text" name="phone"/>
</li>
<li>
<label>平台昵称:</label>
<input type="text" name="nickName"/>
</li>
<li>
<label>真是姓名:</label>
<input type="text" name="realName"/>
</li>
<li>
<label>职业:</label>
<input type="text" name="matchJob"/>
</li>
<li>
<label>支付宝账户:</label>
<input type="text" name="zfbNumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:match:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:match:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:match:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:match:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:match:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:match:remove')}]];
var prefix = ctx + "system/match";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "合伙人信息",
columns: [{
checkbox: true
},
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'userId',
title: '用户id'
},
{
field: 'matchType',
title: '合伙人级别 0.初级 1.高级 2.区域'
},
{
field: 'phone',
title: '绑定手机号'
},
{
field: 'nickName',
title: '平台昵称'
},
{
field: 'realName',
title: '真是姓名'
},
{
field: 'matchJob',
title: '职业'
},
{
field: 'zfbNumber',
title: '支付宝账户'
},
{
field: 'matchContent',
title: '资源群体'
},
{
field: 'remark',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,67 @@
package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 合伙人信息对象 tb_user_match
*
* @author ruoyi
* @date 2023-12-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "tb_user_match")
public class TbUserMatch extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键id */
private Long id;
/** 用户id */
@Excel(name = "用户id")
@ApiModelProperty(value = "用户id")
private Long userId;
/** 合伙人级别 0.初级 1.高级 2.区域 */
@Excel(name = "合伙人级别 0.初级 1.高级 2.区域")
@ApiModelProperty(value = "合伙人级别 0.初级 1.高级 2.区域")
private Long matchType;
/** 绑定手机号 */
@Excel(name = "绑定手机号")
@ApiModelProperty(value = "绑定手机号")
private String phone;
/** 平台昵称 */
@Excel(name = "平台昵称")
@ApiModelProperty(value = "平台昵称")
private String nickName;
/** 真是姓名 */
@Excel(name = "真是姓名")
@ApiModelProperty(value = "真是姓名")
private String realName;
/** 职业 */
@Excel(name = "职业")
@ApiModelProperty(value = "职业")
private String matchJob;
/** 支付宝账户 */
@Excel(name = "支付宝账户")
@ApiModelProperty(value = "支付宝账户")
private String zfbNumber;
/** 资源群体 */
@Excel(name = "资源群体")
@ApiModelProperty(value = "资源群体")
private String matchContent;
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TbUserMatch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 合伙人信息Mapper接口
*
* @author ruoyi
* @date 2023-12-15
*/
public interface TbUserMatchMapper extends BaseMapper<TbUserMatch>
{
/**
* 查询合伙人信息
*
* @param id 合伙人信息主键
* @return 合伙人信息
*/
public TbUserMatch selectTbUserMatchById(Long id);
/**
* 查询合伙人信息列表
*
* @param tbUserMatch 合伙人信息
* @return 合伙人信息集合
*/
public List<TbUserMatch> selectTbUserMatchList(TbUserMatch tbUserMatch);
/**
* 新增合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
public int insertTbUserMatch(TbUserMatch tbUserMatch);
/**
* 修改合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
public int updateTbUserMatch(TbUserMatch tbUserMatch);
/**
* 删除合伙人信息
*
* @param id 合伙人信息主键
* @return 结果
*/
public int deleteTbUserMatchById(Long id);
/**
* 批量删除合伙人信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTbUserMatchByIds(String[] ids);
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TbUserMatch;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 合伙人信息Service接口
*
* @author ruoyi
* @date 2023-12-15
*/
public interface ITbUserMatchService extends IService<TbUserMatch>
{
/**
* 查询合伙人信息
*
* @param id 合伙人信息主键
* @return 合伙人信息
*/
public TbUserMatch selectTbUserMatchById(Long id);
/**
* 查询合伙人信息列表
*
* @param tbUserMatch 合伙人信息
* @return 合伙人信息集合
*/
public List<TbUserMatch> selectTbUserMatchList(TbUserMatch tbUserMatch);
/**
* 新增合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
public int insertTbUserMatch(TbUserMatch tbUserMatch);
/**
* 修改合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
public int updateTbUserMatch(TbUserMatch tbUserMatch);
/**
* 批量删除合伙人信息
*
* @param ids 需要删除的合伙人信息主键集合
* @return 结果
*/
public int deleteTbUserMatchByIds(String ids);
/**
* 删除合伙人信息信息
*
* @param id 合伙人信息主键
* @return 结果
*/
public int deleteTbUserMatchById(Long id);
}

View File

@ -0,0 +1,98 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbUserMatchMapper;
import com.ruoyi.system.domain.TbUserMatch;
import com.ruoyi.system.service.ITbUserMatchService;
import com.ruoyi.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 合伙人信息Service业务层处理
*
* @author ruoyi
* @date 2023-12-15
*/
@Service
public class TbUserMatchServiceImpl extends ServiceImpl<TbUserMatchMapper, TbUserMatch> implements ITbUserMatchService
{
@Autowired
private TbUserMatchMapper tbUserMatchMapper;
/**
* 查询合伙人信息
*
* @param id 合伙人信息主键
* @return 合伙人信息
*/
@Override
public TbUserMatch selectTbUserMatchById(Long id)
{
return tbUserMatchMapper.selectTbUserMatchById(id);
}
/**
* 查询合伙人信息列表
*
* @param tbUserMatch 合伙人信息
* @return 合伙人信息
*/
@Override
public List<TbUserMatch> selectTbUserMatchList(TbUserMatch tbUserMatch)
{
return tbUserMatchMapper.selectTbUserMatchList(tbUserMatch);
}
/**
* 新增合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
@Override
public int insertTbUserMatch(TbUserMatch tbUserMatch)
{
tbUserMatch.setCreateTime(DateUtils.getNowDate());
return tbUserMatchMapper.insertTbUserMatch(tbUserMatch);
}
/**
* 修改合伙人信息
*
* @param tbUserMatch 合伙人信息
* @return 结果
*/
@Override
public int updateTbUserMatch(TbUserMatch tbUserMatch)
{
tbUserMatch.setUpdateTime(DateUtils.getNowDate());
return tbUserMatchMapper.updateTbUserMatch(tbUserMatch);
}
/**
* 批量删除合伙人信息
*
* @param ids 需要删除的合伙人信息主键
* @return 结果
*/
@Override
public int deleteTbUserMatchByIds(String ids)
{
return tbUserMatchMapper.deleteTbUserMatchByIds(Convert.toStrArray(ids));
}
/**
* 删除合伙人信息信息
*
* @param id 合伙人信息主键
* @return 结果
*/
@Override
public int deleteTbUserMatchById(Long id)
{
return tbUserMatchMapper.deleteTbUserMatchById(id);
}
}

View File

@ -0,0 +1,104 @@
<?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.TbUserMatchMapper">
<resultMap type="TbUserMatch" id="TbUserMatchResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="matchType" column="match_type" />
<result property="phone" column="phone" />
<result property="nickName" column="nick_name" />
<result property="realName" column="real_name" />
<result property="matchJob" column="match_job" />
<result property="zfbNumber" column="zfb_number" />
<result property="matchContent" column="match_content" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTbUserMatchVo">
select id, user_id, match_type, phone, nick_name, real_name, match_job, zfb_number, match_content, create_time, update_time, remark from tb_user_match
</sql>
<select id="selectTbUserMatchList" parameterType="TbUserMatch" resultMap="TbUserMatchResult">
<include refid="selectTbUserMatchVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="matchType != null "> and match_type = #{matchType}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
<if test="matchJob != null and matchJob != ''"> and match_job = #{matchJob}</if>
<if test="zfbNumber != null and zfbNumber != ''"> and zfb_number = #{zfbNumber}</if>
<if test="matchContent != null and matchContent != ''"> and match_content = #{matchContent}</if>
</where>
</select>
<select id="selectTbUserMatchById" parameterType="Long" resultMap="TbUserMatchResult">
<include refid="selectTbUserMatchVo"/>
where id = #{id}
</select>
<insert id="insertTbUserMatch" parameterType="TbUserMatch" useGeneratedKeys="true" keyProperty="id">
insert into tb_user_match
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="matchType != null">match_type,</if>
<if test="phone != null">phone,</if>
<if test="nickName != null">nick_name,</if>
<if test="realName != null">real_name,</if>
<if test="matchJob != null">match_job,</if>
<if test="zfbNumber != null">zfb_number,</if>
<if test="matchContent != null">match_content,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="matchType != null">#{matchType},</if>
<if test="phone != null">#{phone},</if>
<if test="nickName != null">#{nickName},</if>
<if test="realName != null">#{realName},</if>
<if test="matchJob != null">#{matchJob},</if>
<if test="zfbNumber != null">#{zfbNumber},</if>
<if test="matchContent != null">#{matchContent},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTbUserMatch" parameterType="TbUserMatch">
update tb_user_match
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="matchType != null">match_type = #{matchType},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="realName != null">real_name = #{realName},</if>
<if test="matchJob != null">match_job = #{matchJob},</if>
<if test="zfbNumber != null">zfb_number = #{zfbNumber},</if>
<if test="matchContent != null">match_content = #{matchContent},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTbUserMatchById" parameterType="Long">
delete from tb_user_match where id = #{id}
</delete>
<delete id="deleteTbUserMatchByIds" parameterType="String">
delete from tb_user_match where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>