quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
admin/app/shop/model/product/Comment.php
@@ -36,14 +36,14 @@
     */
    public function edit($data)
    {   
        $this->updateScore($this['shop_supplier_id']);
        //$this->updateScore($this['shop_supplier_id']);
        return $this->where('comment_id', '=', $data['comment_id'])->save([
            'status' => $data['status'],
            'sort' => $data['sort']
        ]);
    }
    //更新店铺评分
    private function updateScore($shop_supplier_id){
    public function updateScore($shop_supplier_id){
        $SupplierModel = new SupplierModel;
        $express = $this->where(['shop_supplier_id' => $shop_supplier_id, 'status'=>1,'is_delete'=>0])
            ->field('round(avg(express_score),1) as score')->find();