mysql数据类型转换函数_MySQL数据类型转换函数CAST与CONVERT的用法

1fe69fafd8f62700afa8fc9781f662f4.png

SELECT s.supplier_id AS supplierId ,s.main_products AS mainProducts

,s.group_id AS groupId,s.head_url AS supplierHead,

s.repair_center_name AS repairCenterName,s.shop_url AS shopUrl

,s.manager_phone AS managerPhone, s.service_tel AS serviceTel,

s.pro_name AS proName ,s.city_name AS cityName ,s.area_name AS

areaName ,s.detailed ,shop_profile AS shopProfile,s.company AS

supplierName,s.head_url AS headUrl

FROM w_supplier_sort w

LEFT JOIN s_supplier s ON w.supplier_id = s.supplier_id

LEFT JOIN s_user u ON w.supplier_id = u.id

WHERE s.city_number = #{cityNumber,jdbcType=VARCHAR} AND

UNIX_TIMESTAMP(NOW())*1000 < s.end_time

AND s.main_products is not NULL AND u.user_state = 0 AND u.account_state = 0

ORDER BY convert((sell_number /#{sellSum,jdbcType=BIGINT} * #{sellFaciend,jdbcType=DECIMAL} +

call_number/#{callSum,jdbcType=BIGINT} * #{callFaciend,jdbcType=DECIMAL}),decimal(18,10))

DESC

原文:https://www.cnblogs.com/flywang/p/8978841.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值