mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
获取积分新增字段
This commit is contained in:
@@ -104,5 +104,7 @@ public class CompetitionResult extends BaseEntity
|
|||||||
private String vsType;
|
private String vsType;
|
||||||
@ApiModelProperty(value = "比赛总分", required = false)
|
@ApiModelProperty(value = "比赛总分", required = false)
|
||||||
private Integer totalScore;
|
private Integer totalScore;
|
||||||
|
@ApiModelProperty(value = "净胜分", required = false)
|
||||||
|
private Integer netWinPoint;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.system.domain.vo;
|
package com.ruoyi.system.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -11,13 +12,26 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class CompetitionTeamIntegralVo implements Serializable {
|
public class CompetitionTeamIntegralVo implements Serializable {
|
||||||
|
@ApiModelProperty(value = "赛会ID")
|
||||||
private Long competitionId;
|
private Long competitionId;
|
||||||
|
@ApiModelProperty(value = "球队")
|
||||||
private String teamName;
|
private String teamName;
|
||||||
|
@ApiModelProperty(value = "球队Logo")
|
||||||
private String teamLogo;
|
private String teamLogo;
|
||||||
|
@ApiModelProperty(value = "胜场")
|
||||||
private Integer win;
|
private Integer win;
|
||||||
|
@ApiModelProperty(value = "负场")
|
||||||
private Integer fail;
|
private Integer fail;
|
||||||
|
@ApiModelProperty(value = "总得分")
|
||||||
private Integer totalScore;
|
private Integer totalScore;
|
||||||
|
@ApiModelProperty(value = "总输分")
|
||||||
|
private Integer totalFailScore;
|
||||||
|
@ApiModelProperty(value = "净胜分")
|
||||||
|
private Integer netWinPoint;
|
||||||
|
@ApiModelProperty(value = "积分")
|
||||||
private Integer integral;
|
private Integer integral;
|
||||||
|
@ApiModelProperty(value = "赛程类型")
|
||||||
private String vsType;
|
private String vsType;
|
||||||
|
@ApiModelProperty(value = "球队分组")
|
||||||
private String competitionGroup;
|
private String competitionGroup;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="vsResult" column="vs_result"/>
|
<result property="vsResult" column="vs_result"/>
|
||||||
<result property="vsType" column="vs_type"/>
|
<result property="vsType" column="vs_type"/>
|
||||||
<result property="integral" column="integral" />
|
<result property="integral" column="integral" />
|
||||||
|
<result property="netWinPoint" column="net_win_point"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCompetitionResultVo">
|
<sql id="selectCompetitionResultVo">
|
||||||
select id, competition_id, competition_vs_id, team_id, team_name, one_node_score, two_node_score, competition_group, status, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, three_node_score, four_node_score, five_node_score, six_node_score, integral,vs_result,competition_of_team_id,vs_result from competition_result
|
select id, competition_id, competition_vs_id,net_win_point, team_id, team_name, one_node_score, two_node_score, competition_group, status, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, three_node_score, four_node_score, five_node_score, six_node_score, integral,vs_result,competition_of_team_id,vs_result from competition_result
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCompetitionResultList" parameterType="CompetitionResult" resultMap="CompetitionResultResult">
|
<select id="selectCompetitionResultList" parameterType="CompetitionResult" resultMap="CompetitionResultResult">
|
||||||
@@ -81,7 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
rs.six_node_score as sixNodeScore,
|
rs.six_node_score as sixNodeScore,
|
||||||
rs.vs_result,
|
rs.vs_result,
|
||||||
vs.vs_type,
|
vs.vs_type,
|
||||||
rs.integral
|
rs.integral,
|
||||||
|
rs.net_win_point
|
||||||
from competition_team_vs_team vs
|
from competition_team_vs_team vs
|
||||||
inner join competition_of_team team on (vs.main_team_id=team.id or vs.guest_team_id=team.id) and team.IS_DELETED=0
|
inner join competition_of_team team on (vs.main_team_id=team.id or vs.guest_team_id=team.id) and team.IS_DELETED=0
|
||||||
left join competition_Result rs on (rs.competition_vs_id=vs.id and team.id = rs.competition_of_team_id) and rs.is_deleted=0
|
left join competition_Result rs on (rs.competition_vs_id=vs.id and team.id = rs.competition_of_team_id) and rs.is_deleted=0
|
||||||
@@ -119,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="vsResult != null ">vs_result,</if>
|
<if test="vsResult != null ">vs_result,</if>
|
||||||
<if test="vsType != null ">vs_type,</if>
|
<if test="vsType != null ">vs_type,</if>
|
||||||
<if test="competitionOfTeamId != null ">competition_of_team_id,</if>
|
<if test="competitionOfTeamId != null ">competition_of_team_id,</if>
|
||||||
|
<if test="netWinPoint != null ">net_win_point,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="competitionId != null">#{competitionId},</if>
|
<if test="competitionId != null">#{competitionId},</if>
|
||||||
@@ -143,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="vsResult != null ">#{vsResult},</if>
|
<if test="vsResult != null ">#{vsResult},</if>
|
||||||
<if test="vsType != null "> #{vsType},</if>
|
<if test="vsType != null "> #{vsType},</if>
|
||||||
<if test="competitionOfTeamId != null "> #{competitionOfTeamId},</if>
|
<if test="competitionOfTeamId != null "> #{competitionOfTeamId},</if>
|
||||||
|
<if test="netWinPoint != null "> #{netWinPoint},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -171,6 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="vsResult != null ">vs_result = #{vsResult},</if>
|
<if test="vsResult != null ">vs_result = #{vsResult},</if>
|
||||||
<if test="vsType != null "> vs_type = #{vsType},</if>
|
<if test="vsType != null "> vs_type = #{vsType},</if>
|
||||||
<if test="competitionOfTeamId != null "> competition_of_team_id = #{competitionOfTeamId},</if>
|
<if test="competitionOfTeamId != null "> competition_of_team_id = #{competitionOfTeamId},</if>
|
||||||
|
<if test="netWinPoint != null "> net_win_point = #{netWinPoint},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -246,7 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sum(IF( t.vs_result = 'win', 1, 0 )) AS win,
|
sum(IF( t.vs_result = 'win', 1, 0 )) AS win,
|
||||||
sum(IF( t.vs_result = 'fail', 1, 0 )) AS fail,
|
sum(IF( t.vs_result = 'fail', 1, 0 )) AS fail,
|
||||||
sum(IFNULL( t.one_node_score, 0 )+ IFNULL( t.two_node_score, 0 )+ IFNULL( t.three_node_score, 0 )+ IFNULL( t.four_node_score, 0 )+ IFNULL( t.five_node_score, 0 )+ IFNULL( t.six_node_score, 0 )) AS totalScore,
|
sum(IFNULL( t.one_node_score, 0 )+ IFNULL( t.two_node_score, 0 )+ IFNULL( t.three_node_score, 0 )+ IFNULL( t.four_node_score, 0 )+ IFNULL( t.five_node_score, 0 )+ IFNULL( t.six_node_score, 0 )) AS totalScore,
|
||||||
sum(t.integral) AS integral
|
sum(ifnull(t.integral,0)) AS integral ,
|
||||||
|
sum(IFNULL(t.net_win_point,0)) as netWinPoint
|
||||||
FROM competition_result t left join competition_of_team team on team.id = t.competition_of_team_id
|
FROM competition_result t left join competition_of_team team on team.id = t.competition_of_team_id
|
||||||
WHERE t.is_deleted = 0 AND t.competition_id = #{competitionId}
|
WHERE t.is_deleted = 0 AND t.competition_id = #{competitionId}
|
||||||
<if test="vsType != null ">
|
<if test="vsType != null ">
|
||||||
|
|||||||
Reference in New Issue
Block a user