Commit bae80c2e by 杨昕

code format

parent 64e31896
Pipeline #18891 passed with stages
in 59 seconds
......@@ -818,7 +818,6 @@ class MediaModel extends Eloquent
*/
public static function getMediaId()
{
try {
$i = 0;
do {
......@@ -856,44 +855,6 @@ class MediaModel extends Eloquent
return $flag;
}
public static function multiplySetMediaNum($request)
{
try {
$media_ids = $request->media_ids;
//$flag = MediaModel::whereIn("_id",$media_ids)->get($data,['multiple'=>true]);
$medias = MediaModel::whereIn("_id", $media_ids)->limit(self::$max_page_size)->get();
$multiplied = collect($medias)->map(function ($item, $key) {
return $item * 2;
});
$collection = collect([1, 2, 3, 4, 5]);
$collection->contains(function ($key, $value) {
return $value <= 5;
//true
});
$media_id = $request->media_id;
$data = [
'media_num' => md5(md5($media_id)),
];
$flag = MediaModel::whereIn("_id", $media_id)->update($data, ['multiple' => true]);
} catch (\Exception $exception) {
throw new DatabaseException($exception->getMessage());
}
return $flag;
}
/**
* 根据媒资编号获取媒资随机码
* @param $request
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment