各种接口
This commit is contained in:
parent
85d39c12a7
commit
1ded29e34b
|
|
@ -0,0 +1,51 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.ruoyi.system.service.ITbMatchSingleSayService;
|
||||
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/say")
|
||||
public class TbMatchSingleAppController {
|
||||
|
||||
@Autowired
|
||||
private ITbMatchSingleSayService tbMatchSingleSayService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value = "更新媒婆说", httpMethod = "POST")
|
||||
public Result<String> edit(@RequestBody TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
int effectiveRows = tbMatchSingleSayService.updateTbMatchSingleSay(tbMatchSingleSay);
|
||||
if(effectiveRows > 0){
|
||||
return Result.success("更新媒婆说成功!");
|
||||
}else {
|
||||
return Result.error("更新媒婆说失败!");
|
||||
}
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "创建媒婆说", httpMethod = "POST")
|
||||
public Result<String> addSave(@RequestBody TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
int effectiveRows = tbMatchSingleSayService.insertTbMatchSingleSay(tbMatchSingleSay);
|
||||
if(effectiveRows > 0){
|
||||
return Result.success("创建媒婆说成功!");
|
||||
}else {
|
||||
return Result.error("创建媒婆说失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,14 +5,8 @@ import cn.hutool.core.date.DateUtil;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbUser;
|
||||
import com.ruoyi.system.domain.TbUserImg;
|
||||
import com.ruoyi.system.domain.TbUserMatch;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.ruoyi.system.service.ITbUserImgService;
|
||||
import com.ruoyi.system.service.ITbUserMatchService;
|
||||
import com.ruoyi.system.service.ITbUserService;
|
||||
import com.ruoyi.system.service.ITbUserSingleService;
|
||||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.service.*;
|
||||
import com.ruoyi.web.request.MatchRegisterReq;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
|
@ -43,6 +37,9 @@ public class TbUserMatchAppController {
|
|||
@Autowired
|
||||
private ITbUserImgService tbUserImgService;
|
||||
|
||||
@Autowired
|
||||
private ITbMatchSingleSayService tbMatchSingleSayService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/registerSingleList")
|
||||
@ApiOperation(value = "我的单身团", httpMethod = "POST")
|
||||
|
|
@ -60,7 +57,6 @@ public class TbUserMatchAppController {
|
|||
if(CollectionUtil.isEmpty(ids)){
|
||||
return Result.success(PageInfo.of(new ArrayList<>()));
|
||||
}
|
||||
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<TbUserSingle> list = tbUserSingleService.lambdaQuery()
|
||||
.eq(registerReq.getSex() != null, TbUserSingle::getSex, registerReq.getSex())
|
||||
|
|
@ -70,6 +66,7 @@ public class TbUserMatchAppController {
|
|||
if(model.getBirthday() != null){
|
||||
model.setAge(DateUtil.ageOfNow(model.getBirthday()));
|
||||
}
|
||||
model.setMatchSay(tbMatchSingleSayService.lambdaQuery().eq(TbMatchSingleSay::getSingleId, model.getId()).one());
|
||||
model.setTbUserImgList(tbUserImgService.lambdaQuery().eq(TbUserImg::getUserId, model.getUserId()).list());
|
||||
});
|
||||
return Result.success(PageInfo.of(list));
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@ import cn.hutool.core.util.ObjectUtil;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.ruoyi.system.domain.TbUserFollow;
|
||||
import com.ruoyi.system.domain.TbUserImg;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.ruoyi.system.service.ITbMatchSingleSayService;
|
||||
import com.ruoyi.system.service.ITbUserFollowService;
|
||||
import com.ruoyi.system.service.ITbUserImgService;
|
||||
import com.ruoyi.system.service.ITbUserSingleService;
|
||||
|
|
@ -39,6 +41,9 @@ public class TbUserSingleAppController {
|
|||
@Autowired
|
||||
private ITbUserFollowService tbUserFollowService;
|
||||
|
||||
@Autowired
|
||||
private ITbMatchSingleSayService tbMatchSingleSayService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "填写用户信息", httpMethod = "POST")
|
||||
|
|
@ -95,6 +100,7 @@ public class TbUserSingleAppController {
|
|||
if(model.getBirthday() != null){
|
||||
model.setAge(DateUtil.ageOfNow(model.getBirthday()));
|
||||
}
|
||||
model.setMatchSay(tbMatchSingleSayService.lambdaQuery().eq(TbMatchSingleSay::getSingleId, model.getId()).one());
|
||||
model.setTbUserImgList(tbUserImgService.lambdaQuery().eq(TbUserImg::getUserId, model.getUserId()).list());
|
||||
});
|
||||
return Result.success(PageInfo.of(list));
|
||||
|
|
|
|||
|
|
@ -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.TbMatchSingleSay;
|
||||
import com.ruoyi.system.service.ITbMatchSingleSayService;
|
||||
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-26
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/say")
|
||||
public class TbMatchSingleSayController extends BaseController
|
||||
{
|
||||
private String prefix = "system/say";
|
||||
|
||||
@Autowired
|
||||
private ITbMatchSingleSayService tbMatchSingleSayService;
|
||||
|
||||
@RequiresPermissions("system:say:view")
|
||||
@GetMapping()
|
||||
public String say()
|
||||
{
|
||||
return prefix + "/say";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询媒婆说列表
|
||||
*/
|
||||
@RequiresPermissions("system:say:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
startPage();
|
||||
List<TbMatchSingleSay> list = tbMatchSingleSayService.selectTbMatchSingleSayList(tbMatchSingleSay);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出媒婆说列表
|
||||
*/
|
||||
@RequiresPermissions("system:say:export")
|
||||
@Log(title = "媒婆说", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
List<TbMatchSingleSay> list = tbMatchSingleSayService.selectTbMatchSingleSayList(tbMatchSingleSay);
|
||||
ExcelUtil<TbMatchSingleSay> util = new ExcelUtil<TbMatchSingleSay>(TbMatchSingleSay.class);
|
||||
return util.exportExcel(list, "媒婆说数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增媒婆说
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存媒婆说
|
||||
*/
|
||||
@RequiresPermissions("system:say:add")
|
||||
@Log(title = "媒婆说", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
return toAjax(tbMatchSingleSayService.insertTbMatchSingleSay(tbMatchSingleSay));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改媒婆说
|
||||
*/
|
||||
@RequiresPermissions("system:say:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
TbMatchSingleSay tbMatchSingleSay = tbMatchSingleSayService.selectTbMatchSingleSayById(id);
|
||||
mmap.put("tbMatchSingleSay", tbMatchSingleSay);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存媒婆说
|
||||
*/
|
||||
@RequiresPermissions("system:say:edit")
|
||||
@Log(title = "媒婆说", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
return toAjax(tbMatchSingleSayService.updateTbMatchSingleSay(tbMatchSingleSay));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除媒婆说
|
||||
*/
|
||||
@RequiresPermissions("system:say:remove")
|
||||
@Log(title = "媒婆说", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tbMatchSingleSayService.deleteTbMatchSingleSayByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -41,19 +41,19 @@ public class AdapayServiceImpl implements AdapayService {
|
|||
paymentParams.put("order_no", orderNo);
|
||||
paymentParams.put("pay_channel", "alipay");
|
||||
if(adapayReq.getOrderType() == 6L){
|
||||
// paymentParams.put("pay_amt", "9.90");
|
||||
paymentParams.put("pay_amt", "0.01");
|
||||
paymentParams.put("pay_amt", "9.90");
|
||||
// paymentParams.put("pay_amt", "0.01");
|
||||
}else if(adapayReq.getOrderType() == 1L){
|
||||
paymentParams.put("pay_amt", "1999.00");
|
||||
}else if(adapayReq.getOrderType() == 7L){
|
||||
// paymentParams.put("pay_amt", "99.90");
|
||||
paymentParams.put("pay_amt", "0.01");
|
||||
paymentParams.put("pay_amt", "99.90");
|
||||
// paymentParams.put("pay_amt", "0.01");
|
||||
}else if(adapayReq.getOrderType() == 8L){
|
||||
// paymentParams.put("pay_amt", "199.00");
|
||||
paymentParams.put("pay_amt", "0.01");
|
||||
paymentParams.put("pay_amt", "199.00");
|
||||
// paymentParams.put("pay_amt", "0.01");
|
||||
}else if(adapayReq.getOrderType() == 9L){
|
||||
// paymentParams.put("pay_amt", "699.00");
|
||||
paymentParams.put("pay_amt", "0.01");
|
||||
paymentParams.put("pay_amt", "699.00");
|
||||
// paymentParams.put("pay_amt", "0.01");
|
||||
}
|
||||
|
||||
paymentParams.put("goods_title", "全民脱单合伙人开通");
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
<input name="orderMoney" th:field="*{orderMoney}" 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="servTime" th:field="*{servTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订单号:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@
|
|||
field: 'orderMoney',
|
||||
title: '支付金额'
|
||||
},
|
||||
{
|
||||
field: 'servTime',
|
||||
title: '剩余服务次数'
|
||||
},
|
||||
{
|
||||
field: 'orderNo',
|
||||
title: '订单号'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
<!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-say-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合伙人id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="matchId" 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="singleId" 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="says" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/say"
|
||||
$("#form-say-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-say-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<!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-say-edit" th:object="${tbMatchSingleSay}">
|
||||
<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="matchId" th:field="*{matchId}" 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="singleId" th:field="*{singleId}" 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="says" class="form-control">[[*{says}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/say";
|
||||
$("#form-say-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-say-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<!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>单身id:</label>
|
||||
<input type="text" name="singleId"/>
|
||||
</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:say:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:say:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:say:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:say: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:say:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:say:remove')}]];
|
||||
var prefix = ctx + "system/say";
|
||||
|
||||
$(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: '${comment}',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'matchId',
|
||||
title: '合伙人id'
|
||||
},
|
||||
{
|
||||
field: 'singleId',
|
||||
title: '单身id'
|
||||
},
|
||||
{
|
||||
field: 'says',
|
||||
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>
|
||||
|
|
@ -316,6 +316,8 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/app/match/**", "anon");
|
||||
// app合伙人活动团
|
||||
filterChainDefinitionMap.put("/app/matchGroup/**", "anon");
|
||||
// app媒婆说
|
||||
filterChainDefinitionMap.put("/app/say/**", "anon");
|
||||
// 系统权限列表
|
||||
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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_match_single_say
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "媒婆说")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "tb_match_single_say")
|
||||
public class TbMatchSingleSay extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 合伙人id */
|
||||
@Excel(name = "合伙人id")
|
||||
@ApiModelProperty(value = "合伙人id")
|
||||
private Long matchId;
|
||||
|
||||
/** 单身id */
|
||||
@Excel(name = "单身id")
|
||||
@ApiModelProperty(value = "单身id")
|
||||
private Long singleId;
|
||||
|
||||
/** 推荐内容 */
|
||||
@Excel(name = "推荐内容")
|
||||
@ApiModelProperty(value = "推荐内容")
|
||||
private String says;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -159,4 +159,8 @@ public class TbUserSingle extends BaseEntity
|
|||
@TableField(exist = false)
|
||||
private String mobile;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "媒婆说")
|
||||
private TbMatchSingleSay matchSay;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 媒婆说Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
public interface TbMatchSingleSayMapper extends BaseMapper<TbMatchSingleSay>
|
||||
{
|
||||
/**
|
||||
* 查询媒婆说
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 媒婆说
|
||||
*/
|
||||
public TbMatchSingleSay selectTbMatchSingleSayById(Long id);
|
||||
|
||||
/**
|
||||
* 查询媒婆说列表
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 媒婆说集合
|
||||
*/
|
||||
public List<TbMatchSingleSay> selectTbMatchSingleSayList(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 新增媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 修改媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 删除媒婆说
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbMatchSingleSayById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除媒婆说
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbMatchSingleSayByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 媒婆说Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
public interface ITbMatchSingleSayService extends IService<TbMatchSingleSay>
|
||||
{
|
||||
/**
|
||||
* 查询媒婆说
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 媒婆说
|
||||
*/
|
||||
public TbMatchSingleSay selectTbMatchSingleSayById(Long id);
|
||||
|
||||
/**
|
||||
* 查询媒婆说列表
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 媒婆说集合
|
||||
*/
|
||||
public List<TbMatchSingleSay> selectTbMatchSingleSayList(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 新增媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 修改媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay);
|
||||
|
||||
/**
|
||||
* 批量删除媒婆说
|
||||
*
|
||||
* @param ids 需要删除的媒婆说主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbMatchSingleSayByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除媒婆说信息
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbMatchSingleSayById(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.TbMatchSingleSayMapper;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.ruoyi.system.service.ITbMatchSingleSayService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 媒婆说Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Service
|
||||
public class TbMatchSingleSayServiceImpl extends ServiceImpl<TbMatchSingleSayMapper, TbMatchSingleSay> implements ITbMatchSingleSayService
|
||||
{
|
||||
@Autowired
|
||||
private TbMatchSingleSayMapper tbMatchSingleSayMapper;
|
||||
|
||||
/**
|
||||
* 查询媒婆说
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 媒婆说
|
||||
*/
|
||||
@Override
|
||||
public TbMatchSingleSay selectTbMatchSingleSayById(Long id)
|
||||
{
|
||||
return tbMatchSingleSayMapper.selectTbMatchSingleSayById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询媒婆说列表
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 媒婆说
|
||||
*/
|
||||
@Override
|
||||
public List<TbMatchSingleSay> selectTbMatchSingleSayList(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
return tbMatchSingleSayMapper.selectTbMatchSingleSayList(tbMatchSingleSay);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
tbMatchSingleSay.setCreateTime(DateUtils.getNowDate());
|
||||
return tbMatchSingleSayMapper.insertTbMatchSingleSay(tbMatchSingleSay);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改媒婆说
|
||||
*
|
||||
* @param tbMatchSingleSay 媒婆说
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbMatchSingleSay(TbMatchSingleSay tbMatchSingleSay)
|
||||
{
|
||||
tbMatchSingleSay.setUpdateTime(DateUtils.getNowDate());
|
||||
return tbMatchSingleSayMapper.updateTbMatchSingleSay(tbMatchSingleSay);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除媒婆说
|
||||
*
|
||||
* @param ids 需要删除的媒婆说主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbMatchSingleSayByIds(String ids)
|
||||
{
|
||||
return tbMatchSingleSayMapper.deleteTbMatchSingleSayByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除媒婆说信息
|
||||
*
|
||||
* @param id 媒婆说主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbMatchSingleSayById(Long id)
|
||||
{
|
||||
return tbMatchSingleSayMapper.deleteTbMatchSingleSayById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?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.TbMatchSingleSayMapper">
|
||||
|
||||
<resultMap type="TbMatchSingleSay" id="TbMatchSingleSayResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="matchId" column="match_id" />
|
||||
<result property="singleId" column="single_id" />
|
||||
<result property="says" column="says" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTbMatchSingleSayVo">
|
||||
select id, match_id, single_id, says, create_time, update_time, remark from tb_match_single_say
|
||||
</sql>
|
||||
|
||||
<select id="selectTbMatchSingleSayList" parameterType="TbMatchSingleSay" resultMap="TbMatchSingleSayResult">
|
||||
<include refid="selectTbMatchSingleSayVo"/>
|
||||
<where>
|
||||
<if test="matchId != null "> and match_id = #{matchId}</if>
|
||||
<if test="singleId != null "> and single_id = #{singleId}</if>
|
||||
<if test="says != null and says != ''"> and says = #{says}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTbMatchSingleSayById" parameterType="Long" resultMap="TbMatchSingleSayResult">
|
||||
<include refid="selectTbMatchSingleSayVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTbMatchSingleSay" parameterType="TbMatchSingleSay" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_match_single_say
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="matchId != null">match_id,</if>
|
||||
<if test="singleId != null">single_id,</if>
|
||||
<if test="says != null">says,</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="singleId != null">#{singleId},</if>
|
||||
<if test="says != null">#{says},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTbMatchSingleSay" parameterType="TbMatchSingleSay">
|
||||
update tb_match_single_say
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="matchId != null">match_id = #{matchId},</if>
|
||||
<if test="singleId != null">single_id = #{singleId},</if>
|
||||
<if test="says != null">says = #{says},</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="deleteTbMatchSingleSayById" parameterType="Long">
|
||||
delete from tb_match_single_say where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTbMatchSingleSayByIds" parameterType="String">
|
||||
delete from tb_match_single_say where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
<result property="userId" column="user_id" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="orderMoney" column="order_money" />
|
||||
<result property="servTime" column="serv_time" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="paymentId" column="payment_id" />
|
||||
<result property="payStatus" column="pay_status" />
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserMatchOrderVo">
|
||||
select id, user_id, order_type, order_money, order_no, payment_id, pay_status, create_time, update_time, remark from tb_user_match_order
|
||||
select id, user_id, order_type, order_money, serv_time, order_no, payment_id, pay_status, create_time, update_time, remark from tb_user_match_order
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserMatchOrderList" parameterType="TbUserMatchOrder" resultMap="TbUserMatchOrderResult">
|
||||
|
|
@ -44,6 +45,7 @@
|
|||
<if test="userId != null">user_id,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="orderMoney != null">order_money,</if>
|
||||
<if test="servTime != null">serv_time,</if>
|
||||
<if test="orderNo != null">order_no,</if>
|
||||
<if test="paymentId != null">payment_id,</if>
|
||||
<if test="payStatus != null">pay_status,</if>
|
||||
|
|
@ -55,6 +57,7 @@
|
|||
<if test="userId != null">#{userId},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="orderMoney != null">#{orderMoney},</if>
|
||||
<if test="servTime != null">#{servTime},</if>
|
||||
<if test="orderNo != null">#{orderNo},</if>
|
||||
<if test="paymentId != null">#{paymentId},</if>
|
||||
<if test="payStatus != null">#{payStatus},</if>
|
||||
|
|
@ -70,6 +73,7 @@
|
|||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
<if test="orderMoney != null">order_money = #{orderMoney},</if>
|
||||
<if test="servTime != null">serv_time = #{servTime},</if>
|
||||
<if test="orderNo != null">order_no = #{orderNo},</if>
|
||||
<if test="paymentId != null">payment_id = #{paymentId},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue