合肥网站建设渠道,郑州注册公司需要多少钱,wordpress mysql port,seo推广方式是什么呢一、 在框架中引用的先后顺序
在ruoyi-system的resources下的xml中定义方法在java下的mapper包中引用方法在java下的service包中再引用mapper的方法
二、xml中的写法
标签#xff1a;
resultMap 返回数据sql 查询语句 可包含在其他操作中select 查询insert 插入update 更新…一、 在框架中引用的先后顺序
在ruoyi-system的resources下的xml中定义方法在java下的mapper包中引用方法在java下的service包中再引用mapper的方法
二、xml中的写法
标签
resultMap 返回数据sql 查询语句 可包含在其他操作中select 查询insert 插入update 更新delete 删除
属性
id 引用标记parameterType 参数类型 可以是定义的domain里的class,map,Long,String…resultMap 返回查询 多是domain里的类resultType返回数据类型 Double, Long
联表查询 包含类
如果表中有其他表的id形式的联表查询, 在resultMap 中添加association 。
association propertycountry columncountry_id javaTypeSmsCountry resultMapsmsCountryResult /注 property是显示名须要在domain添加 一个字段并加上setter,getter方法 column是对应的外键 javaType是连表的类名 resultMap是连表的类名 Result 查询语句
sql idselectSmsOrdersVoselect o.id, o.user_id, o.line_id, o.service_id, c.country_name, o.country_id, o.order_id, o.phone, o.code, o.fee, o.status, o.create_time, o.update_time from sms_orders oleft join sms_country c on o.country_id c.country_id /sql注意如果有多个连表时设计表的字段名时不要使用想同的字段名。容易混淆出错。
报错
Column ‘country_id’ in where clause is ambiguous; 这是在联表查询时没注明哪个表的字段引起的。