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
ead94d6a
Commit
ead94d6a
authored
Sep 20, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
4c733b0e
e6a60de4
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
107 additions
and
16 deletions
+107
-16
User.php
application/controllers/User.php
+4
-2
ImageConst.php
application/library/Our/ImageConst.php
+4
-0
CartService.php
application/models/Business/Cart/CartService.php
+0
-1
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+1
-1
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+23
-2
AddressService.php
application/models/Business/User/AddressService.php
+11
-8
Order.php
application/models/DAO/Order/Order.php
+1
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+1
-1
DeliveryEvalLabelRedis.php
application/models/Redis/Db5/DeliveryEvalLabelRedis.php
+1
-1
application.ini
conf/application.ini
+42
-0
url.ini
conf/url.ini
+19
-0
No files found.
application/controllers/User.php
View file @
ead94d6a
...
...
@@ -61,7 +61,7 @@ class UserController extends \Our\Controller_AbstractIndex {
$this
->
memberService
->
clearKey
(
$this
->
key
);
$this
->
key
=
Common
::
bulidToken
(
$mobile
,
$password
);
session_id
(
$this
->
key
);
$this
->
sess
[
'member_id'
]
=
$member
[
'member_id'
];
$this
->
sess
[
'member_id'
]
=
(
int
)
$member
[
'member_id'
];
$this
->
sess
[
NameConst
::
sessionKey
]
=
$this
->
key
;
$member
[
NameConst
::
sessionKey
]
=
$this
->
key
;
$this
->
memberService
->
saveMember
(
$member
);
...
...
@@ -136,7 +136,9 @@ class UserController extends \Our\Controller_AbstractIndex {
$member
=
$this
->
memberService
->
loginWithThirdPlatformInfo
(
$where
);
if
(
$member
){
$userToken
=
$this
->
memberService
->
findMbUserTokenByMemberId
(
$member
[
'member_id'
]);
$this
->
memberService
->
clearKey
(
$userToken
[
'token'
]);
if
(
!
empty
(
$userToken
[
'token'
])){
$this
->
updateOldLoginKey
(
$userToken
[
'token'
]);
}
$this
->
memberService
->
clearKey
(
$this
->
key
);
$this
->
key
=
Common
::
bulidToken
(
''
,
''
,
''
,
\Our\ApiConst
::
wechatDeviceType
);
session_id
(
$this
->
key
);
...
...
application/library/Our/ImageConst.php
View file @
ead94d6a
...
...
@@ -111,4 +111,8 @@ class ImageConst{
const
groupGoodsImg
=
160
;
//组合详情页的搭配商品
const
storeGroupImg
=
186
;
//店铺促销
const
storeGroupGoodsImg
=
130
;
const
cartBlImage
=
184
;
const
cartBlDetailImage
=
148
;
}
application/models/Business/Cart/CartService.php
View file @
ead94d6a
...
...
@@ -449,7 +449,6 @@ class CartServiceModel extends \Business\AbstractModel{
$field
=
'MAX(gmt_update) AS gmtupdate,store_id'
;
$group
=
'store_id'
;
$storeIds
=
$cartDao
->
getCartStoreIdsByMemberId
(
$where
,
$memberId
,
$field
,
$group
,
$order
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$storeIds
));
//$cartStores = $cartDao->lists($where,$order,$field,$data['pageIndex'],$data['pageSize'],$group);
$storeIdList
=
array_column
(
$storeIds
,
'store_id'
);
$totalCount
=
count
(
$storeIdList
);
...
...
application/models/Business/Goods/EvaluationService.php
View file @
ead94d6a
...
...
@@ -24,7 +24,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
if
(
$order
[
'diliveryman_id'
])
{
//获取配送员评价标签
$evalLabelDAO
=
\DAO\DeliveryEvalLabelModel
::
getInstance
();
$data
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\DeliveryEvalLabelRedisModel
::
getInstance
(),
array
(
&
$evalLabelDAO
,
'getLabelList'
),
array
(
array
(
'store_id'
=>
$order
[
'store_id'
],
'is_show'
=>
1
),
'label_id,label_name'
),
\Our\ApiConst
::
oneDaySecond
);
$data
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\DeliveryEvalLabelRedisModel
::
getInstance
(),
array
(
&
$evalLabelDAO
,
'getLabelList'
),
array
(
array
(
'store_id'
=>
$order
[
'store_id'
],
'is_show'
=>
1
),
'label_id,label_name'
),
\Our\ApiConst
::
oneDaySecond
,
array
(
$order
[
'store_id'
])
);
if
(
$data
&&
is_array
(
$data
)){
foreach
(
$data
as
$k
=>
$v
){
$serviceEvaluations
[]
=
array
(
'labelId'
=>
$v
[
'label_id'
],
'label'
=>
$v
[
'label_name'
]);
...
...
application/models/Business/Goods/GroupSaleService.php
View file @
ead94d6a
...
...
@@ -114,6 +114,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
//$pBundlingList = $this->getGroupListForCart($blIds);
//var_dump($pBundlingList);
$pBundlingList
=
$this
->
getPBundlingListByBlIds
(
$blIds
,
\Our\DbNameConst
::
salveDBConnectName
,
true
);
$pBundlingList
=
$this
->
getResizeGroupSaleGoodsList
(
$pBundlingList
);
}
$goodsCommonIds
=
$cartListData
[
'goodsCommonIds'
];
$goodsIds
=
$cartListData
[
'goodsIds'
];
...
...
@@ -138,7 +139,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$tempObj
[
'goodsName'
]
=
$tempCart
[
'goods_name'
];
$tempObj
[
'goodsPrice'
]
=
$tempCart
[
'goods_price'
];
$tempObj
[
'goodsNum'
]
=
$tempCart
[
'goods_num'
];
$tempObj
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$tempCart
[
'goods_image'
]);
$tempObj
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$tempCart
[
'goods_image'
]
,
\Our\ImageConst
::
cartBlImage
);
$tempObj
[
'type'
]
=
$tempCart
[
'type'
];
if
(
$tempCart
[
'type'
]
==
\Our\ApiConst
::
addBundingToCart
)
{
$pBundling
=
isset
(
$pBundlingList
[
$tempCart
[
'goods_id'
]])
?
$pBundlingList
[
$tempCart
[
'goods_id'
]]
:
array
();
...
...
@@ -164,13 +165,15 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
if
(
$tempPrice
){
$tempObj
[
'goodsPrice'
]
=
$tempPrice
;
}
$tempObj
[
'goodsImage'
]
=
$pBundling
[
'image'
];
$tempObj
[
'goodsList'
]
=
\Our\Common
::
convertUnderline
(
$pBundling
[
'goodsList'
]);
$tempObj
[
'goodsOriginalPrice'
]
=
$pBundling
[
'sumPrice'
];
}
else
if
(
$tempCart
[
'type'
]
==
\Our\ApiConst
::
addGoodsToCart
)
{
$goodsStorage
=
isset
(
$goodsCommonStorages
[
$tempCart
[
'goods_commonid'
]][
$tempCart
[
'goods_id'
]])
?
$goodsCommonStorages
[
$tempCart
[
'goods_commonid'
]][
$tempCart
[
'goods_id'
]]
:
array
();
//$goodsDao->getOnlineStorageGoods($tempCart['goods_id']);
if
(
$goodsStorage
){
if
(
isset
(
$goodsStorage
[
'goods_image'
])
&&
$goodsStorage
[
'goods_image'
]){
$tempObj
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goodsStorage
[
'goods_image'
]);
$tempObj
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goodsStorage
[
'goods_image'
]
,
\Our\ImageConst
::
cartBlImage
);
}
if
(
$goodsStorage
[
'onlineFlag'
]
==
\Our\ApiConst
::
one
)
{
if
(
$goodsStorage
[
'goodsStorage'
]
>
\Our\ApiConst
::
zero
){
...
...
@@ -353,6 +356,24 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
return
$return
;
}
public
function
getResizeGroupSaleGoodsList
(
$pbundingList
,
$blImageWidth
=
\Our\ImageConst
::
cartBlImage
,
$blDetailImageWidth
=
\Our\ImageConst
::
cartBlDetailImage
){
$groupList
=
array
();
foreach
(
$pbundingList
as
$k
=>
$v
){
$v
[
'image'
]
=
ImageUtil
::
getGoodsImgUrl
(
$v
[
'image'
],
$blImageWidth
);
if
(
$v
[
'goodsList'
]){
$goods
=
array
();
foreach
(
$v
[
'goodsList'
]
as
$v2
){
$v2
[
'goodsImage'
]
=
ImageUtil
::
getGoodsImgWithUrl
(
$v2
[
'goodsImage'
],
$blDetailImageWidth
);
$goods
[]
=
$v2
;
}
$v
[
'goodsList'
]
=
$goods
;
}
$groupList
[
$k
]
=
$v
;
}
return
$groupList
;
}
/**
* 获取组合销售与商品列表
* @param $param
...
...
application/models/Business/User/AddressService.php
View file @
ead94d6a
...
...
@@ -71,14 +71,17 @@ class AddressServiceModel extends \Business\AbstractModel {
}
else
{
if
(
$currentAddress
){
if
(
$currentAddress
[
'addressId'
]
&&
$currentAddress
[
'chooseFlag'
]){
$address
[
'addressId'
]
=
$currentAddress
[
'addressId'
];
$address
[
'address'
]
=
$currentAddress
[
'address'
];
$address
[
'name'
]
=
$currentAddress
[
'name'
];
$address
[
'tagType'
]
=
$currentAddress
[
'tagType'
];
$address
[
'lat'
]
=
$currentAddress
[
'lat'
];
$address
[
'lng'
]
=
$currentAddress
[
'lng'
];
$address
[
'cityCode'
]
=
$currentAddress
[
'cityCode'
];
$addresses
[]
=
$address
;
$addresses
=
array
();
if
(
$currentAddress
[
'addressId'
]
>
\Our\ApiConst
::
zero
){
$address
[
'addressId'
]
=
$currentAddress
[
'addressId'
];
$address
[
'address'
]
=
$currentAddress
[
'address'
];
$address
[
'name'
]
=
$currentAddress
[
'name'
];
$address
[
'tagType'
]
=
$currentAddress
[
'tagType'
];
$address
[
'lat'
]
=
$currentAddress
[
'lat'
];
$address
[
'lng'
]
=
$currentAddress
[
'lng'
];
$address
[
'cityCode'
]
=
$currentAddress
[
'cityCode'
];
$addresses
[]
=
$address
;
}
$returnAddress
=
array
(
'returnAddressId'
=>
$currentAddress
[
'addressId'
],
'choosedAddressFlag'
=>
$currentAddress
[
'chooseFlag'
],
'addresses'
=>
$addresses
);
}
else
{
...
...
application/models/DAO/Order/Order.php
View file @
ead94d6a
...
...
@@ -232,6 +232,7 @@ class OrderModel extends \DAO\AbstractModel
public
function
insert
(
$data
)
{
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$data
[
'gmt_update'
]
=
TIMESTAMP
;
$result
=
$this
->
db
->
insert
(
$this
->
_tableName
)
->
rows
(
$data
)
->
execute
();
return
$result
;
}
...
...
application/models/Error/CodeConfig.php
View file @
ead94d6a
...
...
@@ -755,7 +755,7 @@ class CodeConfigModel {
self
::
noExpressDeliveryForOrder1
=>
'该店铺未配置快递配送'
,
self
::
goodsNoStoreForCartOrOrder1
=>
'商品库存紧张,您的购买数量太多啦'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复
重复
'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复
支付
'
,
//销售员
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
...
...
application/models/Redis/Db5/DeliveryEvalLabelRedis.php
100755 → 100644
View file @
ead94d6a
...
...
@@ -10,7 +10,7 @@ class DeliveryEvalLabelRedisModel extends \Redis\Db5\AbstractModel {
*
* @var string
*/
protected
$_tableName
=
'
OrderRedis.php
'
;
protected
$_tableName
=
'
han_delivery_eval_label
'
;
/**
...
...
conf/application.ini
View file @
ead94d6a
...
...
@@ -261,3 +261,45 @@ elastic.master.scheme="http";
;resources.database.params.database = "database"
;resources.database.params.username = "username"
;resources.database.params.password = "password"
[ccw : common]
; 数据库配置
resources.database.params.driver
=
"pdo_mysql"
resources.database.params.hostname
=
"127.0.0.1"
resources.database.params.port
=
3306
resources.database.params.database
=
"qmcs"
resources.database.params.username
=
"root"
resources.database.params.password
=
"root"
resources.database.params.charset
=
"UTF8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
; 从库配置
resources.database.slave.params.driver
=
"pdo_mysql"
resources.database.slave.params.hostname
=
"127.0.0.1"
resources.database.slave.params.port
=
3306
resources.database.slave.params.database
=
"qmcs"
resources.database.slave.params.username
=
"root"
resources.database.slave.params.password
=
"root"
resources.database.slave.params.charset
=
"UTF8"
resources.database.slave.params.driver_options.1002
=
"SET NAMES utf8"
redis.database.params.host
=
"127.0.0.1"
redis.database.params.port
=
"6379"
redis.database.params.prefix
=
"qm_"
;redis.database.params.password = "23456ertyu"
out.config
=
"/data/config"
;
;锁文件
out.locks="/data/locks";
; redis配置
;redis.database.params.password = "test"
;推送配置
push.clientHost
=
"ws://192.168.80.18:9502"
push.host
=
"192.168.80.18"
push.port
=
"9503"
push.open
=
1
elastic.master.host
=
"192.168.1.201"
elastic.master.port
=
"9200"
elastic.master.scheme
=
"http"
;
conf/url.ini
View file @
ead94d6a
...
...
@@ -115,3 +115,22 @@ config.url.convert="/usr/local/bin/wkhtmltoimage";
config.url.indexUrl="/www/local.qm.com/application/library/React"
config.url.libary
=
"/www/local.qm.com/application/library"
; 文件目录
[ccw : common]
; url相关配置
config.url.resourcesHost
=
"http://local.qm.com"
; 用户中心host
config.url.userHost
=
""
; oss 域名
config.url.ossHost
=
"http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost
=
"127.0.0.1:9503"
;
config.url.convert
=
"/usr/local/bin/wkhtmltoimage"
;
config.url.indexUrl="/www/local.qm.com/application/library/React"
config.url.libary
=
"/www/local.qm.com/application/library"
; 文件目录
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