|
|
@@ -0,0 +1,255 @@
|
|
|
+<?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.goafanti.common.dao.FinanceCountMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.FinanceCount">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
+ <result column="order_count" jdbcType="INTEGER" property="orderCount" />
|
|
|
+ <result column="order_unaudited_count" jdbcType="INTEGER" property="orderUnauditedCount" />
|
|
|
+ <result column="expense_count" jdbcType="INTEGER" property="expenseCount" />
|
|
|
+ <result column="expense_unaudited_count" jdbcType="INTEGER" property="expenseUnauditedCount" />
|
|
|
+ <result column="invoice_count" jdbcType="INTEGER" property="invoiceCount" />
|
|
|
+ <result column="invoice_unaudited_count" jdbcType="INTEGER" property="invoiceUnauditedCount" />
|
|
|
+ <result column="member_count" jdbcType="INTEGER" property="memberCount" />
|
|
|
+ <result column="member_unaudited_count" jdbcType="INTEGER" property="memberUnauditedCount" />
|
|
|
+ <result column="payment_count" jdbcType="INTEGER" property="paymentCount" />
|
|
|
+ <result column="payment_unaudited_count" jdbcType="INTEGER" property="paymentUnauditedCount" />
|
|
|
+ <result column="public_release_count" jdbcType="INTEGER" property="publicReleaseCount" />
|
|
|
+ <result column="date_time" jdbcType="DATE" property="dateTime" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, aid, order_count, order_unaudited_count, expense_count, expense_unaudited_count,
|
|
|
+ invoice_count, invoice_unaudited_count, member_count, member_unaudited_count, payment_count,
|
|
|
+ payment_unaudited_count, public_release_count, date_time, create_time
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from finance_count
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from finance_count
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.FinanceCount" useGeneratedKeys="true">
|
|
|
+ insert into finance_count (aid, order_count, order_unaudited_count,
|
|
|
+ expense_count, expense_unaudited_count, invoice_count,
|
|
|
+ invoice_unaudited_count, member_count, member_unaudited_count,
|
|
|
+ payment_count, payment_unaudited_count, public_release_count,
|
|
|
+ date_time, create_time)
|
|
|
+ values (#{aid,jdbcType=VARCHAR}, #{orderCount,jdbcType=INTEGER}, #{orderUnauditedCount,jdbcType=INTEGER},
|
|
|
+ #{expenseCount,jdbcType=INTEGER}, #{expenseUnauditedCount,jdbcType=INTEGER}, #{invoiceCount,jdbcType=INTEGER},
|
|
|
+ #{invoiceUnauditedCount,jdbcType=INTEGER}, #{memberCount,jdbcType=INTEGER}, #{memberUnauditedCount,jdbcType=INTEGER},
|
|
|
+ #{paymentCount,jdbcType=INTEGER}, #{paymentUnauditedCount,jdbcType=INTEGER}, #{publicReleaseCount,jdbcType=INTEGER},
|
|
|
+ #{dateTime,jdbcType=DATE}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.FinanceCount" useGeneratedKeys="true">
|
|
|
+ insert into finance_count
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
+ <if test="orderCount != null">
|
|
|
+ order_count,
|
|
|
+ </if>
|
|
|
+ <if test="orderUnauditedCount != null">
|
|
|
+ order_unaudited_count,
|
|
|
+ </if>
|
|
|
+ <if test="expenseCount != null">
|
|
|
+ expense_count,
|
|
|
+ </if>
|
|
|
+ <if test="expenseUnauditedCount != null">
|
|
|
+ expense_unaudited_count,
|
|
|
+ </if>
|
|
|
+ <if test="invoiceCount != null">
|
|
|
+ invoice_count,
|
|
|
+ </if>
|
|
|
+ <if test="invoiceUnauditedCount != null">
|
|
|
+ invoice_unaudited_count,
|
|
|
+ </if>
|
|
|
+ <if test="memberCount != null">
|
|
|
+ member_count,
|
|
|
+ </if>
|
|
|
+ <if test="memberUnauditedCount != null">
|
|
|
+ member_unaudited_count,
|
|
|
+ </if>
|
|
|
+ <if test="paymentCount != null">
|
|
|
+ payment_count,
|
|
|
+ </if>
|
|
|
+ <if test="paymentUnauditedCount != null">
|
|
|
+ payment_unaudited_count,
|
|
|
+ </if>
|
|
|
+ <if test="publicReleaseCount != null">
|
|
|
+ public_release_count,
|
|
|
+ </if>
|
|
|
+ <if test="dateTime != null">
|
|
|
+ date_time,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderCount != null">
|
|
|
+ #{orderCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderUnauditedCount != null">
|
|
|
+ #{orderUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseCount != null">
|
|
|
+ #{expenseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseUnauditedCount != null">
|
|
|
+ #{expenseUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceCount != null">
|
|
|
+ #{invoiceCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceUnauditedCount != null">
|
|
|
+ #{invoiceUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberCount != null">
|
|
|
+ #{memberCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberUnauditedCount != null">
|
|
|
+ #{memberUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentCount != null">
|
|
|
+ #{paymentCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentUnauditedCount != null">
|
|
|
+ #{paymentUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="publicReleaseCount != null">
|
|
|
+ #{publicReleaseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="dateTime != null">
|
|
|
+ #{dateTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.FinanceCount">
|
|
|
+ update finance_count
|
|
|
+ <set>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderCount != null">
|
|
|
+ order_count = #{orderCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderUnauditedCount != null">
|
|
|
+ order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseCount != null">
|
|
|
+ expense_count = #{expenseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseUnauditedCount != null">
|
|
|
+ expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceCount != null">
|
|
|
+ invoice_count = #{invoiceCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceUnauditedCount != null">
|
|
|
+ invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberCount != null">
|
|
|
+ member_count = #{memberCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberUnauditedCount != null">
|
|
|
+ member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentCount != null">
|
|
|
+ payment_count = #{paymentCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentUnauditedCount != null">
|
|
|
+ payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="publicReleaseCount != null">
|
|
|
+ public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="dateTime != null">
|
|
|
+ date_time = #{dateTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.FinanceCount">
|
|
|
+ update finance_count
|
|
|
+ set aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ order_count = #{orderCount,jdbcType=INTEGER},
|
|
|
+ order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
|
|
|
+ expense_count = #{expenseCount,jdbcType=INTEGER},
|
|
|
+ expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
|
|
|
+ invoice_count = #{invoiceCount,jdbcType=INTEGER},
|
|
|
+ invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
|
|
|
+ member_count = #{memberCount,jdbcType=INTEGER},
|
|
|
+ member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
|
|
|
+ payment_count = #{paymentCount,jdbcType=INTEGER},
|
|
|
+ payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
|
|
|
+ public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
|
|
|
+ date_time = #{dateTime,jdbcType=DATE},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByAidAndDates">
|
|
|
+ update finance_count
|
|
|
+ <set>
|
|
|
+
|
|
|
+ <if test="orderCount != null">
|
|
|
+ order_count = #{orderCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderUnauditedCount != null">
|
|
|
+ order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseCount != null">
|
|
|
+ expense_count = #{expenseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="expenseUnauditedCount != null">
|
|
|
+ expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceCount != null">
|
|
|
+ invoice_count = #{invoiceCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceUnauditedCount != null">
|
|
|
+ invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberCount != null">
|
|
|
+ member_count = #{memberCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberUnauditedCount != null">
|
|
|
+ member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentCount != null">
|
|
|
+ payment_count = #{paymentCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentUnauditedCount != null">
|
|
|
+ payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="publicReleaseCount != null">
|
|
|
+ public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where aid = #{aid,jdbcType=VARCHAR} and date_time = #{dateTime}
|
|
|
+
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectByAidAndDates" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from finance_count
|
|
|
+ where aid = #{aid} and date_time = #{startTime}
|
|
|
+ </select>
|
|
|
+</mapper>
|