insert into yt_platform_user_app ( app_id, app_name, user_id, app_type, detail_url, package_name, domain, issued_time, wx_app_id, wx_secret, sale_price, create_user_id, create_time, available ) values ( #{appId}, #{appName}, #{userId}, #{appType}, #{detailUrl}, #{packageName}, #{domain}, #{issuedTime}, #{wxAppId}, #{wxSecret}, #{salePrice}, #{createUserId}, #{createTime}, #{available} ) insert into yt_app_grant_record ( record_id, app_id, user_id, sale_price, grant_type, ratio, data_charge, grant_time, operator_id, operator_time ) values ( #{recordId}, #{appId}, #{userId}, #{salePrice}, #{grantType}, #{ratio}, #{dataCharge}, #{grantTime}, #{operatorId}, #{operateTime} ); update yt_platform_user_app app_name = #{appName}, user_id = #{userId}, app_type = #{appType}, detail_url = #{detailUrl}, package_name = #{packageName}, domain = #{domain}, issued_time = #{issuedTime}, wx_app_id = #{wxAppId}, wx_secret = #{wxSecret}, update_user_id = #{updateUserId}, update_time = #{updateTime}, sale_price = #{salePrice}, charge_status = #{chargeStatus}, grant_type = #{grantType}, available = #{available} where app_id = #{appId} update yt_platform_user_app set available = 0, update_time = now(), update_user_id = #{userId} where app_id = #{appId}