|
@@ -175,4 +175,36 @@
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectShareNumber" resultType="java.lang.Long">
|
|
|
|
|
+ SELECT COUNT(1)
|
|
|
|
|
+ FROM dkic_a.t_mst_integral_share tmis
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="cpId != null and cpId != ''">
|
|
|
|
|
+ AND tmis.cp_id = #{cpId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="tacticId != null and tacticId != ''">
|
|
|
|
|
+ AND tmis.tactic_id = #{tacticId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
|
+ AND tmis.user_id = #{userId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="shareDate != null">
|
|
|
|
|
+ AND tmis.share_date = #{shareDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endDate != null">
|
|
|
|
|
+ AND tmis.end_date = #{endDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="flgValid != null">
|
|
|
|
|
+ AND tmis.flg_valid = #{flgValid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="shareDateFlag != null and shareDateFlag ">
|
|
|
|
|
+ AND tmis.share_date >= NOW() - INTERVAL '1 DAY'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="integralType != null and integralType != ''">
|
|
|
|
|
+ AND tmis.integral_type = #{integralType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ AND tmis.end_date > now()
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|