fat log
This commit is contained in:
parent
b5eb8f17da
commit
3a582114f3
@ -851,7 +851,7 @@ class OrderController extends Controller
|
|||||||
return $this->failure("用户不存在");
|
return $this->failure("用户不存在");
|
||||||
|
|
||||||
$fatService = new FatService();
|
$fatService = new FatService();
|
||||||
$res = $fatService->getFatStat($name, $start_date, $end_date, $user);
|
$res = $fatService->getFatStat($name, $start_date, $end_date, $user, "斤");
|
||||||
|
|
||||||
if (!$res['status']) {
|
if (!$res['status']) {
|
||||||
return $this->failure($res['msg']);
|
return $this->failure($res['msg']);
|
||||||
|
|||||||
@ -1150,7 +1150,7 @@ class FatService
|
|||||||
* @param $end_date
|
* @param $end_date
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getFatStat($name, $start_date, $end_date, $user)
|
public function getFatStat($name, $start_date, $end_date, $user, $unit = "")
|
||||||
{
|
{
|
||||||
if ($start_date && $end_date) {
|
if ($start_date && $end_date) {
|
||||||
// 将日期时间字符串转换为 Carbon 实例
|
// 将日期时间字符串转换为 Carbon 实例
|
||||||
@ -1169,7 +1169,9 @@ class FatService
|
|||||||
}
|
}
|
||||||
$user_id = $user->id;
|
$user_id = $user->id;
|
||||||
$type = $user->fat_device;
|
$type = $user->fat_device;
|
||||||
$unit = $user->unit;
|
if (empty($unit)) {
|
||||||
|
$unit = $user->unit;
|
||||||
|
}
|
||||||
$language = $user->language;
|
$language = $user->language;
|
||||||
$x_arr = [];
|
$x_arr = [];
|
||||||
$y_arr = [];
|
$y_arr = [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user