puzhibing
2023-07-27 f281d329a6fe9e61b8ff8f43cc9c7fcd0d5753cb
同步代码
9个文件已修改
37 ■■■■■ 已修改文件
cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/java/com/dsh/competition/model/CompetitionInfo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/java/com/dsh/competition/model/CompetitionListVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/resources/mapper/PaymentCompetitionMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/mapper/FrequentlyAskedQuestionsMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/resources/mapper/SiteMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java
@@ -287,8 +287,8 @@
    @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){
@@ -363,6 +363,7 @@
                    paymentCompetition.setPayStatus(3);
                    paymentCompetition.setRefundTime(new Date());
                    paymentCompetition.setRefundOrderNo(refund_id);
                    paymentCompetition.setAppUserId(null);
                    paymentCompetitionService.updateById(paymentCompetition);
                    Competition competition = cttService.getById(paymentCompetition.getCompetitionId());
cloud-server-competition/src/main/java/com/dsh/competition/model/CompetitionInfo.java
@@ -63,4 +63,8 @@
    private List<ParticipantVo> participant;
    @ApiModelProperty("状态(1=未开始,2=进行中,3=已结束,4=已取消)")
    private Integer status;
    @ApiModelProperty("支付金额")
    private Double payMoney;
    @ApiModelProperty("支付方式(1=微信,2=支付宝,3=玩湃币,4=课时)")
    private Integer payType;
}
cloud-server-competition/src/main/java/com/dsh/competition/model/CompetitionListVo.java
@@ -12,7 +12,7 @@
@ApiModel
public class CompetitionListVo {
    @ApiModelProperty("赛事id")
    private Integer id;
    private Long id;
    @ApiModelProperty("赛事名称")
    private String name;
    @ApiModelProperty("赛事封面")
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java
@@ -203,6 +203,7 @@
        paymentCompetition.setPayType(paymentCompetitionVo.getPayType());
        paymentCompetition.setAmount(money.doubleValue());
        paymentCompetition.setPayStatus(1);
        paymentCompetition.setState(1);
        paymentCompetition.setInsertTime(new Date());
        paymentCompetitionService.save(paymentCompetition);
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
@@ -81,7 +81,7 @@
     */
    @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;
        }
@@ -143,6 +143,8 @@
        if(paymentCompetition.getPayStatus() == 3){
            competitionInfo.setStatus(4);
        }
        competitionInfo.setPayMoney(paymentCompetition.getAmount());
        competitionInfo.setPayType(paymentCompetition.getPayType());
        return competitionInfo;
    }
@@ -187,6 +189,7 @@
            paymentCompetition.setRefundOrderNo(refund_id);
            paymentCompetition.setRefundTime(new Date());
            paymentCompetition.setPayStatus(3);
            paymentCompetition.setAppUserId(null);
            this.updateById(paymentCompetition);
            competition.setApplicantsNumber(competition.getApplicantsNumber() - 1);
@@ -200,6 +203,7 @@
            paymentCompetition.setRefundOrderNo("");
            paymentCompetition.setRefundTime(new Date());
            paymentCompetition.setPayStatus(3);
            paymentCompetition.setAppUserId(null);
            this.updateById(paymentCompetition);
            competition.setApplicantsNumber(competition.getApplicantsNumber() - 1);
@@ -220,6 +224,7 @@
            paymentCompetition.setRefundOrderNo("");
            paymentCompetition.setRefundTime(new Date());
            paymentCompetition.setPayStatus(3);
            paymentCompetition.setAppUserId(null);
            this.updateById(paymentCompetition);
            competition.setApplicantsNumber(competition.getApplicantsNumber() - 1);
cloud-server-competition/src/main/resources/mapper/PaymentCompetitionMapper.xml
@@ -20,17 +20,17 @@
        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>
cloud-server-other/src/main/java/com/dsh/other/mapper/FrequentlyAskedQuestionsMapper.java
@@ -12,5 +12,4 @@
 * @since 2023-07-03
 */
public interface FrequentlyAskedQuestionsMapper extends BaseMapper<FrequentlyAskedQuestions> {
}
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -134,15 +134,14 @@
        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);
cloud-server-other/src/main/resources/mapper/SiteMapper.xml
@@ -19,7 +19,7 @@
        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)) &lt;=  CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.startTime})) and CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', a.appointmentEndTime)) &gt;=  CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.endTime}))
            and CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', a.appointmentStartTime) &lt;=  CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', #{item.startTime}) and CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', a.appointmentEndTime) &gt;=  CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' ', #{item.endTime})
        </if>
        <if test="null != item.siteTypeId">
            and a.siteTypeId = #{item.siteTypeId}