mybatis映射文件insert不执行,而直接用sql则可以插入成功。 求解。。。
<insertid="addPrice"parameterType="CustomerPrice">insertintoclientprice(customerid,sc...
<insert id="addPrice" parameterType="CustomerPrice">
insert into clientprice(customerid,scriptid,langid,price,unit)
select distinct customerid,scriptid,#{langid} as langid,#{price} as price,#{unit} as unit from vhashkey where customername = #{customerName} and scriptname = #{scriptName}
</insert> 展开
insert into clientprice(customerid,scriptid,langid,price,unit)
select distinct customerid,scriptid,#{langid} as langid,#{price} as price,#{unit} as unit from vhashkey where customername = #{customerName} and scriptname = #{scriptName}
</insert> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询