两个数据相乘,获取到的值,是double类型,需要转为,int 类型。备注一下(MySQL) CONVERT((p.totalCount)*(r.rate)/100 ,SIGNED) as groupTotal

       select
r.rate,c.groupName,
CONVERT((p.totalCount)*(r.rate)/100 ,SIGNED) as groupTotal
from xxx.notify_content_setting_new c
left join
xxx.notify_setting_new n on
c.notifySettingKey=n.`key`
left join
xxx.notify_ppl_setting_new p on
c.notifySettingKey=p.notifySettingKey
left join
xxx.notify_time_setting_new t on
c.notifySettingKey=t.notifySettingKey
left join xxx.notify_abtest_rate r on c.notifySettingKey=r.notifySettingKey and c.groupName=r.groupName
where c.notifySettingKey=#{notifySettingKey};
posted @ 2021-10-21 17:17  夏之  阅读(246)  评论(0编辑  收藏  举报