| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.integral.IntegralTaskClassMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.integral.IntegralTaskClass"> |
| | | <id column="tc_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="tc_name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="tc_picture" property="picture" jdbcType="VARCHAR"/> |
| | | <result column="tc_tip" property="tip" jdbcType="VARCHAR"/> |
| | | <result column="tc_btn_name" property="btnName" jdbcType="VARCHAR"/> |
| | | <result column="tc_params" property="params" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule_name" property="ruleName" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule" property="rule" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule_link" property="ruleLink" jdbcType="VARCHAR"/> |
| | | <result column="tc_progress" property="progress" jdbcType="VARCHAR"/> |
| | | <result column="tc_orderby" property="orderBy" jdbcType="INTEGER"/> |
| | | <result column="tc_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="tc_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="tc_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | |
| | | <result column="tc_unique_key" property="uniqueKey" typeHandler="com.yeshi.fanli.util.mybatishandler.integral.UniqueKeyEnumHandler"/> |
| | | <association property="jumpDetail" column="tc_jump_id" |
| | | select="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultVOMap" type="com.yeshi.fanli.vo.integral.IntegralTaskClassVO"> |
| | | <id column="tc_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="tc_name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="tc_picture" property="picture" jdbcType="VARCHAR"/> |
| | | <result column="tc_tip" property="tip" jdbcType="VARCHAR"/> |
| | | <result column="tc_btn_name" property="btnName" jdbcType="VARCHAR"/> |
| | | <result column="tc_params" property="params" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule_name" property="ruleName" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule" property="rule" jdbcType="VARCHAR"/> |
| | | <result column="tc_rule_link" property="ruleLink" jdbcType="VARCHAR"/> |
| | | <result column="tc_progress" property="progress" jdbcType="VARCHAR"/> |
| | | <result column="tc_orderby" property="orderBy" jdbcType="INTEGER"/> |
| | | <result column="tc_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="tc_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="tc_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | |
| | | <result column="totalCoin" property="totalCoin" jdbcType="INTEGER"/> |
| | | <result column="taskNum" property="taskNum" jdbcType="INTEGER"/> |
| | | |
| | | <result column="tc_unique_key" property="uniqueKey" typeHandler="com.yeshi.fanli.util.mybatishandler.integral.UniqueKeyEnumHandler"/> |
| | | <association property="jumpDetail" column="tc_jump_id" |
| | | select="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">tc_id,tc_name,tc_picture,tc_unique_key,tc_tip,tc_btn_name,tc_jump_id,tc_params,tc_rule_name,tc_rule,tc_rule_link,tc_progress,tc_orderby,tc_state,tc_create_time,tc_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_integral_task_class where tc_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_integral_task_class where tc_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_integral_task_class (tc_id,tc_name,tc_picture,tc_unique_key,tc_tip,tc_btn_name,tc_jump_id,tc_params,tc_rule_name,tc_rule,tc_rule_link,tc_progress,tc_orderby,tc_state,tc_create_time,tc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uniqueKey,jdbcType=VARCHAR},#{tip,jdbcType=VARCHAR},#{btnName,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{ruleName,jdbcType=VARCHAR},#{rule,jdbcType=VARCHAR},#{ruleLink,jdbcType=VARCHAR},#{progress,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_integral_task_class |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">tc_id,</if> |
| | | <if test="name != null">tc_name,</if> |
| | | <if test="picture != null">tc_picture,</if> |
| | | <if test="uniqueKey != null">tc_unique_key,</if> |
| | | <if test="tip != null">tc_tip,</if> |
| | | <if test="btnName != null">tc_btn_name,</if> |
| | | <if test="jumpDetail != null">tc_jump_id,</if> |
| | | <if test="params != null">tc_params,</if> |
| | | <if test="ruleName != null">tc_rule_name,</if> |
| | | <if test="rule != null">tc_rule,</if> |
| | | <if test="ruleLink != null">tc_rule_link,</if> |
| | | <if test="progress != null">tc_progress,</if> |
| | | <if test="orderBy != null">tc_orderby,</if> |
| | | <if test="state != null">tc_state,</if> |
| | | <if test="createTime != null">tc_create_time,</if> |
| | | <if test="updateTime != null">tc_update_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uniqueKey != null">#{uniqueKey,jdbcType=VARCHAR},</if> |
| | | <if test="tip != null">#{tip,jdbcType=VARCHAR},</if> |
| | | <if test="btnName != null">#{btnName,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if> |
| | | <if test="ruleName != null">#{ruleName,jdbcType=VARCHAR},</if> |
| | | <if test="rule != null">#{rule,jdbcType=VARCHAR},</if> |
| | | <if test="ruleLink != null">#{ruleLink,jdbcType=VARCHAR},</if> |
| | | <if test="progress != null">#{progress,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass">update yeshi_ec_integral_task_class set tc_name = #{name,jdbcType=VARCHAR},tc_picture = #{picture,jdbcType=VARCHAR},tc_unique_key = #{uniqueKey,jdbcType=VARCHAR},tc_tip = #{tip,jdbcType=VARCHAR},tc_btn_name = #{btnName,jdbcType=VARCHAR},tc_jump_id = #{jumpDetail.id,jdbcType=BIGINT},tc_params = #{params,jdbcType=VARCHAR},tc_rule_name = #{ruleName,jdbcType=VARCHAR},tc_rule = #{rule,jdbcType=VARCHAR},tc_rule_link = #{ruleLink,jdbcType=VARCHAR},tc_progress = #{progress,jdbcType=VARCHAR},tc_orderby = #{orderBy,jdbcType=INTEGER},tc_state = #{state,jdbcType=INTEGER},tc_create_time = #{createTime,jdbcType=TIMESTAMP},tc_update_time = #{updateTime,jdbcType=TIMESTAMP} where tc_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass">update yeshi_ec_integral_task_class |
| | | <set> |
| | | <if test="name != null">tc_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">tc_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uniqueKey != null">tc_unique_key=#{uniqueKey,jdbcType=VARCHAR},</if> |
| | | <if test="tip != null">tc_tip=#{tip,jdbcType=VARCHAR},</if> |
| | | <if test="btnName != null">tc_btn_name=#{btnName,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">tc_jump_id=#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">tc_params=#{params,jdbcType=VARCHAR},</if> |
| | | <if test="ruleName != null">tc_rule_name=#{ruleName,jdbcType=VARCHAR},</if> |
| | | <if test="rule != null">tc_rule=#{rule,jdbcType=VARCHAR},</if> |
| | | <if test="ruleLink != null">tc_rule_link=#{ruleLink,jdbcType=VARCHAR},</if> |
| | | <if test="progress != null">tc_progress=#{progress,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">tc_orderby=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="state != null">tc_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">tc_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">tc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where tc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="getIntegralTaskClassVO" resultMap="BaseResultVOMap"> |
| | | SELECT * FROM `yeshi_ec_integral_task_class` c |
| | | LEFT JOIN (SELECT t.`it_cid` AS cid,SUM(t.`it_gold_coin` * (IFNULL(t.`it_upper_limit`,1)))AS totalCoin,SUM(t.`it_upper_limit`) AS taskNum |
| | | FROM yeshi_ec_integral_task t |
| | | WHERE t.`it_state` = 1 GROUP BY t.`it_cid`)ta ON ta.cid = c.`tc_id` |
| | | WHERE c.`tc_state` = 1 |
| | | ORDER BY c.`tc_orderby` |
| | | LIMIT #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countTaskClass" resultType="Long"> |
| | | SELECT IFNULL(COUNT(c.`tc_id`),0) FROM `yeshi_ec_integral_task_class` c |
| | | WHERE c.`tc_state` = 1 |
| | | </select> |
| | | |
| | | <select id="getByUniqueKey" resultMap="BaseResultMap"> |
| | | SELECT * FROM `yeshi_ec_integral_task_class` |
| | | WHERE tc_unique_key = #{uniqueKey} |
| | | </select> |
| | | |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.integral.IntegralTaskClass"> |
| | | <id column="tc_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="tc_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="tc_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="tc_tip" property="tip" jdbcType="VARCHAR" /> |
| | | <result column="tc_btn_name" property="btnName" jdbcType="VARCHAR" /> |
| | | <result column="tc_params" property="params" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule_name" property="ruleName" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule" property="rule" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule_link" property="ruleLink" jdbcType="VARCHAR" /> |
| | | <result column="tc_progress" property="progress" jdbcType="VARCHAR" /> |
| | | <result column="tc_orderby" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="tc_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="tc_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="tc_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | |
| | | <result column="tc_unique_key" property="uniqueKey" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.integral.UniqueKeyEnumHandler" /> |
| | | <association property="jumpDetail" column="tc_jump_id" |
| | | select="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultVOMap" |
| | | type="com.yeshi.fanli.vo.integral.IntegralTaskClassVO"> |
| | | <id column="tc_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="tc_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="tc_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="tc_tip" property="tip" jdbcType="VARCHAR" /> |
| | | <result column="tc_btn_name" property="btnName" jdbcType="VARCHAR" /> |
| | | <result column="tc_params" property="params" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule_name" property="ruleName" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule" property="rule" jdbcType="VARCHAR" /> |
| | | <result column="tc_rule_link" property="ruleLink" jdbcType="VARCHAR" /> |
| | | <result column="tc_progress" property="progress" jdbcType="VARCHAR" /> |
| | | <result column="tc_orderby" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="tc_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="tc_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="tc_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | |
| | | <result column="totalCoin" property="totalCoin" jdbcType="INTEGER" /> |
| | | <result column="taskNum" property="taskNum" jdbcType="INTEGER" /> |
| | | |
| | | <result column="tc_unique_key" property="uniqueKey" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.integral.UniqueKeyEnumHandler" /> |
| | | <association property="jumpDetail" column="tc_jump_id" |
| | | select="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">tc_id,tc_name,tc_picture,tc_unique_key,tc_tip,tc_btn_name,tc_jump_id,tc_params,tc_rule_name,tc_rule,tc_rule_link,tc_progress,tc_orderby,tc_state,tc_create_time,tc_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_integral_task_class where tc_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_integral_task_class where tc_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_integral_task_class |
| | | (tc_id,tc_name,tc_picture,tc_unique_key,tc_tip,tc_btn_name,tc_jump_id,tc_params,tc_rule_name,tc_rule,tc_rule_link,tc_progress,tc_orderby,tc_state,tc_create_time,tc_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uniqueKey,jdbcType=VARCHAR},#{tip,jdbcType=VARCHAR},#{btnName,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{ruleName,jdbcType=VARCHAR},#{rule,jdbcType=VARCHAR},#{ruleLink,jdbcType=VARCHAR},#{progress,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_integral_task_class |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">tc_id,</if> |
| | | <if test="name != null">tc_name,</if> |
| | | <if test="picture != null">tc_picture,</if> |
| | | <if test="uniqueKey != null">tc_unique_key,</if> |
| | | <if test="tip != null">tc_tip,</if> |
| | | <if test="btnName != null">tc_btn_name,</if> |
| | | <if test="jumpDetail != null">tc_jump_id,</if> |
| | | <if test="params != null">tc_params,</if> |
| | | <if test="ruleName != null">tc_rule_name,</if> |
| | | <if test="rule != null">tc_rule,</if> |
| | | <if test="ruleLink != null">tc_rule_link,</if> |
| | | <if test="progress != null">tc_progress,</if> |
| | | <if test="orderBy != null">tc_orderby,</if> |
| | | <if test="state != null">tc_state,</if> |
| | | <if test="createTime != null">tc_create_time,</if> |
| | | <if test="updateTime != null">tc_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uniqueKey != null">#{uniqueKey,jdbcType=VARCHAR},</if> |
| | | <if test="tip != null">#{tip,jdbcType=VARCHAR},</if> |
| | | <if test="btnName != null">#{btnName,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if> |
| | | <if test="ruleName != null">#{ruleName,jdbcType=VARCHAR},</if> |
| | | <if test="rule != null">#{rule,jdbcType=VARCHAR},</if> |
| | | <if test="ruleLink != null">#{ruleLink,jdbcType=VARCHAR},</if> |
| | | <if test="progress != null">#{progress,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass">update |
| | | yeshi_ec_integral_task_class set tc_name = |
| | | #{name,jdbcType=VARCHAR},tc_picture = |
| | | #{picture,jdbcType=VARCHAR},tc_unique_key = |
| | | #{uniqueKey,jdbcType=VARCHAR},tc_tip = |
| | | #{tip,jdbcType=VARCHAR},tc_btn_name = |
| | | #{btnName,jdbcType=VARCHAR},tc_jump_id = |
| | | #{jumpDetail.id,jdbcType=BIGINT},tc_params = |
| | | #{params,jdbcType=VARCHAR},tc_rule_name = |
| | | #{ruleName,jdbcType=VARCHAR},tc_rule = |
| | | #{rule,jdbcType=VARCHAR},tc_rule_link = |
| | | #{ruleLink,jdbcType=VARCHAR},tc_progress = |
| | | #{progress,jdbcType=VARCHAR},tc_orderby = |
| | | #{orderBy,jdbcType=INTEGER},tc_state = |
| | | #{state,jdbcType=INTEGER},tc_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},tc_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where tc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.integral.IntegralTaskClass"> |
| | | update yeshi_ec_integral_task_class |
| | | <set> |
| | | <if test="name != null">tc_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">tc_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uniqueKey != null">tc_unique_key=#{uniqueKey,jdbcType=VARCHAR},</if> |
| | | <if test="tip != null">tc_tip=#{tip,jdbcType=VARCHAR},</if> |
| | | <if test="btnName != null">tc_btn_name=#{btnName,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">tc_jump_id=#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">tc_params=#{params,jdbcType=VARCHAR},</if> |
| | | <if test="ruleName != null">tc_rule_name=#{ruleName,jdbcType=VARCHAR},</if> |
| | | <if test="rule != null">tc_rule=#{rule,jdbcType=VARCHAR},</if> |
| | | <if test="ruleLink != null">tc_rule_link=#{ruleLink,jdbcType=VARCHAR},</if> |
| | | <if test="progress != null">tc_progress=#{progress,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">tc_orderby=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="state != null">tc_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">tc_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">tc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where tc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="getIntegralTaskClassVO" resultMap="BaseResultVOMap"> |
| | | SELECT * FROM `yeshi_ec_integral_task_class` c |
| | | LEFT JOIN (SELECT t.`it_cid` AS cid,SUM(t.`it_gold_coin` * |
| | | (IFNULL(t.`it_upper_limit`,1)))AS totalCoin,SUM(t.`it_upper_limit`) AS |
| | | taskNum |
| | | FROM yeshi_ec_integral_task t |
| | | WHERE t.`it_state` = 1 GROUP BY t.`it_cid`)ta ON ta.cid = c.`tc_id` |
| | | WHERE c.`tc_state` = 1 |
| | | ORDER BY c.`tc_orderby` |
| | | LIMIT #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countTaskClass" resultType="Long"> |
| | | SELECT IFNULL(COUNT(c.`tc_id`),0) FROM `yeshi_ec_integral_task_class` c |
| | | WHERE c.`tc_state` = 1 |
| | | </select> |
| | | |
| | | <select id="getByUniqueKey" resultMap="BaseResultMap"> |
| | | SELECT * FROM `yeshi_ec_integral_task_class` |
| | | WHERE tc_unique_key = #{uniqueKey} |
| | | </select> |
| | | |
| | | </mapper> |