Commit e46de7a6 authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz

parents 30506137 eed8eea3
...@@ -154,6 +154,7 @@ class DescribeConst ...@@ -154,6 +154,7 @@ class DescribeConst
const notPayed = '未付款'; //货到付款 const notPayed = '未付款'; //货到付款
const refund='退款'; const refund='退款';
const refundRetund='退货'; const refundRetund='退货';
const refundSuccess='退款成功';
const sellerRefuseReturn='卖家拒绝退货'; const sellerRefuseReturn='卖家拒绝退货';
const sellerAgreeReturn='卖家同意退货'; const sellerAgreeReturn='卖家同意退货';
......
...@@ -10,7 +10,7 @@ use Zend\Json\Server\Exception\ErrorException; ...@@ -10,7 +10,7 @@ use Zend\Json\Server\Exception\ErrorException;
class GoodsCommonServiceModel extends \Business\AbstractModel class GoodsCommonServiceModel extends \Business\AbstractModel
{ {
private $goodsStorageField = 'goods_id goodsId,goods_name goodsName,goods_verify goodsVerify,goods_state goodsState,goods_image goodsImage,goods_price goodsPrice,goods_storage goodsStorage,goods_spec goodsAttr'; private $goodsStorageField = 'goods_id goodsId,goods_name goodsName,goods_verify goodsVerify,goods_state goodsState,goods_image goodsImage,goods_price goodsPrice,goods_storage goodsStorage,goods_spec goodsAttr,goods_storage_alarm as goodsStorageAlarm';
private $setStorageType = array('add'=> 1, 'set'=>2); private $setStorageType = array('add'=> 1, 'set'=>2);
public function init() { public function init() {
...@@ -103,7 +103,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -103,7 +103,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$where = array(); $where = array();
$where[] = 'store_id = '.$storeId; $where[] = 'store_id = '.$storeId;
$where[] = 'goods_storage_alarm > 0'; $where[] = 'goods_storage_alarm > 0';
$where[] = 'goods_storage<=goods_storage_alarm'; $where[] = 'goods_storage<goods_storage_alarm';
//获得列表 //获得列表
if($datas = $goodsDao->getList(implode($where, ' and '), $this->goodsStorageField)) { if($datas = $goodsDao->getList(implode($where, ' and '), $this->goodsStorageField)) {
foreach ($datas as $key=>$val) { foreach ($datas as $key=>$val) {
......
...@@ -216,12 +216,17 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -216,12 +216,17 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName); $refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName);
$returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField); $returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField);
$storeDao=\DAO\StoreModel::getInstance(DbNameConst::masterDBConnectName); $storeDao=\DAO\StoreModel::getInstance(DbNameConst::masterDBConnectName);
$orderGoodsDao=\DAO\Order\OrderGoodsModel::getInstance();
if($returnDetail['storeId']!=$storeId){ if($returnDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::notExistRefund); ErrorModel::throwException(CodeConfigModel::notExistRefund);
}$updateData=array(); }$updateData=array();
$updateData['is_suc_refund']=ApiConst::refundSuccess; $updateData['is_suc_refund']=ApiConst::refundSuccess;
$updateData['refund_state']=ApiConst::refundStateComplete; $updateData['refund_state']=ApiConst::refundStateComplete;
$res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData); $res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData);
$goodsUpdateData['is_refund']=ApiConst::refundSuccess;
$goodsUpdateData['refund_state_name']=DescribeConst::refundSuccess;
$orderGoodsWhere['rec_id']=$returnDetail['orderGoodsId'];
$orderGoodsDao->update($orderGoodsWhere,$goodsUpdateData);
\Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refundId)); \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refundId));
$storeDao->deleteStoreCache($storeId,$refundId); $storeDao->deleteStoreCache($storeId,$refundId);
$storeDao->deleteStoreRefundCache($storeId,$refundId); $storeDao->deleteStoreRefundCache($storeId,$refundId);
...@@ -1037,7 +1042,8 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1037,7 +1042,8 @@ class RefundServiceModel extends \Business\AbstractModel
} }
} else { } else {
$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum']; //$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum'];
$refundAmount =$orderInfo['orderAmount'];
} }
$returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee; $returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee;
if((int)$returnData['refundAmount'] <ApiConst::zero){ if((int)$returnData['refundAmount'] <ApiConst::zero){
......
...@@ -276,7 +276,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel ...@@ -276,7 +276,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
'orderId'=>$order['order_id'])); 'orderId'=>$order['order_id']));
$push->addOneToClient($pushData); $push->addOneToClient($pushData);
$push->sendTcpMessage(); $push->sendTcpMessage();
$push->addOneToClient(); // $push->addOneToClient();
// \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId']))); // \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
//\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId']))); //\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
$orderDao->deleteOrderCache($order['buyer_id'], $orderId, $order['store_id'], true); $orderDao->deleteOrderCache($order['buyer_id'], $orderId, $order['store_id'], true);
......
...@@ -199,8 +199,8 @@ class StoreServiceModel extends \Business\AbstractModel{ ...@@ -199,8 +199,8 @@ class StoreServiceModel extends \Business\AbstractModel{
$sale = \DAO\SaleModel::getInstance()->getOne(array('sale_id'=>$param['sid']),'sale_act_id,member_id'); $sale = \DAO\SaleModel::getInstance()->getOne(array('sale_id'=>$param['sid']),'sale_act_id,member_id');
if($sale) { if($sale) {
$sale_act = \DAO\SaleActivityModel::getInstance()->getOne(array('sale_act_id'=>$sale['sale_act_id'],'sale_act_state'=>1),'*'); $sale_act = \DAO\SaleActivityModel::getInstance()->getOne(array('sale_act_id'=>$sale['sale_act_id'],'sale_act_state'=>1),'*');
if($sale_act && $sale_act['sale_start_date'] >= time() && $sale_act['sale_end_date'] <= time()){ if($sale_act && $sale_act['sale_start_date'] <= time() && $sale_act['sale_end_date'] >= time()){
\DAO\SaleMemberModel::getInstance()->insertOrUpdate(array('sale_id'=>$sale['member_id'],'sale_act_id'=>$sale['sale_act_id'],'member_id'=>$memberId,'store_id'=>$storeId)); $result = \DAO\SaleMemberModel::getInstance()->insertOrUpdate(array('sale_id'=>$sale['member_id'],'sale_act_id'=>$sale['sale_act_id'],'member_id'=>$memberId,'store_id'=>$sale_act['store_id']));
\Redis\Db4\SaleActivityRedisModel::getInstance()->tableDel('storeId:'.$storeId); \Redis\Db4\SaleActivityRedisModel::getInstance()->tableDel('storeId:'.$storeId);
} }
} }
......
...@@ -55,7 +55,7 @@ config.url.convert=/usr/local/bin/wkhtmltoimage ...@@ -55,7 +55,7 @@ config.url.convert=/usr/local/bin/wkhtmltoimage
config.url.resourcesHost = "http://apitest.shenbd.com" config.url.resourcesHost = "http://apitest.shenbd.com"
; 用户中心host ; 用户中心host
config.url.userHost = "" config.url.userHost = ""
config.url.ossHost = "https://img.shenbd.com" config.url.ossHost = "http://testadmin.shenbd.com/data/upload"
; oss 域名 ; oss 域名
;config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com" ;config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
......
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