diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 8a75fda1..7b2fe3ec 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -5,7 +5,6 @@ import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; -import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; import com.elink.esua.epdc.async.GroupTask; @@ -1543,7 +1542,7 @@ public class AppUserServiceImpl implements AppUserService { if(!userSignInfoResult.success()){ return new Result().error("获取用户签到信息出错!"); } - UserSignDTO userSignDTO = new UserSignDTO(); + UserSignDTO userSignDTO; //不是空则进行签到信息校验 if(userSignInfoResult.getData()!=null){ userSignDTO = userSignInfoResult.getData(); @@ -1552,7 +1551,7 @@ public class AppUserServiceImpl implements AppUserService { } userSignDTO.setConsequentSignDays(userSignDTO.getConsequentSignDays()+1); //判断签到日期是否是前天或者更前 若是前天或者更前则连续签到天数修改为1 - if(DateUtil.between(userSignDTO.getLastSignTime(), new Date(), DateUnit.DAY) >= 2){ + if(DateUtil.betweenDay(userSignDTO.getLastSignTime(), new Date(),true) >= 2){ userSignDTO.setConsequentSignDays(1); } userSignDTO.setLastSignTime(new Date()); diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml index 68fd2666..49182ef4 100755 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml @@ -60,10 +60,10 @@ and OPERATION_TIME between date_add(now() , interval -1 hour ) and now() - and date_format(OPERATION_TIME,'%d') = date_format(now(),'%d') + and date_format(OPERATION_TIME,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d') - and date_format(OPERATION_TIME,'%m') = date_format(now(),'%m') + and date_format(OPERATION_TIME,'%Y-%m') = date_format(now(),'%Y-%m') and date_format(OPERATION_TIME,'%Y') = date_format(now(),'%Y')