File:view.html
Method:query(table,*app,*connect)
default.extension
对像不存在
xmls/goodsview.xmls
...}
$sub goodsview(){
@ParaTypeName=$string();
@OtherJson=[];
@query=$query(goods,goods);
@gid=$http.get(id,0,N);
@pid=$http.get(pid,0,N);
$if(@gid==0){
$write(参数异常);
$end();
}
@query[GoodsId]=@gid;
@row=@query.map(*,['GoodsId={*GoodsId} and Status=1']);
//@row=@query.map(*,['GoodsId={*GoodsId} ']);
$if(@row==$null){
//$write(数据不存在);
$http.redirect(["notfound.html"]);
$end();
}
@query.nonQuery(['update {**table} set Click=Click+1 where GoodsId={*GoodsId}']);
//检索产品是否推荐产品
@queryextension=$query(extension,goods);
@queryextension.setField($field(GoodsId,@gid,number));
@extensiontb=@queryextension.dataMap(['select M.ManufactorId,b.Price,B.UserId from goods_extension e inner join usmanufactor M on e.ManufactorId=M.ManufactorId inner join goods_goodsBidding B on M.UserId=B.UserId where datediff(day,getdate(),PromotionDate) =0 and datediff(hh,getdate(),PromotionDate)=0 and ISNULL(M.OutPrice,0)>ISNULL(M.ConPrice,0) and ISNULL(M.Amount,0)>ISNULL(M.Expenditure,0) ...