Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
b9914c40
Commit
b9914c40
authored
Dec 07, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz
parents
c0e028b3
98d8cf61
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
309 additions
and
199 deletions
+309
-199
OrderConst.php
application/library/Our/OrderConst.php
+11
-1
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+10
-0
RefundService.php
application/models/Business/Order/RefundService.php
+28
-20
Goods.php
application/models/DAO/Goods.php
+13
-3
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+246
-174
url.ini
conf/url.ini
+1
-1
test.jpg
public/test.jpg
+0
-0
No files found.
application/library/Our/OrderConst.php
View file @
b9914c40
...
@@ -25,6 +25,9 @@ class OrderConst {
...
@@ -25,6 +25,9 @@ class OrderConst {
const
express
=
'快递配送'
;
const
express
=
'快递配送'
;
const
complete
=
"已完成"
;
const
complete
=
"已完成"
;
const
close
=
"已关闭"
;
const
close
=
"已关闭"
;
const
platformStateVerify
=
'待审核'
;
const
platformStateAgree
=
'同意'
;
const
platformStateRefuse
=
'拒绝'
;
const
platformAudit
=
"平台审核"
;
const
platformAudit
=
"平台审核"
;
const
platFormAgree
=
"平台同意"
;
const
platFormAgree
=
"平台同意"
;
...
@@ -50,7 +53,14 @@ class OrderConst {
...
@@ -50,7 +53,14 @@ class OrderConst {
//详情
//详情
const
unpayDetailMessage
=
"10分钟后交易自动关闭"
;
const
unpayDetailMessage
=
"10分钟后交易自动关闭"
;
const
payCancelDetailMessage
=
"10分钟可取消订单"
;
const
payCancelDetailMessage
=
"10分钟可取消订单"
;
//商家售后状态
const
sellerStateVerify
=
'待审核'
;
const
sellerStateAgree
=
'同意'
;
const
sellerStateRefuse
=
'不同意'
;
//商家售后状态
const
platStateVerify
=
'待审核'
;
const
platStateAgree
=
'同意'
;
const
platStateRefuse
=
'不同意'
;
//店铺详细文案
//店铺详细文案
const
storeWaiteConfirm
=
'请尽快确认订单'
;
const
storeWaiteConfirm
=
'请尽快确认订单'
;
const
storeWaiteSend
=
'请尽快发货'
;
const
storeWaiteSend
=
'请尽快发货'
;
...
...
application/models/Business/Goods/EvaluationService.php
View file @
b9914c40
...
@@ -73,7 +73,17 @@ class EvaluationServiceModel extends \Business\AbstractModel {
...
@@ -73,7 +73,17 @@ class EvaluationServiceModel extends \Business\AbstractModel {
$evaluation
[
'memberAvatar'
]
=
$memberAvatar
;
$evaluation
[
'memberAvatar'
]
=
$memberAvatar
;
//$images = $this->_upload($v['images']);
//$images = $this->_upload($v['images']);
$images
=
$v
[
'images'
];
$images
=
$v
[
'images'
];
//兼容安卓传参
if
(
!
is_array
(
$images
))
$images
=
json_decode
(
$images
,
true
);
if
(
!
is_array
(
$images
))
$images
=
json_decode
(
$images
,
true
);
if
(
is_array
(
$images
)
&&
$images
)
{
foreach
(
$images
as
$k
=>
$v
)
{
if
(
empty
(
$v
))
{
unset
(
$images
[
$k
]);
}
}
}
else
{
$images
=
null
;
}
if
(
empty
(
$images
))
$images
=
null
;
if
(
empty
(
$images
))
$images
=
null
;
$images
?
$data
[
'goods'
][
$k
][
'haveImg'
]
=
1
:
$data
[
'goods'
][
$k
][
'haveImg'
]
=
0
;
$images
?
$data
[
'goods'
][
$k
][
'haveImg'
]
=
1
:
$data
[
'goods'
][
$k
][
'haveImg'
]
=
0
;
if
(
$data
[
'goods'
][
$k
][
'haveImg'
]
==
1
)
{
if
(
$data
[
'goods'
][
$k
][
'haveImg'
]
==
1
)
{
...
...
application/models/Business/Order/RefundService.php
View file @
b9914c40
...
@@ -702,6 +702,7 @@ class RefundServiceModel extends \Business\AbstractModel
...
@@ -702,6 +702,7 @@ class RefundServiceModel extends \Business\AbstractModel
$orderCommons
=
$orderCommonDao
->
getAllByOrderIds
(
$orderIds
,
$orderCommonDao
->
orderCommonField
);
$orderCommons
=
$orderCommonDao
->
getAllByOrderIds
(
$orderIds
,
$orderCommonDao
->
orderCommonField
);
$orderCommons
=
$orderDao
->
convertOrder
(
$orderCommons
,
'orderId'
);
$orderCommons
=
$orderDao
->
convertOrder
(
$orderCommons
,
'orderId'
);
foreach
(
$refundMerge
as
&
$value
)
{
foreach
(
$refundMerge
as
&
$value
)
{
$value
[
'sellerStateName'
]
=
$refundReturnDao
->
getSellerStateName
(
$value
[
'sellerState'
]);
$value
[
'stateName'
]
=
$refundReturnDao
->
getRefundTextStatus
(
$value
,
true
);
$value
[
'stateName'
]
=
$refundReturnDao
->
getRefundTextStatus
(
$value
,
true
);
/*$value['blId'] = isset($value['blId']) ? (!is_null($value['blId']) ? $value['blId'] : ApiConst::zero) : ApiConst::zero;
/*$value['blId'] = isset($value['blId']) ? (!is_null($value['blId']) ? $value['blId'] : ApiConst::zero) : ApiConst::zero;
$value['canPlatformIn'] = $refundReturnDao->isPlatformIn($value) ? ApiConst::one : ApiConst::zero;
$value['canPlatformIn'] = $refundReturnDao->isPlatformIn($value) ? ApiConst::one : ApiConst::zero;
...
@@ -725,7 +726,14 @@ class RefundServiceModel extends \Business\AbstractModel
...
@@ -725,7 +726,14 @@ class RefundServiceModel extends \Business\AbstractModel
}
else
{
}
else
{
$value
[
'deliveryman'
]
=
new
\stdClass
();
$value
[
'deliveryman'
]
=
new
\stdClass
();
}
}
$value
[
'goodsGroup'
]
=!
empty
(
$goodGroup
)
?
$goodGroup
:
[];
if
(
!
empty
(
$goodGroup
)){
$value
[
'goodsGroup'
]
=
$goodGroup
;
$value
[
'goodsOriginPrice'
]
=
$goodsDao
->
getOriginPriceByGoodsGroup
(
$value
[
'goodsGroup'
]);
}
else
{
$value
[
'goodsGroup'
]
=
[];
}
if
(
$value
[
'refundType'
]
==
ApiConst
::
refundTypeGoods
)
{
if
(
$value
[
'refundType'
]
==
ApiConst
::
refundTypeGoods
)
{
if
(
$value
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
if
(
$value
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
$value
[
'reciverInfo'
]
=
$orderCommonDao
->
getReciverInfo
(
$value
[
'reciverInfo'
]);
$value
[
'reciverInfo'
]
=
$orderCommonDao
->
getReciverInfo
(
$value
[
'reciverInfo'
]);
...
@@ -1206,7 +1214,7 @@ class RefundServiceModel extends \Business\AbstractModel
...
@@ -1206,7 +1214,7 @@ class RefundServiceModel extends \Business\AbstractModel
// $value['orderAmount'] = $value['orderAmount'];
// $value['orderAmount'] = $value['orderAmount'];
$refundReturn
[
'reciverInfo'
]
=
unserialize
(
$this
->
orderCommon
[
'reciverInfo'
]);
$refundReturn
[
'reciverInfo'
]
=
unserialize
(
$this
->
orderCommon
[
'reciverInfo'
]);
if
(
$refundReturn
[
'refundType'
]
==
ApiConst
::
refundTypeGoods
)
{
if
(
$refundReturn
[
'refundType'
]
==
ApiConst
::
refundTypeGoods
)
{
if
(
$refundReturn
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
if
(
$refundReturn
[
'refundShippingType'
]
==
ApiConst
::
bySeller
||
$refundReturn
[
'refundShippingType'
]
==
ApiConst
::
bySelf
){
$refundReturn
[
'reciverInfo'
]
=
$orderCommonDao
->
getReciverInfo
(
$refundReturn
[
'reciverInfo'
]);
$refundReturn
[
'reciverInfo'
]
=
$orderCommonDao
->
getReciverInfo
(
$refundReturn
[
'reciverInfo'
]);
}
}
}
else
{
}
else
{
...
@@ -1219,25 +1227,25 @@ class RefundServiceModel extends \Business\AbstractModel
...
@@ -1219,25 +1227,25 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturn
[
'refundText'
]
=
$refundReturnDao
->
getRefundTextStatus
(
$refundReturn
);
$refundReturn
[
'refundText'
]
=
$refundReturnDao
->
getRefundTextStatus
(
$refundReturn
);
$refundReturn
[
'stateName'
]
=
$refundReturn
[
'refundText'
];
$refundReturn
[
'stateName'
]
=
$refundReturn
[
'refundText'
];
$refundReturn
[
'goodsImage'
]
=
ImageUtil
::
getGoodsImgUrl
(
$refundReturn
[
'goodsImage'
],
ApiConst
::
goodsSmallSize
);
$refundReturn
[
'goodsImage'
]
=
ImageUtil
::
getGoodsImgUrl
(
$refundReturn
[
'goodsImage'
],
ApiConst
::
goodsSmallSize
);
//
$addressDao = \DAO\Order\DAddressModel::getInstance();
$addressDao
=
\DAO\Order\DAddressModel
::
getInstance
();
$info
=
$refundReturn
;
$info
=
$refundReturn
;
//
if ($refundReturn['refundType'] == ApiConst::refundTypeGoods) {
if
(
$refundReturn
[
'refundType'
]
==
ApiConst
::
refundTypeGoods
)
{
//
if ($refundReturn['addressId']) {
if
(
$refundReturn
[
'addressId'
])
{
//
$address = $addressDao->getAddressByAddressId($refundReturn['addressId'], $this->daddressField);
$address
=
$addressDao
->
getAddressByAddressId
(
$refundReturn
[
'addressId'
],
$this
->
daddressField
);
//
} else {
}
else
{
//
$address = $addressDao->getAddressByStoreId($refundReturn['storeId'], $this->daddressField);
$address
=
$addressDao
->
getAddressByStoreId
(
$refundReturn
[
'storeId'
],
$this
->
daddressField
);
//
}
}
//
if(!empty($address)){
if
(
!
empty
(
$address
)){
//
$address['isDefault'] = (int)$address['isDefault'];
$address
[
'isDefault'
]
=
(
int
)
$address
[
'isDefault'
];
//
$address['company']=isset( $address['company'])? $address['company']:'';
$address
[
'company'
]
=
isset
(
$address
[
'company'
])
?
$address
[
'company'
]
:
''
;
//
$info['dAddressInfo'] = $address;
$info
[
'dAddressInfo'
]
=
$address
;
//
}else{
}
else
{
//
$info['dAddressInfo'] =new \stdClass();
$info
[
'dAddressInfo'
]
=
new
\stdClass
();
//
}
}
//
//
} else {
}
else
{
//
$info['dAddressInfo'] = new \stdClass();
$info
[
'dAddressInfo'
]
=
new
\stdClass
();
//
}
}
$info
[
'canPlatformIn'
]
=
$refundReturnDao
->
isPlatformIn
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
$info
[
'canPlatformIn'
]
=
$refundReturnDao
->
isPlatformIn
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
$info
[
'canSendShippingType'
]
=
$refundReturnDao
->
checkIsAddReturnShipping
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
$info
[
'canSendShippingType'
]
=
$refundReturnDao
->
checkIsAddReturnShipping
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
if
(
$info
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
if
(
$info
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
...
...
application/models/DAO/Goods.php
View file @
b9914c40
...
@@ -474,6 +474,14 @@ class GoodsModel extends \DAO\AbstractModel {
...
@@ -474,6 +474,14 @@ class GoodsModel extends \DAO\AbstractModel {
}
}
return
$orderGoodses
;
return
$orderGoodses
;
}
}
public
function
getOriginPriceByGoodsGroup
(
$goodsGroup
){
$goodsOriginPrice
=
ApiConst
::
zero
;
foreach
(
$goodsGroup
as
$goodsG
){
$goodsOriginPrice
+=
$goodsG
[
'num'
]
*
$goodsG
[
'goodsPrice'
];
}
return
$goodsOriginPrice
;
}
//ccw
//ccw
public
function
convert
(
$goodses
,
$extentField
=
false
,
$refundOrders
=
false
){
public
function
convert
(
$goodses
,
$extentField
=
false
,
$refundOrders
=
false
){
if
(
$refundOrders
){
if
(
$refundOrders
){
...
@@ -505,11 +513,13 @@ class GoodsModel extends \DAO\AbstractModel {
...
@@ -505,11 +513,13 @@ class GoodsModel extends \DAO\AbstractModel {
if
(
isset
(
$goods
[
'goodsGroup'
])
&&!
empty
(
$goods
[
'goodsGroup'
])){
if
(
isset
(
$goods
[
'goodsGroup'
])
&&!
empty
(
$goods
[
'goodsGroup'
])){
$goods
[
'goodsGroup'
]
=
$this
->
getGoodsGroup
(
$goods
[
'goodsGroup'
]);
$goods
[
'goodsGroup'
]
=
$this
->
getGoodsGroup
(
$goods
[
'goodsGroup'
]);
$goods
Discount
Price
=
ApiConst
::
zero
;
$goods
Origin
Price
=
ApiConst
::
zero
;
foreach
(
$goods
[
'goodsGroup'
]
as
$goodsG
){
foreach
(
$goods
[
'goodsGroup'
]
as
$goodsG
){
$goodsDiscountPrice
+=
$goodsG
[
'num'
]
*
$goodsG
[
'discountPrice'
];
$goodsOriginPrice
+=
$goodsG
[
'num'
]
*
$goodsG
[
'goodsPrice'
];
}
}
$goods
[
'goodsDiscountPrice'
]
=
$goodsDiscountPrice
;
$goods
[
'goodsOriginPrice'
]
=
$goodsOriginPrice
;
// $goods['goodsDiscountPrice']=array_sum($goods['goodsGroup'],'discountPrice');
// $goods['goodsDiscountPrice']=array_sum($goods['goodsGroup'],'discountPrice');
// $goods['goodsReduceAmount']=$goods['goodsPayPrice']-$goods['goodsDiscountPrice'];
// $goods['goodsReduceAmount']=$goods['goodsPayPrice']-$goods['goodsDiscountPrice'];
}
else
{
}
else
{
...
...
application/models/DAO/Order/RefundReturn.php
View file @
b9914c40
This diff is collapsed.
Click to expand it.
conf/url.ini
View file @
b9914c40
...
@@ -91,7 +91,7 @@ config.url.resourcesHost = "http://test.qm.com"
...
@@ -91,7 +91,7 @@ config.url.resourcesHost = "http://test.qm.com"
config.url.userHost
=
""
config.url.userHost
=
""
; oss 域名
; oss 域名
config.url.ossHost
=
"http
://qmoss-01.oss-cn-hangzhou.aliyuncs
.com"
config.url.ossHost
=
"http
s://img.shenbd
.com"
;推送域名
;推送域名
config.url.pushHost
=
"127.0.0.1:9503"
;
config.url.pushHost
=
"127.0.0.1:9503"
;
...
...
public/test.jpg
0 → 100644
View file @
b9914c40
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment