From 1ded29e34bfaa61e21e04b8b11cd60c5ad1d287e Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sat, 30 Dec 2023 00:09:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E7=A7=8D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/TbMatchSingleAppController.java | 51 +++++++ .../app/TbUserMatchAppController.java | 15 +-- .../app/TbUserSingleAppController.java | 6 + .../system/TbMatchSingleSayController.java | 127 ++++++++++++++++++ .../web/service/impl/AdapayServiceImpl.java | 16 +-- .../templates/system/order/edit.html | 6 + .../templates/system/order/order.html | 4 + .../resources/templates/system/say/add.html | 49 +++++++ .../resources/templates/system/say/edit.html | 50 +++++++ .../resources/templates/system/say/say.html | 102 ++++++++++++++ .../ruoyi/framework/config/ShiroConfig.java | 2 + .../ruoyi/system/domain/TbMatchSingleSay.java | 47 +++++++ .../com/ruoyi/system/domain/TbUserSingle.java | 4 + .../system/mapper/TbMatchSingleSayMapper.java | 62 +++++++++ .../service/ITbMatchSingleSayService.java | 62 +++++++++ .../impl/TbMatchSingleSayServiceImpl.java | 98 ++++++++++++++ .../mapper/system/TbMatchSingleSayMapper.xml | 79 +++++++++++ .../mapper/system/TbUserMatchOrderMapper.xml | 6 +- 18 files changed, 768 insertions(+), 18 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbMatchSingleAppController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbMatchSingleSayController.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/say/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/say/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/say/say.html create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/TbMatchSingleSay.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbMatchSingleSayMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/ITbMatchSingleSayService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbMatchSingleSayServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/TbMatchSingleSayMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbMatchSingleAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbMatchSingleAppController.java new file mode 100644 index 00000000..26897c9c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbMatchSingleAppController.java @@ -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.*; + +/** + *

媒婆说

+ * @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 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 addSave(@RequestBody TbMatchSingleSay tbMatchSingleSay) + { + int effectiveRows = tbMatchSingleSayService.insertTbMatchSingleSay(tbMatchSingleSay); + if(effectiveRows > 0){ + return Result.success("创建媒婆说成功!"); + }else { + return Result.error("创建媒婆说失败!"); + } + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserMatchAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserMatchAppController.java index 1a079ac3..994f93c7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserMatchAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserMatchAppController.java @@ -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 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)); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserSingleAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserSingleAppController.java index 9caa9e62..54e95c7f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserSingleAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/TbUserSingleAppController.java @@ -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)); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbMatchSingleSayController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbMatchSingleSayController.java new file mode 100644 index 00000000..fe14d1b6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbMatchSingleSayController.java @@ -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 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 list = tbMatchSingleSayService.selectTbMatchSingleSayList(tbMatchSingleSay); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/AdapayServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/AdapayServiceImpl.java index 80596bc2..c95a8866 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/AdapayServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/AdapayServiceImpl.java @@ -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", "全民脱单合伙人开通"); diff --git a/ruoyi-admin/src/main/resources/templates/system/order/edit.html b/ruoyi-admin/src/main/resources/templates/system/order/edit.html index fb791236..364e5423 100644 --- a/ruoyi-admin/src/main/resources/templates/system/order/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/order/edit.html @@ -19,6 +19,12 @@ +
+ +
+ +
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/order/order.html b/ruoyi-admin/src/main/resources/templates/system/order/order.html index 5fe7b18b..5643b4ba 100644 --- a/ruoyi-admin/src/main/resources/templates/system/order/order.html +++ b/ruoyi-admin/src/main/resources/templates/system/order/order.html @@ -99,6 +99,10 @@ field: 'orderMoney', title: '支付金额' }, + { + field: 'servTime', + title: '剩余服务次数' + }, { field: 'orderNo', title: '订单号' diff --git a/ruoyi-admin/src/main/resources/templates/system/say/add.html b/ruoyi-admin/src/main/resources/templates/system/say/add.html new file mode 100644 index 00000000..d5d32672 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/say/add.html @@ -0,0 +1,49 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/say/edit.html b/ruoyi-admin/src/main/resources/templates/system/say/edit.html new file mode 100644 index 00000000..0b8d448d --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/say/edit.html @@ -0,0 +1,50 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/say/say.html b/ruoyi-admin/src/main/resources/templates/system/say/say.html new file mode 100644 index 00000000..38a0d071 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/say/say.html @@ -0,0 +1,102 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index 74e5a30e..405cbfe2 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -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()); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbMatchSingleSay.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbMatchSingleSay.java new file mode 100644 index 00000000..f5ab31d7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbMatchSingleSay.java @@ -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; + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbUserSingle.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbUserSingle.java index 290141cb..7128d7b1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbUserSingle.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TbUserSingle.java @@ -159,4 +159,8 @@ public class TbUserSingle extends BaseEntity @TableField(exist = false) private String mobile; + @TableField(exist = false) + @ApiModelProperty(value = "媒婆说") + private TbMatchSingleSay matchSay; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbMatchSingleSayMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbMatchSingleSayMapper.java new file mode 100644 index 00000000..96530e07 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbMatchSingleSayMapper.java @@ -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 +{ + /** + * 查询媒婆说 + * + * @param id 媒婆说主键 + * @return 媒婆说 + */ + public TbMatchSingleSay selectTbMatchSingleSayById(Long id); + + /** + * 查询媒婆说列表 + * + * @param tbMatchSingleSay 媒婆说 + * @return 媒婆说集合 + */ + public List 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbMatchSingleSayService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbMatchSingleSayService.java new file mode 100644 index 00000000..406b67f7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbMatchSingleSayService.java @@ -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 +{ + /** + * 查询媒婆说 + * + * @param id 媒婆说主键 + * @return 媒婆说 + */ + public TbMatchSingleSay selectTbMatchSingleSayById(Long id); + + /** + * 查询媒婆说列表 + * + * @param tbMatchSingleSay 媒婆说 + * @return 媒婆说集合 + */ + public List 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbMatchSingleSayServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbMatchSingleSayServiceImpl.java new file mode 100644 index 00000000..4ab1ce70 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbMatchSingleSayServiceImpl.java @@ -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 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 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); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/TbMatchSingleSayMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TbMatchSingleSayMapper.xml new file mode 100644 index 00000000..93cefaa9 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/TbMatchSingleSayMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + select id, match_id, single_id, says, create_time, update_time, remark from tb_match_single_say + + + + + + + + insert into tb_match_single_say + + match_id, + single_id, + says, + create_time, + update_time, + remark, + + + #{matchId}, + #{singleId}, + #{says}, + #{createTime}, + #{updateTime}, + #{remark}, + + + + + update tb_match_single_say + + match_id = #{matchId}, + single_id = #{singleId}, + says = #{says}, + create_time = #{createTime}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from tb_match_single_say where id = #{id} + + + + delete from tb_match_single_say where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/TbUserMatchOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TbUserMatchOrderMapper.xml index fd22ea9c..9754f6d4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TbUserMatchOrderMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TbUserMatchOrderMapper.xml @@ -9,6 +9,7 @@ + @@ -18,7 +19,7 @@ - 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