Commit 65ffeedf authored by wwccw0591's avatar wwccw0591

pc

parent 6f2440ff
...@@ -4,7 +4,9 @@ namespace Business\Store; ...@@ -4,7 +4,9 @@ namespace Business\Store;
use DAO\Order\DiliverymanModel; use DAO\Order\DiliverymanModel;
use DAO\StoreModel; use DAO\StoreModel;
use Error\CodeConfigModel;
use Error\ErrorModel;
use Our\ApiConst;
/** /**
...@@ -33,9 +35,22 @@ class DeliveryServiceModel extends \Business\AbstractModel ...@@ -33,9 +35,22 @@ class DeliveryServiceModel extends \Business\AbstractModel
$orderRes=$orderDao->updateByOrderId($orderData,$data['orderId']); $orderRes=$orderDao->updateByOrderId($orderData,$data['orderId']);
if(!$orderRes){ if(!$orderRes){
$orderDao->db->doRollback(); $orderDao->db->doRollback();
ErrorModel::throwException(CodeConfigModel::updateOrderFail);
} }
$qmDeliveryManLogData['diliveryman_id']=$data['id'];
$qmDeliveryManLogData['store_id']=$data['storeId'];
$qmDeliveryManLogData['order_id']=$data['orderId'];
$qmDeliveryManLogData['delivery_state']=ApiConst::deliveryStateWait;
$qmDeliveryManLogData['distribution_fee']=$data['distributionFee'];
$qmDeliveryManLogData['order_type']=$data['orderType'];
$qmDeliveryManLogData['get_time']=TIMESTAMP;
$res=$qmDeliveryManLog->insert($data);
if(!res){
$orderDao->db->doRollback();
ErrorModel::throwException(CodeConfigModel::selectDeliveryFail);
}
$orderDao->db->doCommit();
return $res;
} }
/** /**
* 登录业务 * 登录业务
......
...@@ -285,6 +285,9 @@ class CodeConfigModel ...@@ -285,6 +285,9 @@ class CodeConfigModel
const platFormAreadyIn = 300117; const platFormAreadyIn = 300117;
const confirmReceiveError = 300118; const confirmReceiveError = 300118;
const alreadyExsitDeliveryMan = 300119; const alreadyExsitDeliveryMan = 300119;
const updateOrderFail = 300120;
const selectDeliveryFail = 300121;
const noEnoughStorageForBundlingGoods = 30118; const noEnoughStorageForBundlingGoods = 30118;
const noOrderWaitToPay = 30119; const noOrderWaitToPay = 30119;
const wrongEvaluation = 30120; const wrongEvaluation = 30120;
...@@ -756,6 +759,8 @@ class CodeConfigModel ...@@ -756,6 +759,8 @@ class CodeConfigModel
self::notExistOrderGoods => '退款商品不存在', self::notExistOrderGoods => '退款商品不存在',
self::noExpressDeliveryForOrder1 => '该店铺未配置快递配送', self::noExpressDeliveryForOrder1 => '该店铺未配置快递配送',
self::goodsNoStoreForCartOrOrder1 => '商品库存紧张,您的购买数量太多啦', self::goodsNoStoreForCartOrOrder1 => '商品库存紧张,您的购买数量太多啦',
self::updateOrderFail=>'更新订单表失败',
self::selectDeliveryFail=>'配送员选择失败',
self::noEnoughStorageForBundlingGoods => '组合销售库存紧张,您购买的数量太多啦', self::noEnoughStorageForBundlingGoods => '组合销售库存紧张,您购买的数量太多啦',
self::noOrderWaitToPay => '您的订单已支付,请勿重复支付', self::noOrderWaitToPay => '您的订单已支付,请勿重复支付',
self::wrongEvaluation => '商品评论应在6-500字之间', self::wrongEvaluation => '商品评论应在6-500字之间',
......
...@@ -21,11 +21,21 @@ class DeliveryController extends \Our\Controller_AbstractClient { ...@@ -21,11 +21,21 @@ class DeliveryController extends \Our\Controller_AbstractClient {
public function init(){ public function init(){
parent::init(); parent::init();
$this->memberService = MemberServiceModel::getInstance();
$this->shopkeeperService = ShopkeeperServiceModel::getInstance();
$this->shopkeeperService->clientType=NameConst::pcClient;
}
}
/**
* 选择配送员
*/
public function selectDeliveryAction(){
$deliveryService=\Business\Store\DeliveryServiceModel::getInstance();
$data=$this->req['data'];
$data['storeId']=$this->storeId;
$result =$deliveryService->selectDeliveryMan($data);
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
ErrorModel::throwException(CodeConfigModel::commonError);
}
/** /**
* 获得配送员列表 * 获得配送员列表
*/ */
...@@ -46,14 +56,14 @@ class DeliveryController extends \Our\Controller_AbstractClient { ...@@ -46,14 +56,14 @@ class DeliveryController extends \Our\Controller_AbstractClient {
$res=$res?$res:new \stdClass(); $res=$res?$res:new \stdClass();
$this->success($res,\Our\DescribeConst::successMessage); $this->success($res,\Our\DescribeConst::successMessage);
} }
/** /**
* 选择配送员 * 添加配送员
*
*/ */
public function selectDeliveryAction(){ public function addDeliveryAction(){
} }
} }
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