活动团创建
This commit is contained in:
parent
2a3e6bd6e7
commit
a5ffe4348e
|
|
@ -0,0 +1,38 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbUserMatchGroup;
|
||||
import com.ruoyi.system.service.ITbUserMatchGroupService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>合伙人创建活动团</p>
|
||||
* @author clunt
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "App*合伙人创建活动团")
|
||||
@RestController
|
||||
@RequestMapping(value = "/app/matchGroup")
|
||||
public class TbUserMatchGroupAppController {
|
||||
|
||||
@Autowired
|
||||
private ITbUserMatchGroupService tbUserMatchGroupService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "创建活动团", httpMethod = "POST")
|
||||
public Result<String> addSave(@RequestBody TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
int effectiveRows = tbUserMatchGroupService.insertTbUserMatchGroup(tbUserMatchGroup);
|
||||
if(effectiveRows > 0){
|
||||
return Result.success("创建活动团成功!");
|
||||
}else {
|
||||
return Result.error("创建活动团成功失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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.TbUserMatchGroup;
|
||||
import com.ruoyi.system.service.ITbUserMatchGroupService;
|
||||
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-16
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/group")
|
||||
public class TbUserMatchGroupController extends BaseController
|
||||
{
|
||||
private String prefix = "system/group";
|
||||
|
||||
@Autowired
|
||||
private ITbUserMatchGroupService tbUserMatchGroupService;
|
||||
|
||||
@RequiresPermissions("system:group:view")
|
||||
@GetMapping()
|
||||
public String group()
|
||||
{
|
||||
return prefix + "/group";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询媒婆团列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
startPage();
|
||||
List<TbUserMatchGroup> list = tbUserMatchGroupService.selectTbUserMatchGroupList(tbUserMatchGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出媒婆团列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:export")
|
||||
@Log(title = "媒婆团", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
List<TbUserMatchGroup> list = tbUserMatchGroupService.selectTbUserMatchGroupList(tbUserMatchGroup);
|
||||
ExcelUtil<TbUserMatchGroup> util = new ExcelUtil<TbUserMatchGroup>(TbUserMatchGroup.class);
|
||||
return util.exportExcel(list, "媒婆团数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增媒婆团
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存媒婆团
|
||||
*/
|
||||
@RequiresPermissions("system:group:add")
|
||||
@Log(title = "媒婆团", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
return toAjax(tbUserMatchGroupService.insertTbUserMatchGroup(tbUserMatchGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改媒婆团
|
||||
*/
|
||||
@RequiresPermissions("system:group:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
TbUserMatchGroup tbUserMatchGroup = tbUserMatchGroupService.selectTbUserMatchGroupById(id);
|
||||
mmap.put("tbUserMatchGroup", tbUserMatchGroup);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存媒婆团
|
||||
*/
|
||||
@RequiresPermissions("system:group:edit")
|
||||
@Log(title = "媒婆团", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
return toAjax(tbUserMatchGroupService.updateTbUserMatchGroup(tbUserMatchGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除媒婆团
|
||||
*/
|
||||
@RequiresPermissions("system:group:remove")
|
||||
@Log(title = "媒婆团", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tbUserMatchGroupService.deleteTbUserMatchGroupByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增媒婆团')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-group-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">合伙人id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="matchId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">团名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="groupName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="groupDesc" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">封面图片:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="logoUrl" 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="nativePlace" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">省id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="provinceId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">市id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="cityId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">区id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="district" 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="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/group"
|
||||
$("#form-group-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-group-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改媒婆团')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-group-edit" th:object="${tbUserMatchGroup}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">合伙人id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="matchId" th:field="*{matchId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">团名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="groupName" th:field="*{groupName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="groupDesc" class="form-control">[[*{groupDesc}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">封面图片:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="logoUrl" th:field="*{logoUrl}" 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="nativePlace" th:field="*{nativePlace}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">省id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="provinceId" th:field="*{provinceId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">市id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="cityId" th:field="*{cityId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">区id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="district" th:field="*{district}" 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="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/group";
|
||||
$("#form-group-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-group-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<!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="matchId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>团名:</label>
|
||||
<input type="text" name="groupName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>封面图片:</label>
|
||||
<input type="text" name="logoUrl"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>所在地:</label>
|
||||
<input type="text" name="nativePlace"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>省id:</label>
|
||||
<input type="text" name="provinceId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>市id:</label>
|
||||
<input type="text" name="cityId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>区id:</label>
|
||||
<input type="text" name="district"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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:group:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:group:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:group:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:group: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:group:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:group:remove')}]];
|
||||
var prefix = ctx + "system/group";
|
||||
|
||||
$(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: 'matchId',
|
||||
title: '合伙人id'
|
||||
},
|
||||
{
|
||||
field: 'groupName',
|
||||
title: '团名'
|
||||
},
|
||||
{
|
||||
field: 'groupDesc',
|
||||
title: '简介'
|
||||
},
|
||||
{
|
||||
field: 'groupType',
|
||||
title: '团类型:0.活动团 扩展字段,目前只有活动团'
|
||||
},
|
||||
{
|
||||
field: 'logoUrl',
|
||||
title: '封面图片'
|
||||
},
|
||||
{
|
||||
field: 'nativePlace',
|
||||
title: '所在地'
|
||||
},
|
||||
{
|
||||
field: 'provinceId',
|
||||
title: '省id'
|
||||
},
|
||||
{
|
||||
field: 'cityId',
|
||||
title: '市id'
|
||||
},
|
||||
{
|
||||
field: 'district',
|
||||
title: '区id'
|
||||
},
|
||||
{
|
||||
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>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 媒婆团对象 tb_user_match_group
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-16
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "媒婆团")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "tb_user_match_group")
|
||||
public class TbUserMatchGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 合伙人id */
|
||||
@Excel(name = "合伙人id")
|
||||
@ApiModelProperty(value = "合伙人id")
|
||||
private Long matchId;
|
||||
|
||||
/** 团名 */
|
||||
@Excel(name = "团名")
|
||||
@ApiModelProperty(value = "团名")
|
||||
private String groupName;
|
||||
|
||||
/** 简介 */
|
||||
@Excel(name = "简介")
|
||||
@ApiModelProperty(value = "简介")
|
||||
private String groupDesc;
|
||||
|
||||
/** 团类型:0.活动团 扩展字段,目前只有活动团 */
|
||||
@Excel(name = "团类型:0.活动团 扩展字段,目前只有活动团")
|
||||
@ApiModelProperty(value = "团类型:0.活动团 扩展字段,目前只有活动团")
|
||||
private Long groupType;
|
||||
|
||||
/** 封面图片 */
|
||||
@Excel(name = "封面图片")
|
||||
@ApiModelProperty(value = "封面图片")
|
||||
private String logoUrl;
|
||||
|
||||
/** 所在地 */
|
||||
@Excel(name = "所在地")
|
||||
@ApiModelProperty(value = "所在地")
|
||||
private String nativePlace;
|
||||
|
||||
/** 省id */
|
||||
@Excel(name = "省id")
|
||||
@ApiModelProperty(value = "省id")
|
||||
private Long provinceId;
|
||||
|
||||
/** 市id */
|
||||
@Excel(name = "市id")
|
||||
@ApiModelProperty(value = "市id")
|
||||
private Long cityId;
|
||||
|
||||
/** 区id */
|
||||
@Excel(name = "区id")
|
||||
@ApiModelProperty(value = "区id")
|
||||
private Long district;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserMatchGroup;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 媒婆团Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-16
|
||||
*/
|
||||
public interface TbUserMatchGroupMapper extends BaseMapper<TbUserMatchGroup>
|
||||
{
|
||||
/**
|
||||
* 查询媒婆团
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 媒婆团
|
||||
*/
|
||||
public TbUserMatchGroup selectTbUserMatchGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询媒婆团列表
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 媒婆团集合
|
||||
*/
|
||||
public List<TbUserMatchGroup> selectTbUserMatchGroupList(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 新增媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 修改媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 删除媒婆团
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserMatchGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除媒婆团
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserMatchGroupByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserMatchGroup;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 媒婆团Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-16
|
||||
*/
|
||||
public interface ITbUserMatchGroupService extends IService<TbUserMatchGroup>
|
||||
{
|
||||
/**
|
||||
* 查询媒婆团
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 媒婆团
|
||||
*/
|
||||
public TbUserMatchGroup selectTbUserMatchGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询媒婆团列表
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 媒婆团集合
|
||||
*/
|
||||
public List<TbUserMatchGroup> selectTbUserMatchGroupList(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 新增媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 修改媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup);
|
||||
|
||||
/**
|
||||
* 批量删除媒婆团
|
||||
*
|
||||
* @param ids 需要删除的媒婆团主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserMatchGroupByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除媒婆团信息
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserMatchGroupById(Long id);
|
||||
}
|
||||
|
|
@ -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.TbUserMatchGroupMapper;
|
||||
import com.ruoyi.system.domain.TbUserMatchGroup;
|
||||
import com.ruoyi.system.service.ITbUserMatchGroupService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 媒婆团Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-16
|
||||
*/
|
||||
@Service
|
||||
public class TbUserMatchGroupServiceImpl extends ServiceImpl<TbUserMatchGroupMapper, TbUserMatchGroup> implements ITbUserMatchGroupService
|
||||
{
|
||||
@Autowired
|
||||
private TbUserMatchGroupMapper tbUserMatchGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询媒婆团
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 媒婆团
|
||||
*/
|
||||
@Override
|
||||
public TbUserMatchGroup selectTbUserMatchGroupById(Long id)
|
||||
{
|
||||
return tbUserMatchGroupMapper.selectTbUserMatchGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询媒婆团列表
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 媒婆团
|
||||
*/
|
||||
@Override
|
||||
public List<TbUserMatchGroup> selectTbUserMatchGroupList(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
return tbUserMatchGroupMapper.selectTbUserMatchGroupList(tbUserMatchGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
tbUserMatchGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return tbUserMatchGroupMapper.insertTbUserMatchGroup(tbUserMatchGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改媒婆团
|
||||
*
|
||||
* @param tbUserMatchGroup 媒婆团
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbUserMatchGroup(TbUserMatchGroup tbUserMatchGroup)
|
||||
{
|
||||
tbUserMatchGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return tbUserMatchGroupMapper.updateTbUserMatchGroup(tbUserMatchGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除媒婆团
|
||||
*
|
||||
* @param ids 需要删除的媒婆团主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserMatchGroupByIds(String ids)
|
||||
{
|
||||
return tbUserMatchGroupMapper.deleteTbUserMatchGroupByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除媒婆团信息
|
||||
*
|
||||
* @param id 媒婆团主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserMatchGroupById(Long id)
|
||||
{
|
||||
return tbUserMatchGroupMapper.deleteTbUserMatchGroupById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<?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.TbUserMatchGroupMapper">
|
||||
|
||||
<resultMap type="TbUserMatchGroup" id="TbUserMatchGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="matchId" column="match_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="groupDesc" column="group_desc" />
|
||||
<result property="groupType" column="group_type" />
|
||||
<result property="logoUrl" column="logo_url" />
|
||||
<result property="nativePlace" column="native_place" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="district" column="district" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserMatchGroupVo">
|
||||
select id, match_id, group_name, group_desc, group_type, logo_url, native_place, province_id, city_id, district, create_time, update_time, remark from tb_user_match_group
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserMatchGroupList" parameterType="TbUserMatchGroup" resultMap="TbUserMatchGroupResult">
|
||||
<include refid="selectTbUserMatchGroupVo"/>
|
||||
<where>
|
||||
<if test="matchId != null "> and match_id = #{matchId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="groupDesc != null and groupDesc != ''"> and group_desc = #{groupDesc}</if>
|
||||
<if test="groupType != null "> and group_type = #{groupType}</if>
|
||||
<if test="logoUrl != null and logoUrl != ''"> and logo_url = #{logoUrl}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and native_place = #{nativePlace}</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="district != null "> and district = #{district}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTbUserMatchGroupById" parameterType="Long" resultMap="TbUserMatchGroupResult">
|
||||
<include refid="selectTbUserMatchGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTbUserMatchGroup" parameterType="TbUserMatchGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_user_match_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="matchId != null">match_id,</if>
|
||||
<if test="groupName != null">group_name,</if>
|
||||
<if test="groupDesc != null">group_desc,</if>
|
||||
<if test="groupType != null">group_type,</if>
|
||||
<if test="logoUrl != null">logo_url,</if>
|
||||
<if test="nativePlace != null">native_place,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="district != null">district,</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="matchId != null">#{matchId},</if>
|
||||
<if test="groupName != null">#{groupName},</if>
|
||||
<if test="groupDesc != null">#{groupDesc},</if>
|
||||
<if test="groupType != null">#{groupType},</if>
|
||||
<if test="logoUrl != null">#{logoUrl},</if>
|
||||
<if test="nativePlace != null">#{nativePlace},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="district != null">#{district},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTbUserMatchGroup" parameterType="TbUserMatchGroup">
|
||||
update tb_user_match_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="matchId != null">match_id = #{matchId},</if>
|
||||
<if test="groupName != null">group_name = #{groupName},</if>
|
||||
<if test="groupDesc != null">group_desc = #{groupDesc},</if>
|
||||
<if test="groupType != null">group_type = #{groupType},</if>
|
||||
<if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
||||
<if test="nativePlace != null">native_place = #{nativePlace},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="district != null">district = #{district},</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="deleteTbUserMatchGroupById" parameterType="Long">
|
||||
delete from tb_user_match_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTbUserMatchGroupByIds" parameterType="String">
|
||||
delete from tb_user_match_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue