更新修复编辑bug
This commit is contained in:
parent
116e04b7b1
commit
906f816099
@ -407,11 +407,14 @@ class CommunityRepository extends BaseRepository
|
||||
if (!$getTopic || !$getTopic->status) throw new ValidateException('话题不存在或已关闭');
|
||||
$data['category_id'] = $getTopic->category_id;
|
||||
}
|
||||
|
||||
|
||||
Db::transaction(function () use($id, $data) {
|
||||
$spuId = $data['spu_id'];
|
||||
$productInfo = $data['product_info'];
|
||||
unset($data['spu_id'], $data['product_info']);
|
||||
if ($data['is_type'] != self::COMMUNITY_TYPE_ENTRUST) {
|
||||
unset($data['entrust_mer_id'], $data['entrust_day']);
|
||||
}
|
||||
$community = $this->dao->update($id, $data);
|
||||
if ($spuId) $this->joinProduct($id, $spuId);
|
||||
if ($productInfo && $data['is_type'] == self::COMMUNITY_TYPE_RESALE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user