|
@@ -24,105 +24,43 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<insert id="insertBaseSupplier" parameterType="com.ozs.base.domain.BaseSupplier">
|
|
|
- insert into base_supplier (
|
|
|
- <if test="supplierName != null and supplierName != '' ">
|
|
|
- supplier_name,
|
|
|
- </if>
|
|
|
- <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != '' ">
|
|
|
- supplier_responsible_person,
|
|
|
- </if>
|
|
|
- <if test="supplierAddress != null and supplierAddress != '' ">
|
|
|
- supplier_address,
|
|
|
- </if>
|
|
|
- <if test="supplierType != null and supplierType != '' ">
|
|
|
- supplier_type,
|
|
|
- </if>
|
|
|
- <if test="supplierState != null and supplierState != ''">
|
|
|
- supplier_state,
|
|
|
- </if>
|
|
|
- <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != ''">
|
|
|
- supplier_advance_purchase,
|
|
|
- </if>
|
|
|
- <if test="postalCode != null and postalCode != ''">
|
|
|
- postal_code,
|
|
|
- </if>
|
|
|
- <if test="projectPerson != null and projectPerson != ''">
|
|
|
- project_person,
|
|
|
- </if>
|
|
|
- <if test="telephone != null and telephone != ''">
|
|
|
- telephone,
|
|
|
- </if>
|
|
|
- <if test="bankAccountName != null and bankAccountName != ''">
|
|
|
- bank_account_name,
|
|
|
- </if>
|
|
|
- <if test="bankOfDeposit != null and bankOfDeposit != ''">
|
|
|
- bank_of_deposit,
|
|
|
- </if>
|
|
|
- <if test="bankAccountNumber != null and bankAccountNumber != ''">
|
|
|
- bank_account_number,
|
|
|
- </if>
|
|
|
- <if test="created != null and created != ''">
|
|
|
- created,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="updated != null and updated != ''">
|
|
|
- updated,
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time
|
|
|
- </if>
|
|
|
- ) values (
|
|
|
- <if test="supplierName != null and supplierName != ''">
|
|
|
- #{supplierName},
|
|
|
- </if>
|
|
|
- <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
|
|
|
- #{supplierResponsiblePerson},
|
|
|
- </if>
|
|
|
- <if test="supplierAddress != null and supplierAddress != ''">
|
|
|
- #{supplierAddress},
|
|
|
- </if>
|
|
|
- <if test="supplierType != null and supplierType != ''">
|
|
|
- #{supplierType},
|
|
|
- </if>
|
|
|
- <if test="supplierState != null and supplierState != ''">
|
|
|
- #{supplierState},
|
|
|
- </if>
|
|
|
- <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != ''">
|
|
|
- #{supplierAdvancePurchase},
|
|
|
- </if>
|
|
|
- <if test="postalCode != null and postalCode != ''">
|
|
|
- #{postalCode},
|
|
|
- </if>
|
|
|
- <if test="projectPerson != null and projectPerson != ''">
|
|
|
- #{projectPerson},
|
|
|
- </if>
|
|
|
- <if test="telephone != null and telephone != ''">
|
|
|
- #{telephone},
|
|
|
- </if>
|
|
|
- <if test="bankAccountName != null and bankAccountName != ''">
|
|
|
- #{bankAccountName},
|
|
|
- </if>
|
|
|
- <if test="bankOfDeposit != null and bankOfDeposit != ''">
|
|
|
- #{bankOfDeposit},
|
|
|
- </if>
|
|
|
- <if test="bankAccountNumber != null and bankAccountNumber != ''">
|
|
|
- #{bankAccountNumber},
|
|
|
- </if>
|
|
|
- <if test="created != null and created != ''">
|
|
|
- #{created},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime},
|
|
|
- </if>
|
|
|
- <if test="updated != null and updated != ''">
|
|
|
- #{updated},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- #{updateTime}
|
|
|
- </if>
|
|
|
- )
|
|
|
+ insert into base_supplier
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="supplierName != null">supplier_name,</if>
|
|
|
+ <if test="supplierResponsiblePerson != null">supplier_responsible_person,</if>
|
|
|
+ <if test="supplierAddress != null">supplier_address,</if>
|
|
|
+ <if test="supplierType != null">supplier_type,</if>
|
|
|
+ <if test="supplierState != null">supplier_state,</if>
|
|
|
+ <if test="supplierAdvancePurchase != null">supplier_advance_purchase,</if>
|
|
|
+ <if test="postalCode != null">postal_code,</if>
|
|
|
+ <if test="projectPerson != null">project_person,</if>
|
|
|
+ <if test="telephone != null">telephone,</if>
|
|
|
+ <if test="bankAccountName != null">bank_account_name,</if>
|
|
|
+ <if test="bankOfDeposit != null">bank_of_deposit,</if>
|
|
|
+ <if test="bankAccountNumber != null">bank_account_number,</if>
|
|
|
+ <if test="created != null">created,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updated != null">updated,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="supplierName != null">#{supplierName},</if>
|
|
|
+ <if test="supplierResponsiblePerson != null">#{supplierResponsiblePerson},</if>
|
|
|
+ <if test="supplierAddress != null">#{supplierAddress},</if>
|
|
|
+ <if test="supplierType != null">#{supplierType},</if>
|
|
|
+ <if test="supplierState != null">#{supplierState},</if>
|
|
|
+ <if test="supplierAdvancePurchase != null">#{supplierAdvancePurchase},</if>
|
|
|
+ <if test="postalCode != null">#{postalCode},</if>
|
|
|
+ <if test="projectPerson != null">#{projectPerson},</if>
|
|
|
+ <if test="telephone != null">#{telephone},</if>
|
|
|
+ <if test="bankAccountName != null">#{bankAccountName},</if>
|
|
|
+ <if test="bankOfDeposit != null">#{bankOfDeposit},</if>
|
|
|
+ <if test="bankAccountNumber != null">#{bankAccountNumber},</if>
|
|
|
+ <if test="created != null">#{created},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updated != null">#{updated},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<delete id="deleteBaseSupplier" parameterType="java.lang.Integer">
|
|
@@ -133,56 +71,24 @@
|
|
|
|
|
|
<update id="updateBaseSupplier" parameterType="com.ozs.base.domain.BaseSupplier">
|
|
|
update base_supplier
|
|
|
- <set>
|
|
|
- <if test="supplierName != null and supplierName != ''">
|
|
|
- supplier_name = #{supplierName},
|
|
|
- </if>
|
|
|
- <if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
|
|
|
- supplier_responsible_person = #{supplierResponsiblePerson},
|
|
|
- </if>
|
|
|
- <if test="supplierAddress != null and supplierAddress != ''">
|
|
|
- supplier_address = #{supplierAddress},
|
|
|
- </if>
|
|
|
- <if test="supplierType != null and supplierType != ''">
|
|
|
- supplier_type = #{supplierType},
|
|
|
- </if>
|
|
|
- <if test="supplierState != null and supplierState != ''">
|
|
|
- supplier_state = #{supplierState},
|
|
|
- </if>
|
|
|
- <if test="supplierAdvancePurchase != null and supplierAdvancePurchase != '' ">
|
|
|
- supplier_advance_purchase = #{supplierAdvancePurchase},
|
|
|
- </if>
|
|
|
- <if test="postalCode != null and postalCode != ''">
|
|
|
- postal_code = #{postalCode},
|
|
|
- </if>
|
|
|
- <if test="projectPerson != null and projectPerson != ''">
|
|
|
- project_person = #{projectPerson},
|
|
|
- </if>
|
|
|
- <if test="telephone != null and telephone != ''">
|
|
|
- telephone = #{telephone},
|
|
|
- </if>
|
|
|
- <if test="bankAccountName != null and bankAccountName != ''">
|
|
|
- bank_account_name = #{bankAccountName},
|
|
|
- </if>
|
|
|
- <if test="bankOfDeposit != null and bankOfDeposit != ''">
|
|
|
- bank_of_deposit = #{bankOfDeposit},
|
|
|
- </if>
|
|
|
- <if test="bankAccountNumber != null and bankAccountNumber != ''">
|
|
|
- bank_account_number = #{bankAccountNumber},
|
|
|
- </if>
|
|
|
- <if test="created != null and created != ''">
|
|
|
- created = #{created},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time = #{createTime},
|
|
|
- </if>
|
|
|
- <if test="updated != null and updated != ''">
|
|
|
- updated = #{updated},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time = #{updateTime},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="supplierName != null">supplier_name = #{supplierName},</if>
|
|
|
+ <if test="supplierResponsiblePerson != null">supplier_responsible_person = #{supplierResponsiblePerson},</if>
|
|
|
+ <if test="supplierAddress != null">supplier_address = #{supplierAddress},</if>
|
|
|
+ <if test="supplierType != null">supplier_type = #{supplierType},</if>
|
|
|
+ <if test="supplierState != null">supplier_state = #{supplierState},</if>
|
|
|
+ <if test="supplierAdvancePurchase != null">supplier_advance_purchase = #{supplierAdvancePurchase},</if>
|
|
|
+ <if test="postalCode != null">postal_code = #{postalCode},</if>
|
|
|
+ <if test="projectPerson != null">project_person = #{projectPerson},</if>
|
|
|
+ <if test="telephone != null">telephone = #{telephone},</if>
|
|
|
+ <if test="bankAccountName != null">bank_account_name = #{bankAccountName},</if>
|
|
|
+ <if test="bankOfDeposit != null">bank_of_deposit = #{bankOfDeposit},</if>
|
|
|
+ <if test="bankAccountNumber != null">bank_account_number = #{bankAccountNumber},</if>
|
|
|
+ <if test="created != null">created = #{created},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updated != null">updated = #{updated},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
@@ -190,55 +96,55 @@
|
|
|
select * from base_supplier
|
|
|
<where>
|
|
|
<if test="id != null and id != ''">
|
|
|
- id = #{id},
|
|
|
+ and id = #{id}
|
|
|
</if>
|
|
|
<if test="supplierName != null and supplierName != ''">
|
|
|
- supplier_name like '% +' #{supplierName} '+ %',
|
|
|
+ and supplier_name like '% +' #{supplierName} '+ %'
|
|
|
</if>
|
|
|
<if test="supplierResponsiblePerson != null and supplierResponsiblePerson != ''">
|
|
|
- supplier_responsible_person like '% +' #{supplierResponsiblePerson} '+ %',
|
|
|
+ and supplier_responsible_person like '% +' #{supplierResponsiblePerson} '+ %'
|
|
|
</if>
|
|
|
<if test="supplierAddress != null and supplierAddress != ''">
|
|
|
- supplier_address like '% +' #{supplierAddress} '+ %',
|
|
|
+ and supplier_address like '% +' #{supplierAddress} '+ %'
|
|
|
</if>
|
|
|
<if test="supplierType != null and supplierType != ''">
|
|
|
- supplier_type = #{supplierType},
|
|
|
+ and supplier_type = #{supplierType}
|
|
|
</if>
|
|
|
<if test="supplierState != null and supplierState != ''">
|
|
|
- supplier_state = #{supplierState},
|
|
|
+ and supplier_state = #{supplierState}
|
|
|
</if>
|
|
|
<if test="supplierAdvancePurchase != null and supplierAdvancePurchase != '' ">
|
|
|
- supplier_advance_purchase = #{supplierAdvancePurchase},
|
|
|
+ and supplier_advance_purchase = #{supplierAdvancePurchase}
|
|
|
</if>
|
|
|
<if test="postalCode != null and postalCode != ''">
|
|
|
- postal_code = #{postalCode},
|
|
|
+ and postal_code = #{postalCode}
|
|
|
</if>
|
|
|
<if test="projectPerson != null and projectPerson != ''">
|
|
|
- project_person = #{projectPerson},
|
|
|
+ and project_person = #{projectPerson}
|
|
|
</if>
|
|
|
<if test="telephone != null and telephone != ''">
|
|
|
- telephone = #{telephone},
|
|
|
+ and telephone = #{telephone}
|
|
|
</if>
|
|
|
<if test="bankAccountName != null and bankAccountName != ''">
|
|
|
- bank_account_name = #{bankAccountName},
|
|
|
+ and bank_account_name = #{bankAccountName}
|
|
|
</if>
|
|
|
<if test="bankOfDeposit != null and bankOfDeposit != ''">
|
|
|
- bank_of_deposit = #{bankOfDeposit},
|
|
|
+ and bank_of_deposit = #{bankOfDeposit}
|
|
|
</if>
|
|
|
<if test="bankAccountNumber != null and bankAccountNumber != ''">
|
|
|
- bank_account_number = #{bankAccountNumber},
|
|
|
+ and bank_account_number = #{bankAccountNumber}
|
|
|
</if>
|
|
|
<if test="created != null and created != ''">
|
|
|
- created = #{created},
|
|
|
+ and created = #{created}
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
- create_time = #{createTime},
|
|
|
+ and create_time = #{createTime}
|
|
|
</if>
|
|
|
<if test="updated != null and updated != ''">
|
|
|
- updated = #{updated},
|
|
|
+ and updated = #{updated}
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
- update_time = #{updateTime}
|
|
|
+ and update_time = #{updateTime}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|