$mainId], true); if (!empty($has)) { return true; } $map = dict::getDict('memberLevelMap'); foreach ($map as $k => $v) { $v['mainId'] = $mainId; $v['shopId'] = $shopId; if (!isset($v['discount'])) { $v['discount'] = 10; } if (!isset($v['birthdayBenefit'])) { $v['birthdayBenefit'] = ''; } if (!isset($v['benefitDesc'])) { $v['benefitDesc'] = ''; } self::add($v); } return true; } }