Java多商戶在平臺(tái)編輯優(yōu)惠券協(xié)議的時(shí)候報(bào)錯(cuò):"nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3"
根據(jù)報(bào)錯(cuò)可以看出這個(gè)異常表明在執(zhí)行查詢時(shí)返回了3個(gè)結(jié)果,但是預(yù)期的是只返回一個(gè)結(jié)果或者返回 null,
根據(jù)這個(gè)報(bào)錯(cuò)去數(shù)據(jù)庫查看數(shù)據(jù),發(fā)現(xiàn)優(yōu)惠券協(xié)議確實(shí)是有3條記錄,只需要?jiǎng)h除任意兩條數(shù)據(jù)就可以了
在eb_system_config這個(gè)表中找couponAgreement