whyclxw
1 天以前 a6c0ad601911684f1641c41c6abe4afe770bebb8
src/main/java/com/whyc/controller/BattCompareController.java
@@ -37,9 +37,9 @@
    public Response getBattCompare15Statistic(@RequestBody BattCompareStic stic) throws ParseException {
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        if(stic.getInuserYear()!=null){
        if(stic.getInuseYear()!=null){
            int year=ActionUtil.getNowYear();
            stic.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-stic.getInuserYear(),0,1,5)));
            stic.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-stic.getInuseYear(),0,1,5)));
            stic.setInuseEndTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year,11,31,5)));
        }
        return battTinfService.getBattCompare15Statistic(stic);
@@ -68,11 +68,24 @@
    public Response getScoreByHehavior(@RequestBody SocreHehaviorDto dto) throws ParseException {
        User uinf= ActionUtil.getUser();
        dto.setUid(uinf.getId());
        if(dto.getInuserYear()!=null){
        if(dto.getInuseYear()!=null){
            int year=ActionUtil.getNowYear();
            dto.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-dto.getInuserYear(),0,1,5)));
            dto.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-dto.getInuseYear(),0,1,5)));
            dto.setInuseEndTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year,11,31,5)));
        }
        if (dto.getProduct()!=null) {
            if(dto.getInuseYear()!=null){
                dto.setSelectType(1);
            }else{
                dto.setSelectType(2);
            }
        }else{
            if(dto.getInuseYear()!=null){
                dto.setSelectType(3);
            }else{
                dto.setSelectType(4);
            }
        }
        return battTinfService.getScoreByHehavior(dto);
    }