$('#dg').datagrid({
url:ctx+'supplier/material',
pagination:true,//分页
fit:true,
pageList:[5,6,8,10,12],
columns:[
[
{field:'id',title:'序号',width:130,align:'center',sortable:true},
{field:'materialNum',title:'产品编号',width:150,align:'center'},
{field:'materialName',title:'产品名称',align:'center',sortable:true},
{field:'materialType',title:'产品类别',width:150,align:'center'},
{field:'materialCount',title:'数量',width:150,align:'center',sortable:true},
{field:'materialUnit',title:'单位',width:140,align:'center'},
{field:'materialMoney',title:'价格',width:150,align:'center',sortable:true},
]
],
//工具栏
toolbar:'#tb',
});
<mapper namespace="com.turing.ppm.mapper.MaterialMapper" >
<resultMap id="BaseResultMap" type="com.turing.ppm.entity.Material" >
<id column="ID" property="id" jdbcType="INTEGER" />
<result column="MATERIAL_NUM" property="materialNum" jdbcType="VARCHAR" />
<result column="MATERIAL_NAME" property="materialName" jdbcType="VARCHAR" />
<result column="MATERIAL_UNIT" property="materialUnit" jdbcType="VARCHAR" />
<result column="MATERIAL_TYPE" property="materialType" jdbcType="VARCHAR" />
<result column="material_count" property="materialCount" jdbcType="INTEGER" />
<result column="material_money" property="materialMoney" jdbcType="DOUBLE" />
</resultMap>
<select id="selectBySupplierId" resultMap="BaseResultMap" parameterType="com.turing.ppm.entity.MaterialExample" >
select * from material where id in (select MATERIAL_ID from supp_material where SUPPLIER_ID=(select id from supplier where user_id=#{id}))
<if test="sort!=null and sort!=''">
order by ${sort} ${order}
</if>
limit #{pageNum},#{pageSize}
</select>
你是要解决列名没有下划线,还是不知道mapper.xml怎么写
您好,我是有问必答小助手,你的问题已经有小伙伴为您解答了问题,您看下是否解决了您的问题,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632
非常感谢您使用有问必答服务,为了后续更快速的帮您解决问题,现诚邀您参与有问必答体验反馈。您的建议将会运用到我们的产品优化中,希望能得到您的支持与协助!
速戳参与调研>>>https://t.csdnimg.cn/Kf0y