Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

포인트를 저장하는 부분에 적용여부를 확인하지 않는 문제 고침 #2348

Merged
2 commits merged into from
Dec 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions modules/point/point.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,25 @@ function setPoint($member_srl, $point, $mode = null)
$oDB->begin();

// If there are points, update, if no, insert
$oPointModel = getModel('point');
if($oPointModel->isExistsPoint($member_srl)) executeQuery("point.updatePoint", $args);
else executeQuery("point.insertPoint", $args);
if($current_point > 0)
{
$output = executeQuery("point.updatePoint", $args);
}
else
{
// 많은 동접시 넣는 과정에서 insert가 미리 이루어졌지만 이 공간으로 넘어올 경우 다시 한번 더 업데이트를 처리.
$output = executeQuery("point.insertPoint", $args);
if(!$output->toBool())
{
$output = executeQuery("point.updatePoint", $args);
}
}

if(!$output->toBool())
{
$oDB->rollback();
return $output;
}

// Get a new level
$level = $oPointModel->getLevel($point, $config->level_step);
Expand Down