qq_49781024 2021-04-15 18:46 采纳率: 0%
浏览 54

easyui datagrid排序传入的列名没有下划线

$('#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>

 

 

 

  • 写回答

3条回答 默认 最新

  • 关注

    你是要解决列名没有下划线,还是不知道mapper.xml怎么写

    评论

报告相同问题?

悬赏问题

  • ¥15 数学的三元一次方程求解
  • ¥20 iqoo11 如何下载安装工程模式
  • ¥15 本题的答案是不是有问题
  • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 蓝桥杯单片机第十三届第一场,整点继电器吸合,5s后断开出现了问题