正在显示
3 个修改的文件
包含
30 行增加
和
5 行删除
| @@ -91,7 +91,7 @@ class BaseController extends Controller | @@ -91,7 +91,7 @@ class BaseController extends Controller | ||
| 91 | break; | 91 | break; |
| 92 | case "end_at": | 92 | case "end_at": |
| 93 | $this->_btw[1] = $v; | 93 | $this->_btw[1] = $v; |
| 94 | - $this->map['updated_at'] = ['between', $this->_btw]; | 94 | + $this->map['created_at'] = ['between', $this->_btw]; |
| 95 | break; | 95 | break; |
| 96 | default: | 96 | default: |
| 97 | if (!empty($v) || $v == 0) { | 97 | if (!empty($v) || $v == 0) { |
| @@ -13,6 +13,8 @@ use App\Models\Product\CategoryRelated; | @@ -13,6 +13,8 @@ use App\Models\Product\CategoryRelated; | ||
| 13 | use App\Models\Product\Keyword; | 13 | use App\Models\Product\Keyword; |
| 14 | use App\Models\Product\KeywordRelated; | 14 | use App\Models\Product\KeywordRelated; |
| 15 | use App\Models\Product\Product; | 15 | use App\Models\Product\Product; |
| 16 | +use App\Models\Template\BSetting; | ||
| 17 | +use App\Models\Template\BTemplate; | ||
| 16 | use App\Models\User\User; | 18 | use App\Models\User\User; |
| 17 | use App\Rules\Ids; | 19 | use App\Rules\Ids; |
| 18 | use Illuminate\Http\Request; | 20 | use Illuminate\Http\Request; |
| @@ -51,6 +53,7 @@ class ProductController extends BaseController | @@ -51,6 +53,7 @@ class ProductController extends BaseController | ||
| 51 | foreach ($lists['list'] as $k=>$v){ | 53 | foreach ($lists['list'] as $k=>$v){ |
| 52 | //处理参数 | 54 | //处理参数 |
| 53 | $v = $this->handleParam($v); | 55 | $v = $this->handleParam($v); |
| 56 | + $v['is_renovation'] = $this->getProductIsRenovation($v['id']); | ||
| 54 | $lists['list'][$k] = $v; | 57 | $lists['list'][$k] = $v; |
| 55 | } | 58 | } |
| 56 | } | 59 | } |
| @@ -58,6 +61,32 @@ class ProductController extends BaseController | @@ -58,6 +61,32 @@ class ProductController extends BaseController | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | /** | 63 | /** |
| 64 | + * @remark :查看产品是否已装修 | ||
| 65 | + * @name :getProductIsRenovation | ||
| 66 | + * @author :lyh | ||
| 67 | + * @method :post | ||
| 68 | + * @time :2023/9/13 14:02 | ||
| 69 | + */ | ||
| 70 | + public function getProductIsRenovation($id){ | ||
| 71 | + $templateSettingModel = new BSetting(); | ||
| 72 | + $info = $templateSettingModel->read(['project_id'=>$this->user['project_id']]); | ||
| 73 | + if($info !== false){ | ||
| 74 | + $webTemplateModel = new BTemplate(); | ||
| 75 | + $param = [ | ||
| 76 | + 'source'=>2, | ||
| 77 | + 'project_id'=>$this->user['project_id'], | ||
| 78 | + 'source_id'=>$id, | ||
| 79 | + 'template_id'=>$info['template_id'] | ||
| 80 | + ]; | ||
| 81 | + $templateInfo = $webTemplateModel->read($param); | ||
| 82 | + if($templateInfo !== false){ | ||
| 83 | + return 1; | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + return 0; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + /** | ||
| 61 | * @remark :处理列表参数 | 90 | * @remark :处理列表参数 |
| 62 | * @name :handleParam | 91 | * @name :handleParam |
| 63 | * @author :lyh | 92 | * @author :lyh |
| @@ -260,11 +260,9 @@ class ProjectLogic extends BaseLogic | @@ -260,11 +260,9 @@ class ProjectLogic extends BaseLogic | ||
| 260 | */ | 260 | */ |
| 261 | public function setTypeSevenEdit($param){ | 261 | public function setTypeSevenEdit($param){ |
| 262 | $info = $this->model->read(['id'=>$param['id']]); | 262 | $info = $this->model->read(['id'=>$param['id']]); |
| 263 | - | ||
| 264 | if($info['delete_status'] == 0){ | 263 | if($info['delete_status'] == 0){ |
| 265 | //删除原始项目 | 264 | //删除原始项目 |
| 266 | $this->edit(['delete_status' => 1], ['id' => $param['id']]); | 265 | $this->edit(['delete_status' => 1], ['id' => $param['id']]); |
| 267 | - | ||
| 268 | //添加到续费单 | 266 | //添加到续费单 |
| 269 | $data = [ | 267 | $data = [ |
| 270 | 'title' => '【续费单】' . $param['title'], | 268 | 'title' => '【续费单】' . $param['title'], |
| @@ -277,7 +275,6 @@ class ProjectLogic extends BaseLogic | @@ -277,7 +275,6 @@ class ProjectLogic extends BaseLogic | ||
| 277 | 'cooperate_date' => $param['cooperate_date'], | 275 | 'cooperate_date' => $param['cooperate_date'], |
| 278 | 'service_duration' => $param['deploy_build']['service_duration'], | 276 | 'service_duration' => $param['deploy_build']['service_duration'], |
| 279 | 'plan' => $param['deploy_build']['plan'], | 277 | 'plan' => $param['deploy_build']['plan'], |
| 280 | -// 'api_no' => $param['id'], //改手动填 | ||
| 281 | 'amount' => $param['payment']['amount'], | 278 | 'amount' => $param['payment']['amount'], |
| 282 | 'contract' => json_encode($param['payment']['contract']), | 279 | 'contract' => json_encode($param['payment']['contract']), |
| 283 | 'bill' => json_encode($param['payment']['bill']), | 280 | 'bill' => json_encode($param['payment']['bill']), |
| @@ -285,7 +282,6 @@ class ProjectLogic extends BaseLogic | @@ -285,7 +282,6 @@ class ProjectLogic extends BaseLogic | ||
| 285 | $renewModel = new ProjectRenew(); | 282 | $renewModel = new ProjectRenew(); |
| 286 | $renewModel->add($data); | 283 | $renewModel->add($data); |
| 287 | } | 284 | } |
| 288 | - | ||
| 289 | return $this->success(); | 285 | return $this->success(); |
| 290 | } | 286 | } |
| 291 | 287 |
-
请 注册 或 登录 后发表评论