外食计算器优化,营养成分以及热量比例数据计算
This commit is contained in:
		@@ -2,6 +2,7 @@ package com.stdiet.custom.service;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerHeatStatistics;
 | 
			
		||||
import com.stdiet.custom.dto.response.NutritionalCalories;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 外食热量统计Service接口
 | 
			
		||||
@@ -65,4 +66,18 @@ public interface ISysCustomerHeatStatisticsService
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public int calculateCustomerHeat(SysCustomerHeatStatistics sysCustomerHeatStatistics);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据日期查询是否客户热量统计
 | 
			
		||||
     * @param sysCustomerHeatStatistics
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    SysCustomerHeatStatistics getCustomerHeatStatisticsByDate(SysCustomerHeatStatistics sysCustomerHeatStatistics);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据客户热量食材统计ID查询详情
 | 
			
		||||
     * @param id
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public NutritionalCalories getNutritionalCaloriesByCustomer(Long id);
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +1,16 @@
 | 
			
		||||
package com.stdiet.custom.service.impl;
 | 
			
		||||
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import com.stdiet.common.utils.DateUtils;
 | 
			
		||||
import com.stdiet.common.utils.HealthyUtils;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerHealthy;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerPhysicalSigns;
 | 
			
		||||
import com.stdiet.custom.domain.SysFoodHeatStatistics;
 | 
			
		||||
import com.stdiet.custom.mapper.SysFoodHeatStatisticsMapper;
 | 
			
		||||
import com.stdiet.custom.dto.response.NutritionalCalories;
 | 
			
		||||
import com.stdiet.custom.service.ISysCustomerHealthyService;
 | 
			
		||||
import com.stdiet.custom.service.ISysCustomerPhysicalSignsService;
 | 
			
		||||
import com.stdiet.custom.service.ISysFoodHeatStatisticsService;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import com.stdiet.custom.mapper.SysCustomerHeatStatisticsMapper;
 | 
			
		||||
@@ -30,7 +32,7 @@ public class SysCustomerHeatStatisticsServiceImpl implements ISysCustomerHeatSta
 | 
			
		||||
    private SysCustomerHeatStatisticsMapper sysCustomerHeatStatisticsMapper;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private SysFoodHeatStatisticsMapper sysFoodHeatStatisticsMapper;
 | 
			
		||||
    private ISysFoodHeatStatisticsService sysFoodHeatStatisticsService;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ISysCustomerPhysicalSignsService sysCustomerPhysicalSignsService;
 | 
			
		||||
@@ -112,6 +114,15 @@ public class SysCustomerHeatStatisticsServiceImpl implements ISysCustomerHeatSta
 | 
			
		||||
        return sysCustomerHeatStatisticsMapper.deleteSysCustomerHeatStatisticsById(id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据日期查询是否客户热量统计
 | 
			
		||||
     * @param sysCustomerHeatStatistics
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public SysCustomerHeatStatistics getCustomerHeatStatisticsByDate(SysCustomerHeatStatistics sysCustomerHeatStatistics){
 | 
			
		||||
        return sysCustomerHeatStatisticsMapper.getCustomerHeatStatisticsByDate(sysCustomerHeatStatistics);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新食材热量并计算当天总热量
 | 
			
		||||
     * @param sysCustomerHeatStatistics
 | 
			
		||||
@@ -121,34 +132,81 @@ public class SysCustomerHeatStatisticsServiceImpl implements ISysCustomerHeatSta
 | 
			
		||||
    public int calculateCustomerHeat(SysCustomerHeatStatistics sysCustomerHeatStatistics){
 | 
			
		||||
        Long[] foodHeatId = sysCustomerHeatStatistics.getFoodHeatIdList();
 | 
			
		||||
        Integer[] foodHeat = sysCustomerHeatStatistics.getFoodHeatList();
 | 
			
		||||
        if(foodHeatId != null && foodHeatId.length > 0 && foodHeat != null && foodHeat.length == foodHeatId.length){
 | 
			
		||||
        if(foodHeatId != null && foodHeatId.length > 0){
 | 
			
		||||
            SysFoodHeatStatistics sysFoodHeatStatistics = new SysFoodHeatStatistics();
 | 
			
		||||
            int totalHeatCalue = 0;
 | 
			
		||||
            for (int i = 0; i < foodHeatId.length; i++) {
 | 
			
		||||
                sysFoodHeatStatistics.setId(foodHeatId[i]);
 | 
			
		||||
                sysFoodHeatStatistics.setHeatValue(foodHeat[i]);
 | 
			
		||||
                sysFoodHeatStatisticsMapper.updateSysFoodHeatStatistics(sysFoodHeatStatistics);
 | 
			
		||||
                totalHeatCalue += foodHeat[i];
 | 
			
		||||
                sysFoodHeatStatistics.setProteinQuality(sysCustomerHeatStatistics.getProteinQualityList()[i]);
 | 
			
		||||
                sysFoodHeatStatistics.setFatQuality(sysCustomerHeatStatistics.getFatQualityList()[i]);
 | 
			
		||||
                sysFoodHeatStatistics.setCarbonWaterQuality(sysCustomerHeatStatistics.getCarbonWaterQualityList()[i]);
 | 
			
		||||
                //根据蛋白质、脂肪、碳水计算热量
 | 
			
		||||
                sysFoodHeatStatistics.setHeatValue(HealthyUtils.calculateTotalHeatByProteinFatCarbonWater(sysCustomerHeatStatistics.getProteinQualityList()[i],
 | 
			
		||||
                        sysCustomerHeatStatistics.getFatQualityList()[i], sysCustomerHeatStatistics.getCarbonWaterQualityList()[i]));
 | 
			
		||||
                sysFoodHeatStatisticsService.updateSysFoodHeatStatistics(sysFoodHeatStatistics);
 | 
			
		||||
                totalHeatCalue += sysFoodHeatStatistics.getHeatValue();
 | 
			
		||||
            }
 | 
			
		||||
            sysCustomerHeatStatistics.setHeatValue(totalHeatCalue);
 | 
			
		||||
            Long maxHeatValue = getMaxHeatValue(sysCustomerHeatStatistics.getCustomerId());
 | 
			
		||||
            sysCustomerHeatStatistics.setMaxHeatValue(maxHeatValue.intValue());
 | 
			
		||||
            sysCustomerHeatStatistics.setHeatGap(maxHeatValue.intValue() - totalHeatCalue);
 | 
			
		||||
            sysCustomerHeatStatistics.setHeatGap(sysCustomerHeatStatistics.getMaxHeatValue() - totalHeatCalue);
 | 
			
		||||
            return sysCustomerHeatStatisticsMapper.updateSysCustomerHeatStatistics(sysCustomerHeatStatistics);
 | 
			
		||||
        }
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long getMaxHeatValue(Long customerId){
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据客户热量食材统计ID查询详情
 | 
			
		||||
     * @param id
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public NutritionalCalories getNutritionalCaloriesByCustomer(Long id){
 | 
			
		||||
        NutritionalCalories nutritionalCalories = new NutritionalCalories();
 | 
			
		||||
        SysCustomerHeatStatistics sysCustomerHeatStatistics = sysCustomerHeatStatisticsMapper.selectSysCustomerHeatStatisticsById(id);
 | 
			
		||||
        if(sysCustomerHeatStatistics != null){
 | 
			
		||||
            SysCustomerHealthy sysCustomerHealthy = getSysCustomerHealthy(sysCustomerHeatStatistics.getCustomerId());
 | 
			
		||||
            if(sysCustomerHealthy != null){
 | 
			
		||||
                nutritionalCalories.setName(sysCustomerHealthy.getName());
 | 
			
		||||
                nutritionalCalories.setAge(sysCustomerHealthy.getAge().intValue());
 | 
			
		||||
                nutritionalCalories.setTall(sysCustomerHealthy.getTall());
 | 
			
		||||
                nutritionalCalories.setWeight(sysCustomerHealthy.getWeight().doubleValue());
 | 
			
		||||
                nutritionalCalories.setStandardWeight(HealthyUtils.calculateStandardWeight(nutritionalCalories.getTall()));
 | 
			
		||||
                double overHeight = nutritionalCalories.getWeight() - nutritionalCalories.getStandardWeight();
 | 
			
		||||
                overHeight = overHeight > 0 ? overHeight : 0;
 | 
			
		||||
                nutritionalCalories.setOverWeight(overHeight);
 | 
			
		||||
                nutritionalCalories.setMetabolizeHeat(HealthyUtils.calculateMetabolizeHeat(nutritionalCalories.getAge(), nutritionalCalories.getTall(), nutritionalCalories.getWeight()).intValue());
 | 
			
		||||
                nutritionalCalories.setMaxIntakeHeat(sysCustomerHeatStatistics.getMaxHeatValue());
 | 
			
		||||
                nutritionalCalories.setEveryWeightHeat(HealthyUtils.calculateHeatRateByWeight(nutritionalCalories.getMetabolizeHeat(), nutritionalCalories.getWeight()));
 | 
			
		||||
                nutritionalCalories.setTargetEveryWeightHeat(HealthyUtils.calculateHeatTargetRate(nutritionalCalories.getEveryWeightHeat()));
 | 
			
		||||
                //nutritionalCalories.setStandardEveryWeightHeat(HealthyUtils.calculateHeatTargetRate() );
 | 
			
		||||
                nutritionalCalories.setNutritionalRate(HealthyUtils.nutritionRate);
 | 
			
		||||
                Integer[][] nutritionalHeatAndQuality = HealthyUtils.calculateNutritionHeatAndQuality(nutritionalCalories.getMetabolizeHeat());
 | 
			
		||||
                nutritionalCalories.setNutritionalHeat(nutritionalHeatAndQuality[0]);
 | 
			
		||||
                nutritionalCalories.setNutritionalQuality(nutritionalHeatAndQuality[1]);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return nutritionalCalories;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID查询该用户每天最大摄入量
 | 
			
		||||
     * @param customerId
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    private SysCustomerHealthy getSysCustomerHealthy(Long customerId){
 | 
			
		||||
        SysCustomerHealthy sysCustomerHealthy = sysCustomerHealthyService.selectSysCustomerHealthyByCustomerId(customerId);
 | 
			
		||||
        if(sysCustomerHealthy != null){
 | 
			
		||||
            return HealthyUtils.calculateMaxHeatEveryDay(sysCustomerHealthy.getAge().intValue(),sysCustomerHealthy.getTall(),sysCustomerHealthy.getWeight().doubleValue());
 | 
			
		||||
            return sysCustomerHealthy;
 | 
			
		||||
        }
 | 
			
		||||
        //查询体征信息
 | 
			
		||||
        SysCustomerPhysicalSigns sysCustomerPhysicalSigns = sysCustomerPhysicalSignsService.selectSysCustomerPhysicalSignsByCusId(customerId);
 | 
			
		||||
        if(sysCustomerPhysicalSigns != null){
 | 
			
		||||
            return HealthyUtils.calculateMaxHeatEveryDay(sysCustomerPhysicalSigns.getAge().intValue(),sysCustomerPhysicalSigns.getTall(),sysCustomerPhysicalSigns.getWeight().doubleValue());
 | 
			
		||||
            sysCustomerHealthy = new SysCustomerHealthy();
 | 
			
		||||
            sysCustomerHealthy.setName(sysCustomerPhysicalSigns.getName());
 | 
			
		||||
            sysCustomerHealthy.setTall(sysCustomerPhysicalSigns.getTall());
 | 
			
		||||
            sysCustomerHealthy.setAge(sysCustomerPhysicalSigns.getAge().longValue());
 | 
			
		||||
            sysCustomerHealthy.setWeight(BigDecimal.valueOf(sysCustomerPhysicalSigns.getWeight()));
 | 
			
		||||
        }
 | 
			
		||||
        return 0;
 | 
			
		||||
        return sysCustomerHealthy;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +1,19 @@
 | 
			
		||||
package com.stdiet.custom.service.impl;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.fastjson.JSON;
 | 
			
		||||
import com.stdiet.common.utils.DateUtils;
 | 
			
		||||
import com.stdiet.common.utils.HealthyUtils;
 | 
			
		||||
import com.stdiet.common.utils.StringUtils;
 | 
			
		||||
import com.stdiet.common.utils.sign.AesUtils;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerHealthy;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerHeatStatistics;
 | 
			
		||||
import com.stdiet.custom.domain.SysCustomerPhysicalSigns;
 | 
			
		||||
import com.stdiet.custom.dto.request.FoodHeatCalculatorRequest;
 | 
			
		||||
import com.stdiet.custom.mapper.SysCustomerHeatStatisticsMapper;
 | 
			
		||||
import com.stdiet.custom.service.ISysCustomerHealthyService;
 | 
			
		||||
import com.stdiet.custom.service.ISysCustomerHeatStatisticsService;
 | 
			
		||||
import com.stdiet.custom.service.ISysCustomerPhysicalSignsService;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import com.stdiet.custom.mapper.SysFoodHeatStatisticsMapper;
 | 
			
		||||
@@ -19,6 +21,8 @@ import com.stdiet.custom.domain.SysFoodHeatStatistics;
 | 
			
		||||
import com.stdiet.custom.service.ISysFoodHeatStatisticsService;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import javax.xml.crypto.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 外食热量统计Service业务层处理
 | 
			
		||||
 *
 | 
			
		||||
@@ -33,7 +37,13 @@ public class SysFoodHeatStatisticsServiceImpl implements ISysFoodHeatStatisticsS
 | 
			
		||||
    private SysFoodHeatStatisticsMapper sysFoodHeatStatisticsMapper;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private SysCustomerHeatStatisticsMapper sysCustomerHeatStatisticsMapper;
 | 
			
		||||
    private ISysCustomerHeatStatisticsService sysCustomerHeatStatisticsService;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ISysCustomerPhysicalSignsService sysCustomerPhysicalSignsService;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ISysCustomerHealthyService sysCustomerHealthyService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询外食热量统计
 | 
			
		||||
@@ -118,29 +128,67 @@ public class SysFoodHeatStatisticsServiceImpl implements ISysFoodHeatStatisticsS
 | 
			
		||||
    public int addMuchFoodHeat(FoodHeatCalculatorRequest foodHeatCalculatorRequest){
 | 
			
		||||
        //客户ID解密
 | 
			
		||||
        String customerId = StringUtils.isNotEmpty(foodHeatCalculatorRequest.getCustomerEncId()) ? AesUtils.decrypt(foodHeatCalculatorRequest.getCustomerEncId(), null) : "";
 | 
			
		||||
        if(StringUtils.isEmpty(customerId)){
 | 
			
		||||
        if(StringUtils.isEmpty(customerId) || StringUtils.isEmpty(foodHeatCalculatorRequest.getIngredientArray())){
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        //先判断该日期下是否已存在
 | 
			
		||||
        SysCustomerHeatStatistics sysCustomerHeatStatistics = new SysCustomerHeatStatistics();
 | 
			
		||||
        sysCustomerHeatStatistics.setCustomerId(Long.parseLong(customerId));
 | 
			
		||||
        sysCustomerHeatStatistics.setEdibleDate(new Date());
 | 
			
		||||
        SysCustomerHeatStatistics customerHeatResult = sysCustomerHeatStatisticsMapper.getCustomerHeatStatisticsByDate(sysCustomerHeatStatistics);
 | 
			
		||||
        if(customerHeatResult == null){
 | 
			
		||||
            sysCustomerHeatStatisticsMapper.insertSysCustomerHeatStatistics(sysCustomerHeatStatistics);
 | 
			
		||||
        }else{
 | 
			
		||||
            sysCustomerHeatStatistics.setId(customerHeatResult.getId());
 | 
			
		||||
        List<HashMap> foodHeatList = JSON.parseArray(foodHeatCalculatorRequest.getIngredientArray(), HashMap.class);
 | 
			
		||||
        if(foodHeatList == null || foodHeatList.size() == 0){
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        if(sysCustomerHeatStatistics.getId() != null){
 | 
			
		||||
            List<SysFoodHeatStatistics> list = new ArrayList<>();
 | 
			
		||||
            if(StringUtils.isNotEmpty(foodHeatCalculatorRequest.getIngredientArray())){
 | 
			
		||||
                List<HashMap> foodHeatList = JSON.parseArray(foodHeatCalculatorRequest.getIngredientArray(), HashMap.class);
 | 
			
		||||
                for(HashMap map : foodHeatList){
 | 
			
		||||
                    map.put("customerHeatId", sysCustomerHeatStatistics.getId());
 | 
			
		||||
                }
 | 
			
		||||
                return sysFoodHeatStatisticsMapper.insertFoodHeatBatch(foodHeatList);
 | 
			
		||||
        Map<String, List<HashMap>> dateFoodMap = new HashMap<>();
 | 
			
		||||
        //根据日期分类
 | 
			
		||||
        for(HashMap map : foodHeatList){
 | 
			
		||||
            String edibleDate = map.get("edibleDate").toString();
 | 
			
		||||
            if(dateFoodMap.containsKey(edibleDate)){
 | 
			
		||||
                dateFoodMap.get(edibleDate).add(map);
 | 
			
		||||
            }else{
 | 
			
		||||
                List<HashMap> list = new ArrayList<>();
 | 
			
		||||
                list.add(map);
 | 
			
		||||
                dateFoodMap.put(edibleDate, list);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return 0;
 | 
			
		||||
        int row = 0;
 | 
			
		||||
        int maxHeatValue = getMaxHeatValue(Long.parseLong(customerId)).intValue();
 | 
			
		||||
        for (String dateKey : dateFoodMap.keySet()) {
 | 
			
		||||
            //先判断该日期下是否已存在
 | 
			
		||||
            SysCustomerHeatStatistics sysCustomerHeatStatistics = new SysCustomerHeatStatistics();
 | 
			
		||||
            sysCustomerHeatStatistics.setCustomerId(Long.parseLong(customerId));
 | 
			
		||||
            sysCustomerHeatStatistics.setEdibleDate(DateUtils.parseDate(dateKey));
 | 
			
		||||
            SysCustomerHeatStatistics customerHeatResult = sysCustomerHeatStatisticsService.getCustomerHeatStatisticsByDate(sysCustomerHeatStatistics);
 | 
			
		||||
            if(customerHeatResult == null){
 | 
			
		||||
                sysCustomerHeatStatistics.setMaxHeatValue(maxHeatValue);
 | 
			
		||||
                sysCustomerHeatStatisticsService.insertSysCustomerHeatStatistics(sysCustomerHeatStatistics);
 | 
			
		||||
            }else{
 | 
			
		||||
                sysCustomerHeatStatistics.setId(customerHeatResult.getId());
 | 
			
		||||
            }
 | 
			
		||||
            if(sysCustomerHeatStatistics.getId() != null){
 | 
			
		||||
                for(HashMap map : dateFoodMap.get(dateKey)){
 | 
			
		||||
                    map.put("customerHeatId", sysCustomerHeatStatistics.getId());
 | 
			
		||||
                    map.put("number", map.get("number") != null && "".equals(map.get("number").toString().trim()) ? null : map.get("number"));
 | 
			
		||||
                    map.put("unit", map.get("unit") != null && "".equals(map.get("unit").toString().trim()) ? null : map.get("unit"));
 | 
			
		||||
                    map.put("quantity", map.get("quantity") != null && "".equals(map.get("quantity").toString().trim()) ? null : map.get("quantity"));
 | 
			
		||||
                }
 | 
			
		||||
                row = sysFoodHeatStatisticsMapper.insertFoodHeatBatch(dateFoodMap.get(dateKey));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return row;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID查询该用户每天最大摄入量
 | 
			
		||||
     * @param customerId
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    private Long getMaxHeatValue(Long customerId){
 | 
			
		||||
        SysCustomerHealthy sysCustomerHealthy = sysCustomerHealthyService.selectSysCustomerHealthyByCustomerId(customerId);
 | 
			
		||||
        if(sysCustomerHealthy != null){
 | 
			
		||||
            return HealthyUtils.calculateMaxHeatEveryDay(sysCustomerHealthy.getAge().intValue(),sysCustomerHealthy.getTall(),sysCustomerHealthy.getWeight().doubleValue());
 | 
			
		||||
        }
 | 
			
		||||
        //查询体征信息
 | 
			
		||||
        SysCustomerPhysicalSigns sysCustomerPhysicalSigns = sysCustomerPhysicalSignsService.selectSysCustomerPhysicalSignsByCusId(customerId);
 | 
			
		||||
        if(sysCustomerPhysicalSigns != null){
 | 
			
		||||
            return HealthyUtils.calculateMaxHeatEveryDay(sysCustomerPhysicalSigns.getAge().intValue(),sysCustomerPhysicalSigns.getTall(),sysCustomerPhysicalSigns.getWeight().doubleValue());
 | 
			
		||||
        }
 | 
			
		||||
        return 0L;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user