Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uc_card
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
uc_card
Commits
a963d196
Commit
a963d196
authored
Jun 08, 2021
by
liyadong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
http://gitlab.cccwangluo.com/zhoujun/uc_card
into test
parents
295758da
a8d78eb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+3
-4
No files found.
src/app/Http/Controllers/Card/CardController.php
View file @
a963d196
...
...
@@ -100,9 +100,8 @@ class CardController extends Controller
$this
->
getCheckRoleInfoTable
(
$tableName
);
$verity
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
select
(
'id'
)
->
first
();
if
(
$verity
)
return
$this
->
jsonReturn
(
0
,
'角色绑定成功'
);
$insert
=
$this
->
getInsertRoleInfo
(
$userId
,
$roleId
,
$serverId
,
$serverName
,
$tableName
);
if
(
$insert
[
'code'
]
==
200
)
$this
->
jsonReturn
(
0
,
'角色绑定成功'
);
if
(
$insert
[
'code'
]
==
200
)
return
$this
->
jsonReturn
(
0
,
'角色绑定成功'
);
return
$this
->
jsonReturn
(
$insert
[
'code'
],
$insert
[
'msg'
]);
}
...
...
@@ -221,8 +220,8 @@ class CardController extends Controller
if
(
$braveTime
<
1
)
$braveTime
=
0
;
if
(
$mercenaryScore
<
1
)
$mercenaryScore
=
0
;
$array
=
[
'uid'
=>
$userId
,
'server_id'
=>
$serverId
,
'server_name'
=>
$serverName
,
'user_id'
=>
$targetRole
[
'userId'
],
'role_id'
=>
$roleId
,
'role_name'
=>
$targetRole
[
'roleName'
],
'job'
=>
$targetRole
[
'occupation'
],
'guild'
=>
$targetRole
[
'guild'
],
'online_time'
=>
$targetRole
[
'onlineTime'
],
'register_time'
=>
date
(
'Y-m-d H:i:s'
,
$targetRole
[
'createTime'
]),
'role_score'
=>
$roleScore
,
'arms_score'
=>
$armsScoreArr
,
'arms_strong'
=>
$armsStrongArr
,
'arms_exciting'
=>
$armsExcitingArr
,
'duel_total'
=>
$duelTotal
,
'duel_win'
=>
$duelWin
,
'duel_continuity_win'
=>
$duelContinuityWin
,
'max_rank'
=>
$maxRank
,
'brave_num'
=>
$braveNum
,
'brave_time'
=>
$braveTime
,
'mercenary_score'
=>
$mercenaryScore
,
'created_at'
=>
$time
,
'updated_at'
=>
$time
];
$result
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
insert
(
$array
);
$array
Data
=
[
'uid'
=>
$userId
,
'server_id'
=>
$serverId
,
'server_name'
=>
$serverName
,
'user_id'
=>
$targetRole
[
'userId'
],
'role_id'
=>
$roleId
,
'role_name'
=>
$targetRole
[
'roleName'
],
'job'
=>
$targetRole
[
'occupation'
],
'guild'
=>
$targetRole
[
'guild'
],
'online_time'
=>
$targetRole
[
'onlineTime'
],
'register_time'
=>
date
(
'Y-m-d H:i:s'
,
$targetRole
[
'createTime'
]),
'role_score'
=>
$roleScore
,
'arms_score'
=>
$armsScoreArr
,
'arms_strong'
=>
$armsStrongArr
,
'arms_exciting'
=>
$armsExcitingArr
,
'duel_total'
=>
$duelTotal
,
'duel_win'
=>
$duelWin
,
'duel_continuity_win'
=>
$duelContinuityWin
,
'max_rank'
=>
$maxRank
,
'brave_num'
=>
$braveNum
,
'brave_time'
=>
$braveTime
,
'mercenary_score'
=>
$mercenaryScore
,
'created_at'
=>
$time
,
'updated_at'
=>
$time
];
$result
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
insert
(
$array
Data
);
if
(
$result
)
return
$array
;
$array
[
'code'
]
=
10052
;
...
...
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