Commit 22774f77 authored by zhz's avatar zhz

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

parents 5c33b320 0a5535ec
...@@ -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,14 +216,17 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -216,14 +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\RefundReturnModel::getInstance(); $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);
......
...@@ -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