ruoyi
This commit is contained in:
33
src/main/resources/mybatis/hit/CardGameRuleMapper.xml
Normal file
33
src/main/resources/mybatis/hit/CardGameRuleMapper.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?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.ruoyi.project.hit.mapper.CardGameRuleMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.project.hit.domain.CardGameRule">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="gameid" column="gameid" jdbcType="INTEGER"/>
|
||||
<result property="levelid" column="levelid" jdbcType="INTEGER"/>
|
||||
<result property="enterCount" column="enter_count" jdbcType="INTEGER"/>
|
||||
<result property="hitCount" column="hit_count" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,gameid,levelid,
|
||||
enter_count,hit_count
|
||||
</sql>
|
||||
<select id="getGameRuleListByGameId" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
card_game_rule.enter_count enterCount,
|
||||
card_game_rule.hit_count hitCount,
|
||||
card_game_rule.id,
|
||||
system_dict.dict_value dictValue
|
||||
FROM
|
||||
card_game_rule
|
||||
INNER JOIN system_dict ON card_game_rule.levelid = system_dict.dict_key AND system_dict.dict_type='userlevel'
|
||||
WHERE card_game_rule.gameid=#{id}
|
||||
</select>
|
||||
<select id="getHitCountSumByGameId" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(hit_count),0) FROM `card_game_rule` WHERE gameid=#{gameid}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user