Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
04708fd3
Commit
04708fd3
authored
Feb 17, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
1e042ba4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
34 deletions
+39
-34
api/Appapi/Model/Game.php
+0
-0
api/Appapi/Model/Guard.php
+2
-2
api/Appapi/Model/Live.php
+14
-8
api/Appapi/Model/Login.php
+1
-1
api/Appapi/Model/Red.php
+20
-21
api/Appapi/Model/User.php
+2
-2
No files found.
api/Appapi/Model/Game.php
View file @
04708fd3
This diff is collapsed.
Click to expand it.
api/Appapi/Model/Guard.php
View file @
04708fd3
...
@@ -147,8 +147,8 @@ class Model_Guard extends PhalApi_Model_NotORM {
...
@@ -147,8 +147,8 @@ class Model_Guard extends PhalApi_Model_NotORM {
$showid
=
0
;
$showid
=
0
;
}
}
}
}
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
'1'
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
'1'
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$endtime
=
$addtime
+
$guardinfo
[
'length_time'
];
$endtime
=
$addtime
+
$guardinfo
[
'length_time'
];
...
...
api/Appapi/Model/Live.php
View file @
04708fd3
...
@@ -147,11 +147,11 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -147,11 +147,11 @@ class Model_Live extends PhalApi_Model_NotORM {
->
group
(
'uid'
)
->
group
(
'uid'
)
->
fetchAll
();
->
fetchAll
();
foreach
(
$total
as
$k
=>
$v
){
foreach
(
$total
as
$k
=>
$v
){
$u
=
DI
()
->
notorm
->
users
DI
()
->
notorm
->
users
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$v
[
'total'
]
}
"
)));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$v
[
'total'
]
}
"
)));
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$v
[
'uid'
])
->
fetchOne
();
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'game_return'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$game
[
'id'
],
"giftcount"
=>
1
,
"totalcoin"
=>
$v
[
'total'
],
"showid"
=>
0
,
"addtime"
=>
$nowtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'game_return'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$game
[
'id'
],
"giftcount"
=>
1
,
"totalcoin"
=>
$v
[
'total'
],
"showid"
=>
0
,
"addtime"
=>
$nowtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
...
@@ -178,7 +178,8 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -178,7 +178,8 @@ class Model_Live extends PhalApi_Model_NotORM {
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$data
[
'deposit'
]
}
"
)));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$data
[
'deposit'
]
}
"
)));
delcache
(
'userinfo_'
.
$uid
);
delcache
(
'userinfo_'
.
$uid
);
$addtime
=
time
();
$addtime
=
time
();
$insert
=
array
(
"type"
=>
'income'
,
"action"
=>
'deposit_return'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$data
[
'deposit'
],
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
4
,
"game_banker"
=>
0
);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'deposit_return'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$data
[
'deposit'
],
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
4
,
"game_banker"
=>
0
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
...
@@ -402,10 +403,10 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -402,10 +403,10 @@ class Model_Live extends PhalApi_Model_NotORM {
'addtime'
=>
time
(),
'addtime'
=>
time
(),
];
];
DI
()
->
notorm
->
users_voterecord
->
insert
(
$insert_votes
);
DI
()
->
notorm
->
users_voterecord
->
insert
(
$insert_votes
);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
/* 更新直播 映票 累计映票 */
/* 更新直播 映票 累计映票 */
DI
()
->
notorm
->
users_coinrecord
DI
()
->
notorm
->
users_coinrecord
->
insert
(
array
(
"type"
=>
'expend'
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
));
->
insert
(
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'expend'
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
));
$userinfo2
=
DI
()
->
notorm
->
users
$userinfo2
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
select
(
'coin'
)
...
@@ -555,7 +556,7 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -555,7 +556,7 @@ class Model_Live extends PhalApi_Model_NotORM {
$showid
=
$stream2
[
1
];
$showid
=
$stream2
[
1
];
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"mark"
=>
$giftinfo
[
'mark'
],
"addtime"
=>
$addtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"mark"
=>
$giftinfo
[
'mark'
],
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
...
@@ -630,6 +631,7 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -630,6 +631,7 @@ class Model_Live extends PhalApi_Model_NotORM {
DI
()
->
notorm
->
users
DI
()
->
notorm
->
users
->
where
(
'id = ?'
,
$uid
)
->
where
(
'id = ?'
,
$uid
)
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$luckcoin
}
"
)
));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$luckcoin
}
"
)
));
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
$insert
=
array
(
"type"
=>
'income'
,
"type"
=>
'income'
,
"action"
=>
'luckgift'
,
"action"
=>
'luckgift'
,
...
@@ -640,7 +642,8 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -640,7 +642,8 @@ class Model_Live extends PhalApi_Model_NotORM {
"totalcoin"
=>
$luckcoin
,
"totalcoin"
=>
$luckcoin
,
"showid"
=>
$showid
,
"showid"
=>
$showid
,
"mark"
=>
$giftinfo
[
'mark'
],
"mark"
=>
$giftinfo
[
'mark'
],
"addtime"
=>
$addtime
"addtime"
=>
$addtime
,
'coin'
=>
$u
[
'coin'
],
);
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
break
;
break
;
...
@@ -730,7 +733,9 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -730,7 +733,9 @@ class Model_Live extends PhalApi_Model_NotORM {
DI
()
->
notorm
->
users
DI
()
->
notorm
->
users
->
where
(
'id = ?'
,
$uid
)
->
where
(
'id = ?'
,
$uid
)
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$wincoin2
}
"
)
));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$wincoin2
}
"
)
));
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"type"
=>
'income'
,
"action"
=>
'jackpotwin'
,
"action"
=>
'jackpotwin'
,
"uid"
=>
$uid
,
"uid"
=>
$uid
,
...
@@ -842,7 +847,8 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -842,7 +847,8 @@ class Model_Live extends PhalApi_Model_NotORM {
}
}
/* 写入记录 或更新 */
/* 写入记录 或更新 */
$insert
=
array
(
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$liveuid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
$isup
=
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$isup
=
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$userinfo2
=
DI
()
->
notorm
->
users
$userinfo2
=
DI
()
->
notorm
->
users
...
...
api/Appapi/Model/Login.php
View file @
04708fd3
...
@@ -99,7 +99,7 @@ class Model_Login extends PhalApi_Model_NotORM {
...
@@ -99,7 +99,7 @@ class Model_Login extends PhalApi_Model_NotORM {
}
}
$uid
=
$rs
[
'id'
];
$uid
=
$rs
[
'id'
];
if
(
$reg_reward
>
0
){
if
(
$reg_reward
>
0
){
$insert
=
array
(
"type"
=>
'income'
,
"action"
=>
'reg_reward'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$reg_reward
,
"showid"
=>
0
,
"addtime"
=>
time
()
);
$insert
=
array
(
'coin'
=>
$data
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'reg_reward'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$reg_reward
,
"showid"
=>
0
,
"addtime"
=>
time
()
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
$code
=
$this
->
createCode
();
$code
=
$this
->
createCode
();
...
...
api/Appapi/Model/Red.php
View file @
04708fd3
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
class
Model_Red
extends
PhalApi_Model_NotORM
{
class
Model_Red
extends
PhalApi_Model_NotORM
{
/* 发布红包 */
/* 发布红包 */
public
function
sendRed
(
$data
)
{
public
function
sendRed
(
$data
)
{
$rs
=
array
(
'code'
=>
0
,
'msg'
=>
'发送成功'
,
'info'
=>
array
());
$rs
=
array
(
'code'
=>
0
,
'msg'
=>
'发送成功'
,
'info'
=>
array
());
$uid
=
$data
[
'uid'
];
$uid
=
$data
[
'uid'
];
$total
=
$data
[
'coin'
];
$total
=
$data
[
'coin'
];
$ifok
=
DI
()
->
notorm
->
users
$ifok
=
DI
()
->
notorm
->
users
...
@@ -13,18 +13,18 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -13,18 +13,18 @@ class Model_Red extends PhalApi_Model_NotORM {
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin -
{
$total
}
"
)
,
'consumption'
=>
new
NotORM_Literal
(
"consumption +
{
$total
}
"
)
)
);
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin -
{
$total
}
"
)
,
'consumption'
=>
new
NotORM_Literal
(
"consumption +
{
$total
}
"
)
)
);
if
(
!
$ifok
){
if
(
!
$ifok
){
$rs
[
'code'
]
=
1009
;
$rs
[
'code'
]
=
1009
;
$rs
[
'msg'
]
=
'余额不足'
;
$rs
[
'msg'
]
=
'余额不足'
;
return
$rs
;
return
$rs
;
}
}
$result
=
DI
()
->
notorm
->
red
->
insert
(
$data
);
$result
=
DI
()
->
notorm
->
red
->
insert
(
$data
);
if
(
!
$result
){
if
(
!
$result
){
$rs
[
'code'
]
=
1009
;
$rs
[
'code'
]
=
1009
;
$rs
[
'msg'
]
=
'发送失败,请重试'
;
$rs
[
'msg'
]
=
'发送失败,请重试'
;
return
$rs
;
return
$rs
;
}
}
$type
=
'expend'
;
$type
=
'expend'
;
$action
=
'sendred'
;
$action
=
'sendred'
;
$uid
=
$data
[
'uid'
];
$uid
=
$data
[
'uid'
];
...
@@ -33,15 +33,14 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -33,15 +33,14 @@ class Model_Red extends PhalApi_Model_NotORM {
$total
=
$data
[
'coin'
];
$total
=
$data
[
'coin'
];
$showid
=
$data
[
'showid'
];
$showid
=
$data
[
'showid'
];
$addtime
=
$data
[
'addtime'
];
$addtime
=
$data
[
'addtime'
];
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
$insert
=
array
(
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$rs
[
'info'
]
=
$result
;
$rs
[
'info'
]
=
$result
;
return
$rs
;
return
$rs
;
}
}
/* 红包列表 */
/* 红包列表 */
public
function
getRedList
(
$liveuid
,
$showid
){
public
function
getRedList
(
$liveuid
,
$showid
){
$list
=
DI
()
->
notorm
->
red
$list
=
DI
()
->
notorm
->
red
...
@@ -63,15 +62,15 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -63,15 +62,15 @@ class Model_Red extends PhalApi_Model_NotORM {
$showid
=
$data
[
'showid'
];
$showid
=
$data
[
'showid'
];
$addtime
=
$data
[
'addtime'
];
$addtime
=
$data
[
'addtime'
];
unset
(
$data
[
'showid'
]);
unset
(
$data
[
'showid'
]);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
$type
,
"action"
=>
$action
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
$giftcount
,
"totalcoin"
=>
$total
,
"showid"
=>
$showid
,
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$result
=
DI
()
->
notorm
->
red_record
->
insert
(
$data
);
$result
=
DI
()
->
notorm
->
red_record
->
insert
(
$data
);
DI
()
->
notorm
->
users
DI
()
->
notorm
->
users
->
where
(
'id = ?'
,
$uid
)
->
where
(
'id = ?'
,
$uid
)
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$total
}
"
)
)
);
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$total
}
"
)
)
);
...
@@ -80,7 +79,7 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -80,7 +79,7 @@ class Model_Red extends PhalApi_Model_NotORM {
->
where
(
'id = ?'
,
$giftid
)
->
where
(
'id = ?'
,
$giftid
)
->
update
(
array
(
'coin_rob'
=>
new
NotORM_Literal
(
"coin_rob +
{
$total
}
"
)
,
'nums_rob'
=>
new
NotORM_Literal
(
"nums_rob + 1"
)
)
);
->
update
(
array
(
'coin_rob'
=>
new
NotORM_Literal
(
"coin_rob +
{
$total
}
"
)
,
'nums_rob'
=>
new
NotORM_Literal
(
"nums_rob + 1"
)
)
);
return
$result
;
return
$result
;
}
}
/* 抢红包列表 */
/* 抢红包列表 */
public
function
getRedRobList
(
$redid
){
public
function
getRedRobList
(
$redid
){
...
@@ -91,7 +90,7 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -91,7 +90,7 @@ class Model_Red extends PhalApi_Model_NotORM {
->
fetchAll
();
->
fetchAll
();
return
$list
;
return
$list
;
}
}
/* 红包信息 */
/* 红包信息 */
public
function
getRedInfo
(
$redid
){
public
function
getRedInfo
(
$redid
){
$redinfo
=
DI
()
->
notorm
->
red
$redinfo
=
DI
()
->
notorm
->
red
...
@@ -106,6 +105,6 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -106,6 +105,6 @@ class Model_Red extends PhalApi_Model_NotORM {
unset
(
$redinfo
[
'status'
]);
unset
(
$redinfo
[
'status'
]);
}
}
return
$redinfo
;
return
$redinfo
;
}
}
}
}
api/Appapi/Model/User.php
View file @
04708fd3
...
@@ -854,9 +854,9 @@ class Model_User extends PhalApi_Model_NotORM {
...
@@ -854,9 +854,9 @@ class Model_User extends PhalApi_Model_NotORM {
DI
()
->
notorm
->
users
DI
()
->
notorm
->
users
->
where
(
'id=?'
,
$uid
)
->
where
(
'id=?'
,
$uid
)
->
update
(
array
(
"coin"
=>
new
NotORM_Literal
(
"coin +
{
$coin
}
"
),
"consumption"
=>
new
NotORM_Literal
(
"consumption +
{
$loginCoin
}
"
)
));
->
update
(
array
(
"coin"
=>
new
NotORM_Literal
(
"coin +
{
$coin
}
"
),
"consumption"
=>
new
NotORM_Literal
(
"consumption +
{
$loginCoin
}
"
)
));
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
/* 记录 */
/* 记录 */
$insert
=
array
(
"type"
=>
'income'
,
"action"
=>
'loginbonus'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$bonus_day
,
"giftcount"
=>
'0'
,
"totalcoin"
=>
$coin
,
"showid"
=>
'0'
,
"addtime"
=>
$nowtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'loginbonus'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$bonus_day
,
"giftcount"
=>
'0'
,
"totalcoin"
=>
$coin
,
"showid"
=>
'0'
,
"addtime"
=>
$nowtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
$rs
=
1
;
$rs
=
1
;
...
...
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