| | |
| | | @ApiOperation(value = "获取已报名赛事列表", tags = {"APP-赛事活动列表"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "类型(0=全部,1=未开始,2=进行中,3=已结束,4=已取消)", name = "type", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageSize", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "页条数", name = "pageNo", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNo", dataType = "int", required = true), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<CompetitionListVo>> queryMyCompetitionList(Integer type, Integer pageSize, Integer pageNo){ |
| | |
| | | paymentCompetition.setPayStatus(3); |
| | | paymentCompetition.setRefundTime(new Date()); |
| | | paymentCompetition.setRefundOrderNo(refund_id); |
| | | paymentCompetition.setAppUserId(null); |
| | | paymentCompetitionService.updateById(paymentCompetition); |
| | | |
| | | Competition competition = cttService.getById(paymentCompetition.getCompetitionId()); |
| | |
| | | private List<ParticipantVo> participant; |
| | | @ApiModelProperty("状态(1=未开始,2=进行中,3=已结束,4=已取消)") |
| | | private Integer status; |
| | | @ApiModelProperty("支付金额") |
| | | private Double payMoney; |
| | | @ApiModelProperty("支付方式(1=微信,2=支付宝,3=玩湃币,4=课时)") |
| | | private Integer payType; |
| | | } |
| | |
| | | @ApiModel |
| | | public class CompetitionListVo { |
| | | @ApiModelProperty("赛事id") |
| | | private Integer id; |
| | | private Long id; |
| | | @ApiModelProperty("赛事名称") |
| | | private String name; |
| | | @ApiModelProperty("赛事封面") |
| | |
| | | paymentCompetition.setPayType(paymentCompetitionVo.getPayType()); |
| | | paymentCompetition.setAmount(money.doubleValue()); |
| | | paymentCompetition.setPayStatus(1); |
| | | paymentCompetition.setState(1); |
| | | paymentCompetition.setInsertTime(new Date()); |
| | | paymentCompetitionService.save(paymentCompetition); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public List<CompetitionListVo> queryMyCompetitionList(Integer uid, Integer type, Integer pageSize, Integer pageNo) throws Exception { |
| | | pageSize = (pageSize - 1) * pageNo; |
| | | pageNo = (pageNo - 1) * pageSize; |
| | | if(0 == type){ |
| | | type = null; |
| | | } |
| | |
| | | if(paymentCompetition.getPayStatus() == 3){ |
| | | competitionInfo.setStatus(4); |
| | | } |
| | | competitionInfo.setPayMoney(paymentCompetition.getAmount()); |
| | | competitionInfo.setPayType(paymentCompetition.getPayType()); |
| | | return competitionInfo; |
| | | } |
| | | |
| | |
| | | paymentCompetition.setRefundOrderNo(refund_id); |
| | | paymentCompetition.setRefundTime(new Date()); |
| | | paymentCompetition.setPayStatus(3); |
| | | paymentCompetition.setAppUserId(null); |
| | | this.updateById(paymentCompetition); |
| | | |
| | | competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); |
| | |
| | | paymentCompetition.setRefundOrderNo(""); |
| | | paymentCompetition.setRefundTime(new Date()); |
| | | paymentCompetition.setPayStatus(3); |
| | | paymentCompetition.setAppUserId(null); |
| | | this.updateById(paymentCompetition); |
| | | |
| | | competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); |
| | |
| | | paymentCompetition.setRefundOrderNo(""); |
| | | paymentCompetition.setRefundTime(new Date()); |
| | | paymentCompetition.setPayStatus(3); |
| | | paymentCompetition.setAppUserId(null); |
| | | this.updateById(paymentCompetition); |
| | | |
| | | competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); |
| | |
| | | where a.state = 1 and a.appUserId = #{uid} and a.payStatus != 1 |
| | | <!--1=未开始,2=进行中,3=已结束,4=已取消--> |
| | | <if test="null != type and 1 == type"> |
| | | and b.status = 1 |
| | | and b.status = 1 and a.payStatus = 2 |
| | | </if> |
| | | <if test="null != type and 2 == type"> |
| | | and b.status = 2 |
| | | and b.status = 2 and a.payStatus = 2 |
| | | </if> |
| | | <if test="null != type and 3 == type"> |
| | | and b.status = 3 |
| | | and b.status = 3 and a.payStatus = 2 |
| | | </if> |
| | | <if test="null != type and 4 == type"> |
| | | and a.payStatus = 3 |
| | | </if> |
| | | order by a.insertTime desc limit #{pageSize}, #{pageNo} |
| | | order by a.insertTime desc limit #{pageNo}, #{pageSize} |
| | | </select> |
| | | </mapper> |
| | |
| | | * @since 2023-07-03 |
| | | */ |
| | | public interface FrequentlyAskedQuestionsMapper extends BaseMapper<FrequentlyAskedQuestions> { |
| | | |
| | | } |
| | |
| | | int hour = e.get(Calendar.HOUR_OF_DAY); |
| | | int minute = e.get(Calendar.MINUTE); |
| | | List<QuerySiteTimes> list = new ArrayList<>(); |
| | | SimpleDateFormat sdfs = new SimpleDateFormat("HH:mm"); |
| | | while (true){ |
| | | int s_hour = s.get(Calendar.HOUR_OF_DAY); |
| | | int s_minute = s.get(Calendar.MINUTE); |
| | | String start = s_hour + ":" + s_minute; |
| | | String start = sdfs.format(s.getTime()); |
| | | |
| | | s.set(Calendar.MINUTE, s.get(Calendar.MINUTE) + 30); |
| | | int e_hour = s.get(Calendar.HOUR_OF_DAY); |
| | | int e_minute = s.get(Calendar.MINUTE); |
| | | String end = e_hour + ":" + e_minute; |
| | | String end = sdfs.format(e.getTime()); |
| | | |
| | | QuerySiteTimes querySiteTimes = new QuerySiteTimes(); |
| | | querySiteTimes.setTime(start + "-" + end); |
| | |
| | | left join t_site_type c on (a.siteTypeId = c.id) |
| | | where a.state = 1 |
| | | <if test="null != item.startTime and '' != item.startTime and null != item.endTime and '' != item.endTime"> |
| | | and CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', a.appointmentStartTime)) <= CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.startTime})) and CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', a.appointmentEndTime)) >= CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.endTime})) |
| | | and CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', a.appointmentStartTime) <= CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', #{item.startTime}) and CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', a.appointmentEndTime) >= CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', #{item.endTime}) |
| | | </if> |
| | | <if test="null != item.siteTypeId"> |
| | | and a.siteTypeId = #{item.siteTypeId} |