255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'type' => '类型', 'mall_id' => '商城ID', 'self_store_id' => '自身门店ID', 'source_store_id' => '源门店ID', 'type_id' => '自身门店的类型id', 'source_type_id' => '源门店的的类型id', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public static function getTypeIds($self_store_id, $source_store_id, $type, $source_type_id) { $goods_common_rule_sync_logs_list = self::lists([ 'where' => [ ['self_store_id' => $self_store_id], ['type' => $type], ['source_store_id' => $source_store_id], ['source_type_id' => $source_type_id] ], ]); return array_column($goods_common_rule_sync_logs_list, 'source_type_id'); } public static function add($self_store_id, $source_store_id, $source_type_id, $type, $type_id, $mall_id) { $obj = new self(); $obj->mall_id = $mall_id; $obj->self_store_id = $self_store_id; $obj->source_store_id = $source_store_id; $obj->source_type_id = $source_type_id; $obj->type = $type; $obj->type_id = $type_id; $obj->save(); } }