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
68051e1a
Commit
68051e1a
authored
Dec 01, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
58e18cb9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
2 deletions
+17
-2
StoreService.php
application/models/Business/Store/StoreService.php
+1
-1
MemberService.php
application/models/Business/User/MemberService.php
+5
-0
Goods.php
application/models/DAO/Goods.php
+1
-1
StoreJoinin.php
application/models/DAO/Store/StoreJoinin.php
+8
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+2
-0
No files found.
application/models/Business/Store/StoreService.php
View file @
68051e1a
...
...
@@ -933,7 +933,7 @@ class StoreServiceModel extends \Business\AbstractModel{
$field
=
'store_id as storeId,store_name as storeName,store_label as storeLabel,store_intro as storeIntro,store_longitude,store_latitude'
;
$where
=
' store_id in('
.
implode
(
','
,
$storeIds
)
.
')'
;
sort
(
$storeIds
);
$stores
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getOnlineStores'
),
array
(
$where
,
$field
),
\Our\ApiConst
::
oneHour
);
$stores
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getOnlineStores'
),
array
(
$where
,
$field
),
\Our\ApiConst
::
oneHour
,
array
(
$condition
[
'cityCode'
])
);
if
(
$stores
){
$storeList
=
array
();
foreach
(
$stores
as
$store
){
...
...
application/models/Business/User/MemberService.php
View file @
68051e1a
...
...
@@ -781,6 +781,11 @@ class MemberServiceModel extends \Business\AbstractModel
$memberDao
->
db
->
doRollback
();
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storePhoneUpdateFailed
);
}
$resultStoreJoinin
=
\DAO\Store\StoreJoininModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
)
->
save
(
array
(
'seller_name'
=>
$data
[
'mobile'
]),
array
(
'member_id'
=>
$store
[
'member_id'
]));
if
(
$resultStoreJoinin
===
false
){
$memberDao
->
db
->
doRollback
();
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
sellerJoinUpdateFailed
);
}
}
$sellerResult
=
\DAO\Store\SellerModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
)
->
update
(
array
(
'seller_name'
=>
$data
[
'mobile'
]),
array
(
'seller_name'
=>
$oldMemberMobile
));
if
(
$sellerResult
===
false
){
...
...
application/models/DAO/Goods.php
View file @
68051e1a
...
...
@@ -378,7 +378,7 @@ class GoodsModel extends \DAO\AbstractModel {
$dataIds
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$datas
);
$i
++
)
{
$goodsSql
.=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN goods_storage
{
2}{1
}
"
,
$datas
[
$i
][
'goodsId'
],
$datas
[
$i
][
'goodsNum'
],
\Our\ArrayConst
::
ops
[
$op
]);
$goodsEdittimeSql
.=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN
goods_edittime=
{
1
}
"
,
$datas
[
$i
][
'goodsId'
],
TIMESTAMP
);
$goodsEdittimeSql
.=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN
{
1
}
"
,
$datas
[
$i
][
'goodsId'
],
TIMESTAMP
);
$dataIds
[]
=
$datas
[
$i
][
'goodsId'
];
//$updateAllSql .= $updateSql;
if
(
$i
%
1000
==
0
&&
$i
!=
0
)
{
...
...
application/models/DAO/Store/StoreJoinin.php
View file @
68051e1a
...
...
@@ -43,6 +43,14 @@ class StoreJoininModel extends \DAO\AbstractModel
public
function
getOneByMemberIdCache
(
$memberId
,
$field
)
{
return
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOneByMemberId'
),
array
(
$memberId
,
$field
),
\Our\ApiConst
::
oneDaySecond
,
array
(
$memberId
));
}
public
function
save
(
$data
,
$where
){
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
rows
(
$data
)
->
where
(
$where
)
->
execute
();
return
$result
;
}
/**
* 类实例
*
...
...
application/models/Error/CodeConfig.php
View file @
68051e1a
...
...
@@ -103,6 +103,7 @@ class CodeConfigModel
const
storePhoneUpdateFailed
=
10115
;
const
sellerNameUpdateFailed
=
10116
;
const
notHaveAccess
=
10117
;
const
sellerJoinUpdateFailed
=
10118
;
//访问错误
const
illegalAccess
=
200001
;
...
...
@@ -530,6 +531,7 @@ class CodeConfigModel
self
::
storePhoneUpdateFailed
=>
'更换手机时卖家手机号码更新失败'
,
self
::
sellerNameUpdateFailed
=>
'更换手机时卖家手机号码更新失败'
,
self
::
notHaveAccess
=>
'您没有权限使用'
,
self
::
sellerJoinUpdateFailed
=>
'更换手机时卖家手机号码更新失败'
,
//商品相关
self
::
emptyCommonId
=>
'商品主键不能为空'
,
self
::
goodsNotExist
=>
'商品不存在'
,
...
...
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