@@ -28,7 +28,7 @@ class OrderModel extends \DAO\AbstractModel
*/
protected$_tableName='han_order';
private$countField='(sum(order_amount)-sum(refund_amount)) as orderTotal,count(*) as orderCount';
private$countField='(sum(order_amount)-sum(refund_amount)) as orderTotal,count(*) as orderCount';
/**
* 主键
*
...
...
@@ -42,12 +42,16 @@ class OrderModel extends \DAO\AbstractModel
//$this->setDb();
}
publicfunctiongetOrderDetailField(){
publicfunctiongetOrderDetailField()
{
return'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,order_sn as orderSn,store_name as storeName,add_time as addTime,store_id as storeId,goods_amount as goodsAmount,shipping_fee as shippingFee,order_amount as orderAmount,shipping_type as shippingType,payment_type as paymentType,order_state as orderState,shipping_fee as shippingFee,refund_state as refundState,order_type as orderType,is_receive_payment as isReceivePayment,payment_time as paymentTime,finnshed_time as finnshedTime,need_shipping_fee as needShippingFee,payment_code as paymentCode,buyer_id as buyerId,buyer_name as buyerName,refund_condition as refundCondition';
}
publicfunctiongetOrderShippingField(){
publicfunctiongetOrderShippingField()
{
return"order_id as orderId,order_sn as orderSn,store_name as storeName,add_time as addTime,store_id as storeId,goods_amount as goodsAmount,shipping_fee as shippingFee,order_amount as orderAmount,shipping_type as shippingType,payment_type as paymentType,order_state as orderState,shipping_fee as shippingFee,refund_state as refundState,order_type as orderType,is_receive_payment as isReceivePayment,shipping_code as shippingCode";
}
publicfunctiongetCount($where,$isArray=true)
{
$this->setDb();
...
...
@@ -69,29 +73,32 @@ class OrderModel extends \DAO\AbstractModel
@@ -17,7 +17,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
* @var string
*/
protected$_tableName='han_order_goods';
public$sumField="rec_id,store_id as storeId,buyer_id as buyerId,goods_num as goodsNum,goods_price as goodsPrice,gmt_create as gmtCreate";
public$sumField="rec_id,store_id as storeId,buyer_id as buyerId,goods_num as goodsNum,goods_price as goodsPrice,gmt_create as gmtCreate,order_id as orderId";
public$groupField=array('buyer_id','store_id');
public$orderGoodsField="order_id as orderId,rec_id as recId,goods_id as goodsId,goods_name as goodsName,goods_price as goodsPrice,goods_num as goodsNum,goods_image as goodsImage,goods_pay_price as goodsPayPrice,sale_act_id as saleActId,sale_id as saleId,comment_state as commentState,is_refund as isRefund,goods_spec as goodsSpec,refund_state_name as refundStateName,refund_id as refundId";