SELECT id AS id from mini_info where del_flag = 0 and customer_id = #{customerId} and client_type = #{clientType} order by created_time desc limit 1
INSERT INTO mini_info ( ID, CUSTOMER_ID, CLIENT_TYPE, NICK_NAME, HEAD_IMG, SERVICE_TYPE_INFO, VERIFY_TYPE_INFO, USER_NAME,
PRINCIPAL_NAME, SIGNATURE, QRCODE_URL, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
VALUES
(
REPLACE ( UUID(), '-', '' ),
#{customerId},
#{clientType},
#{nick_name},
#{head_img},
#{service_type_info},
#{verify_type_info},
#{user_name},
#{principal_name},
#{signature},
#{qrcode_url},
#{delFlag},
#{revision},
#{createdBy},
NOW(),
#{updatedBy},
NOW()
)
update mini_info
set NICK_NAME = #{nickName}
where CUSTOMER_ID = #{customerId}
and CLIENT_TYPE = #{clientType}
and DEL_FLAG = '0'
DELETE
FROM
mini_info
WHERE
del_flag = 0
AND customer_id = #{customerId}
AND client_type = #{clientType}