新增:match、match_order、cooperate、cooperate_log表及模块
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
package com.gxwebsoft.booking.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.booking.service.CooperateService;
|
||||
import com.gxwebsoft.booking.entity.Cooperate;
|
||||
import com.gxwebsoft.booking.param.CooperateParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Api(tags = "商务合作管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/booking/cooperate")
|
||||
public class CooperateController extends BaseController {
|
||||
@Resource
|
||||
private CooperateService cooperateService;
|
||||
|
||||
@ApiOperation("分页查询商务合作")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Cooperate>> page(CooperateParam param) {
|
||||
// 使用关联查询
|
||||
return success(cooperateService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商务合作")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Cooperate>> list(CooperateParam param) {
|
||||
// 使用关联查询
|
||||
return success(cooperateService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('booking:cooperate:list')")
|
||||
@ApiOperation("根据id查询商务合作")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Cooperate> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cooperateService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商务合作")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Cooperate cooperate) {
|
||||
if (cooperateService.save(cooperate)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商务合作")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Cooperate cooperate) {
|
||||
if (cooperateService.updateById(cooperate)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商务合作")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cooperateService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商务合作")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Cooperate> list) {
|
||||
if (cooperateService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商务合作")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Cooperate> batchParam) {
|
||||
if (batchParam.update(cooperateService, "cooperate_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商务合作")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cooperateService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.gxwebsoft.booking.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.booking.service.CooperateLogService;
|
||||
import com.gxwebsoft.booking.entity.CooperateLog;
|
||||
import com.gxwebsoft.booking.param.CooperateLogParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
@Api(tags = "商务合作留言记录管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/booking/cooperate-log")
|
||||
public class CooperateLogController extends BaseController {
|
||||
@Resource
|
||||
private CooperateLogService cooperateLogService;
|
||||
|
||||
@ApiOperation("分页查询商务合作留言记录")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CooperateLog>> page(CooperateLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(cooperateLogService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商务合作留言记录")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CooperateLog>> list(CooperateLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(cooperateLogService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('booking:cooperateLog:list')")
|
||||
@ApiOperation("根据id查询商务合作留言记录")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CooperateLog> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cooperateLogService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商务合作留言记录")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CooperateLog cooperateLog) {
|
||||
if (cooperateLogService.save(cooperateLog)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商务合作留言记录")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CooperateLog cooperateLog) {
|
||||
if (cooperateLogService.updateById(cooperateLog)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商务合作留言记录")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cooperateLogService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商务合作留言记录")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CooperateLog> list) {
|
||||
if (cooperateLogService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商务合作留言记录")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CooperateLog> batchParam) {
|
||||
if (batchParam.update(cooperateLogService, "log_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商务合作留言记录")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cooperateLogService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gxwebsoft.booking.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.booking.service.MatchService;
|
||||
import com.gxwebsoft.booking.entity.Match;
|
||||
import com.gxwebsoft.booking.param.MatchParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛信息表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
@Api(tags = "比赛信息表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/booking/match")
|
||||
public class MatchController extends BaseController {
|
||||
@Resource
|
||||
private MatchService matchService;
|
||||
|
||||
@ApiOperation("分页查询比赛信息表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Match>> page(MatchParam param) {
|
||||
// 使用关联查询
|
||||
return success(matchService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部比赛信息表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Match>> list(MatchParam param) {
|
||||
// 使用关联查询
|
||||
return success(matchService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('booking:match:list')")
|
||||
@ApiOperation("根据id查询比赛信息表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Match> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(matchService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加比赛信息表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Match match) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
match.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (matchService.save(match)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改比赛信息表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Match match) {
|
||||
if (matchService.updateById(match)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除比赛信息表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (matchService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加比赛信息表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Match> list) {
|
||||
if (matchService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改比赛信息表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Match> batchParam) {
|
||||
if (batchParam.update(matchService, "match_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除比赛信息表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (matchService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gxwebsoft.booking.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.booking.service.MatchOrderService;
|
||||
import com.gxwebsoft.booking.entity.MatchOrder;
|
||||
import com.gxwebsoft.booking.param.MatchOrderParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Api(tags = "比赛报名记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/booking/match-order")
|
||||
public class MatchOrderController extends BaseController {
|
||||
@Resource
|
||||
private MatchOrderService matchOrderService;
|
||||
|
||||
@ApiOperation("分页查询比赛报名记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<MatchOrder>> page(MatchOrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(matchOrderService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部比赛报名记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<MatchOrder>> list(MatchOrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(matchOrderService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('booking:matchOrder:list')")
|
||||
@ApiOperation("根据id查询比赛报名记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<MatchOrder> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(matchOrderService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加比赛报名记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody MatchOrder matchOrder) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
matchOrder.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (matchOrderService.save(matchOrder)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改比赛报名记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody MatchOrder matchOrder) {
|
||||
if (matchOrderService.updateById(matchOrder)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除比赛报名记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (matchOrderService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加比赛报名记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<MatchOrder> list) {
|
||||
if (matchOrderService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改比赛报名记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<MatchOrder> batchParam) {
|
||||
if (batchParam.update(matchOrderService, "match_order_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除比赛报名记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (matchOrderService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.gxwebsoft.booking.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商务合作
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Cooperate对象", description = "商务合作")
|
||||
@TableName("booking_cooperate")
|
||||
public class Cooperate implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@TableId(value = "cooperate_id", type = IdType.AUTO)
|
||||
private Integer cooperateId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "咨询电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.gxwebsoft.booking.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "CooperateLog对象", description = "商务合作留言记录")
|
||||
@TableName("booking_cooperate_log")
|
||||
public class CooperateLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@TableId(value = "log_id", type = IdType.AUTO)
|
||||
private Integer logId;
|
||||
|
||||
@ApiModelProperty(value = "关联ID")
|
||||
private Integer cooperateId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "咨询电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.gxwebsoft.booking.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 比赛信息表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Match对象", description = "比赛信息表")
|
||||
@TableName("booking_match")
|
||||
public class Match implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
@TableId(value = "match_id", type = IdType.AUTO)
|
||||
private Integer matchId;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "比赛类型 0常规比赛")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "活动开始时间")
|
||||
private Integer matchStartTime;
|
||||
|
||||
@ApiModelProperty(value = "活动结束时间")
|
||||
private Integer matchEndTime;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Integer bmStartTime;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Integer bmEndTime;
|
||||
|
||||
@ApiModelProperty(value = "文章分类ID")
|
||||
private Integer categoryId;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "虚拟阅读量(仅用作展示)")
|
||||
private Integer virtualViews;
|
||||
|
||||
@ApiModelProperty(value = "实际阅读量")
|
||||
private Integer actualViews;
|
||||
|
||||
@ApiModelProperty(value = "文章附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "视频地址")
|
||||
private String video;
|
||||
|
||||
@ApiModelProperty(value = "退费规则")
|
||||
private String refundRule;
|
||||
|
||||
@ApiModelProperty(value = "活动介绍")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "比赛活动地点")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "报名费用")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "已报名人数")
|
||||
private Integer users;
|
||||
|
||||
@ApiModelProperty(value = "报名人数限制")
|
||||
private Integer maxUsers;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0未开始, 1进行中,2已结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gxwebsoft.booking.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "MatchOrder对象", description = "比赛报名记录表")
|
||||
@TableName("booking_match_order")
|
||||
public class MatchOrder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
@TableId(value = "match_order_id", type = IdType.AUTO)
|
||||
private Integer matchOrderId;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
private Integer matchId;
|
||||
|
||||
@ApiModelProperty(value = "场次")
|
||||
private Integer session;
|
||||
|
||||
@ApiModelProperty(value = "比赛活动地点")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private Integer name;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private Integer sex;
|
||||
|
||||
@ApiModelProperty(value = "身份证号码")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0未开始, 1进行中,2已结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.booking.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.booking.entity.CooperateLog;
|
||||
import com.gxwebsoft.booking.param.CooperateLogParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
public interface CooperateLogMapper extends BaseMapper<CooperateLog> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CooperateLog>
|
||||
*/
|
||||
List<CooperateLog> selectPageRel(@Param("page") IPage<CooperateLog> page,
|
||||
@Param("param") CooperateLogParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CooperateLog> selectListRel(@Param("param") CooperateLogParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.booking.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.booking.entity.Cooperate;
|
||||
import com.gxwebsoft.booking.param.CooperateParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
public interface CooperateMapper extends BaseMapper<Cooperate> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Cooperate>
|
||||
*/
|
||||
List<Cooperate> selectPageRel(@Param("page") IPage<Cooperate> page,
|
||||
@Param("param") CooperateParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Cooperate> selectListRel(@Param("param") CooperateParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.booking.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.booking.entity.Match;
|
||||
import com.gxwebsoft.booking.param.MatchParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛信息表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
public interface MatchMapper extends BaseMapper<Match> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Match>
|
||||
*/
|
||||
List<Match> selectPageRel(@Param("page") IPage<Match> page,
|
||||
@Param("param") MatchParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Match> selectListRel(@Param("param") MatchParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.booking.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.booking.entity.MatchOrder;
|
||||
import com.gxwebsoft.booking.param.MatchOrderParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
public interface MatchOrderMapper extends BaseMapper<MatchOrder> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<MatchOrder>
|
||||
*/
|
||||
List<MatchOrder> selectPageRel(@Param("page") IPage<MatchOrder> page,
|
||||
@Param("param") MatchOrderParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<MatchOrder> selectListRel(@Param("param") MatchOrderParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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.gxwebsoft.booking.mapper.CooperateLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.name
|
||||
FROM booking_cooperate_log a
|
||||
LEFT JOIN booking_cooperate b ON a.cooperate_id = b.cooperate_id
|
||||
<where>
|
||||
<if test="param.logId != null">
|
||||
AND a.log_id = #{param.logId}
|
||||
</if>
|
||||
<if test="param.cooperateId != null">
|
||||
AND a.cooperate_id = #{param.cooperateId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.booking.entity.CooperateLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.booking.entity.CooperateLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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.gxwebsoft.booking.mapper.CooperateMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM booking_cooperate a
|
||||
<where>
|
||||
<if test="param.cooperateId != null">
|
||||
AND a.cooperate_id = #{param.cooperateId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.booking.entity.Cooperate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.booking.entity.Cooperate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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.gxwebsoft.booking.mapper.MatchMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM booking_match a
|
||||
<where>
|
||||
<if test="param.matchId != null">
|
||||
AND a.match_id = #{param.matchId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.matchStartTime != null">
|
||||
AND a.match_start_time = #{param.matchStartTime}
|
||||
</if>
|
||||
<if test="param.matchEndTime != null">
|
||||
AND a.match_end_time = #{param.matchEndTime}
|
||||
</if>
|
||||
<if test="param.bmStartTime != null">
|
||||
AND a.bm_start_time = #{param.bmStartTime}
|
||||
</if>
|
||||
<if test="param.bmEndTime != null">
|
||||
AND a.bm_end_time = #{param.bmEndTime}
|
||||
</if>
|
||||
<if test="param.categoryId != null">
|
||||
AND a.category_id = #{param.categoryId}
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.virtualViews != null">
|
||||
AND a.virtual_views = #{param.virtualViews}
|
||||
</if>
|
||||
<if test="param.actualViews != null">
|
||||
AND a.actual_views = #{param.actualViews}
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.video != null">
|
||||
AND a.video LIKE CONCAT('%', #{param.video}, '%')
|
||||
</if>
|
||||
<if test="param.refundRule != null">
|
||||
AND a.refund_rule LIKE CONCAT('%', #{param.refundRule}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.longitude != null">
|
||||
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
|
||||
</if>
|
||||
<if test="param.latitude != null">
|
||||
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
|
||||
</if>
|
||||
<if test="param.address != null">
|
||||
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.users != null">
|
||||
AND a.users = #{param.users}
|
||||
</if>
|
||||
<if test="param.maxUsers != null">
|
||||
AND a.max_users = #{param.maxUsers}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.booking.entity.Match">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.booking.entity.Match">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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.gxwebsoft.booking.mapper.MatchOrderMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.title
|
||||
FROM booking_match_order a
|
||||
LEFT JOIN booking_match b ON a.match_id = b.match_id
|
||||
<where>
|
||||
<if test="param.matchOrderId != null">
|
||||
AND a.match_order_id = #{param.matchOrderId}
|
||||
</if>
|
||||
<if test="param.matchId != null">
|
||||
AND a.match_id = #{param.matchId}
|
||||
</if>
|
||||
<if test="param.session != null">
|
||||
AND a.session = #{param.session}
|
||||
</if>
|
||||
<if test="param.address != null">
|
||||
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name = #{param.name}
|
||||
</if>
|
||||
<if test="param.sex != null">
|
||||
AND a.sex = #{param.sex}
|
||||
</if>
|
||||
<if test="param.idCardNo != null">
|
||||
AND a.id_card_no LIKE CONCAT('%', #{param.idCardNo}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.booking.entity.MatchOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.booking.entity.MatchOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.gxwebsoft.booking.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "CooperateLogParam对象", description = "商务合作留言记录查询参数")
|
||||
public class CooperateLogParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer logId;
|
||||
|
||||
@ApiModelProperty(value = "关联ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer cooperateId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "咨询电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.booking.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商务合作查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "CooperateParam对象", description = "商务合作查询参数")
|
||||
public class CooperateParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer cooperateId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "咨询电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.gxwebsoft.booking.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "MatchOrderParam对象", description = "比赛报名记录表查询参数")
|
||||
public class MatchOrderParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer matchOrderId;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer matchId;
|
||||
|
||||
@ApiModelProperty(value = "场次")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer session;
|
||||
|
||||
@ApiModelProperty(value = "比赛活动地点")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer name;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sex;
|
||||
|
||||
@ApiModelProperty(value = "身份证号码")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0未开始, 1进行中,2已结束")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.gxwebsoft.booking.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 比赛信息表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "MatchParam对象", description = "比赛信息表查询参数")
|
||||
public class MatchParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "赛事ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer matchId;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "比赛类型 0常规比赛")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "活动开始时间")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer matchStartTime;
|
||||
|
||||
@ApiModelProperty(value = "活动结束时间")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer matchEndTime;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer bmStartTime;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer bmEndTime;
|
||||
|
||||
@ApiModelProperty(value = "文章分类ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer categoryId;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "虚拟阅读量(仅用作展示)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer virtualViews;
|
||||
|
||||
@ApiModelProperty(value = "实际阅读量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer actualViews;
|
||||
|
||||
@ApiModelProperty(value = "文章附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "视频地址")
|
||||
private String video;
|
||||
|
||||
@ApiModelProperty(value = "退费规则")
|
||||
private String refundRule;
|
||||
|
||||
@ApiModelProperty(value = "活动介绍")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "比赛活动地点")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "报名费用")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "已报名人数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer users;
|
||||
|
||||
@ApiModelProperty(value = "报名人数限制")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer maxUsers;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0未开始, 1进行中,2已结束")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.booking.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.booking.entity.CooperateLog;
|
||||
import com.gxwebsoft.booking.param.CooperateLogParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
public interface CooperateLogService extends IService<CooperateLog> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CooperateLog>
|
||||
*/
|
||||
PageResult<CooperateLog> pageRel(CooperateLogParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CooperateLog>
|
||||
*/
|
||||
List<CooperateLog> listRel(CooperateLogParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param logId ID
|
||||
* @return CooperateLog
|
||||
*/
|
||||
CooperateLog getByIdRel(Integer logId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.booking.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.booking.entity.Cooperate;
|
||||
import com.gxwebsoft.booking.param.CooperateParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
public interface CooperateService extends IService<Cooperate> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Cooperate>
|
||||
*/
|
||||
PageResult<Cooperate> pageRel(CooperateParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Cooperate>
|
||||
*/
|
||||
List<Cooperate> listRel(CooperateParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param cooperateId ID
|
||||
* @return Cooperate
|
||||
*/
|
||||
Cooperate getByIdRel(Integer cooperateId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.booking.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.booking.entity.MatchOrder;
|
||||
import com.gxwebsoft.booking.param.MatchOrderParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
public interface MatchOrderService extends IService<MatchOrder> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<MatchOrder>
|
||||
*/
|
||||
PageResult<MatchOrder> pageRel(MatchOrderParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<MatchOrder>
|
||||
*/
|
||||
List<MatchOrder> listRel(MatchOrderParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param matchOrderId 赛事ID
|
||||
* @return MatchOrder
|
||||
*/
|
||||
MatchOrder getByIdRel(Integer matchOrderId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.booking.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.booking.entity.Match;
|
||||
import com.gxwebsoft.booking.param.MatchParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛信息表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
public interface MatchService extends IService<Match> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Match>
|
||||
*/
|
||||
PageResult<Match> pageRel(MatchParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Match>
|
||||
*/
|
||||
List<Match> listRel(MatchParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param matchId 赛事ID
|
||||
* @return Match
|
||||
*/
|
||||
Match getByIdRel(Integer matchId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.booking.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.booking.mapper.CooperateLogMapper;
|
||||
import com.gxwebsoft.booking.service.CooperateLogService;
|
||||
import com.gxwebsoft.booking.entity.CooperateLog;
|
||||
import com.gxwebsoft.booking.param.CooperateLogParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作留言记录Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:38:29
|
||||
*/
|
||||
@Service
|
||||
public class CooperateLogServiceImpl extends ServiceImpl<CooperateLogMapper, CooperateLog> implements CooperateLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<CooperateLog> pageRel(CooperateLogParam param) {
|
||||
PageParam<CooperateLog, CooperateLogParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<CooperateLog> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CooperateLog> listRel(CooperateLogParam param) {
|
||||
List<CooperateLog> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CooperateLog, CooperateLogParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CooperateLog getByIdRel(Integer logId) {
|
||||
CooperateLogParam param = new CooperateLogParam();
|
||||
param.setLogId(logId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.booking.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.booking.mapper.CooperateMapper;
|
||||
import com.gxwebsoft.booking.service.CooperateService;
|
||||
import com.gxwebsoft.booking.entity.Cooperate;
|
||||
import com.gxwebsoft.booking.param.CooperateParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务合作Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Service
|
||||
public class CooperateServiceImpl extends ServiceImpl<CooperateMapper, Cooperate> implements CooperateService {
|
||||
|
||||
@Override
|
||||
public PageResult<Cooperate> pageRel(CooperateParam param) {
|
||||
PageParam<Cooperate, CooperateParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<Cooperate> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Cooperate> listRel(CooperateParam param) {
|
||||
List<Cooperate> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Cooperate, CooperateParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cooperate getByIdRel(Integer cooperateId) {
|
||||
CooperateParam param = new CooperateParam();
|
||||
param.setCooperateId(cooperateId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.booking.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.booking.mapper.MatchOrderMapper;
|
||||
import com.gxwebsoft.booking.service.MatchOrderService;
|
||||
import com.gxwebsoft.booking.entity.MatchOrder;
|
||||
import com.gxwebsoft.booking.param.MatchOrderParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛报名记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:31:24
|
||||
*/
|
||||
@Service
|
||||
public class MatchOrderServiceImpl extends ServiceImpl<MatchOrderMapper, MatchOrder> implements MatchOrderService {
|
||||
|
||||
@Override
|
||||
public PageResult<MatchOrder> pageRel(MatchOrderParam param) {
|
||||
PageParam<MatchOrder, MatchOrderParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<MatchOrder> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MatchOrder> listRel(MatchOrderParam param) {
|
||||
List<MatchOrder> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<MatchOrder, MatchOrderParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MatchOrder getByIdRel(Integer matchOrderId) {
|
||||
MatchOrderParam param = new MatchOrderParam();
|
||||
param.setMatchOrderId(matchOrderId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.booking.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.booking.mapper.MatchMapper;
|
||||
import com.gxwebsoft.booking.service.MatchService;
|
||||
import com.gxwebsoft.booking.entity.Match;
|
||||
import com.gxwebsoft.booking.param.MatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 比赛信息表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-01 01:35:11
|
||||
*/
|
||||
@Service
|
||||
public class MatchServiceImpl extends ServiceImpl<MatchMapper, Match> implements MatchService {
|
||||
|
||||
@Override
|
||||
public PageResult<Match> pageRel(MatchParam param) {
|
||||
PageParam<Match, MatchParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<Match> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Match> listRel(MatchParam param) {
|
||||
List<Match> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Match, MatchParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Match getByIdRel(Integer matchId) {
|
||||
MatchParam param = new MatchParam();
|
||||
param.setMatchId(matchId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class OrderTask extends BaseController {
|
||||
/**
|
||||
* 自动处理过期订单任务
|
||||
*/
|
||||
// @Scheduled(fixedDelay = 2000, initialDelay = 2000)
|
||||
@Scheduled(fixedDelay = 2000, initialDelay = 2000)
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public void settledExpirationOrder() {
|
||||
final OrderParam p = new OrderParam();
|
||||
|
||||
Reference in New Issue
Block a user