问题说明:连续签到添加提示已存在
修改文件:app\services\system\SystemSignRewardServices
修改方法:saveRewards()
public function saveRewards($id, $data)
{
if ($id) {
$this->dao->update($id, $data);
} else {
if ($this->dao->be(['type' => $data['type'], 'days' => $data['days']])) {
throw new AdminException('签到奖励已存在');
} else {
$this->dao->save($data);
}
}
return true;
}