From d7a7d4a9b14fd257c67f46ecaa1bcfa889b3d881 Mon Sep 17 00:00:00 2001 From: gxwebsoft Date: Thu, 25 Apr 2024 22:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=98=8E=E7=BB=86=E3=80=81=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E3=80=81=E8=AE=A2=E5=8D=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IntegralController.java | 115 +++++++++++ .../controller/IntegralLogController.java | 115 +++++++++++ .../booking/controller/UsersController.java | 115 +++++++++++ .../gxwebsoft/booking/entity/Integral.java | 53 +++++ .../gxwebsoft/booking/entity/IntegralLog.java | 62 ++++++ .../com/gxwebsoft/booking/entity/Users.java | 118 +++++++++++ .../booking/mapper/IntegralLogMapper.java | 37 ++++ .../booking/mapper/IntegralMapper.java | 37 ++++ .../gxwebsoft/booking/mapper/UsersMapper.java | 37 ++++ .../booking/mapper/xml/IntegralLogMapper.xml | 63 ++++++ .../booking/mapper/xml/IntegralMapper.xml | 54 +++++ .../booking/mapper/xml/UsersMapper.xml | 122 ++++++++++++ .../booking/param/IntegralLogParam.java | 60 ++++++ .../booking/param/IntegralParam.java | 49 +++++ .../gxwebsoft/booking/param/UsersParam.java | 116 +++++++++++ .../booking/service/IntegralLogService.java | 42 ++++ .../booking/service/IntegralService.java | 42 ++++ .../booking/service/UsersService.java | 42 ++++ .../service/impl/IntegralLogServiceImpl.java | 47 +++++ .../service/impl/IntegralServiceImpl.java | 47 +++++ .../service/impl/PeriodServiceImpl.java | 4 +- .../service/impl/UsersServiceImpl.java | 47 +++++ .../gxwebsoft/common/system/entity/User.java | 109 ++--------- .../common/system/mapper/xml/UserMapper.xml | 23 +-- .../system/service/impl/UserServiceImpl.java | 20 +- .../shop/controller/OrderController.java | 25 +-- .../java/com/gxwebsoft/shop/entity/Order.java | 169 +++++++++------- .../gxwebsoft/shop/mapper/OrderMapper.java | 4 +- .../gxwebsoft/shop/mapper/xml/OrderMapper.xml | 144 ++++++++------ .../com/gxwebsoft/shop/param/OrderParam.java | 185 +++++++++++------- .../gxwebsoft/shop/service/OrderService.java | 6 +- .../shop/service/impl/OrderServiceImpl.java | 4 +- .../gxwebsoft/generator/BookingGenerator.java | 6 +- .../gxwebsoft/generator/ShopGenerator.java | 2 +- 34 files changed, 1771 insertions(+), 350 deletions(-) create mode 100644 src/main/java/com/gxwebsoft/booking/controller/IntegralController.java create mode 100644 src/main/java/com/gxwebsoft/booking/controller/IntegralLogController.java create mode 100644 src/main/java/com/gxwebsoft/booking/controller/UsersController.java create mode 100644 src/main/java/com/gxwebsoft/booking/entity/Integral.java create mode 100644 src/main/java/com/gxwebsoft/booking/entity/IntegralLog.java create mode 100644 src/main/java/com/gxwebsoft/booking/entity/Users.java create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/IntegralLogMapper.java create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/IntegralMapper.java create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/UsersMapper.java create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralLogMapper.xml create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralMapper.xml create mode 100644 src/main/java/com/gxwebsoft/booking/mapper/xml/UsersMapper.xml create mode 100644 src/main/java/com/gxwebsoft/booking/param/IntegralLogParam.java create mode 100644 src/main/java/com/gxwebsoft/booking/param/IntegralParam.java create mode 100644 src/main/java/com/gxwebsoft/booking/param/UsersParam.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/IntegralLogService.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/IntegralService.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/UsersService.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/impl/IntegralLogServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/impl/IntegralServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/booking/service/impl/UsersServiceImpl.java diff --git a/src/main/java/com/gxwebsoft/booking/controller/IntegralController.java b/src/main/java/com/gxwebsoft/booking/controller/IntegralController.java new file mode 100644 index 0000000..ebfac64 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/controller/IntegralController.java @@ -0,0 +1,115 @@ +package com.gxwebsoft.booking.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.booking.service.IntegralService; +import com.gxwebsoft.booking.entity.Integral; +import com.gxwebsoft.booking.param.IntegralParam; +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-04-25 21:24:51 + */ +@Api(tags = "签到积分管理") +@RestController +@RequestMapping("/api/booking/integral") +public class IntegralController extends BaseController { + @Resource + private IntegralService integralService; + + @ApiOperation("分页查询签到积分") + @GetMapping("/page") + public ApiResult> page(IntegralParam param) { + // 使用关联查询 + return success(integralService.pageRel(param)); + } + + @ApiOperation("查询全部签到积分") + @GetMapping() + public ApiResult> list(IntegralParam param) { + // 使用关联查询 + return success(integralService.listRel(param)); + } + + @PreAuthorize("hasAuthority('booking:integral:list')") + @ApiOperation("根据id查询签到积分") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(integralService.getByIdRel(id)); + } + + @ApiOperation("添加签到积分") + @PostMapping() + public ApiResult save(@RequestBody Integral integral) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // integral.setUserId(loginUser.getUserId()); + // } + if (integralService.save(integral)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改签到积分") + @PutMapping() + public ApiResult update(@RequestBody Integral integral) { + if (integralService.updateById(integral)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除签到积分") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (integralService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加签到积分") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (integralService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改签到积分") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(integralService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除签到积分") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (integralService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/booking/controller/IntegralLogController.java b/src/main/java/com/gxwebsoft/booking/controller/IntegralLogController.java new file mode 100644 index 0000000..06bb591 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/controller/IntegralLogController.java @@ -0,0 +1,115 @@ +package com.gxwebsoft.booking.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.booking.service.IntegralLogService; +import com.gxwebsoft.booking.entity.IntegralLog; +import com.gxwebsoft.booking.param.IntegralLogParam; +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-04-25 21:24:52 + */ +@Api(tags = "积分明细管理") +@RestController +@RequestMapping("/api/booking/integral-log") +public class IntegralLogController extends BaseController { + @Resource + private IntegralLogService integralLogService; + + @ApiOperation("分页查询积分明细") + @GetMapping("/page") + public ApiResult> page(IntegralLogParam param) { + // 使用关联查询 + return success(integralLogService.pageRel(param)); + } + + @ApiOperation("查询全部积分明细") + @GetMapping() + public ApiResult> list(IntegralLogParam param) { + // 使用关联查询 + return success(integralLogService.listRel(param)); + } + + @PreAuthorize("hasAuthority('booking:integralLog:list')") + @ApiOperation("根据id查询积分明细") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(integralLogService.getByIdRel(id)); + } + + @ApiOperation("添加积分明细") + @PostMapping() + public ApiResult save(@RequestBody IntegralLog integralLog) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // integralLog.setUserId(loginUser.getUserId()); + // } + if (integralLogService.save(integralLog)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改积分明细") + @PutMapping() + public ApiResult update(@RequestBody IntegralLog integralLog) { + if (integralLogService.updateById(integralLog)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除积分明细") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (integralLogService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加积分明细") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (integralLogService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改积分明细") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(integralLogService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除积分明细") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (integralLogService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/booking/controller/UsersController.java b/src/main/java/com/gxwebsoft/booking/controller/UsersController.java new file mode 100644 index 0000000..84c1805 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/controller/UsersController.java @@ -0,0 +1,115 @@ +package com.gxwebsoft.booking.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.booking.service.UsersService; +import com.gxwebsoft.booking.entity.Users; +import com.gxwebsoft.booking.param.UsersParam; +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-04-25 20:44:46 + */ +@Api(tags = "用户管理") +@RestController +@RequestMapping("/api/booking/users") +public class UsersController extends BaseController { + @Resource + private UsersService usersService; + + @ApiOperation("分页查询用户") + @GetMapping("/page") + public ApiResult> page(UsersParam param) { + // 使用关联查询 + return success(usersService.pageRel(param)); + } + + @ApiOperation("查询全部用户") + @GetMapping() + public ApiResult> list(UsersParam param) { + // 使用关联查询 + return success(usersService.listRel(param)); + } + + @PreAuthorize("hasAuthority('booking:users:list')") + @ApiOperation("根据id查询用户") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(usersService.getByIdRel(id)); + } + + @ApiOperation("添加用户") + @PostMapping() + public ApiResult save(@RequestBody Users users) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // users.setUserId(loginUser.getUserId()); + // } + if (usersService.save(users)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改用户") + @PutMapping() + public ApiResult update(@RequestBody Users users) { + if (usersService.updateById(users)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除用户") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (usersService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加用户") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (usersService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改用户") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(usersService, "user_id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除用户") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (usersService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/booking/entity/Integral.java b/src/main/java/com/gxwebsoft/booking/entity/Integral.java new file mode 100644 index 0000000..1a929f5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/entity/Integral.java @@ -0,0 +1,53 @@ +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.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 签到积分 + * + * @author 科技小王子 + * @since 2024-04-25 21:24:51 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "Integral对象", description = "签到积分") +@TableName("booking_integral") +public class Integral implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "用户id") + private Integer userId; + + @ApiModelProperty(value = "微信昵称") + private String username; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "获得积分") + private BigDecimal integral; + + @ApiModelProperty(value = "日期") + private String dateTime; + + @ApiModelProperty(value = "天") + private String day; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty(value = "签到时间") + private Integer createTime; + +} diff --git a/src/main/java/com/gxwebsoft/booking/entity/IntegralLog.java b/src/main/java/com/gxwebsoft/booking/entity/IntegralLog.java new file mode 100644 index 0000000..89f969a --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/entity/IntegralLog.java @@ -0,0 +1,62 @@ +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.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 积分明细 + * + * @author 科技小王子 + * @since 2024-04-25 21:24:52 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "IntegralLog对象", description = "积分明细") +@TableName("booking_integral_log") +public class IntegralLog implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "场馆订单号") + private String orderNum; + + @ApiModelProperty(value = "订单id") + private Integer oid; + + @ApiModelProperty(value = "场馆名称") + private String siteName; + + @ApiModelProperty(value = "微信昵称") + private String username; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "获得积分") + private BigDecimal integral; + + @ApiModelProperty(value = "变化前积分") + private BigDecimal oldMoney; + + @ApiModelProperty(value = "变化后积分") + private BigDecimal newMoney; + + @ApiModelProperty(value = "描述") + private String info; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty(value = "记录时间") + private Integer createTime; + +} diff --git a/src/main/java/com/gxwebsoft/booking/entity/Users.java b/src/main/java/com/gxwebsoft/booking/entity/Users.java new file mode 100644 index 0000000..5b610d1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/entity/Users.java @@ -0,0 +1,118 @@ +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-04-25 20:44:46 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "Users对象", description = "用户") +@TableName("booking_users") +public class Users implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(value = "user_id", type = IdType.AUTO) + private Integer userId; + + @ApiModelProperty(value = "用户唯一小程序id") + private String openid; + + @ApiModelProperty(value = "小程序用户秘钥") + private String sessionKey; + + @ApiModelProperty(value = "用户名") + private String username; + + @ApiModelProperty(value = "头像地址") + private String avatarUrl; + + @ApiModelProperty(value = "1男,2女") + private Boolean sex; + + @ApiModelProperty(value = "国家") + private String country; + + @ApiModelProperty(value = "省份") + private String province; + + @ApiModelProperty(value = "城市") + private String city; + + @ApiModelProperty(value = "所在辖区") + private String region; + + @ApiModelProperty(value = "经度") + private String longitude; + + @ApiModelProperty(value = "纬度") + private String latitude; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "邮箱") + private String email; + + @ApiModelProperty(value = "邮箱是否验证, 0否, 1是") + private Integer emailVerified; + + @ApiModelProperty(value = "积分") + private BigDecimal points; + + @ApiModelProperty(value = "余额") + private BigDecimal balance; + + @ApiModelProperty(value = "注册时间") + private Integer addTime; + + @ApiModelProperty(value = "身份证号码") + private String idCard; + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "是否管理员:1是;2否") + private Boolean isAdmin; + + @ApiModelProperty(value = "客户端ID") + private String clientId; + + @ApiModelProperty(value = "注册来源客户端 (APP、H5、小程序等)") + private String platform; + + @ApiModelProperty(value = "排序") + private Integer sortNumber; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "状态") + private Integer status; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty(value = "注册时间") + private Date createTime; + +} diff --git a/src/main/java/com/gxwebsoft/booking/mapper/IntegralLogMapper.java b/src/main/java/com/gxwebsoft/booking/mapper/IntegralLogMapper.java new file mode 100644 index 0000000..6e4bcd1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/IntegralLogMapper.java @@ -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.IntegralLog; +import com.gxwebsoft.booking.param.IntegralLogParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 积分明细Mapper + * + * @author 科技小王子 + * @since 2024-04-25 21:24:52 + */ +public interface IntegralLogMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") IntegralLogParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") IntegralLogParam param); + +} diff --git a/src/main/java/com/gxwebsoft/booking/mapper/IntegralMapper.java b/src/main/java/com/gxwebsoft/booking/mapper/IntegralMapper.java new file mode 100644 index 0000000..789be71 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/IntegralMapper.java @@ -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.Integral; +import com.gxwebsoft.booking.param.IntegralParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 签到积分Mapper + * + * @author 科技小王子 + * @since 2024-04-25 21:24:51 + */ +public interface IntegralMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") IntegralParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") IntegralParam param); + +} diff --git a/src/main/java/com/gxwebsoft/booking/mapper/UsersMapper.java b/src/main/java/com/gxwebsoft/booking/mapper/UsersMapper.java new file mode 100644 index 0000000..0ef5a03 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/UsersMapper.java @@ -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.Users; +import com.gxwebsoft.booking.param.UsersParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户Mapper + * + * @author 科技小王子 + * @since 2024-04-25 20:44:46 + */ +public interface UsersMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") UsersParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") UsersParam param); + +} diff --git a/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralLogMapper.xml b/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralLogMapper.xml new file mode 100644 index 0000000..899faa7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralLogMapper.xml @@ -0,0 +1,63 @@ + + + + + + + SELECT a.* + FROM booking_integral_log a + + + AND a.id = #{param.id} + + + AND a.order_num LIKE CONCAT('%', #{param.orderNum}, '%') + + + AND a.oid = #{param.oid} + + + AND a.site_name LIKE CONCAT('%', #{param.siteName}, '%') + + + AND a.username LIKE CONCAT('%', #{param.username}, '%') + + + AND a.phone LIKE CONCAT('%', #{param.phone}, '%') + + + AND a.integral = #{param.integral} + + + AND a.old_money = #{param.oldMoney} + + + AND a.new_money = #{param.newMoney} + + + AND a.info LIKE CONCAT('%', #{param.info}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralMapper.xml b/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralMapper.xml new file mode 100644 index 0000000..88b64ad --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/xml/IntegralMapper.xml @@ -0,0 +1,54 @@ + + + + + + + SELECT a.* + FROM booking_integral a + + + AND a.id = #{param.id} + + + AND a.user_id = #{param.userId} + + + AND a.username LIKE CONCAT('%', #{param.username}, '%') + + + AND a.phone LIKE CONCAT('%', #{param.phone}, '%') + + + AND a.integral = #{param.integral} + + + AND a.date_time LIKE CONCAT('%', #{param.dateTime}, '%') + + + AND a.day LIKE CONCAT('%', #{param.day}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/booking/mapper/xml/UsersMapper.xml b/src/main/java/com/gxwebsoft/booking/mapper/xml/UsersMapper.xml new file mode 100644 index 0000000..0df6687 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/mapper/xml/UsersMapper.xml @@ -0,0 +1,122 @@ + + + + + + + SELECT a.* + FROM booking_users a + + + AND a.user_id = #{param.userId} + + + AND a.openid LIKE CONCAT('%', #{param.openid}, '%') + + + AND a.session_key LIKE CONCAT('%', #{param.sessionKey}, '%') + + + AND a.username LIKE CONCAT('%', #{param.username}, '%') + + + AND a.avatar_url LIKE CONCAT('%', #{param.avatarUrl}, '%') + + + AND a.sex = #{param.sex} + + + AND a.country LIKE CONCAT('%', #{param.country}, '%') + + + AND a.province LIKE CONCAT('%', #{param.province}, '%') + + + AND a.city LIKE CONCAT('%', #{param.city}, '%') + + + AND a.region LIKE CONCAT('%', #{param.region}, '%') + + + AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%') + + + AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%') + + + AND a.phone LIKE CONCAT('%', #{param.phone}, '%') + + + AND a.email LIKE CONCAT('%', #{param.email}, '%') + + + AND a.email_verified = #{param.emailVerified} + + + AND a.points = #{param.points} + + + AND a.balance = #{param.balance} + + + AND a.add_time = #{param.addTime} + + + AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') + + + AND a.real_name LIKE CONCAT('%', #{param.realName}, '%') + + + AND a.is_admin = #{param.isAdmin} + + + AND a.client_id LIKE CONCAT('%', #{param.clientId}, '%') + + + AND a.platform LIKE CONCAT('%', #{param.platform}, '%') + + + AND a.sort_number = #{param.sortNumber} + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR a.phone LIKE CONCAT('%', #{param.keywords}, '%') + OR a.username LIKE CONCAT('%', #{param.keywords}, '%') + OR a.province LIKE CONCAT('%', #{param.keywords}, '%') + OR a.city LIKE CONCAT('%', #{param.keywords}, '%') + OR a.region LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/booking/param/IntegralLogParam.java b/src/main/java/com/gxwebsoft/booking/param/IntegralLogParam.java new file mode 100644 index 0000000..48ab79f --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/param/IntegralLogParam.java @@ -0,0 +1,60 @@ +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-04-25 21:24:52 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(value = "IntegralLogParam对象", description = "积分明细查询参数") +public class IntegralLogParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + private Integer id; + + @ApiModelProperty(value = "场馆订单号") + private String orderNum; + + @ApiModelProperty(value = "订单id") + @QueryField(type = QueryType.EQ) + private Integer oid; + + @ApiModelProperty(value = "场馆名称") + private String siteName; + + @ApiModelProperty(value = "微信昵称") + private String username; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "获得积分") + @QueryField(type = QueryType.EQ) + private BigDecimal integral; + + @ApiModelProperty(value = "变化前积分") + @QueryField(type = QueryType.EQ) + private BigDecimal oldMoney; + + @ApiModelProperty(value = "变化后积分") + @QueryField(type = QueryType.EQ) + private BigDecimal newMoney; + + @ApiModelProperty(value = "描述") + private String info; + +} diff --git a/src/main/java/com/gxwebsoft/booking/param/IntegralParam.java b/src/main/java/com/gxwebsoft/booking/param/IntegralParam.java new file mode 100644 index 0000000..6c24d99 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/param/IntegralParam.java @@ -0,0 +1,49 @@ +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-04-25 21:24:51 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(value = "IntegralParam对象", description = "签到积分查询参数") +public class IntegralParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + private Integer id; + + @ApiModelProperty(value = "用户id") + @QueryField(type = QueryType.EQ) + private Integer userId; + + @ApiModelProperty(value = "微信昵称") + private String username; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "获得积分") + @QueryField(type = QueryType.EQ) + private BigDecimal integral; + + @ApiModelProperty(value = "日期") + private String dateTime; + + @ApiModelProperty(value = "天") + private String day; + +} diff --git a/src/main/java/com/gxwebsoft/booking/param/UsersParam.java b/src/main/java/com/gxwebsoft/booking/param/UsersParam.java new file mode 100644 index 0000000..39b9b92 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/param/UsersParam.java @@ -0,0 +1,116 @@ +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-04-25 20:44:46 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(value = "UsersParam对象", description = "用户查询参数") +public class UsersParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + private Integer userId; + + @ApiModelProperty(value = "用户唯一小程序id") + private String openid; + + @ApiModelProperty(value = "小程序用户秘钥") + private String sessionKey; + + @ApiModelProperty(value = "用户名") + private String username; + + @ApiModelProperty(value = "头像地址") + private String avatarUrl; + + @ApiModelProperty(value = "1男,2女") + @QueryField(type = QueryType.EQ) + private Boolean sex; + + @ApiModelProperty(value = "国家") + private String country; + + @ApiModelProperty(value = "省份") + private String province; + + @ApiModelProperty(value = "城市") + private String city; + + @ApiModelProperty(value = "所在辖区") + private String region; + + @ApiModelProperty(value = "经度") + private String longitude; + + @ApiModelProperty(value = "纬度") + private String latitude; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "邮箱") + private String email; + + @ApiModelProperty(value = "邮箱是否验证, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer emailVerified; + + @ApiModelProperty(value = "积分") + @QueryField(type = QueryType.EQ) + private BigDecimal points; + + @ApiModelProperty(value = "余额") + @QueryField(type = QueryType.EQ) + private BigDecimal balance; + + @ApiModelProperty(value = "注册时间") + @QueryField(type = QueryType.EQ) + private Integer addTime; + + @ApiModelProperty(value = "身份证号码") + private String idCard; + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "是否管理员:1是;2否") + @QueryField(type = QueryType.EQ) + private Boolean isAdmin; + + @ApiModelProperty(value = "客户端ID") + private String clientId; + + @ApiModelProperty(value = "注册来源客户端 (APP、H5、小程序等)") + private String platform; + + @ApiModelProperty(value = "排序") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "状态") + @QueryField(type = QueryType.EQ) + private Integer status; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/IntegralLogService.java b/src/main/java/com/gxwebsoft/booking/service/IntegralLogService.java new file mode 100644 index 0000000..bb8c046 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/IntegralLogService.java @@ -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.IntegralLog; +import com.gxwebsoft.booking.param.IntegralLogParam; + +import java.util.List; + +/** + * 积分明细Service + * + * @author 科技小王子 + * @since 2024-04-25 21:24:52 + */ +public interface IntegralLogService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(IntegralLogParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(IntegralLogParam param); + + /** + * 根据id查询 + * + * @param id + * @return IntegralLog + */ + IntegralLog getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/IntegralService.java b/src/main/java/com/gxwebsoft/booking/service/IntegralService.java new file mode 100644 index 0000000..6dfb9b5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/IntegralService.java @@ -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.Integral; +import com.gxwebsoft.booking.param.IntegralParam; + +import java.util.List; + +/** + * 签到积分Service + * + * @author 科技小王子 + * @since 2024-04-25 21:24:51 + */ +public interface IntegralService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(IntegralParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(IntegralParam param); + + /** + * 根据id查询 + * + * @param id + * @return Integral + */ + Integral getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/UsersService.java b/src/main/java/com/gxwebsoft/booking/service/UsersService.java new file mode 100644 index 0000000..12fa493 --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/UsersService.java @@ -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.Users; +import com.gxwebsoft.booking.param.UsersParam; + +import java.util.List; + +/** + * 用户Service + * + * @author 科技小王子 + * @since 2024-04-25 20:44:46 + */ +public interface UsersService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(UsersParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(UsersParam param); + + /** + * 根据id查询 + * + * @param userId + * @return Users + */ + Users getByIdRel(Integer userId); + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/impl/IntegralLogServiceImpl.java b/src/main/java/com/gxwebsoft/booking/service/impl/IntegralLogServiceImpl.java new file mode 100644 index 0000000..7ceef5b --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/impl/IntegralLogServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.booking.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.booking.mapper.IntegralLogMapper; +import com.gxwebsoft.booking.service.IntegralLogService; +import com.gxwebsoft.booking.entity.IntegralLog; +import com.gxwebsoft.booking.param.IntegralLogParam; +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-04-25 21:24:52 + */ +@Service +public class IntegralLogServiceImpl extends ServiceImpl implements IntegralLogService { + + @Override + public PageResult pageRel(IntegralLogParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(IntegralLogParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public IntegralLog getByIdRel(Integer id) { + IntegralLogParam param = new IntegralLogParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/impl/IntegralServiceImpl.java b/src/main/java/com/gxwebsoft/booking/service/impl/IntegralServiceImpl.java new file mode 100644 index 0000000..3a3b89e --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/impl/IntegralServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.booking.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.booking.mapper.IntegralMapper; +import com.gxwebsoft.booking.service.IntegralService; +import com.gxwebsoft.booking.entity.Integral; +import com.gxwebsoft.booking.param.IntegralParam; +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-04-25 21:24:51 + */ +@Service +public class IntegralServiceImpl extends ServiceImpl implements IntegralService { + + @Override + public PageResult pageRel(IntegralParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(IntegralParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public Integral getByIdRel(Integer id) { + IntegralParam param = new IntegralParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/booking/service/impl/PeriodServiceImpl.java b/src/main/java/com/gxwebsoft/booking/service/impl/PeriodServiceImpl.java index 0717129..92fba1a 100644 --- a/src/main/java/com/gxwebsoft/booking/service/impl/PeriodServiceImpl.java +++ b/src/main/java/com/gxwebsoft/booking/service/impl/PeriodServiceImpl.java @@ -23,7 +23,7 @@ public class PeriodServiceImpl extends ServiceImpl impleme @Override public PageResult pageRel(PeriodParam param) { PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); + page.setDefaultOrder("sort_number desc, create_time desc"); List list = baseMapper.selectPageRel(page, param); return new PageResult<>(list, page.getTotal()); } @@ -33,7 +33,7 @@ public class PeriodServiceImpl extends ServiceImpl impleme List list = baseMapper.selectListRel(param); // 排序 PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); + page.setDefaultOrder("sort_number desc, create_time desc"); return page.sortRecords(list); } diff --git a/src/main/java/com/gxwebsoft/booking/service/impl/UsersServiceImpl.java b/src/main/java/com/gxwebsoft/booking/service/impl/UsersServiceImpl.java new file mode 100644 index 0000000..b8933dd --- /dev/null +++ b/src/main/java/com/gxwebsoft/booking/service/impl/UsersServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.booking.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.booking.mapper.UsersMapper; +import com.gxwebsoft.booking.service.UsersService; +import com.gxwebsoft.booking.entity.Users; +import com.gxwebsoft.booking.param.UsersParam; +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-04-25 20:44:46 + */ +@Service +public class UsersServiceImpl extends ServiceImpl implements UsersService { + + @Override + public PageResult pageRel(UsersParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(UsersParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public Users getByIdRel(Integer userId) { + UsersParam param = new UsersParam(); + param.setUserId(userId); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/User.java b/src/main/java/com/gxwebsoft/common/system/entity/User.java index e56ef14..e74e697 100644 --- a/src/main/java/com/gxwebsoft/common/system/entity/User.java +++ b/src/main/java/com/gxwebsoft/common/system/entity/User.java @@ -10,6 +10,7 @@ import lombok.Data; import org.springframework.security.core.userdetails.UserDetails; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.Date; import java.util.List; @@ -50,7 +51,7 @@ public class User implements UserDetails { @ApiModelProperty("头像") private String bgImage; - @ApiModelProperty("性别, 字典标识") + @ApiModelProperty("性别, 1男 2女") private String sex; @ApiModelProperty("手机号") @@ -59,15 +60,9 @@ public class User implements UserDetails { @ApiModelProperty("邮箱") private String email; - @ApiModelProperty("职务") - private String position; - @ApiModelProperty("邮箱是否验证, 0否, 1是") private Integer emailVerified; - @ApiModelProperty("别名") - private String alias; - @ApiModelProperty("真实姓名") private String realName; @@ -123,12 +118,6 @@ public class User implements UserDetails { @ApiModelProperty("机构ID") private Integer organizationId; - @ApiModelProperty("客户ID") - private Integer customerId; - - @ApiModelProperty("企业ID") - private Integer companyId; - @ApiModelProperty(value = "商户ID") @TableField(exist = false) private Integer merchantId; @@ -136,36 +125,6 @@ public class User implements UserDetails { @ApiModelProperty("注册来源客户端") private String platform; - @ApiModelProperty("兴趣爱好") - private String interest; - - @ApiModelProperty("身高") - private String height; - - @ApiModelProperty("体重") - private String weight; - - @ApiModelProperty("学历") - private String education; - - @ApiModelProperty("月薪") - private String monthlyPay; - - @ApiModelProperty("是否下线会员") - private Integer offline; - - @ApiModelProperty("关注数") - private Integer followers; - - @ApiModelProperty("粉丝数") - private Integer fans; - - @ApiModelProperty("获赞数") - private Integer likes; - - @ApiModelProperty("评论数") - private Integer commentNumbers; - @ApiModelProperty("是否推荐") private Integer recommend; @@ -182,22 +141,9 @@ public class User implements UserDetails { @ApiModelProperty(value = "租户id") private Integer tenantId; - @ApiModelProperty(value = "租户名称") - @TableField(exist = false) - private String tenantName; - - @ApiModelProperty(value = "最后结算时间") - private Date settlementTime; - - @ApiModelProperty("注册时间") - private Date createTime; - @ApiModelProperty("修改时间") private Date updateTime; - @ApiModelProperty("公司名称") - private String companyName; - @ApiModelProperty("是否已实名认证") private Integer certification; @@ -233,46 +179,33 @@ public class User implements UserDetails { @TableField(exist = false) private Integer dealerId; - @ApiModelProperty("微信openid") - @TableField(exist = false) + @ApiModelProperty("用户唯一小程序id") private String openid; - @ApiModelProperty("微信unionid") - @TableField(exist = false) - private String unionid; - - @ApiModelProperty("所属商户的编号") - @TableField(exist = false) - private String merchantCode; - - @ApiModelProperty("所属商户名称") - @TableField(exist = false) - private String merchantName; - - @ApiModelProperty("ico文件") - @TableField(exist = false) - private String logo; - - @ApiModelProperty("创建的应用数量") - @TableField(exist = false) - private Double apps; - - @ApiModelProperty("租户设置信息") - @TableField(exist = false) - private String setting; - @ApiModelProperty("手机号(脱敏)") @TableField(exist = false) private String mobile; - @ApiModelProperty("企业信息") - @TableField(exist = false) - private Company companyInfo; + @ApiModelProperty(value = "小程序用户秘钥") + private String sessionKey; + @ApiModelProperty(value = "头像地址") + private String avatarUrl; - @ApiModelProperty("系统配置信息") - @TableField(exist = false) - private Object system; + @ApiModelProperty(value = "注册时间") + private Integer addTime; + + @ApiModelProperty(value = "是否管理员:1是;2否") + private Boolean isAdmin; + + @ApiModelProperty(value = "客户端ID") + private String clientId; + + @ApiModelProperty(value = "排序") + private Integer sortNumber; + + @ApiModelProperty(value = "注册时间") + private Date createTime; @Override public boolean isAccountNonExpired() { diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml index 1b702bf..4c23016 100644 --- a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml @@ -25,13 +25,10 @@ SELECT a.*, - b.organization_name, c.dict_data_name sex_name, - e.tenant_name,e.logo, - g.grade_id,g.name as gradeName, + e.tenant_name, h.dealer_id FROM sys_user a - LEFT JOIN sys_organization b ON a.organization_id = b.organization_id LEFT JOIN ( ) c ON a.sex = c.dict_data_code @@ -39,8 +36,7 @@ ) d ON a.user_id = d.user_id LEFT JOIN sys_tenant e ON a.tenant_id = e.tenant_id - LEFT JOIN shop_user_grade g ON a.grade_id = g.grade_id - LEFT JOIN shop_user_referee h ON a.user_id = h.user_id and h.deleted = 0 + LEFT JOIN sys_user_referee h ON a.user_id = h.user_id and h.deleted = 0 AND a.user_id = #{param.userId} @@ -126,15 +122,9 @@ AND a.region LIKE CONCAT('%', #{param.region}, '%') - - AND b.organization_name LIKE CONCAT('%', #{param.organizationName}, '%') - AND c.dict_data_name = #{param.sexName} - - AND g.grade_id = #{param.gradeId} - AND ( a.username LIKE CONCAT('%', #{param.keywords}, '%') @@ -144,7 +134,6 @@ OR a.alias LIKE CONCAT('%', #{param.keywords}, '%') OR a.phone LIKE CONCAT('%', #{param.keywords}, '%') OR a.email LIKE CONCAT('%', #{param.keywords}, '%') - OR b.organization_name LIKE CONCAT('%', #{param.keywords}, '%') OR c.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%') OR d.role_name LIKE CONCAT('%', #{param.keywords}, '%') ) @@ -168,10 +157,8 @@ - SELECT a.*,b.organization_name + SELECT a.* FROM sys_user a - LEFT JOIN sys_organization b ON a.organization_id = b.organization_id AND a.deleted = 0 - - AND b.organization_id = #{param.organizationId} - diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java index 8a98ea5..694ab34 100644 --- a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java @@ -81,17 +81,17 @@ public class UserServiceImpl extends ServiceImpl implements Us user.setRoles(userRoleService.listByUserId(user.getUserId())); user.setAuthorities(roleMenuService.listMenuByUserId(user.getUserId(), null)); // 系统配置信息 - Map map = new HashMap<>(); +// Map map = new HashMap<>(); // 1)云存储 - String key = "setting:upload:" + user.getTenantId(); - final String upload = redisUtil.get(key); - if(upload != null){ - final JSONObject object = JSONObject.parseObject(upload); - map.put("uploadMethod",object.getString("uploadMethod")); - map.put("bucketDomain",object.getString("bucketDomain")); - map.put("fileUrl",object.getString("fileUrl") + "/"); - user.setSystem(map); - } +// String key = "setting:upload:" + user.getTenantId(); +// final String upload = redisUtil.get(key); +// if(upload != null){ +// final JSONObject object = JSONObject.parseObject(upload); +// map.put("uploadMethod",object.getString("uploadMethod")); +// map.put("bucketDomain",object.getString("bucketDomain")); +// map.put("fileUrl",object.getString("fileUrl") + "/"); +// user.setSystem(map); +// } } return user; } diff --git a/src/main/java/com/gxwebsoft/shop/controller/OrderController.java b/src/main/java/com/gxwebsoft/shop/controller/OrderController.java index 750a1c9..dbd43e5 100644 --- a/src/main/java/com/gxwebsoft/shop/controller/OrderController.java +++ b/src/main/java/com/gxwebsoft/shop/controller/OrderController.java @@ -19,40 +19,41 @@ import javax.annotation.Resource; import java.util.List; /** - * 订单控制器 + * 预约订单控制器 * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ -@Api(tags = "订单管理") +@Api(tags = "预约订单管理") @RestController @RequestMapping("/api/shop/order") public class OrderController extends BaseController { @Resource private OrderService orderService; - @ApiOperation("分页查询订单") + @ApiOperation("分页查询预约订单") @GetMapping("/page") public ApiResult> page(OrderParam param) { // 使用关联查询 return success(orderService.pageRel(param)); } - @ApiOperation("查询全部订单") + @ApiOperation("查询全部预约订单") @GetMapping() public ApiResult> list(OrderParam param) { // 使用关联查询 return success(orderService.listRel(param)); } - @ApiOperation("根据id查询订单") + @PreAuthorize("hasAuthority('shop:order:list')") + @ApiOperation("根据id查询预约订单") @GetMapping("/{id}") public ApiResult get(@PathVariable("id") Integer id) { // 使用关联查询 return success(orderService.getByIdRel(id)); } - @ApiOperation("添加订单") + @ApiOperation("添加预约订单") @PostMapping() public ApiResult save(@RequestBody Order order) { // 记录当前登录用户id @@ -66,7 +67,7 @@ public class OrderController extends BaseController { return fail("添加失败"); } - @ApiOperation("修改订单") + @ApiOperation("修改预约订单") @PutMapping() public ApiResult update(@RequestBody Order order) { if (orderService.updateById(order)) { @@ -75,7 +76,7 @@ public class OrderController extends BaseController { return fail("修改失败"); } - @ApiOperation("删除订单") + @ApiOperation("删除预约订单") @DeleteMapping("/{id}") public ApiResult remove(@PathVariable("id") Integer id) { if (orderService.removeById(id)) { @@ -84,7 +85,7 @@ public class OrderController extends BaseController { return fail("删除失败"); } - @ApiOperation("批量添加订单") + @ApiOperation("批量添加预约订单") @PostMapping("/batch") public ApiResult saveBatch(@RequestBody List list) { if (orderService.saveBatch(list)) { @@ -93,7 +94,7 @@ public class OrderController extends BaseController { return fail("添加失败"); } - @ApiOperation("批量修改订单") + @ApiOperation("批量修改预约订单") @PutMapping("/batch") public ApiResult removeBatch(@RequestBody BatchParam batchParam) { if (batchParam.update(orderService, "order_id")) { @@ -102,7 +103,7 @@ public class OrderController extends BaseController { return fail("修改失败"); } - @ApiOperation("批量删除订单") + @ApiOperation("批量删除预约订单") @DeleteMapping("/batch") public ApiResult removeBatch(@RequestBody List ids) { if (orderService.removeByIds(ids)) { diff --git a/src/main/java/com/gxwebsoft/shop/entity/Order.java b/src/main/java/com/gxwebsoft/shop/entity/Order.java index f22c461..7b9f0a8 100644 --- a/src/main/java/com/gxwebsoft/shop/entity/Order.java +++ b/src/main/java/com/gxwebsoft/shop/entity/Order.java @@ -4,7 +4,6 @@ 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 io.swagger.annotations.ApiModel; @@ -13,106 +12,132 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * 订单 + * 预约订单 * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ @Data @EqualsAndHashCode(callSuper = false) -@ApiModel(value = "Order对象", description = "订单") +@ApiModel(value = "Order对象", description = "预约订单") @TableName("shop_order") public class Order implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "ID") + @ApiModelProperty(value = "订单号") @TableId(value = "order_id", type = IdType.AUTO) private Integer orderId; - @ApiModelProperty(value = "订单号") + @ApiModelProperty(value = "订单编号") private String orderNo; - @ApiModelProperty(value = "类型") - private Integer type; + @ApiModelProperty(value = "微信支付订单号") + private String wechatOrder; - @ApiModelProperty(value = "订单金额") - private BigDecimal money; + @ApiModelProperty(value = "微信退款订单号") + private String refundOrder; - @ApiModelProperty(value = "实际付款金额(包含运费)") - private BigDecimal payPrice; + @ApiModelProperty(value = "场馆id用于权限判断") + private Integer merchantId; - @ApiModelProperty(value = "套餐ID") - private Integer planId; - - @ApiModelProperty(value = "卡ID") - private Integer priceId; - - @ApiModelProperty(value = "获得的会员等级") - private Integer gradeId; - - @ApiModelProperty(value = "卡名称") - private String priceName; - - @ApiModelProperty(value = "用户ID") + @ApiModelProperty(value = "用户id") private Integer userId; - @ApiModelProperty(value = "持有者ID") - private Integer memberId; + @ApiModelProperty(value = "使用的优惠券id") + private Integer couponId; + + @ApiModelProperty(value = "使用的会员卡id") + private Integer cardId; + + @ApiModelProperty(value = "关联管理员id") + private Integer aid; + + @ApiModelProperty(value = "核销管理员id") + private Integer adminId; + + @ApiModelProperty(value = "IC卡号") + private String code; @ApiModelProperty(value = "真实姓名") - private String realName; + private String name; - @ApiModelProperty(value = "联系电话") + @ApiModelProperty(value = "手机号码") private String phone; + @ApiModelProperty(value = "订单总额") + private BigDecimal totalPrice; + + @ApiModelProperty(value = "减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格") + private BigDecimal reducePrice; + + @ApiModelProperty(value = "实际付款") + private BigDecimal payPrice; + + @ApiModelProperty(value = "用于统计") + private BigDecimal price; + + @ApiModelProperty(value = "价钱,用于积分赠送") + private BigDecimal money; + + @ApiModelProperty(value = "退款金额") + private BigDecimal refundMoney; + + @ApiModelProperty(value = "教练价格") + private BigDecimal coachPrice; + + @ApiModelProperty(value = "教练id") + private Integer coachId; + + @ApiModelProperty(value = "1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡") + private Boolean payType; + + @ApiModelProperty(value = "1已付款,2未付款") + private Boolean payStatus; + + @ApiModelProperty(value = "1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款") + private Boolean orderStatus; + + @ApiModelProperty(value = "优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡") + private Boolean type; + + @ApiModelProperty(value = "二维码地址,保存订单号,支付成功后才生成") + private String qrcode; + + @ApiModelProperty(value = "优惠说明") + private String desc; + + @ApiModelProperty(value = "vip月卡年卡、ic月卡年卡回退次数") + private Integer returnNum; + + @ApiModelProperty(value = "vip充值回退金额") + private BigDecimal returnMoney; + + @ApiModelProperty(value = "预约详情开始时间数组") + private String startTime; + + @ApiModelProperty(value = "是否已开具发票:1已开发票,2未开发票,3不能开具发票") + private Boolean isInvoice; + + @ApiModelProperty(value = "下单时间") + private Integer createTime; + + private Integer updateTime; + @ApiModelProperty(value = "付款时间") - private LocalDateTime payTime; + private Integer payTime; - @ApiModelProperty(value = "支付方式") - private Integer payMethod; + @ApiModelProperty(value = "退款时间") + private Integer refundTime; - @ApiModelProperty(value = "支付流水号") - private String transactionId; + @ApiModelProperty(value = "申请退款时间") + private Integer refundApplyTime; - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - private Integer payStatus; - - @ApiModelProperty(value = "到期时间") - private LocalDateTime expirationTime; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "所在地区") - private String area; - - @ApiModelProperty(value = "街道地址") - private String address; - - @ApiModelProperty(value = "退款凭证") - private String refundImage; - - @ApiModelProperty(value = "退款理由") - private String refundContent; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") - private Integer isSettled; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; + @ApiModelProperty(value = "对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单") + private Integer checkBill; @ApiModelProperty(value = "备注") private String comments; - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - @ApiModelProperty(value = "是否删除, 0否, 1是") @TableLogic private Integer deleted; @@ -120,10 +145,4 @@ public class Order implements Serializable { @ApiModelProperty(value = "租户id") private Integer tenantId; - @ApiModelProperty(value = "创建时间") - private LocalDateTime createTime; - - @ApiModelProperty(value = "修改时间") - private LocalDateTime updateTime; - } diff --git a/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java b/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java index c7bdf49..fbc4c45 100644 --- a/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java +++ b/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java @@ -9,10 +9,10 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 订单Mapper + * 预约订单Mapper * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ public interface OrderMapper extends BaseMapper { diff --git a/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml b/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml index fe57d92..874760c 100644 --- a/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml +++ b/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml @@ -13,89 +13,92 @@ AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%') - - AND a.type = #{param.type} + + AND a.wechat_order LIKE CONCAT('%', #{param.wechatOrder}, '%') - - AND a.money = #{param.money} + + AND a.refund_order LIKE CONCAT('%', #{param.refundOrder}, '%') - - AND a.pay_price = #{param.payPrice} - - - AND a.plan_id = #{param.planId} - - - AND a.price_id = #{param.priceId} - - - AND a.grade_id = #{param.gradeId} - - - AND a.price_name LIKE CONCAT('%', #{param.priceName}, '%') + + AND a.merchant_id = #{param.merchantId} AND a.user_id = #{param.userId} - - AND a.member_id = #{param.memberId} + + AND a.coupon_id = #{param.couponId} - - AND a.real_name LIKE CONCAT('%', #{param.realName}, '%') + + AND a.card_id = #{param.cardId} + + + AND a.aid = #{param.aid} + + + AND a.admin_id = #{param.adminId} + + + AND a.code LIKE CONCAT('%', #{param.code}, '%') + + + AND a.name LIKE CONCAT('%', #{param.name}, '%') AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%') + + AND a.total_price = #{param.totalPrice} - - AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%') + + AND a.reduce_price = #{param.reducePrice} + + + AND a.pay_price = #{param.payPrice} + + + AND a.price = #{param.price} + + + AND a.money = #{param.money} + + + AND a.refund_money = #{param.refundMoney} + + + AND a.coach_price = #{param.coachPrice} + + + AND a.coach_id = #{param.coachId} + + + AND a.pay_type = #{param.payType} AND a.pay_status = #{param.payStatus} - - AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%') + + AND a.order_status = #{param.orderStatus} - - AND a.province LIKE CONCAT('%', #{param.province}, '%') + + AND a.type = #{param.type} - - AND a.city LIKE CONCAT('%', #{param.city}, '%') + + AND a.qrcode LIKE CONCAT('%', #{param.qrcode}, '%') - - AND a.region LIKE CONCAT('%', #{param.region}, '%') + + AND a.desc LIKE CONCAT('%', #{param.desc}, '%') - - AND a.area LIKE CONCAT('%', #{param.area}, '%') + + AND a.return_num = #{param.returnNum} - - AND a.address LIKE CONCAT('%', #{param.address}, '%') + + AND a.return_money = #{param.returnMoney} - - AND a.refund_image LIKE CONCAT('%', #{param.refundImage}, '%') + + AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%') - - AND a.refund_content LIKE CONCAT('%', #{param.refundContent}, '%') - - - AND a.is_settled = #{param.isSettled} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 + + AND a.is_invoice = #{param.isInvoice} AND a.create_time >= #{param.createTimeStart} @@ -103,6 +106,27 @@ AND a.create_time <= #{param.createTimeEnd} + + AND a.pay_time = #{param.payTime} + + + AND a.refund_time = #{param.refundTime} + + + AND a.refund_apply_time = #{param.refundApplyTime} + + + AND a.check_bill = #{param.checkBill} + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') ) diff --git a/src/main/java/com/gxwebsoft/shop/param/OrderParam.java b/src/main/java/com/gxwebsoft/shop/param/OrderParam.java index 7bc4bc0..33b492e 100644 --- a/src/main/java/com/gxwebsoft/shop/param/OrderParam.java +++ b/src/main/java/com/gxwebsoft/shop/param/OrderParam.java @@ -11,115 +11,152 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * 订单查询参数 + * 预约订单查询参数 * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ @Data @EqualsAndHashCode(callSuper = false) @JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "OrderParam对象", description = "订单查询参数") +@ApiModel(value = "OrderParam对象", description = "预约订单查询参数") public class OrderParam extends BaseParam { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "ID") + @ApiModelProperty(value = "订单号") @QueryField(type = QueryType.EQ) private Integer orderId; - @ApiModelProperty(value = "订单号") + @ApiModelProperty(value = "订单编号") private String orderNo; - @ApiModelProperty(value = "类型") + @ApiModelProperty(value = "微信支付订单号") + private String wechatOrder; + + @ApiModelProperty(value = "微信退款订单号") + private String refundOrder; + + @ApiModelProperty(value = "场馆id用于权限判断") @QueryField(type = QueryType.EQ) - private Integer type; + private Integer merchantId; - @ApiModelProperty(value = "订单金额") - @QueryField(type = QueryType.EQ) - private BigDecimal money; - - @ApiModelProperty(value = "实际付款金额(包含运费)") - @QueryField(type = QueryType.EQ) - private BigDecimal payPrice; - - @ApiModelProperty(value = "套餐ID") - @QueryField(type = QueryType.EQ) - private Integer planId; - - @ApiModelProperty(value = "卡ID") - @QueryField(type = QueryType.EQ) - private Integer priceId; - - @ApiModelProperty(value = "获得的会员等级") - @QueryField(type = QueryType.EQ) - private Integer gradeId; - - @ApiModelProperty(value = "卡名称") - private String priceName; - - @ApiModelProperty(value = "用户ID") + @ApiModelProperty(value = "用户id") @QueryField(type = QueryType.EQ) private Integer userId; - @ApiModelProperty(value = "持有者ID") + @ApiModelProperty(value = "使用的优惠券id") @QueryField(type = QueryType.EQ) - private Integer memberId; + private Integer couponId; + + @ApiModelProperty(value = "使用的会员卡id") + @QueryField(type = QueryType.EQ) + private Integer cardId; + + @ApiModelProperty(value = "关联管理员id") + @QueryField(type = QueryType.EQ) + private Integer aid; + + @ApiModelProperty(value = "核销管理员id") + @QueryField(type = QueryType.EQ) + private Integer adminId; + + @ApiModelProperty(value = "IC卡号") + private String code; @ApiModelProperty(value = "真实姓名") - private String realName; + private String name; - @ApiModelProperty(value = "联系电话") + @ApiModelProperty(value = "手机号码") private String phone; + @ApiModelProperty(value = "订单总额") + @QueryField(type = QueryType.EQ) + private BigDecimal totalPrice; + + @ApiModelProperty(value = "减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格") + @QueryField(type = QueryType.EQ) + private BigDecimal reducePrice; + + @ApiModelProperty(value = "实际付款") + @QueryField(type = QueryType.EQ) + private BigDecimal payPrice; + + @ApiModelProperty(value = "用于统计") + @QueryField(type = QueryType.EQ) + private BigDecimal price; + + @ApiModelProperty(value = "价钱,用于积分赠送") + @QueryField(type = QueryType.EQ) + private BigDecimal money; + + @ApiModelProperty(value = "退款金额") + @QueryField(type = QueryType.EQ) + private BigDecimal refundMoney; + + @ApiModelProperty(value = "教练价格") + @QueryField(type = QueryType.EQ) + private BigDecimal coachPrice; + + @ApiModelProperty(value = "教练id") + @QueryField(type = QueryType.EQ) + private Integer coachId; + + @ApiModelProperty(value = "1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡") + @QueryField(type = QueryType.EQ) + private Boolean payType; + + @ApiModelProperty(value = "1已付款,2未付款") + @QueryField(type = QueryType.EQ) + private Boolean payStatus; + + @ApiModelProperty(value = "1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款") + @QueryField(type = QueryType.EQ) + private Boolean orderStatus; + + @ApiModelProperty(value = "优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡") + @QueryField(type = QueryType.EQ) + private Boolean type; + + @ApiModelProperty(value = "二维码地址,保存订单号,支付成功后才生成") + private String qrcode; + + @ApiModelProperty(value = "优惠说明") + private String desc; + + @ApiModelProperty(value = "vip月卡年卡、ic月卡年卡回退次数") + @QueryField(type = QueryType.EQ) + private Integer returnNum; + + @ApiModelProperty(value = "vip充值回退金额") + @QueryField(type = QueryType.EQ) + private BigDecimal returnMoney; + + @ApiModelProperty(value = "预约详情开始时间数组") + private String startTime; + + @ApiModelProperty(value = "是否已开具发票:1已开发票,2未开发票,3不能开具发票") + @QueryField(type = QueryType.EQ) + private Boolean isInvoice; + @ApiModelProperty(value = "付款时间") - private String payTime; - - @ApiModelProperty(value = "支付流水号") - private String transactionId; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") @QueryField(type = QueryType.EQ) - private Integer payStatus; + private Integer payTime; - @ApiModelProperty(value = "到期时间") - private String expirationTime; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "所在地区") - private String area; - - @ApiModelProperty(value = "街道地址") - private String address; - - @ApiModelProperty(value = "退款凭证") - private String refundImage; - - @ApiModelProperty(value = "退款理由") - private String refundContent; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") + @ApiModelProperty(value = "退款时间") @QueryField(type = QueryType.EQ) - private Integer isSettled; + private Integer refundTime; - @ApiModelProperty(value = "排序(数字越小越靠前)") + @ApiModelProperty(value = "申请退款时间") @QueryField(type = QueryType.EQ) - private Integer sortNumber; + private Integer refundApplyTime; + + @ApiModelProperty(value = "对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单") + @QueryField(type = QueryType.EQ) + private Integer checkBill; @ApiModelProperty(value = "备注") private String comments; - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - @ApiModelProperty(value = "是否删除, 0否, 1是") @QueryField(type = QueryType.EQ) private Integer deleted; diff --git a/src/main/java/com/gxwebsoft/shop/service/OrderService.java b/src/main/java/com/gxwebsoft/shop/service/OrderService.java index dc4a978..06f14d3 100644 --- a/src/main/java/com/gxwebsoft/shop/service/OrderService.java +++ b/src/main/java/com/gxwebsoft/shop/service/OrderService.java @@ -8,10 +8,10 @@ import com.gxwebsoft.shop.param.OrderParam; import java.util.List; /** - * 订单Service + * 预约订单Service * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ public interface OrderService extends IService { @@ -34,7 +34,7 @@ public interface OrderService extends IService { /** * 根据id查询 * - * @param orderId ID + * @param orderId 订单号 * @return Order */ Order getByIdRel(Integer orderId); diff --git a/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java b/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java index 51b340d..0ba6e03 100644 --- a/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java +++ b/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java @@ -12,10 +12,10 @@ import org.springframework.stereotype.Service; import java.util.List; /** - * 订单Service实现 + * 预约订单Service实现 * * @author 科技小王子 - * @since 2024-04-06 12:12:48 + * @since 2024-04-25 22:01:33 */ @Service public class OrderServiceImpl extends ServiceImpl implements OrderService { diff --git a/src/test/java/com/gxwebsoft/generator/BookingGenerator.java b/src/test/java/com/gxwebsoft/generator/BookingGenerator.java index ef3cd2f..26c7365 100644 --- a/src/test/java/com/gxwebsoft/generator/BookingGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/BookingGenerator.java @@ -51,7 +51,11 @@ public class BookingGenerator { // "booking_card", // "booking_card_plan", // "booking_field", - "booking_period" +// "booking_period" +// "booking_users", +// "booking_integral", +// "booking_integral_log" +// "booking_order" }; // 需要去除的表前缀 private static final String[] TABLE_PREFIX = new String[]{ diff --git a/src/test/java/com/gxwebsoft/generator/ShopGenerator.java b/src/test/java/com/gxwebsoft/generator/ShopGenerator.java index fa06873..abf72e3 100644 --- a/src/test/java/com/gxwebsoft/generator/ShopGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/ShopGenerator.java @@ -62,7 +62,7 @@ public class ShopGenerator { // "shop_merchant", // "shop_merchant_type", // "shop_merchant_apply", -// "shop_order" + "shop_order" // "shop_merchant_account" }; // 需要去除的表前缀