export_dao 解决数字库表字段与类的成员变量不一致 方式1:sql语句 使用 as 方式2:mybatis里面使用resultMap标签
方式1:sql别名
ICompanyDao.xml
<mappernamespace="com.lfy.dao.company.ICompanyDao"><selectid="findAll"resultType="company">
select
id,
name,
expiration_date as expirationDate,
address,
license_id as licenseId,
representative,
phone,
company_size as companySize,
industry,
remarks,
state,
balance,
city
from ss_company
</select></mapper>
方式2: resultMap标签
<mappernamespace="com.lfy.dao.company.ICompanyDao"><resultMapid="companyMap"type="company"><resultproperty="id"column="id"/><resultproperty="expirationDate"column="expiration_date"/><resultproperty="licenseId"column="license_id"/><resultproperty="companySize"column="company_size"/></resultMap><selectid="findAll"resultMap="companyMap">
select
*
from ss_company
</select></mapper>