// $field = 'bl_id AS blId,bl_name AS name,bl_title,store_id,store_name,bl_state,bl_quota_starttime,bl_image,bl_storage,bl_discount_price AS discountPrice,bl_sum_price AS sumPrice,bl_quota_endtime AS endTime,image';
//// $goods = \Our\RedisHelper::cachedFunction(\Redis\Db4\PBundlingGoodsRedisModel::getInstance(),array(&$bundingGoodsDAO, 'getList'),array('bl_id,goods_commonid AS goodsCommonId,goods_name AS goodsName,goods_image AS goodsImage,bl_count_price AS goodsPrice,bl_goods_price AS discountPrice,num','bl_id in('.implode(',',$blIds).')'),\Our\ApiConst::oneDaySecond,array($storeId));
@@ -105,7 +105,7 @@ class FootprintServiceModel extends \Business\AbstractModel
...
@@ -105,7 +105,7 @@ class FootprintServiceModel extends \Business\AbstractModel
$field='bl_id AS blId,bl_name AS name,bl_title,store_id,store_name,bl_state,bl_quota_starttime,bl_image,bl_storage,bl_discount_price AS discountPrice,bl_sum_price AS sumPrice,bl_quota_endtime AS endTime,image,is_transport,transport_id';
$field='bl_id AS blId,bl_name AS name,bl_title,store_id,store_name,bl_state,bl_quota_starttime,bl_image,bl_storage,bl_discount_price AS discountPrice,bl_sum_price AS sumPrice,bl_quota_endtime AS endTime,image,is_transport,transport_id';
$baseSql="insert into {$this->_tableName}(member_id,store_id,fav_type,fav_time) values({0},{1},1,{2}) ON DUPLICATE KEY UPDATE fav_type=1,fav_time=VALUES (fav_time)";
$baseSql="insert into {$this->_tableName}(member_id,store_id,fav_type,fav_time) values({0},{1},1,{2}) ON DUPLICATE KEY UPDATE fav_type=1,fav_time=VALUES (fav_time)";
@@ -27,6 +27,8 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -27,6 +27,8 @@ class OrderModel extends \DAO\AbstractModel
* @var string
* @var string
*/
*/
protected$_tableName='han_order';
protected$_tableName='han_order';
private$countField='(sum(order_amount)-sum(refund_amount)) as orderTotal,count(*) as orderCount';
/**
/**
* 主键
* 主键
*
*
...
@@ -40,12 +42,16 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -40,12 +42,16 @@ class OrderModel extends \DAO\AbstractModel
//$this->setDb();
//$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';
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";
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)
publicfunctiongetCount($where,$isArray=true)
{
{
$this->setDb();
$this->setDb();
...
@@ -68,6 +74,33 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -68,6 +74,33 @@ class OrderModel extends \DAO\AbstractModel
@@ -17,7 +17,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -17,7 +17,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
* @var string
* @var string
*/
*/
protected$_tableName='han_order_goods';
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$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";
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";