1. 前台**:
//匯出excel
function excelout() ,
datatype: "json",
success: function (data) else
}});
}
2. 原controller**(報錯**),通過物件傳參;/**
firstline.add(0,d.getexpresstype());//expresstype"快遞型別"
firstline.add(0,d.getslogisticcode());//slogisticcode"面單號"
datalist.add(line);
}excelsheetpo.setdatalist(datalist);
string filepath = "c:";
createworkbookatdisk(v2003, excelsheets,filepath);
flag = "01";//上傳成功
} catch (exception e)
return (resmsg+"");
}
3. 新cointroller**,通過request傳參;/**
firstline.add(0,"主訂單號");//mainordernum
firstline.add(1,"買家姓名");//addressee
firstline.add(0,"買家**");//phone
firstline.add(0,"買家位址");//province city district address
firstline.add(0,"訂單商品");//goodsname goodsnum
firstline.add(0,"快遞型別");//expresstype
firstline.add(0,"面單號");//slogisticcode
datalist.add(firstline);
for(ddordervo d :list.getresults())
firstline.add(0,gstring);//goodsname goodsnum
firstline.add(0,d.getexpresstype());//expresstype"快遞型別"
firstline.add(0,d.getslogisticcode());//slogisticcode"面單號"
datalist.add(line);
}excelsheetpo.setdatalist(datalist);
string filepath = "c:";
createworkbookatdisk(v2003, excelsheets,filepath);
flag = "01";//上傳成功
} catch (exception e)
return (resmsg+"");
}```
Mybatis Plus 實現查詢條件為空時不生效
當我們查詢條件中的值不確定是否有空值時,我們期待查詢時,mybatis 能自動幫我們判空。比如這樣 this page new query getpage queryfields new eq province id queryfields.getprovinceid eq city id quer...
where 條件為空時不走where條件
mysql 若想當where 條件為空時不走where條件,where可以整個為空,但裡面的如where is status sta tus 的 status 的 status 的status不能為空,不然會查詢出status為空的資料,記錄一下。where sta demandstatus if ...
判斷條件為空時需要注意
if accessuser null equals accessuser accesspassword null accesspassword.equals accessuser.equals usercheck accesspassword.equals passwordcheck 第一點 先判斷...