后端数据传不到前端,报错显示:
单独查看传输的数据,显示为:
代码接口:
实现:
查询代码:***
//"countPurchaseTotal"查询代码如下:
<select id="countPurchaseTotal" resultType="java.lang.Long">
select
count(*)
form t_purchase_list pl
LEFT JOIN t_supplier s on pl.supplier_id = s.id
LEFT JOIN t_purchase_list_goods plg on pl.id = plg.purchase_list_id
LEFT JOIN t_goods_type gt on plg.type_id = gt.id
<where>
<if test="null != purchaseListQuery.startDate and purchaseListQuery.startDate !='' ">
and purchase_date >=#{purchaseListQuery.startDate}
</if>
<if test="null !=purchaseListQuery.endDate and purchaseListQuery.endDate !='' ">
and purchase_date <=#{purchaseListQuery.endDate}
</if>
<if test="null != purchaseListQuery.goodsName and purchaseListQuery.goodsName !='' ">
and (
plg.name like concat('%',#{purchaseListQuery.goodsName},'%') or plg.code =#{purchaseListQuery.goodsName}
)
</if>
<if test="null != purchaseListQuery.typeIds and purchaseListQuery.typeIds.size>0">
and plg.type_id in
<foreach collection="purchaseListQuery.typeIds" item="typeId" open="(" separator="," close=")">
#{typeId}
</foreach>
</if>
</where>
</select>
//countPurchaseList查询代码如下
<select id="countPurchaseList" resultType="com.lzj.admin.model.CountResultModel">
select
pl.purchase_number as number,
pl.purchase_date as date,
s.`name` as name,
plg.`code`,
plg.`name` as goodsName,
plg.model,
plg.unit as unitName,
plg.price,
plg.num,
plg.total,
gt.`name` as typeName
form t_purchase_list pl
LEFT JOIN t_supplier s on pl.supplier_id = s.id
left join t_purchase_list_goods plg on pl.id = plg.purchase_list_id
LEFT JOIN t_goods_type gt on plg.type_id = gt.id
<where>
<if test="null != purchaseListQuery.startDate and purchaseListQuery.startDate !='' ">
and purchase_date >= #{purchaseListQuery.startDate}
</if>
<if test="null !=purchaseListQuery.endDate and purchaseListQuery.endDate !='' ">
and purchase_date <= #{purchaseListQuery.endDate}
</if>
<if test="null != purchaseListQuery.goodsName and purchaseListQuery.goodsName !='' ">
and (
plg.name like concat('%',#{purchaseListQuery.goodsName},'%') or plg.code =#{purchaseListQuery.goodsName}
)
</if>
<if test="null != purchaseListQuery.typeIds and purchaseListQuery.typeIds.size>0">
and plg.type_id in
<foreach collection="purchaseListQuery.typeIds" item="typeId" open="(" separator="," close=")">
#{typeId}
</foreach>
</if>
</where>
limit #{purchaseListQuery.index},#{purchaseListQuery.limit}
</select>
日志显示内容为:
请问一下大家,这个问题该怎么解决呀?谢谢大家啦!