@Select("select p.*,c.user_id,c.id cid,c.count "
+ " from shopcar c join product p "
+ " on(c.product_id = p.id) "
+ " where c.user_id = #{id}")
@Results({
@Result(property="cid", column="c.id")
})
public List<HashMap<String, Object>> myShopcar(int id);
前端接收:
cid:1
id:1
user_id:1