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
40f863db
Commit
40f863db
authored
Nov 28, 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
e6308fcf
a8e3f6eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
489 additions
and
219 deletions
+489
-219
Index.php
application/controllers/Index.php
+1
-1
ApiConst.php
application/library/Our/ApiConst.php
+1
-0
DescribeConst.php
application/library/Our/DescribeConst.php
+3
-0
PathConst.php
application/library/Our/PathConst.php
+2
-1
OrderService.php
application/models/Business/Order/OrderService.php
+43
-26
RefundService.php
application/models/Business/Order/RefundService.php
+249
-120
DeliveryService.php
application/models/Business/Store/DeliveryService.php
+5
-1
ShareService.php
application/models/Business/User/ShareService.php
+55
-6
Goods.php
application/models/DAO/Goods.php
+2
-0
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+101
-47
PBundling.php
application/models/DAO/PBundling.php
+0
-1
PBundlingGoods.php
application/models/DAO/PBundlingGoods.php
+1
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+6
-1
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+20
-15
No files found.
application/controllers/Index.php
View file @
40f863db
...
@@ -45,7 +45,7 @@ class IndexController extends \Our\Controller_Abstract {
...
@@ -45,7 +45,7 @@ class IndexController extends \Our\Controller_Abstract {
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareStore
){
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareStore
){
$this
->
_view
->
display
(
'index/store.phtml'
);
$this
->
_view
->
display
(
'index/store.phtml'
);
}
}
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareGoods
){
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareGoods
||
\Our\ApiConst
::
shareGroup
){
$this
->
_view
->
display
(
'index/goods.phtml'
);
$this
->
_view
->
display
(
'index/goods.phtml'
);
}
}
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareSaler
){
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareSaler
){
...
...
application/library/Our/ApiConst.php
View file @
40f863db
...
@@ -394,6 +394,7 @@ class ApiConst
...
@@ -394,6 +394,7 @@ class ApiConst
const
shareStore
=
2
;
//店铺
const
shareStore
=
2
;
//店铺
const
shareGoods
=
3
;
//商品
const
shareGoods
=
3
;
//商品
const
shareSaler
=
4
;
//销售员分享
const
shareSaler
=
4
;
//销售员分享
const
shareGroup
=
31
;
//分享组合商品
const
wxAppPayType
=
1
;
//APP微信支付
const
wxAppPayType
=
1
;
//APP微信支付
const
aliPayType
=
2
;
//APP支付宝支付
const
aliPayType
=
2
;
//APP支付宝支付
...
...
application/library/Our/DescribeConst.php
View file @
40f863db
...
@@ -152,6 +152,9 @@ class DescribeConst
...
@@ -152,6 +152,9 @@ class DescribeConst
const
refund
=
'退款'
;
const
refund
=
'退款'
;
const
refundRetund
=
'退货'
;
const
refundRetund
=
'退货'
;
const
sellerRefuseReturn
=
'卖家拒绝退货'
;
const
sellerAgreeReturn
=
'卖家同意退货'
;
//用户订单送达消息
//用户订单送达消息
const
reacheRemindTitle
=
'你的订单卖家已经送达'
;
const
reacheRemindTitle
=
'你的订单卖家已经送达'
;
const
reacheRemindContent
=
'你有新的订单号为{0}的订单已经已经送达'
;
const
reacheRemindContent
=
'你有新的订单号为{0}的订单已经已经送达'
;
...
...
application/library/Our/PathConst.php
View file @
40f863db
...
@@ -26,7 +26,8 @@ class PathConst {
...
@@ -26,7 +26,8 @@ class PathConst {
const
sharePlat
=
"http://www.shenbd.com"
;
const
sharePlat
=
"http://www.shenbd.com"
;
const
shareStore
=
"http://share.shenbd.com/share.html?type=store&id=
{
0
}
"
;
const
shareStore
=
"http://share.shenbd.com/share.html?type=store&id=
{
0
}
"
;
const
shareGoods
=
"http://share.shenbd.com/share.html?type=goods&gid=
{
0}&cid={1}&sid={2
}
"
;
const
shareGroups
=
"http://share.shenbd.com/share.html?type=group&gid=
{
0}&sid={1
}
"
;
const
timeParam
=
'¶m='
.
TIMESTAMP
;
const
timeParam
=
'¶m='
.
TIMESTAMP
;
const
cutVertical
=
'|'
;
const
cutVertical
=
'|'
;
...
...
application/models/Business/Order/OrderService.php
View file @
40f863db
This diff is collapsed.
Click to expand it.
application/models/Business/Order/RefundService.php
View file @
40f863db
This diff is collapsed.
Click to expand it.
application/models/Business/Store/DeliveryService.php
View file @
40f863db
...
@@ -58,7 +58,11 @@ class DeliveryServiceModel extends \Business\AbstractModel
...
@@ -58,7 +58,11 @@ class DeliveryServiceModel extends \Business\AbstractModel
$qmDeliveryManLogData
[
'delivery_state'
]
=
ApiConst
::
deliveryStateWait
;
$qmDeliveryManLogData
[
'delivery_state'
]
=
ApiConst
::
deliveryStateWait
;
$qmDeliveryManLogData
[
'distribution_fee'
]
=
$data
[
'distributionFee'
];
$qmDeliveryManLogData
[
'distribution_fee'
]
=
$data
[
'distributionFee'
];
$qmDeliveryManLogData
[
'order_type'
]
=
$data
[
'orderType'
];
$qmDeliveryManLogData
[
'order_type'
]
=
$data
[
'orderType'
];
$qmDeliveryManLogData
[
'shipping_fee'
]
=
$orderD
[
'shippingFee'
];
if
(
$data
[
'orderType'
]
==
ApiConst
::
orderTypeRefund
){
$qmDeliveryManLogData
[
'shipping_fee'
]
=
$orderD
[
'need_shipping_fee'
];
}
else
{
$qmDeliveryManLogData
[
'shipping_fee'
]
=
$orderD
[
'shippingFee'
];
}
$qmDeliveryManLogData
[
'order_sn'
]
=
$orderD
[
'orderSn'
];
$qmDeliveryManLogData
[
'order_sn'
]
=
$orderD
[
'orderSn'
];
$qmDeliveryManLogData
[
'get_time'
]
=
TIMESTAMP
;
$qmDeliveryManLogData
[
'get_time'
]
=
TIMESTAMP
;
// $qmDeliveryWhere['diliveryman_id']= $qmDeliveryManLogData['diliveryman_id'];
// $qmDeliveryWhere['diliveryman_id']= $qmDeliveryManLogData['diliveryman_id'];
...
...
application/models/Business/User/ShareService.php
View file @
40f863db
...
@@ -34,6 +34,23 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -34,6 +34,23 @@ class ShareServiceModel extends \Business\AbstractModel
public
function
getSaveData
(
$data
){
public
function
getSaveData
(
$data
){
$driverType
=
\Our\Common
::
getDriverType
();
$driverType
=
\Our\Common
::
getDriverType
();
$data
[
'driverType'
]
=
$driverType
;
$data
[
'driverType'
]
=
$driverType
;
if
(
$data
[
'type'
]
==
ApiConst
::
shareGoods
){
if
(
!
empty
(
$data
[
'id'
])){
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
$goods
=
$goodsDao
->
getOnlineOne
(
$data
[
'id'
]);
$data
[
'goodsId'
]
=
$goods
[
'goods_id'
];
$data
[
'goodsCommonid'
]
=
$goods
[
'goods_commonid'
];
$data
[
'storeId'
]
=
$goods
[
'store_id'
];
}
}
if
(
$data
[
'type'
]
==
ApiConst
::
shareGroup
){
if
(
!
empty
(
$data
[
'id'
])){
$pBundlingDao
=
\DAO\PBundlingModel
::
getInstance
();
$pBundling
=
$pBundlingDao
->
findById
(
$data
[
'groupId'
]);
$data
[
'groupId'
]
=
$data
[
'groupId'
];
$data
[
'storeId'
]
=
$pBundling
[
'store_id'
];
}
}
$data
[
'qrCode'
]
=
$this
->
growQrcode
(
$data
);
$data
[
'qrCode'
]
=
$this
->
growQrcode
(
$data
);
if
(
$data
[
'type'
]
==
ApiConst
::
shareStore
||
$data
[
'type'
]
==
ApiConst
::
shareSaler
){
if
(
$data
[
'type'
]
==
ApiConst
::
shareStore
||
$data
[
'type'
]
==
ApiConst
::
shareSaler
){
if
(
!
empty
(
$data
[
'id'
])){
if
(
!
empty
(
$data
[
'id'
])){
...
@@ -47,6 +64,7 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -47,6 +64,7 @@ class ShareServiceModel extends \Business\AbstractModel
}
}
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
return
$data
;
return
$data
;
...
@@ -74,8 +92,17 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -74,8 +92,17 @@ class ShareServiceModel extends \Business\AbstractModel
));
));
return
$res
;
return
$res
;
}
}
public
function
getQrUrl
(
$id
){
public
function
getQrUrl
(
$data
,
$type
=
'store'
){
return
Common
::
format
(
PathConst
::
shareStore
,
$id
);
if
(
$type
==
'store'
){
return
Common
::
format
(
PathConst
::
shareStore
,
$data
[
'id'
]);
}
if
(
$type
==
'goods'
){
return
Common
::
format
(
PathConst
::
shareGoods
,
$data
[
'goodsId'
],
$data
[
'goodsCommonid'
],
$data
[
'storeId'
]);
}
if
(
$type
==
'group'
){
return
Common
::
format
(
PathConst
::
shareGroups
,
$data
[
'groupId'
],
$data
[
'storeId'
]);
}
}
}
public
function
growQrcode
(
$data
){
public
function
growQrcode
(
$data
){
...
@@ -93,11 +120,11 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -93,11 +120,11 @@ class ShareServiceModel extends \Business\AbstractModel
$this
->
memberDb0Redis
->
tableCacheSet
(
$fileName
,
$url
,
ApiConst
::
zero
);
$this
->
memberDb0Redis
->
tableCacheSet
(
$fileName
,
$url
,
ApiConst
::
zero
);
return
$url
;
return
$url
;
}
else
{
}
else
{
return
$this
->
getQrUrl
(
$data
[
'id'
]
);
return
$this
->
getQrUrl
(
$data
);
// return PathConst::wxDefaultPath;
// return PathConst::wxDefaultPath;
}
}
}
else
{
}
else
{
return
$this
->
getQrUrl
(
$data
[
'id'
]
);
return
$this
->
getQrUrl
(
$data
);
//不是微信分享就是普通下载的二维码图片
//不是微信分享就是普通下载的二维码图片
//return PathConst::downLoadQrcode;
//return PathConst::downLoadQrcode;
}
}
...
@@ -115,12 +142,34 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -115,12 +142,34 @@ class ShareServiceModel extends \Business\AbstractModel
$this
->
memberDb0Redis
->
tableCacheSet
(
$fileName
,
$url
,
ApiConst
::
zero
);
$this
->
memberDb0Redis
->
tableCacheSet
(
$fileName
,
$url
,
ApiConst
::
zero
);
return
$url
;
return
$url
;
}
else
{
}
else
{
return
$this
->
getQrUrl
(
$data
[
'id'
]
);
return
$this
->
getQrUrl
(
$data
,
'goods'
);
//return PathConst::wxDefaultPath;
//return PathConst::wxDefaultPath;
}
}
}
else
{
}
else
{
//不是微信分享就是普通下载的二维码图片
//不是微信分享就是普通下载的二维码图片
return
$this
->
getQrUrl
(
$data
[
'id'
]);
return
$this
->
getQrUrl
(
$data
,
'goods'
);
//return PathConst::downLoadQrcode;
}
}
if
(
$data
[
'type'
]
==
\Our\ApiConst
::
shareGroup
){
if
((
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriend
||
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriends
)){
if
(
\Our\ApiConst
::
isWxPublish
){
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxGoodsParams
,
$data
[
'id'
]);
$page
=
\Our\PathConst
::
wxGoodsPath
;
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
$fileName
=
md5
(
$page
.
$res
);
$fileName
=
$fileName
.
NameConst
::
jpgSuffix
;
$base64image
=
$this
->
dataUri
(
$res
,
ImageConst
::
imagePgn
);
$url
=
ImageUtil
::
uploadBase64Image
(
$base64image
,
ImageConst
::
shareImage
,
$fileName
);
$this
->
memberDb0Redis
->
tableCacheSet
(
$fileName
,
$url
,
ApiConst
::
zero
);
return
$url
;
}
else
{
return
$this
->
getQrUrl
(
$data
,
'group'
);
//return PathConst::wxDefaultPath;
}
}
else
{
//不是微信分享就是普通下载的二维码图片
return
$this
->
getQrUrl
(
$data
,
'group'
);
//return PathConst::downLoadQrcode;
//return PathConst::downLoadQrcode;
}
}
}
}
...
...
application/models/DAO/Goods.php
View file @
40f863db
...
@@ -20,6 +20,8 @@ class GoodsModel extends \DAO\AbstractModel {
...
@@ -20,6 +20,8 @@ class GoodsModel extends \DAO\AbstractModel {
private
$cartGoodsField
=
'goods_id,goods_storage,store_id,goods_commonid,goods_name,goods_image,goods_spec,snapshot_id'
;
private
$cartGoodsField
=
'goods_id,goods_storage,store_id,goods_commonid,goods_name,goods_image,goods_spec,snapshot_id'
;
public
$goodsDetailField
=
'goods_id as goodsId,goods_commonid as goodsCommonid,goods_name as goodsName,store_id as storeId'
;
/**
/**
* 主键
* 主键
*
*
...
...
application/models/DAO/Order/RefundReturn.php
View file @
40f863db
This diff is collapsed.
Click to expand it.
application/models/DAO/PBundling.php
View file @
40f863db
...
@@ -81,7 +81,6 @@ class PBundlingModel extends \DAO\AbstractModel {
...
@@ -81,7 +81,6 @@ class PBundlingModel extends \DAO\AbstractModel {
public
function
findById
(
$blId
,
$field
=
\Our\NameConst
::
allField
){
public
function
findById
(
$blId
,
$field
=
\Our\NameConst
::
allField
){
$where
[
'bl_id'
]
=
$blId
;
$where
[
'bl_id'
]
=
$blId
;
$data
=
$this
->
find
(
$where
,
$field
);
$data
=
$this
->
find
(
$where
,
$field
);
return
$data
;
return
$data
;
}
}
...
...
application/models/DAO/PBundlingGoods.php
View file @
40f863db
...
@@ -37,6 +37,7 @@ class PBundlingGoodsModel extends \DAO\AbstractModel {
...
@@ -37,6 +37,7 @@ class PBundlingGoodsModel extends \DAO\AbstractModel {
$this
->
setDb
(
$this
->
dbName
);
$this
->
setDb
(
$this
->
dbName
);
return
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
join
(
'han_p_bundling_goods'
,
"han_p_bundling_goods.bl_id = han_p_bundling.bl_id"
,
'inner'
)
->
where
(
$where
)
->
where
(
"bl_quota_starttime <= "
.
time
())
->
where
(
'bl_quota_endtime >= '
.
time
())
->
where
(
'bl_state=1'
)
->
limit
(
$limit
)
->
fetchAll
();
return
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
join
(
'han_p_bundling_goods'
,
"han_p_bundling_goods.bl_id = han_p_bundling.bl_id"
,
'inner'
)
->
where
(
$where
)
->
where
(
"bl_quota_starttime <= "
.
time
())
->
where
(
'bl_quota_endtime >= '
.
time
())
->
where
(
'bl_state=1'
)
->
limit
(
$limit
)
->
fetchAll
();
}
}
/**
/**
* 类实例
* 类实例
*
*
...
...
application/models/Error/CodeConfig.php
View file @
40f863db
...
@@ -315,7 +315,9 @@ class CodeConfigModel
...
@@ -315,7 +315,9 @@ class CodeConfigModel
const
orderWxPayError
=
30137
;
const
orderWxPayError
=
30137
;
const
orderWxPaySignError
=
30138
;
const
orderWxPaySignError
=
30138
;
const
wrongRefundState
=
300139
;
const
updateIsRefundFail
=
300140
;
const
updateRefundStateNameFail
=
300141
;
//店铺相关错误码
//店铺相关错误码
//商品分类
//商品分类
...
@@ -811,6 +813,9 @@ class CodeConfigModel
...
@@ -811,6 +813,9 @@ class CodeConfigModel
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
self
::
orderWxPayError
=>
'微信支付尚未开通'
,
self
::
orderWxPayError
=>
'微信支付尚未开通'
,
self
::
orderWxPaySignError
=>
'微信支付签名错误'
,
self
::
orderWxPaySignError
=>
'微信支付签名错误'
,
self
::
wrongRefundState
=>
'订单状态有误'
,
self
::
updateIsRefundFail
=>
'更新is_refund失败'
,
self
::
updateRefundStateNameFail
=>
'更新order表refund_state_name失败'
,
//销售员
//销售员
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
40f863db
...
@@ -202,16 +202,16 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -202,16 +202,16 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
* 查询配送员
* 查询配送员
*
*
*/
*/
public
function
searchDeliveryAction
(){
public
function
searchDeliveryAction
(){
$shopkeeperService
=
\Business\Store\ShopkeeperServiceModel
::
getInstance
();
$shopkeeperService
=
\Business\Store\ShopkeeperServiceModel
::
getInstance
();
$res
=
$shopkeeperService
->
getDiliveryMan
(
$this
->
req
[
'data'
][
'mobile'
]);
$res
=
$shopkeeperService
->
getDiliveryMan
(
$this
->
req
[
'data'
][
'mobile'
]);
$res
=
$res
?
$res
:
new
\stdClass
();
$res
=
$res
?
$res
:
new
\stdClass
();
$this
->
success
(
$res
,
\Our\DescribeConst
::
successMessage
);
$this
->
success
(
$res
,
\Our\DescribeConst
::
successMessage
);
}
}
/**
/**
* 单一属性商品库存预警
* 单一属性商品库存预警
* @author king
* @author king
*/
*/
public
function
warningAction
(){
public
function
warningAction
(){
$goodsCommonService
=
\Business\Goods\GoodsCommonServiceModel
::
getInstance
();
$goodsCommonService
=
\Business\Goods\GoodsCommonServiceModel
::
getInstance
();
$pageIndex
=
$this
->
getPageIndex
();
$pageIndex
=
$this
->
getPageIndex
();
...
@@ -259,8 +259,13 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -259,8 +259,13 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$refundService
=
\Business\Order\RefundServiceModel
::
getInstance
();
$refundService
=
\Business\Order\RefundServiceModel
::
getInstance
();
$refundAmount
=
floatval
(
$this
->
req
[
'data'
][
'refundAmount'
]);
$refundAmount
=
floatval
(
$this
->
req
[
'data'
][
'refundAmount'
]);
$text
=
trim
(
$this
->
req
[
'data'
][
'text'
]);
$text
=
trim
(
$this
->
req
[
'data'
][
'text'
]);
$res
=
$refundService
->
refund
(
$this
->
storeId
,
$this
->
sellerId
,
$this
->
sellerName
,
$refundId
,
$refundAmount
,
$text
);
$isGiveUp
=
$this
->
req
[
'data'
][
'isGiveUp'
]
?
$this
->
req
[
'data'
][
'isGiveUp'
]
:
\Our\ApiConst
::
zero
;
$this
->
success
(
$res
);
$res
=
$refundService
->
refund
(
$this
->
storeId
,
$this
->
sellerId
,
$this
->
sellerName
,
$refundId
,
$refundAmount
,
$text
,
\Our\ApiConst
::
refundSellerAgree
,
$isGiveUp
);
if
(
$res
){
$this
->
success
(
'操作成功'
);
}
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
}
/**
/**
...
@@ -278,9 +283,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -278,9 +283,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
}
}
/**
/**
* 确认收货
* 确认收货
* @throws Exception
* @throws Exception
*/
*/
public
function
confirmReceiveAction
(){
public
function
confirmReceiveAction
(){
$refundId
=
intval
(
$this
->
req
[
'data'
][
'refundId'
]);
$refundId
=
intval
(
$this
->
req
[
'data'
][
'refundId'
]);
if
(
!
$refundId
)
{
if
(
!
$refundId
)
{
...
...
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