bug修改,维护指定门店门票和散客二维码只可使用一次
| | |
| | | map.put("lose", lose); |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | map.put("province", appUser.getProvince() + appUser.getCity()); |
| | | map.put("registerPhone", appUser.getPhone()); |
| | | if (1 == participantType) { |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if (tStudent.getState() != 1) { |
| | |
| | | WorldCupPayment worldCupPayment = worldCupPaymentService.getById(on.getWorldCupPaymentId()); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | AppUser appUser = appUserClient.getAppUser(on.getAppUserId()); |
| | | map1.put("registerPhone", appUser.getPhone()); |
| | | if(on.getParticipantType() == 1){ |
| | | TStudent tStudent = studentClient.queryById(on.getParticipantId().intValue()); |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '性别', field: 'gender', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '年龄', field: 'age', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '注册电话', field: 'registerPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '二维码', field: '', visible: true, align: 'center', valign: 'middle', |
| | |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '名次', field: 'row_num', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '用户姓名', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '注册电话', field: 'registerPhone', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在城市', field: 'province', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已比赛场次', field: 'totalSession', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | package com.dsh.other.controller; |
| | | |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.entity.TSiteBookingUse; |
| | | import com.dsh.other.feignclient.activity.UserCouponClient; |
| | | import com.dsh.other.model.QuerySiteTimes; |
| | | import com.dsh.other.service.ISiteBookingService; |
| | | import com.dsh.other.service.ISiteBookingUseService; |
| | | import com.dsh.other.service.ISiteService; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import io.swagger.annotations.Api; |
| | |
| | | private ISiteService siteService; |
| | | @Autowired |
| | | private UserCouponClient userCouponClient; |
| | | @Autowired |
| | | private ISiteBookingUseService siteBookingUseService; |
| | | // 进场二维码新增参数codeType 1=订场 2=散客,3=门票,玩湃惠民卡codeType=4 |
| | | /** |
| | | * 硬件开门后回调 是否可进场检查接口 sid门店id rid场地id |
| | |
| | | siteBooking.setStatus(3); |
| | | siteBookingService.updateById(siteBooking); |
| | | } |
| | | return ResultUtil.success(); |
| | | if (siteBooking.getStoreId()==9939 && codeType==2){ |
| | | TSiteBookingUse siteBookingUse = siteBookingUseService.lambdaQuery() |
| | | .eq(TSiteBookingUse::getDataId, dataId) |
| | | |
| | | .eq(TSiteBookingUse::getType, 1) |
| | | .last("limit 1") |
| | | .one(); |
| | | if (siteBookingUse!=null){ |
| | | // 已经使用过了 不开门 |
| | | return ResultUtil.error("已使用"); |
| | | } |
| | | TSiteBookingUse siteBookingUse1 = new TSiteBookingUse(); |
| | | siteBookingUse1.setDataId(dataId); |
| | | siteBookingUse1.setType(1); |
| | | siteBookingUse1.setInsertTime(date); |
| | | siteBookingUseService.save(siteBookingUse1); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | } |
| | | if (codeType==3){ |
| | | // 判断是否能入场 远程调用将门票设置为已使用 |
| | |
| | | }else{ |
| | | // 远程调用 将门票设置为已使用 |
| | | userCouponClient.changeTicketStatus(dataId,sid,rid); |
| | | return ResultUtil.success(); |
| | | if (sid==9939){ |
| | | TSiteBookingUse siteBookingUse = siteBookingUseService.lambdaQuery() |
| | | .eq(TSiteBookingUse::getDataId, dataId) |
| | | .eq(TSiteBookingUse::getType, 2) |
| | | .last("limit 1") |
| | | .one(); |
| | | if (siteBookingUse!=null){ |
| | | // 已经使用过了 不开门 |
| | | return ResultUtil.error("已使用"); |
| | | } |
| | | TSiteBookingUse siteBookingUse2 = new TSiteBookingUse(); |
| | | siteBookingUse2.setDataId(dataId); |
| | | siteBookingUse2.setType(2); |
| | | siteBookingUse2.setInsertTime(date); |
| | | siteBookingUseService.save(siteBookingUse2); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (codeType==4){ |
| New file |
| | |
| | | package com.dsh.other.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:43 |
| | | */ |
| | | @Data |
| | | @TableName("t_site_booking_use") |
| | | public class TSiteBookingUse { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 类型:1=订场,2=门票 |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 数据id |
| | | */ |
| | | @TableField("dataId") |
| | | private String dataId; |
| | | |
| | | /** |
| | | * 插入时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
| New file |
| | |
| | | package com.dsh.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.other.entity.Banner; |
| | | import com.dsh.other.entity.CreateHistoryDto; |
| | | import com.dsh.other.entity.GetHistoryDto; |
| | | import com.dsh.other.entity.TSiteBookingUse; |
| | | import com.dsh.other.feignclient.model.AdvertisementQuery; |
| | | import com.dsh.other.model.BannerVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 17:46 |
| | | */ |
| | | public interface SiteBookingUseMapper extends BaseMapper<TSiteBookingUse> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.dsh.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.other.entity.Banner; |
| | | import com.dsh.other.entity.CreateHistoryDto; |
| | | import com.dsh.other.entity.GetHistoryDto; |
| | | import com.dsh.other.entity.TSiteBookingUse; |
| | | import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.other.feignclient.model.AdvertisementQuery; |
| | | import com.dsh.other.mapper.SiteBookingUseMapper; |
| | | import com.dsh.other.model.BannerVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 17:47 |
| | | */ |
| | | public interface ISiteBookingUseService extends IService<TSiteBookingUse> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.dsh.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.other.entity.Banner; |
| | | import com.dsh.other.entity.CreateHistoryDto; |
| | | import com.dsh.other.entity.GetHistoryDto; |
| | | import com.dsh.other.entity.TSiteBookingUse; |
| | | import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.other.feignclient.model.AdvertisementQuery; |
| | | import com.dsh.other.mapper.BannerMapper; |
| | | import com.dsh.other.mapper.SiteBookingUseMapper; |
| | | import com.dsh.other.model.BannerVo; |
| | | import com.dsh.other.service.IBannerService; |
| | | import com.dsh.other.service.ISiteBookingUseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 17:47 |
| | | */ |
| | | @Service |
| | | public class SiteBookingUseServiceImpl extends ServiceImpl<SiteBookingUseMapper, TSiteBookingUse> implements ISiteBookingUseService { |
| | | |
| | | |
| | | } |
| | |
| | | siteBooking.setHalfName(reservationSite.getHalfName()); |
| | | siteBookingService.save(siteBooking); |
| | | |
| | | |
| | | if (reservationSite.getPayType() == 1) {//微信支付 |
| | | if (money.compareTo(BigDecimal.ZERO)==0){ |
| | | siteBooking.setStatus(1); |
| | | siteBookingService.updateById(siteBooking); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("siteBooking", siteBooking.getId().toString()); |
| | | return ResultUtil.success(map); |
| | | } |
| | | if (reservationSite.getPayType() == 1 ) {//微信支付 |
| | | ResultUtil resultUtil = weChatPaymentSite(money.setScale(2, RoundingMode.HALF_EVEN).doubleValue(), siteBooking); |
| | | return resultUtil; |
| | | } |
| | |
| | | } |
| | | if (reservationSite.getPayType() == 3) {//玩湃币支付 |
| | | return playPaiCoinPaymentSite(appUser, playCoin.doubleValue(), siteBooking); |
| | | |
| | | } |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |