Authored by wangshusheng

当前时间

package com.yoho.activity.queue.restapi;
import com.yoho.activity.common.utils.DateUtils;
import com.yoho.activity.dal.model.CutDownPriceProductHelpUser;
import com.yoho.activity.queue.ApiResponse;
import com.yoho.activity.queue.service.ICutDownPriceService;
... ... @@ -16,6 +17,7 @@ import com.yoho.service.model.activity.CutDownPriceActivityProductBo;
import com.yoho.service.model.activity.CutDownPriceProductHelpUserBo;
import com.yoho.service.model.activity.CutDownProductQueryRequest;
import com.yoho.service.model.activity.drawline.request.CutPriceHelpUserRequestBO;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -120,6 +122,13 @@ public class CutDownProductPriceRest {
public List<CutDownPriceProductHelpUserBo> queryCutPriceHelpUserInfos(@RequestBody CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO) {
logger.info("CutDownProductPriceRest queryCutPriceHelpUserInfos params is{}", cutPriceHelpUserRequestBO);
List<CutDownPriceProductHelpUserBo> helpUsers = cutDownPriceService.queryHelpInfo(cutPriceHelpUserRequestBO);
// 设置当前时间
if(CollectionUtils.isNotEmpty(helpUsers)){
int currentTime = DateUtils.getCurrentTimeSecond();
for (CutDownPriceProductHelpUserBo bo : helpUsers) {
bo.setCurrentTime(currentTime);
}
}
logger.info("CutDownProductPriceRest queryCutPriceHelpUserInfos success params is{}", cutPriceHelpUserRequestBO);
return helpUsers;
}
... ...