Commit 1deb8f05 authored by wwccw0591's avatar wwccw0591

delivery

parent 6ffe3ea6
......@@ -64,7 +64,7 @@ class DeliveryServiceModel extends \Business\AbstractModel
return $res;
}
public function addDeleiveryMan($storeId,$memberId){
public function addDeleiveryMan($storeId,$memberId,$trueName=''){
$memberDao=\DAO\MemberModel::getInstance(DbNameConst::masterDBConnectName);
$deliveryManDao=\DAO\Order\DiliverymanModel::getInstance(DbNameConst::masterDBConnectName);
$member=$memberDao->getInfo($memberId);
......@@ -78,7 +78,8 @@ class DeliveryServiceModel extends \Business\AbstractModel
if($res){
ErrorModel::throwException(CodeConfigModel::alreadyExsitDeliveryMan);
}
$deliveryManData['true_name']=$member['memberName'];
$trueName=$trueName?$trueName:$member['memberName'];
$deliveryManData['true_name']=$trueName;
$deliveryManData['mobile']=$memberMobile;
$deliveryManData['scores']=ApiConst::five;
$deliveryManData['store_id']=$storeId;
......
......@@ -306,7 +306,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$value['orderAmount'] = $value['orderAmount'] + $value['couponAmount'];
$value['reciverInfo'] = unserialize($value['reciverInfo']);
$value['dlyoPickupCode'] = intval(substr($value['orderSn'], ApiConst::positionPickupCodeBegin));
$value['shippingArrivalTimeEnd'] = $value['shippingArrivalTime'] + ApiConst::arriveTimeRadius;
$value['deliveryTimeEnd'] = $value['deliveryTime'] + ApiConst::arriveTimeRadius;
if ($value['diliverymanId']) {
$diliverymanDao = DiliverymanModel::getInstance();
$res = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$diliverymanDao, 'findById'), array($value['diliverymanId']), \Our\ApiConst::oneDaySecond, array($value['diliverymanId']));
......@@ -490,7 +490,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$returnData['receiveAmount'] = $returnData['goodsAmount'] - $returnData['couponAmount'];
$returnData['orderAmount'] = $returnData['orderAmount'] + $returnData['couponAmount'];
$returnData['dlyoPickupCode'] = intval(substr($returnData['orderSn'], ApiConst::positionPickupCodeBegin));
$returnData['shippingArrivalTimeEnd'] = $returnData['shippingArrivalTime'] + ApiConst::arriveTimeRadius;
$returnData['deliveryTimeEnd'] = $returnData['deliveryTime'] + ApiConst::arriveTimeRadius;
} else {
unset($returnData['reciverInfo']);
}
......
......@@ -45,7 +45,7 @@ class OrderModel extends \DAO\AbstractModel
public function getOrderDetailField()
{
return 'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,order_sn as orderSn,pay_sn as paySn,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,delay_time as delayTime,gmt_update as gmtUpdate,diliveryman_id as diliverymanId,shipping_arrival_time as shippingArrivalTime';
return 'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,order_sn as orderSn,pay_sn as paySn,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,delay_time as delayTime,gmt_update as gmtUpdate,diliveryman_id as diliverymanId,shipping_arrival_time as shippingArrivalTime,delivery_time as deliveryTime';
}
public function getOrderShippingField()
......
......@@ -716,7 +716,7 @@ class CodeConfigModel
self::confirmReceiveError => '确认收款失败',
self::alreadyExsitDeliveryMan=>'您的店铺已经存在此配送员',
self::alreadyExsitQmDeliveryLog=>'配送订单已存在',
self::notExsitDeliveryMan=>'配送员不存在',
self::notExsitDeliveryMan=>'用户不存在或未绑定手机号码',
self::addDeliveryManError=>'添加配送员失败',
self::noStorageForBundlingGoods => '组合销售商品库存不存在',
self::bundlingGoodsOfflineForCartOrOrder => '组合销售活动已下架',
......
......@@ -62,7 +62,8 @@ class DeliveryController extends \Our\Controller_AbstractClient {
*/
public function addDeliveryAction(){
$deliveryService=\Business\Store\DeliveryServiceModel::getInstance();
$result =$deliveryService->addDeleiveryMan($this->storeId,$this->memberId);
$trueName=$this->req['data']['trueName'];
$result =$deliveryService->addDeleiveryMan($this->storeId,$this->memberId,$trueName);
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment