insert into bm_qrcode_info
task_id,
type_id,
ma_code,
qr_code,
fix_code,
code_type,
status,
create_by,
create_time,
company_id,
out_fac_code,
qr_url,
del_flag
#{taskId},
#{typeId},
#{maCode},
#{qrCode},
#{fixCode},
#{codeType},
#{status},
#{createBy},
#{createTime},
#{companyId},
#{outFacCode},
#{qrUrl},
0
INSERT INTO bm_qrcode_info
qr_code,
type_id,
qr_url,
task_id,
create_by,
create_time,
del_flag,
`status`
#{qrCode},
#{typeId},
#{qrUrl},
#{taskId},
#{createBy},
NOW(),
0,
0
UPDATE purchase_check_details
SET bind_num = COALESCE(bind_num, 0) + COALESCE(#{num}, 0)
WHERE task_id = #{dto.taskId}
AND type_id = #{dto.typeId}
AND #{num} IS NOT NULL
UPDATE purchase_check_details
SET `status` = #{updatedStatus}
WHERE
id = #{id}
UPDATE ma_type
SET storage_num = #{inputNum} + IFNULL(storage_num, 0)
WHERE
type_id = #{typeId}
UPDATE purchase_check_details
SET is_download = '1'
WHERE id = #{purchaseId}
and task_id = #{id}