第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

mybatis sql 查詢問題

mybatis sql 查詢問題

躍然一笑 2019-03-20 18:19:03
今天碰到一個(gè)關(guān)于mybatis的問題 查詢到的數(shù)據(jù)是null首先申明,數(shù)據(jù)庫(kù)是有相關(guān)的數(shù)據(jù),并且sql是正確的,但是調(diào)用的時(shí)候 debug進(jìn)去發(fā)現(xiàn)查出來的list集合是空數(shù)據(jù)。   <resultMap id="RevenuePercsResultMap"    type="com.xxx.common.dto.report.RevenuePercsEntity">    <result property="totalPrice" column="totalPrice" />    <result property="bussinessType" column="bussinessType"/> </resultMap><select id="getCommoditySalesTotalPercentage" resultMap="RevenuePercsResultMap" parameterType="com.xxx.common.param.report.GetReportParam">   select sum(a.`num` * a.price) as totalPrice,o.business_type as bussinessType    from order_detail a right join `order` o on o.id = a.order_id    where o.shop_id = #{param.shopId} and (o.business_type = 0 or o.business_type = 1 or o.business_type = 2)   <if test="param.startTm != null and param.endTm != null and param.startTm != '' and param.endTm != ''">        and o.create_tm between #{param.startTm} and #{param.endTm}   </if>    group by o.business_type</select>在java代碼里面調(diào)用這個(gè)查詢數(shù)據(jù)庫(kù)的方法的時(shí)候,方法查出來的數(shù)據(jù)是:只有當(dāng)o.business_type = 2 有顯示查到數(shù)據(jù),o.business_type = 0 和 o.business_type = 1 都是null的
查看完整描述

1 回答

?
qq_花開花謝_0

TA貢獻(xiàn)1835條經(jīng)驗(yàn) 獲得超7個(gè)贊

你數(shù)據(jù)庫(kù)字段 跟 javabean 的關(guān)系在哪?


查看完整回答
反對(duì) 回復(fù) 2019-04-16
  • 1 回答
  • 0 關(guān)注
  • 412 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)