|
@@ -605,7 +605,8 @@ class refund_returnModel extends Model
|
|
|
* @param $order
|
|
|
* @return int
|
|
|
*/
|
|
|
- public function getRefundId($order){
|
|
|
+ public function getRefundId($order,&$refund_state){
|
|
|
+ $refund_state = '0';
|
|
|
//只有已付款未发货的订单才处理
|
|
|
if(empty($order) || $order['order_state'] != 20) {
|
|
|
return 0;
|
|
@@ -615,9 +616,10 @@ class refund_returnModel extends Model
|
|
|
$condition['refund_type'] = 1;
|
|
|
$condition['order_id'] = $order['order_id'];
|
|
|
$condition['seller_state'] = array('lt', '3'); //状态:1为待审核,2为同意,3为不同意
|
|
|
- $result = $this->getRefundReturnList($condition,'','refund_id');
|
|
|
+ $result = $this->getRefundReturnList($condition);
|
|
|
|
|
|
if(!empty($result)){
|
|
|
+ $refund_state = $this->getRefundStatueApp($result);
|
|
|
return $result[0]['refund_id'];
|
|
|
}
|
|
|
return 0;
|
|
@@ -641,10 +643,10 @@ class refund_returnModel extends Model
|
|
|
$condition['order_id'] = $good['order_id'];
|
|
|
$condition['goods_id'] = $good['goods_id'];
|
|
|
$condition['seller_state'] = array('lt', '3'); //状态:1为待审核,2为同意,3为不同意
|
|
|
- $result = $this->getRefundReturnList($condition,'','refund_id,refund_state');
|
|
|
+ $result = $this->getRefundReturnList($condition);
|
|
|
|
|
|
if(!empty($result)){
|
|
|
- $refund_state = $result[0]['refund_state'];
|
|
|
+ $refund_state = $this->getRefundStatueApp($result);
|
|
|
return $result[0]['refund_id'];
|
|
|
}
|
|
|
return 0;
|