and ${criterion.condition}
and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition}
#{listItem}
and ${criterion.condition}
and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition}
#{listItem}
id, create_by, create_by_name, create_time, del_flag, update_by, update_by_name, update_time, user_id, user_name, shop_id, shop_name, total_amount, discount,
discount_amount, real_amount, debt_deduction_amount, sale_deduction_amount, balance_deduction_amount, already_earn, no_earn, pay_status,pay_type, status, other_expense, transport_type, share_address, receive_address, province, city, area,
trans_company, company_name, product_count, remark, sale_name, company_phone, create_by_phone,mode_of_service,ai_flag,ai_result,ai_not_recognition,print_count,distribution_flag
delete from t_sale
where id = #{id,jdbcType=VARCHAR}
delete from t_sale
insert into t_sale (id, create_by,create_by_name, create_time,
del_flag, update_by,update_by_name, update_time,
user_id,user_name, shop_id,shop_name, total_amount,
discount, discount_amount, real_amount, debt_deduction_amount, sale_deduction_amount, balance_deduction_amount,
already_earn, no_earn, pay_status,pay_type,
status, transport_type, share_address,
receive_address, province, city,
area,sale_name,remark,other_expense,trans_company,company_name,company_phone,product_count,create_by_phone,mode_of_service,ai_flag,ai_result,ai_not_recognition,print_count,distribution_flag)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},#{createByName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR},#{updateByName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{userId,jdbcType=VARCHAR},#{userName,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
#{discount,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{realAmount,jdbcType=DECIMAL},
#{debtDeductionAmount,jdbcType=DECIMAL}, #{saleDeductionAmount,jdbcType=DECIMAL},#{balanceDeductionAmount,jdbcType=DECIMAL},
#{alreadyEarn,jdbcType=DECIMAL}, #{noEarn,jdbcType=DECIMAL}, #{payStatus,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{transportType,jdbcType=VARCHAR}, #{shareAddress,jdbcType=VARCHAR},
#{receiveAddress,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
#{area,jdbcType=VARCHAR}, #{saleName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{otherExpense,jdbcType=VARCHAR},#{transCompany,jdbcType=VARCHAR},#{companyName,jdbcType=VARCHAR},#{companyPhone,jdbcType=VARCHAR},
#{productCount,jdbcType=INTEGER},#{createByPhone,jdbcType=VARCHAR},#{modeOfService,jdbcType=VARCHAR},
#{aiFlag,jdbcType=VARCHAR},#{aiResult,jdbcType=VARCHAR},#{aiNotRecognition,jdbcType=VARCHAR},#{printCount,jdbcType=INTEGER},#{distributionFlag,jdbcType=VARCHAR})
insert into t_sale
id,
create_by,
create_time,
del_flag,
update_by,
update_time,
user_id,
user_name,
shop_id,
total_amount,
discount,
discount_amount,
real_amount,
debt_deduction_amount,
sale_deduction_amount,
balance_deduction_amount,
already_earn,
no_earn,
pay_status,
pay_type,
status,
transport_type,
share_address,
receive_address,
province,
city,
area,
other_expense,
trans_company,
company_name,
company_phone,
product_count,
create_by_phone,
mode_of_service,
ai_flag,
ai_result,
ai_not_recognition,
print_count,
distribution_flag,
#{id,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER},
#{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{userId,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR},
#{totalAmount,jdbcType=DECIMAL},
#{discount,jdbcType=DECIMAL},
#{discountAmount,jdbcType=DECIMAL},
#{realAmount,jdbcType=DECIMAL},
#{debtDeductionAmount,jdbcType=DECIMAL},
#{saleDeductionAmount,jdbcType=DECIMAL},
#{balanceDeductionAmount,jdbcType=DECIMAL},
#{alreadyEarn,jdbcType=DECIMAL},
#{noEarn,jdbcType=DECIMAL},
#{payStatus,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{transportType,jdbcType=VARCHAR},
#{shareAddress,jdbcType=VARCHAR},
#{receiveAddress,jdbcType=VARCHAR},
#{province,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR},
#{area,jdbcType=VARCHAR},
#{otherExpense,jdbcType=VARCHAR},
#{transCompany,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR},
#{companyPhone,jdbcType=VARCHAR},
#{productCount,jdbcType=INTEGER},
#{createByPhone,jdbcType=VARCHAR},
#{modeOfService,jdbcType=VARCHAR},
#{aiFlag,jdbcType=INTEGER},
#{aiResult,jdbcType=VARCHAR},
#{aiNotRecognition,jdbcType=VARCHAR},
#{printCount,jdbcType=INTEGER},
#{distributionFlag,jdbcType=VARCHAR},
update t_sale
id = #{record.id,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=INTEGER},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
user_id = #{record.userId,jdbcType=VARCHAR},
user_name = #{record.userName,jdbcType=VARCHAR},
shop_id = #{record.shopId,jdbcType=VARCHAR},
total_amount = #{record.totalAmount,jdbcType=DECIMAL},
discount = #{record.discount,jdbcType=DECIMAL},
discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
real_amount = #{record.realAmount,jdbcType=DECIMAL},
debt_deduction_amount = #{record.debtDeductionAmount,jdbcType=DECIMAL},
sale_deduction_amount = #{record.saleDeductionAmount,jdbcType=DECIMAL},
balance_deduction_amount = #{record.balanceDeductionAmount,jdbcType=DECIMAL},
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL},
no_earn = #{record.noEarn,jdbcType=DECIMAL},
pay_status = #{record.payStatus,jdbcType=VARCHAR},
pay_type = #{record.payType,jdbcType=VARCHAR},
status = #{record.status,jdbcType=VARCHAR},
transport_type = #{record.transportType,jdbcType=VARCHAR},
share_address = #{record.shareAddress,jdbcType=VARCHAR},
receive_address = #{record.receiveAddress,jdbcType=VARCHAR},
province = #{record.province,jdbcType=VARCHAR},
city = #{record.city,jdbcType=VARCHAR},
area = #{record.area,jdbcType=VARCHAR},
other_expense = #{record.otherExpense,jdbcType=VARCHAR},
trans_company = #{record.transCompany,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_phone = #{record.companyPhone,jdbcType=VARCHAR},
product_count = #{record.productCount,jdbcType=INTEGER},
create_by_phone = #{record.createByPhone,jdbcType=VARCHAR},
mode_of_service = #{record.modeOfService,jdbcType=VARCHAR},
ai_flag = #{record.aiFlag,jdbcType=INTEGER},
ai_result = #{record.aiResult,jdbcType=VARCHAR},
ai_not_recognition = #{record.aiNotRecognition,jdbcType=VARCHAR},
print_count = #{record.printCount,jdbcType=INTEGER},
distribution_flag = #{record.distributionFlag,jdbcType=VARCHAR},
update t_sale
set id = #{record.id,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=INTEGER},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
user_id = #{record.userId,jdbcType=VARCHAR},
user_name = #{record.userName,jdbcType=VARCHAR},
shop_id = #{record.shopId,jdbcType=VARCHAR},
total_amount = #{record.totalAmount,jdbcType=DECIMAL},
discount = #{record.discount,jdbcType=DECIMAL},
discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
real_amount = #{record.realAmount,jdbcType=DECIMAL},
debt_deduction_amount = #{record.debtDeductionAmount,jdbcType=DECIMAL},
sale_deduction_amount = #{record.saleDeductionAmount,jdbcType=DECIMAL},
balance_deduction_amount = #{record.balanceDeductionAmount,jdbcType=DECIMAL},
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL},
no_earn = #{record.noEarn,jdbcType=DECIMAL},
pay_status = #{record.payStatus,jdbcType=VARCHAR},
pay_type = #{record.payType,jdbcType=VARCHAR},
status = #{record.status,jdbcType=VARCHAR},
transport_type = #{record.transportType,jdbcType=VARCHAR},
share_address = #{record.shareAddress,jdbcType=VARCHAR},
receive_address = #{record.receiveAddress,jdbcType=VARCHAR},
province = #{record.province,jdbcType=VARCHAR},
city = #{record.city,jdbcType=VARCHAR},
area = #{record.area,jdbcType=VARCHAR},
other_expense = #{record.otherExpense,jdbcType=VARCHAR},
trans_company = #{record.transCompany,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_phone = #{record.companyPhone,jdbcType=VARCHAR},
product_count = #{record.productCount,jdbcType=INTEGER},
create_by_phone = #{record.createByPhone,jdbcType=VARCHAR},
mode_of_service = #{record.modeOfService,jdbcType=VARCHAR},
ai_flag = #{record.aiFlag,jdbcType=INTEGER},
ai_result = #{record.aiResult,jdbcType=VARCHAR},
ai_not_recognition = #{record.aiNotRecognition,jdbcType=VARCHAR},
print_count = #{record.printCount,jdbcType=INTEGER},
distribution_flag = #{record.distributionFlag,jdbcType=VARCHAR}
update t_sale
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=INTEGER},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
user_id = #{userId,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
total_amount = #{totalAmount,jdbcType=DECIMAL},
discount = #{discount,jdbcType=DECIMAL},
discount_amount = #{discountAmount,jdbcType=DECIMAL},
real_amount = #{realAmount,jdbcType=DECIMAL},
debt_deduction_amount = #{debtDeductionAmount,jdbcType=DECIMAL},
sale_deduction_amount = #{saleDeductionAmount,jdbcType=DECIMAL},
balance_deduction_amount = #{balanceDeductionAmount,jdbcType=DECIMAL},
already_earn = #{alreadyEarn,jdbcType=DECIMAL},
no_earn = #{noEarn,jdbcType=DECIMAL},
pay_status = #{payStatus,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
transport_type = #{transportType,jdbcType=VARCHAR},
share_address = #{shareAddress,jdbcType=VARCHAR},
receive_address = #{receiveAddress,jdbcType=VARCHAR},
province = #{province,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
area = #{area,jdbcType=VARCHAR},
other_expense = #{otherExpense,jdbcType=VARCHAR},
trans_company = #{transCompany,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
company_phone = #{companyPhone,jdbcType=VARCHAR},
product_count = #{productCount,jdbcType=INTEGER},
create_by_phone = #{createByPhone,jdbcType=VARCHAR},
mode_of_service = #{modeOfService,jdbcType=VARCHAR},
ai_flag = #{aiFlag,jdbcType=INTEGER},
ai_result = #{aiResult,jdbcType=VARCHAR},
ai_not_recognition = #{aiNotRecognition,jdbcType=VARCHAR},
print_count = #{printCount,jdbcType=INTEGER},
distribution_flag = #{distributionFlag,jdbcType=VARCHAR},
where id = #{id,jdbcType=VARCHAR}
update t_sale
set create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=INTEGER},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
user_id = #{userId,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
total_amount = #{totalAmount,jdbcType=DECIMAL},
discount = #{discount,jdbcType=DECIMAL},
discount_amount = #{discountAmount,jdbcType=DECIMAL},
real_amount = #{realAmount,jdbcType=DECIMAL},
debt_deduction_amount = #{debtDeductionAmount,jdbcType=DECIMAL},
sale_deduction_amount = #{saleDeductionAmount,jdbcType=DECIMAL},
balance_deduction_amount = #{balanceDeductionAmount,jdbcType=DECIMAL},
already_earn = #{alreadyEarn,jdbcType=DECIMAL},
no_earn = #{noEarn,jdbcType=DECIMAL},
pay_status = #{payStatus,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
transport_type = #{transportType,jdbcType=VARCHAR},
share_address = #{shareAddress,jdbcType=VARCHAR},
receive_address = #{receiveAddress,jdbcType=VARCHAR},
province = #{province,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
area = #{area,jdbcType=VARCHAR},
other_expense = #{otherExpense,jdbcType=VARCHAR},
trans_company = #{transCompany,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
company_phone = #{companyPhone,jdbcType=VARCHAR},
product_count = #{productCount,jdbcType=INTEGER},
create_by_phone = #{createByPhone,jdbcType=VARCHAR},
mode_of_service = #{modeOfService,jdbcType=VARCHAR},
ai_flag = #{aiFlag,jdbcType=INTEGER},
ai_result = #{aiResult,jdbcType=VARCHAR},
ai_not_recognition = #{aiNotRecognition,jdbcType=VARCHAR},
print_count = #{printCount,jdbcType=INTEGER},
distribution_flag = #{distributionFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
update t_sale
set
status = '4'
where id = #{saleId,jdbcType=VARCHAR}
update t_sale
set
remark = #{aiMsg,jdbcType=VARCHAR}
where id = #{saleId,jdbcType=VARCHAR}
update t_sale
set
ai_flag = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
update t_sale
set
status = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
update t_sale
set
distribution_flag = #{distributionFlag,jdbcType=VARCHAR}
where id = #{saleId,jdbcType=VARCHAR}
update t_sale
set
print_count = COALESCE(print_count, 0) + 1
where id = #{saleId,jdbcType=VARCHAR}