| | |
| | | import com.dsh.activity.feignclient.other.model.Site; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.service.*; |
| | | import com.dsh.activity.util.ResultUtil; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | /** |
| | | * 硬件开门后回调 是否可进场检查接口 sid门店id rid场地id |
| | | */ |
| | | @PostMapping("/verify") |
| | | public ResultUtil verify(Integer id, Integer rid, Integer sid) { |
| | | System.err.println("硬件开门后回调 校验是否可入场");System.err.println("rid:"+rid); |
| | | System.err.println("sid:"+sid); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 硬件开门后回调 存储玩湃惠民卡使用记录 |
| | | */ |
| | | @PostMapping("/record") |
| New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.TSitePrice; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface TSitePriceMapper extends BaseMapper<TSitePrice> { |
| | | } |
| New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("t_site_price") |
| | | @ApiModel(description = "场地价格明细表") |
| | | public class TSitePrice { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键") |
| | | private Long id; |
| | | |
| | | @TableField("siteId") |
| | | @ApiModelProperty(value = "场地id") |
| | | private Integer siteId; |
| | | |
| | | @TableField("startTime") |
| | | @ApiModelProperty(value = "开始时间(如:09:00)") |
| | | private String startTime; |
| | | |
| | | @TableField("endTime") |
| | | @ApiModelProperty(value = "结束时间(如:10:00)") |
| | | private String endTime; |
| | | |
| | | @TableField("dayOfWeek") |
| | | @ApiModelProperty(value = "星期几 1=周一 2=周二...7=周日") |
| | | private Integer dayOfWeek; |
| | | |
| | | @TableField("targetAudience") |
| | | @ApiModelProperty(value = "面向人群:booking=订场,walkin=散客") |
| | | private String targetAudience; |
| | | |
| | | @TableField("fieldType") |
| | | @ApiModelProperty(value = "场地类型:full=全场,half=半场") |
| | | private String fieldType; |
| | | |
| | | @TableField("cashPrice") |
| | | @ApiModelProperty(value = "现金价格(元)") |
| | | private BigDecimal cashPrice; |
| | | |
| | | @TableField("coinPrice") |
| | | @ApiModelProperty(value = "玩湃币价格(币)") |
| | | private BigDecimal coinPrice; |
| | | |
| | | @TableField("insertTime") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date insertTime; |
| | | |
| | | @TableField("updateTime") |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateTime; |
| | | } |
| New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.TSitePrice; |
| | | |
| | | public interface ITSitePriceService extends IService<TSitePrice> { |
| | | } |
| New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.TSitePriceMapper; |
| | | import com.dsh.guns.modular.system.model.TSitePrice; |
| | | import com.dsh.guns.modular.system.service.ITSitePriceService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class TSitePriceServiceImpl extends ServiceImpl<TSitePriceMapper, TSitePrice> implements ITSitePriceService { |
| | | } |
| New file |
| | |
| | | <?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.dsh.course.mapper.TSitePriceMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dsh.guns.modular.system.model.TSitePrice"> |
| | | <id column="id" property="id"/> |
| | | <result column="siteId" property="siteId"/> |
| | | <result column="startTime" property="startTime"/> |
| | | <result column="endTime" property="endTime"/> |
| | | <result column="dayOfWeek" property="dayOfWeek"/> |
| | | <result column="targetAudience" property="targetAudience"/> |
| | | <result column="fieldType" property="fieldType"/> |
| | | <result column="cashPrice" property="cashPrice"/> |
| | | <result column="coinPrice" property="coinPrice"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | <result column="updateTime" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id, siteId, startTime, endTime, dayOfWeek, targetAudience, fieldType, cashPrice, coinPrice, insertTime, updateTime |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | @ApiImplicitParam(value = "场地id", name = "id", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "日期(2023-01-01)", name = "day", dataType = "string", required = true), |
| | | @ApiImplicitParam(value = "半场名称", name = "halfName", dataType = "string", required = false), |
| | | @ApiImplicitParam(value = "选择场地的名称", name = "siteName", dataType = "string", required = false) |
| | | @ApiImplicitParam(value = "选择场地的名称", name = "siteName", dataType = "string", required = false), |
| | | @ApiImplicitParam(value = "入场方式 1订场 2散客", name = "targetAudience",defaultValue = "1",dataType = "string", required = true), |
| | | }) |
| | | public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day, String halfName, String siteName) { |
| | | public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day, String halfName, String siteName,Integer targetAudience) { |
| | | try { |
| | | List<QuerySiteTimes> list = siteService.querySiteTimes(id, day, halfName, siteName); |
| | | return ResultUtil.success(list); |