feat(glt): 添加水票功能模块
- 新增 GltTicketTemplate 实体类定义水票基础属性 - 实现 GltTicketTemplateController 提供水票管理API接口 - 创建 GltTicketTemplateMapper 和 XML 映射文件实现数据访问 - 定义 GltTicketTemplateParam 查询参数类 - 实现 GltTicketTemplateService 业务逻辑层接口 - 添加 GltUserTicket 实体类管理用户水票信息 - 实现 GltUserTicketController 控制器提供用户水票管理功能 - 新增 GltUserTicketLog 实体类记录消费日志 - 实现 GltUserTicketLogController 提供消费日志管理接口 - 完善相关 Mapper、Service 层接口及实现类 - 集成 Swagger 注解提供 API 文档支持 - 添加安全权限控制注解实现接口权限验证
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
package com.gxwebsoft.glt.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.glt.service.GltTicketTemplateService;
|
||||
import com.gxwebsoft.glt.entity.GltTicketTemplate;
|
||||
import com.gxwebsoft.glt.param.GltTicketTemplateParam;
|
||||
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 io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Tag(name = "水票管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/glt/glt-ticket-template")
|
||||
public class GltTicketTemplateController extends BaseController {
|
||||
@Resource
|
||||
private GltTicketTemplateService gltTicketTemplateService;
|
||||
|
||||
@Operation(summary = "分页查询水票")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GltTicketTemplate>> page(GltTicketTemplateParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltTicketTemplateService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:list')")
|
||||
@Operation(summary = "查询全部水票")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GltTicketTemplate>> list(GltTicketTemplateParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltTicketTemplateService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:list')")
|
||||
@Operation(summary = "根据id查询水票")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GltTicketTemplate> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gltTicketTemplateService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加水票")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GltTicketTemplate gltTicketTemplate) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gltTicketTemplate.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (gltTicketTemplateService.save(gltTicketTemplate)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改水票")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GltTicketTemplate gltTicketTemplate) {
|
||||
if (gltTicketTemplateService.updateById(gltTicketTemplate)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除水票")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gltTicketTemplateService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加水票")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GltTicketTemplate> list) {
|
||||
if (gltTicketTemplateService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改水票")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GltTicketTemplate> batchParam) {
|
||||
if (batchParam.update(gltTicketTemplateService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltTicketTemplate:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除水票")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gltTicketTemplateService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.gxwebsoft.glt.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicket;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketParam;
|
||||
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 io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的水票控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Tag(name = "我的水票管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/glt/glt-user-ticket")
|
||||
public class GltUserTicketController extends BaseController {
|
||||
@Resource
|
||||
private GltUserTicketService gltUserTicketService;
|
||||
|
||||
@Operation(summary = "分页查询我的水票")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GltUserTicket>> page(GltUserTicketParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:list')")
|
||||
@Operation(summary = "查询全部我的水票")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GltUserTicket>> list(GltUserTicketParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:list')")
|
||||
@Operation(summary = "根据id查询我的水票")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GltUserTicket> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加我的水票")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GltUserTicket gltUserTicket) {
|
||||
if (gltUserTicketService.save(gltUserTicket)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改我的水票")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GltUserTicket gltUserTicket) {
|
||||
if (gltUserTicketService.updateById(gltUserTicket)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除我的水票")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gltUserTicketService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加我的水票")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GltUserTicket> list) {
|
||||
if (gltUserTicketService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改我的水票")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GltUserTicket> batchParam) {
|
||||
if (batchParam.update(gltUserTicketService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicket:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除我的水票")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gltUserTicketService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.glt.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketLogService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketLog;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketLogParam;
|
||||
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 io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消费日志控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Tag(name = "消费日志管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/glt/glt-user-ticket-log")
|
||||
public class GltUserTicketLogController extends BaseController {
|
||||
@Resource
|
||||
private GltUserTicketLogService gltUserTicketLogService;
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:list')")
|
||||
@Operation(summary = "分页查询消费日志")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GltUserTicketLog>> page(GltUserTicketLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketLogService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:list')")
|
||||
@Operation(summary = "查询全部消费日志")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GltUserTicketLog>> list(GltUserTicketLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketLogService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:list')")
|
||||
@Operation(summary = "根据id查询消费日志")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GltUserTicketLog> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketLogService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加消费日志")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GltUserTicketLog gltUserTicketLog) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gltUserTicketLog.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (gltUserTicketLogService.save(gltUserTicketLog)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改消费日志")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GltUserTicketLog gltUserTicketLog) {
|
||||
if (gltUserTicketLogService.updateById(gltUserTicketLog)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除消费日志")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gltUserTicketLogService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加消费日志")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GltUserTicketLog> list) {
|
||||
if (gltUserTicketLogService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改消费日志")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GltUserTicketLog> batchParam) {
|
||||
if (batchParam.update(gltUserTicketLogService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketLog:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除消费日志")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gltUserTicketLogService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.glt.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketReleaseService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketRelease;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketReleaseParam;
|
||||
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 io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票释放控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Tag(name = "水票释放管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/glt/glt-user-ticket-release")
|
||||
public class GltUserTicketReleaseController extends BaseController {
|
||||
@Resource
|
||||
private GltUserTicketReleaseService gltUserTicketReleaseService;
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:list')")
|
||||
@Operation(summary = "分页查询水票释放")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GltUserTicketRelease>> page(GltUserTicketReleaseParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketReleaseService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:list')")
|
||||
@Operation(summary = "查询全部水票释放")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GltUserTicketRelease>> list(GltUserTicketReleaseParam param) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketReleaseService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:list')")
|
||||
@Operation(summary = "根据id查询水票释放")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GltUserTicketRelease> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gltUserTicketReleaseService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加水票释放")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GltUserTicketRelease gltUserTicketRelease) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gltUserTicketRelease.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (gltUserTicketReleaseService.save(gltUserTicketRelease)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改水票释放")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GltUserTicketRelease gltUserTicketRelease) {
|
||||
if (gltUserTicketReleaseService.updateById(gltUserTicketRelease)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除水票释放")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gltUserTicketReleaseService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加水票释放")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GltUserTicketRelease> list) {
|
||||
if (gltUserTicketReleaseService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改水票释放")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GltUserTicketRelease> batchParam) {
|
||||
if (batchParam.update(gltUserTicketReleaseService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('glt:gltUserTicketRelease:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除水票释放")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gltUserTicketReleaseService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.gxwebsoft.glt.entity;
|
||||
|
||||
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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 水票
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:54
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "GltTicketTemplate对象", description = "水票")
|
||||
public class GltTicketTemplate implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "关联商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "启用")
|
||||
private Boolean enabled;
|
||||
|
||||
@Schema(description = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "最小购买数量")
|
||||
private Integer minBuyQty;
|
||||
|
||||
@Schema(description = "起始发送数量")
|
||||
private Integer startSendQty;
|
||||
|
||||
@Schema(description = "买赠:买1送4 => gift_multiplier=4")
|
||||
private Integer giftMultiplier;
|
||||
|
||||
@Schema(description = "是否把购买量也计入套票总量(默认仅计入赠送量)")
|
||||
private Boolean includeBuyQty;
|
||||
|
||||
@Schema(description = "每期释放数量(默认每月释放10)")
|
||||
private Integer monthlyReleaseQty;
|
||||
|
||||
@Schema(description = "总共释放多少期(若配置>0,则按期数平均分摊)")
|
||||
private Integer releasePeriods;
|
||||
|
||||
@Schema(description = "首期释放时机:0=支付成功当刻;1=下个月同日")
|
||||
private Integer firstReleaseMode;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
85
src/main/java/com/gxwebsoft/glt/entity/GltUserTicket.java
Normal file
85
src/main/java/com/gxwebsoft/glt/entity/GltUserTicket.java
Normal file
@@ -0,0 +1,85 @@
|
||||
package com.gxwebsoft.glt.entity;
|
||||
|
||||
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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 我的水票
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "GltUserTicket对象", description = "我的水票")
|
||||
public class GltUserTicket implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Integer templateId;
|
||||
|
||||
@Schema(description = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "订单ID")
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "订单商品ID")
|
||||
private Integer orderGoodsId;
|
||||
|
||||
@Schema(description = "总数量")
|
||||
private Integer totalQty;
|
||||
|
||||
@Schema(description = "可用数量")
|
||||
private Integer availableQty;
|
||||
|
||||
@Schema(description = "冻结数量")
|
||||
private Integer frozenQty;
|
||||
|
||||
@Schema(description = "已使用数量")
|
||||
private Integer usedQty;
|
||||
|
||||
@Schema(description = "已释放数量")
|
||||
private Integer releasedQty;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
85
src/main/java/com/gxwebsoft/glt/entity/GltUserTicketLog.java
Normal file
85
src/main/java/com/gxwebsoft/glt/entity/GltUserTicketLog.java
Normal file
@@ -0,0 +1,85 @@
|
||||
package com.gxwebsoft.glt.entity;
|
||||
|
||||
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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 消费日志
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "GltUserTicketLog对象", description = "消费日志")
|
||||
public class GltUserTicketLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "用户水票ID")
|
||||
private Integer userTicketId;
|
||||
|
||||
@Schema(description = "变更类型")
|
||||
private Integer changeType;
|
||||
|
||||
@Schema(description = "可更改")
|
||||
private Integer changeAvailable;
|
||||
|
||||
@Schema(description = "更改冻结状态")
|
||||
private Integer changeFrozen;
|
||||
|
||||
@Schema(description = "已使用更改")
|
||||
private Integer changeUsed;
|
||||
|
||||
@Schema(description = "可用后")
|
||||
private Integer availableAfter;
|
||||
|
||||
@Schema(description = "冻结后")
|
||||
private Integer frozenAfter;
|
||||
|
||||
@Schema(description = "使用后")
|
||||
private Integer usedAfter;
|
||||
|
||||
@Schema(description = "订单ID")
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gxwebsoft.glt.entity;
|
||||
|
||||
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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 水票释放
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "GltUserTicketRelease对象", description = "水票释放")
|
||||
public class GltUserTicketRelease implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "水票ID")
|
||||
private Long userTicketId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "周期编号")
|
||||
private Integer periodNo;
|
||||
|
||||
@Schema(description = "释放数量")
|
||||
private Integer releaseQty;
|
||||
|
||||
@Schema(description = "释放时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime releaseTime;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.glt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.glt.entity.GltTicketTemplate;
|
||||
import com.gxwebsoft.glt.param.GltTicketTemplateParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:54
|
||||
*/
|
||||
public interface GltTicketTemplateMapper extends BaseMapper<GltTicketTemplate> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GltTicketTemplate>
|
||||
*/
|
||||
List<GltTicketTemplate> selectPageRel(@Param("page") IPage<GltTicketTemplate> page,
|
||||
@Param("param") GltTicketTemplateParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GltTicketTemplate> selectListRel(@Param("param") GltTicketTemplateParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.glt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketLog;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketLogParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消费日志Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketLogMapper extends BaseMapper<GltUserTicketLog> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicketLog>
|
||||
*/
|
||||
List<GltUserTicketLog> selectPageRel(@Param("page") IPage<GltUserTicketLog> page,
|
||||
@Param("param") GltUserTicketLogParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GltUserTicketLog> selectListRel(@Param("param") GltUserTicketLogParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.glt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicket;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的水票Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketMapper extends BaseMapper<GltUserTicket> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicket>
|
||||
*/
|
||||
List<GltUserTicket> selectPageRel(@Param("page") IPage<GltUserTicket> page,
|
||||
@Param("param") GltUserTicketParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GltUserTicket> selectListRel(@Param("param") GltUserTicketParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.glt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketRelease;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketReleaseParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票释放Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketReleaseMapper extends BaseMapper<GltUserTicketRelease> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicketRelease>
|
||||
*/
|
||||
List<GltUserTicketRelease> selectPageRel(@Param("page") IPage<GltUserTicketRelease> page,
|
||||
@Param("param") GltUserTicketReleaseParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GltUserTicketRelease> selectListRel(@Param("param") GltUserTicketReleaseParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?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.glt.mapper.GltTicketTemplateMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM glt_ticket_template a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.enabled != null">
|
||||
AND a.enabled = #{param.enabled}
|
||||
</if>
|
||||
<if test="param.unitName != null">
|
||||
AND a.unit_name LIKE CONCAT('%', #{param.unitName}, '%')
|
||||
</if>
|
||||
<if test="param.minBuyQty != null">
|
||||
AND a.min_buy_qty = #{param.minBuyQty}
|
||||
</if>
|
||||
<if test="param.startSendQty != null">
|
||||
AND a.start_send_qty = #{param.startSendQty}
|
||||
</if>
|
||||
<if test="param.giftMultiplier != null">
|
||||
AND a.gift_multiplier = #{param.giftMultiplier}
|
||||
</if>
|
||||
<if test="param.includeBuyQty != null">
|
||||
AND a.include_buy_qty = #{param.includeBuyQty}
|
||||
</if>
|
||||
<if test="param.monthlyReleaseQty != null">
|
||||
AND a.monthly_release_qty = #{param.monthlyReleaseQty}
|
||||
</if>
|
||||
<if test="param.releasePeriods != null">
|
||||
AND a.release_periods = #{param.releasePeriods}
|
||||
</if>
|
||||
<if test="param.firstReleaseMode != null">
|
||||
AND a.first_release_mode = #{param.firstReleaseMode}
|
||||
</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.glt.entity.GltTicketTemplate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.glt.entity.GltTicketTemplate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.glt.mapper.GltUserTicketLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM glt_user_ticket_log a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userTicketId != null">
|
||||
AND a.user_ticket_id = #{param.userTicketId}
|
||||
</if>
|
||||
<if test="param.changeType != null">
|
||||
AND a.change_type = #{param.changeType}
|
||||
</if>
|
||||
<if test="param.changeAvailable != null">
|
||||
AND a.change_available = #{param.changeAvailable}
|
||||
</if>
|
||||
<if test="param.changeFrozen != null">
|
||||
AND a.change_frozen = #{param.changeFrozen}
|
||||
</if>
|
||||
<if test="param.changeUsed != null">
|
||||
AND a.change_used = #{param.changeUsed}
|
||||
</if>
|
||||
<if test="param.availableAfter != null">
|
||||
AND a.available_after = #{param.availableAfter}
|
||||
</if>
|
||||
<if test="param.frozenAfter != null">
|
||||
AND a.frozen_after = #{param.frozenAfter}
|
||||
</if>
|
||||
<if test="param.usedAfter != null">
|
||||
AND a.used_after = #{param.usedAfter}
|
||||
</if>
|
||||
<if test="param.orderId != null">
|
||||
AND a.order_id = #{param.orderId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</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.glt.entity.GltUserTicketLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.glt.entity.GltUserTicketLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.glt.mapper.GltUserTicketMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM glt_user_ticket a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.templateId != null">
|
||||
AND a.template_id = #{param.templateId}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.orderId != null">
|
||||
AND a.order_id = #{param.orderId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.orderGoodsId != null">
|
||||
AND a.order_goods_id = #{param.orderGoodsId}
|
||||
</if>
|
||||
<if test="param.totalQty != null">
|
||||
AND a.total_qty = #{param.totalQty}
|
||||
</if>
|
||||
<if test="param.availableQty != null">
|
||||
AND a.available_qty = #{param.availableQty}
|
||||
</if>
|
||||
<if test="param.frozenQty != null">
|
||||
AND a.frozen_qty = #{param.frozenQty}
|
||||
</if>
|
||||
<if test="param.usedQty != null">
|
||||
AND a.used_qty = #{param.usedQty}
|
||||
</if>
|
||||
<if test="param.releasedQty != null">
|
||||
AND a.released_qty = #{param.releasedQty}
|
||||
</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.glt.entity.GltUserTicket">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.glt.entity.GltUserTicket">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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.glt.mapper.GltUserTicketReleaseMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM glt_user_ticket_release a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userTicketId != null">
|
||||
AND a.user_ticket_id LIKE CONCAT('%', #{param.userTicketId}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.periodNo != null">
|
||||
AND a.period_no = #{param.periodNo}
|
||||
</if>
|
||||
<if test="param.releaseQty != null">
|
||||
AND a.release_qty = #{param.releaseQty}
|
||||
</if>
|
||||
<if test="param.releaseTime != null">
|
||||
AND a.release_time LIKE CONCAT('%', #{param.releaseTime}, '%')
|
||||
</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.glt.entity.GltUserTicketRelease">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.glt.entity.GltUserTicketRelease">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.gxwebsoft.glt.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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 水票查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:54
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "GltTicketTemplateParam对象", description = "水票查询参数")
|
||||
public class GltTicketTemplateParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "关联商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "启用")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean enabled;
|
||||
|
||||
@Schema(description = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "最小购买数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer minBuyQty;
|
||||
|
||||
@Schema(description = "起始发送数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer startSendQty;
|
||||
|
||||
@Schema(description = "买赠:买1送4 => gift_multiplier=4")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer giftMultiplier;
|
||||
|
||||
@Schema(description = "是否把购买量也计入套票总量(默认仅计入赠送量)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean includeBuyQty;
|
||||
|
||||
@Schema(description = "每期释放数量(默认每月释放10)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer monthlyReleaseQty;
|
||||
|
||||
@Schema(description = "总共释放多少期(若配置>0,则按期数平均分摊)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer releasePeriods;
|
||||
|
||||
@Schema(description = "首期释放时机:0=支付成功当刻;1=下个月同日")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer firstReleaseMode;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.gxwebsoft.glt.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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 消费日志查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "GltUserTicketLogParam对象", description = "消费日志查询参数")
|
||||
public class GltUserTicketLogParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "用户水票ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userTicketId;
|
||||
|
||||
@Schema(description = "变更类型")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer changeType;
|
||||
|
||||
@Schema(description = "可更改")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer changeAvailable;
|
||||
|
||||
@Schema(description = "更改冻结状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer changeFrozen;
|
||||
|
||||
@Schema(description = "已使用更改")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer changeUsed;
|
||||
|
||||
@Schema(description = "可用后")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer availableAfter;
|
||||
|
||||
@Schema(description = "冻结后")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer frozenAfter;
|
||||
|
||||
@Schema(description = "使用后")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer usedAfter;
|
||||
|
||||
@Schema(description = "订单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.gxwebsoft.glt.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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 我的水票查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "GltUserTicketParam对象", description = "我的水票查询参数")
|
||||
public class GltUserTicketParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer templateId;
|
||||
|
||||
@Schema(description = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "订单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "订单商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orderGoodsId;
|
||||
|
||||
@Schema(description = "总数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer totalQty;
|
||||
|
||||
@Schema(description = "可用数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer availableQty;
|
||||
|
||||
@Schema(description = "冻结数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer frozenQty;
|
||||
|
||||
@Schema(description = "已使用数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer usedQty;
|
||||
|
||||
@Schema(description = "已释放数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer releasedQty;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.gxwebsoft.glt.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.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 水票释放查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "GltUserTicketReleaseParam对象", description = "水票释放查询参数")
|
||||
public class GltUserTicketReleaseParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "水票ID")
|
||||
private Long userTicketId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "周期编号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer periodNo;
|
||||
|
||||
@Schema(description = "释放数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer releaseQty;
|
||||
|
||||
@Schema(description = "释放时间")
|
||||
private String releaseTime;
|
||||
|
||||
@Schema(description = "状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.glt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.glt.entity.GltTicketTemplate;
|
||||
import com.gxwebsoft.glt.param.GltTicketTemplateParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:54
|
||||
*/
|
||||
public interface GltTicketTemplateService extends IService<GltTicketTemplate> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GltTicketTemplate>
|
||||
*/
|
||||
PageResult<GltTicketTemplate> pageRel(GltTicketTemplateParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GltTicketTemplate>
|
||||
*/
|
||||
List<GltTicketTemplate> listRel(GltTicketTemplateParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GltTicketTemplate
|
||||
*/
|
||||
GltTicketTemplate getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.glt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketLog;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketLogParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消费日志Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketLogService extends IService<GltUserTicketLog> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GltUserTicketLog>
|
||||
*/
|
||||
PageResult<GltUserTicketLog> pageRel(GltUserTicketLogParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicketLog>
|
||||
*/
|
||||
List<GltUserTicketLog> listRel(GltUserTicketLogParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GltUserTicketLog
|
||||
*/
|
||||
GltUserTicketLog getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.glt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketRelease;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketReleaseParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水票释放Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketReleaseService extends IService<GltUserTicketRelease> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GltUserTicketRelease>
|
||||
*/
|
||||
PageResult<GltUserTicketRelease> pageRel(GltUserTicketReleaseParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicketRelease>
|
||||
*/
|
||||
List<GltUserTicketRelease> listRel(GltUserTicketReleaseParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GltUserTicketRelease
|
||||
*/
|
||||
GltUserTicketRelease getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.glt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicket;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的水票Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-02-03 18:55:55
|
||||
*/
|
||||
public interface GltUserTicketService extends IService<GltUserTicket> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GltUserTicket>
|
||||
*/
|
||||
PageResult<GltUserTicket> pageRel(GltUserTicketParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GltUserTicket>
|
||||
*/
|
||||
List<GltUserTicket> listRel(GltUserTicketParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GltUserTicket
|
||||
*/
|
||||
GltUserTicket getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.glt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.glt.mapper.GltTicketTemplateMapper;
|
||||
import com.gxwebsoft.glt.service.GltTicketTemplateService;
|
||||
import com.gxwebsoft.glt.entity.GltTicketTemplate;
|
||||
import com.gxwebsoft.glt.param.GltTicketTemplateParam;
|
||||
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 2026-02-03 18:55:54
|
||||
*/
|
||||
@Service
|
||||
public class GltTicketTemplateServiceImpl extends ServiceImpl<GltTicketTemplateMapper, GltTicketTemplate> implements GltTicketTemplateService {
|
||||
|
||||
@Override
|
||||
public PageResult<GltTicketTemplate> pageRel(GltTicketTemplateParam param) {
|
||||
PageParam<GltTicketTemplate, GltTicketTemplateParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GltTicketTemplate> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GltTicketTemplate> listRel(GltTicketTemplateParam param) {
|
||||
List<GltTicketTemplate> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GltTicketTemplate, GltTicketTemplateParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GltTicketTemplate getByIdRel(Integer id) {
|
||||
GltTicketTemplateParam param = new GltTicketTemplateParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.glt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.glt.mapper.GltUserTicketLogMapper;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketLogService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketLog;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketLogParam;
|
||||
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 2026-02-03 18:55:55
|
||||
*/
|
||||
@Service
|
||||
public class GltUserTicketLogServiceImpl extends ServiceImpl<GltUserTicketLogMapper, GltUserTicketLog> implements GltUserTicketLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<GltUserTicketLog> pageRel(GltUserTicketLogParam param) {
|
||||
PageParam<GltUserTicketLog, GltUserTicketLogParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GltUserTicketLog> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GltUserTicketLog> listRel(GltUserTicketLogParam param) {
|
||||
List<GltUserTicketLog> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GltUserTicketLog, GltUserTicketLogParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GltUserTicketLog getByIdRel(Integer id) {
|
||||
GltUserTicketLogParam param = new GltUserTicketLogParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.glt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.glt.mapper.GltUserTicketReleaseMapper;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketReleaseService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicketRelease;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketReleaseParam;
|
||||
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 2026-02-03 18:55:55
|
||||
*/
|
||||
@Service
|
||||
public class GltUserTicketReleaseServiceImpl extends ServiceImpl<GltUserTicketReleaseMapper, GltUserTicketRelease> implements GltUserTicketReleaseService {
|
||||
|
||||
@Override
|
||||
public PageResult<GltUserTicketRelease> pageRel(GltUserTicketReleaseParam param) {
|
||||
PageParam<GltUserTicketRelease, GltUserTicketReleaseParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GltUserTicketRelease> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GltUserTicketRelease> listRel(GltUserTicketReleaseParam param) {
|
||||
List<GltUserTicketRelease> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GltUserTicketRelease, GltUserTicketReleaseParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GltUserTicketRelease getByIdRel(Integer id) {
|
||||
GltUserTicketReleaseParam param = new GltUserTicketReleaseParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.glt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.glt.mapper.GltUserTicketMapper;
|
||||
import com.gxwebsoft.glt.service.GltUserTicketService;
|
||||
import com.gxwebsoft.glt.entity.GltUserTicket;
|
||||
import com.gxwebsoft.glt.param.GltUserTicketParam;
|
||||
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 2026-02-03 18:55:55
|
||||
*/
|
||||
@Service
|
||||
public class GltUserTicketServiceImpl extends ServiceImpl<GltUserTicketMapper, GltUserTicket> implements GltUserTicketService {
|
||||
|
||||
@Override
|
||||
public PageResult<GltUserTicket> pageRel(GltUserTicketParam param) {
|
||||
PageParam<GltUserTicket, GltUserTicketParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GltUserTicket> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GltUserTicket> listRel(GltUserTicketParam param) {
|
||||
List<GltUserTicket> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GltUserTicket, GltUserTicketParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GltUserTicket getByIdRel(Integer id) {
|
||||
GltUserTicketParam param = new GltUserTicketParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -84,6 +84,8 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
|
||||
private ShopOrderDeliveryService shopOrderDeliveryService;
|
||||
@Resource
|
||||
private ShopExpressService shopExpressService;
|
||||
@Resource
|
||||
private ShopTicketBizService shopTicketBizService;
|
||||
|
||||
private static final long USER_ORDER_STATS_CACHE_SECONDS = 60L;
|
||||
|
||||
@@ -528,6 +530,9 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
|
||||
// 2. 累计商品销量
|
||||
updateGoodsSales(order);
|
||||
|
||||
// 3. 套票发放(冻结/可用、分期释放)
|
||||
shopTicketBizService.grantTicketsForPaidOrder(order);
|
||||
|
||||
log.info("支付成功后业务逻辑处理完成 - 订单号:{}", order.getOrderNo());
|
||||
} catch (Exception e) {
|
||||
log.error("处理支付成功后业务逻辑失败 - 订单号:{}", order.getOrderNo(), e);
|
||||
|
||||
24
src/main/java/com/gxwebsoft/shop/vo/UserTicketSummaryVo.java
Normal file
24
src/main/java/com/gxwebsoft/shop/vo/UserTicketSummaryVo.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.gxwebsoft.shop.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户套票汇总(可用/冻结)
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "UserTicketSummaryVo对象", description = "用户套票汇总(可用/冻结)")
|
||||
public class UserTicketSummaryVo {
|
||||
@Schema(description = "可用数量")
|
||||
private Integer availableQty;
|
||||
|
||||
@Schema(description = "冻结数量")
|
||||
private Integer frozenQty;
|
||||
|
||||
@Schema(description = "已用数量")
|
||||
private Integer usedQty;
|
||||
|
||||
@Schema(description = "总数量")
|
||||
private Integer totalQty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user