|
|
@@ -61,9 +61,9 @@ class ReliefController extends Controller
|
|
|
$data = json_decode($getSystemconfig[0]['systemconfig_data'], true);
|
|
|
$status = $getSystemconfig[0]['systemconfig_status'];
|
|
|
if ($res >= $data['count']) {
|
|
|
- return toJson(1, '今日领取次数已用完,明天再来哟亲', []);
|
|
|
+ return toJson(-30002);
|
|
|
} else if ($data['condition'] < $allCash) {
|
|
|
- return toJson(1, '您还未达到领取条件', []);
|
|
|
+ return toJson(-30003);
|
|
|
}
|
|
|
|
|
|
if ($status == 1 && $res < $data['count'] && $data['condition'] >= $allCash) {
|
|
|
@@ -85,12 +85,13 @@ class ReliefController extends Controller
|
|
|
$addRelief = $reliefDataModel->addRelief($addReliefData);
|
|
|
if ($addRelief && $upUserInfo) {
|
|
|
DB::commit();
|
|
|
- return toJson(1, '成功', ['money' => ($data['mony'] + $cash['membersDetailed_cash'])]);
|
|
|
+ return toJson(2, '成功', ['money' => ($data['mony'] + $cash['membersDetailed_cash'])]);
|
|
|
} else {
|
|
|
+ return toJson(-2);
|
|
|
DB::rollBack();
|
|
|
}
|
|
|
} else {
|
|
|
- return toJson(1, '活动未开启', []);
|
|
|
+ return toJson(-30004);
|
|
|
}//end if
|
|
|
} catch (Exception $e) {
|
|
|
echo $e->getMessage();
|