|
@@ -7,6 +7,7 @@
|
|
<resultMap type="com.bosshand.virgo.api.workark.model.Invoice" id="result">
|
|
<resultMap type="com.bosshand.virgo.api.workark.model.Invoice" id="result">
|
|
<id column="id" property="id"/>
|
|
<id column="id" property="id"/>
|
|
<result column="invoiceModelId" property="invoiceModelId"/>
|
|
<result column="invoiceModelId" property="invoiceModelId"/>
|
|
|
|
+ <result column="providerId" property="providerId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="userId" property="userId"/>
|
|
<result column="userId" property="userId"/>
|
|
<result column="createTime" property="createTime"/>
|
|
<result column="createTime" property="createTime"/>
|
|
@@ -39,6 +40,9 @@
|
|
<if test="organizationId != 0">
|
|
<if test="organizationId != 0">
|
|
and organizationId = #{organizationId}
|
|
and organizationId = #{organizationId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="providerId != 0">
|
|
|
|
+ and providerId = #{providerId}
|
|
|
|
+ </if>
|
|
<if test="userId != 0">
|
|
<if test="userId != 0">
|
|
and userId = #{userId}
|
|
and userId = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -81,6 +85,9 @@
|
|
<if test="invoiceModelId != 0">
|
|
<if test="invoiceModelId != 0">
|
|
and invoiceModelId = #{invoiceModelId}
|
|
and invoiceModelId = #{invoiceModelId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="providerId != 0">
|
|
|
|
+ and providerId = #{providerId}
|
|
|
|
+ </if>
|
|
<if test="organizationId != 0">
|
|
<if test="organizationId != 0">
|
|
and organizationId = #{organizationId}
|
|
and organizationId = #{organizationId}
|
|
</if>
|
|
</if>
|
|
@@ -123,6 +130,9 @@
|
|
<if test="p.invoiceModelId != 0">
|
|
<if test="p.invoiceModelId != 0">
|
|
and invoiceModelId = #{p.invoiceModelId}
|
|
and invoiceModelId = #{p.invoiceModelId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="p.providerId != 0">
|
|
|
|
+ and providerId = #{p.providerId}
|
|
|
|
+ </if>
|
|
<if test="p.organizationId != 0">
|
|
<if test="p.organizationId != 0">
|
|
and organizationId = #{p.organizationId}
|
|
and organizationId = #{p.organizationId}
|
|
</if>
|
|
</if>
|
|
@@ -161,14 +171,15 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
- INSERT INTO workark_invoice (`organizationId`, `userId`, `invoiceModelId`, `createTime`, `orderNo`, `type`, `name`, `taxpayerIdentificationNumber`, `address`, `phone`, `bankAccount`, `bankAccountNumber`, `content`, `amount`, `file`)
|
|
|
|
- VALUES (#{organizationId}, #{userId}, #{invoiceModelId}, now(), #{orderNo}, #{type}, #{name}, #{taxpayerIdentificationNumber}, #{address}, #{phone}, #{bankAccount}, #{bankAccountNumber}, #{content}, #{amount}, #{file})
|
|
|
|
|
|
+ INSERT INTO workark_invoice (`providerId`, `organizationId`, `userId`, `invoiceModelId`, `createTime`, `orderNo`, `type`, `name`, `taxpayerIdentificationNumber`, `address`, `phone`, `bankAccount`, `bankAccountNumber`, `content`, `amount`, `file`)
|
|
|
|
+ VALUES (#{providerId}, #{organizationId}, #{userId}, #{invoiceModelId}, now(), #{orderNo}, #{type}, #{name}, #{taxpayerIdentificationNumber}, #{address}, #{phone}, #{bankAccount}, #{bankAccountNumber}, #{content}, #{amount}, #{file})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.workark.model.Invoice">
|
|
<update id="update" parameterType="com.bosshand.virgo.api.workark.model.Invoice">
|
|
UPDATE workark_invoice
|
|
UPDATE workark_invoice
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="invoiceModelId != 0">invoiceModelId = #{invoiceModelId},</if>
|
|
<if test="invoiceModelId != 0">invoiceModelId = #{invoiceModelId},</if>
|
|
|
|
+ <if test="providerId != 0">providerId = #{providerId},</if>
|
|
<if test="organizationId != 0">organizationId = #{organizationId},</if>
|
|
<if test="organizationId != 0">organizationId = #{organizationId},</if>
|
|
<if test="userId != 0">userId = #{userId},</if>
|
|
<if test="userId != 0">userId = #{userId},</if>
|
|
<if test="orderNo != null">orderNo = #{orderNo},</if>
|
|
<if test="orderNo != null">orderNo = #{orderNo},</if>
|