|
@@ -144,7 +144,7 @@ class CmsContentTemplateSetRepository
|
|
|
|
|
|
if ($template_id->apply_type == 2) {
|
|
if ($template_id->apply_type == 2) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
- throw new HttpException(500, '所填专题已关闭或不是兑换商城专题');
|
|
|
|
|
|
+ throw new HttpException(500, '所填专题已关闭或不是兑换专区专题');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -177,7 +177,7 @@ class CmsContentTemplateSetRepository
|
|
$subject = $this->cmsSubject->where('id', intval($v['link_url']))->first();
|
|
$subject = $this->cmsSubject->where('id', intval($v['link_url']))->first();
|
|
if ($template_id->apply_type == 2) {
|
|
if ($template_id->apply_type == 2) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
- throw new HttpException(500, '所填专题已关闭或不是兑换商城专题');
|
|
|
|
|
|
+ throw new HttpException(500, '所填专题已关闭或不是兑换专区专题');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$subject->used_count += 1;
|
|
$subject->used_count += 1;
|
|
@@ -210,7 +210,7 @@ class CmsContentTemplateSetRepository
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
if ($request['apply_type'] == 2) {
|
|
if ($request['apply_type'] == 2) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
- throw new HttpException(500, '所填专题已关闭或不是兑换商城专题');
|
|
|
|
|
|
+ throw new HttpException(500, '所填专题已关闭或不是兑换专区专题');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$subject->used_count += 1;
|
|
$subject->used_count += 1;
|
|
@@ -228,7 +228,7 @@ class CmsContentTemplateSetRepository
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
if ($request['apply_type'] == 2) {
|
|
if ($request['apply_type'] == 2) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
- throw new HttpException(500, '所填专题已关闭或不是兑换商城专题');
|
|
|
|
|
|
+ throw new HttpException(500, '所填专题已关闭或不是兑换专区专题');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$subject->used_count += 1;
|
|
$subject->used_count += 1;
|
|
@@ -318,7 +318,7 @@ class CmsContentTemplateSetRepository
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
$subject = $this->cmsSubject->where('id', intval($request['rule']['link_url']))->first();
|
|
if ($template_id->apply_type == 2) {
|
|
if ($template_id->apply_type == 2) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
if (!$subject || $subject->is_open != 1 || $subject->used_mall != 0) {
|
|
- throw new HttpException(500, '所填专题已关闭或不是兑换商城专题');
|
|
|
|
|
|
+ throw new HttpException(500, '所填专题已关闭或不是兑换专区专题');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -409,7 +409,7 @@ class CmsContentTemplateSetRepository
|
|
//同一个城市同一个模板(团购/菜市场) 只能有一种状态(草稿/发布),已发布的一旦被编辑把之前的直接删掉
|
|
//同一个城市同一个模板(团购/菜市场) 只能有一种状态(草稿/发布),已发布的一旦被编辑把之前的直接删掉
|
|
$template = $this->cmsContentTemplate->select('id', 'city_name', 'city_id', 'title', 'apply_type', 'is_open', 'status')->where('id', $request['tpl_id'])->first();
|
|
$template = $this->cmsContentTemplate->select('id', 'city_name', 'city_id', 'title', 'apply_type', 'is_open', 'status')->where('id', $request['tpl_id'])->first();
|
|
|
|
|
|
- //兑换商城检测banner是否设置
|
|
|
|
|
|
+ //兑换专区检测banner是否设置
|
|
if ($template->apply_type == 2) {
|
|
if ($template->apply_type == 2) {
|
|
$testing_banner = $this->cmsContentTemplateSet->select('rule')->where(['tpl_id' => $request['tpl_id'], 'area_type' => 0])->first();
|
|
$testing_banner = $this->cmsContentTemplateSet->select('rule')->where(['tpl_id' => $request['tpl_id'], 'area_type' => 0])->first();
|
|
$testing_banner = $testing_banner->toArray();
|
|
$testing_banner = $testing_banner->toArray();
|
|
@@ -611,7 +611,7 @@ class CmsContentTemplateSetRepository
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * v0.3兑换商城内容预览
|
|
|
|
|
|
+ * v0.3兑换专区内容预览
|
|
*/
|
|
*/
|
|
public function exchangeMall($request)
|
|
public function exchangeMall($request)
|
|
{
|
|
{
|