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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
29 deletions
+37
-29
api/Appapi/Model/Game.php
+14
-11
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
+4
-5
api/Appapi/Model/User.php
+2
-2
No files found.
api/Appapi/Model/Game.php
View file @
04708fd3
...
@@ -81,8 +81,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -81,8 +81,8 @@ class Model_Game extends PhalApi_Model_NotORM {
->
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
(
"type"
=>
'income'
,
"action"
=>
'game_return'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$v
[
'total'
],
"showid"
=>
0
,
"addtime"
=>
$addtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'game_return'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$v
[
'total'
],
"showid"
=>
0
,
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
...
@@ -102,7 +102,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -102,7 +102,8 @@ class Model_Game 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
);
}
}
...
@@ -192,8 +193,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -192,8 +193,8 @@ class Model_Game extends PhalApi_Model_NotORM {
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$gamecoin
}
"
)));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$gamecoin
}
"
)));
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$v
[
'uid'
])
->
fetchOne
();
$insert
=
array
(
"type"
=>
'income'
,
"action"
=>
'game_win'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$gamecoin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
$action
,
"game_banker"
=>
$bankerid
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'game_win'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$gamecoin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
$action
,
"game_banker"
=>
$bankerid
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
//file_put_contents('./endGame.txt',date('y-m-d H:i:s').' 提交参数信息 win:'.json_encode($win)."\r\n",FILE_APPEND);
//file_put_contents('./endGame.txt',date('y-m-d H:i:s').' 提交参数信息 win:'.json_encode($win)."\r\n",FILE_APPEND);
...
@@ -311,8 +312,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -311,8 +312,8 @@ class Model_Game extends PhalApi_Model_NotORM {
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
where
(
'id = ?'
,
$v
[
'uid'
])
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$gamecoin
}
"
)));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin +
{
$gamecoin
}
"
)));
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
delcache
(
'userinfo_'
.
$v
[
'uid'
]);
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$v
[
'uid'
])
->
fetchOne
();
$insert
=
array
(
"type"
=>
'income'
,
"action"
=>
'game_win'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$gamecoin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
$action
,
"game_banker"
=>
$bankerid
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'income'
,
"action"
=>
'game_win'
,
"uid"
=>
$v
[
'uid'
],
"touid"
=>
$v
[
'uid'
],
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$gamecoin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
$action
,
"game_banker"
=>
$bankerid
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
}
}
$banker_profit
-=
$win
;
$banker_profit
-=
$win
;
...
@@ -423,8 +424,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -423,8 +424,8 @@ class Model_Game extends PhalApi_Model_NotORM {
$addtime
=
time
();
$addtime
=
time
();
$giftid
=
$game
[
'id'
];
$giftid
=
$game
[
'id'
];
$u
=
DI
()
->
notorm
->
users
->
select
(
'coin'
)
->
where
(
'id = '
.
$uid
)
->
fetchOne
();
$insert
=
array
(
"type"
=>
'expend'
,
"action"
=>
'game_bet'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$coin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
);
$insert
=
array
(
'coin'
=>
$u
[
'coin'
],
"type"
=>
'expend'
,
"action"
=>
'game_bet'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
$giftid
,
"giftcount"
=>
1
,
"totalcoin"
=>
$coin
,
"showid"
=>
0
,
"addtime"
=>
$addtime
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
delcache
(
'userinfo_'
.
$uid
);
delcache
(
'userinfo_'
.
$uid
);
...
@@ -721,7 +722,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -721,7 +722,8 @@ class Model_Game extends PhalApi_Model_NotORM {
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin -
{
$deposit
}
"
)));
->
update
(
array
(
'coin'
=>
new
NotORM_Literal
(
"coin -
{
$deposit
}
"
)));
delcache
(
'userinfo_'
.
$uid
);
delcache
(
'userinfo_'
.
$uid
);
$addtime
=
time
();
$addtime
=
time
();
$insert
=
array
(
"type"
=>
'expend'
,
"action"
=>
'set_deposit'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$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"
=>
'expend'
,
"action"
=>
'set_deposit'
,
"uid"
=>
$uid
,
"touid"
=>
$uid
,
"giftid"
=>
0
,
"giftcount"
=>
1
,
"totalcoin"
=>
$deposit
,
"showid"
=>
0
,
"addtime"
=>
$addtime
,
"game_action"
=>
4
,
"game_banker"
=>
0
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
DI
()
->
notorm
->
users_coinrecord
->
insert
(
$insert
);
$info
=
DI
()
->
notorm
->
users
$info
=
DI
()
->
notorm
->
users
...
@@ -739,7 +741,8 @@ class Model_Game extends PhalApi_Model_NotORM {
...
@@ -739,7 +741,8 @@ class Model_Game 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
);
return
1
;
return
1
;
...
...
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
...
@@ -33,9 +33,8 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -33,9 +33,8 @@ 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
;
...
@@ -64,8 +63,8 @@ class Model_Red extends PhalApi_Model_NotORM {
...
@@ -64,8 +63,8 @@ class Model_Red extends PhalApi_Model_NotORM {
$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
);
...
...
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