From 5e7b0ed4a154ad067cbcf4aa1a1c7cce32f9864c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 26 四月 2024 18:02:17 +0800 Subject: [PATCH] 唯品会链接解析升级 --- fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFlashSaleServiceImpl.java | 187 +++++++++++++++++++++++----------------------- 1 files changed, 93 insertions(+), 94 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFlashSaleServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFlashSaleServiceImpl.java index 816b207..c7c7847 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFlashSaleServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFlashSaleServiceImpl.java @@ -1,94 +1,93 @@ -package com.yeshi.fanli.service.impl.lable; - -import java.util.Calendar; -import java.util.List; - -import javax.annotation.Resource; - -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Service; - -import com.yeshi.fanli.dao.mybatis.lable.QualityFlashSaleMapper; -import com.yeshi.fanli.entity.bus.lable.QualityFlashSale; -import com.yeshi.fanli.exception.QualityFlashSaleException; -import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService; - -@Service -public class QualityFlashSaleServiceImpl implements QualityFlashSaleService { - - @Resource - private QualityFlashSaleMapper qualityFlashSaleMapper; - - @Override - public int insertSelective(QualityFlashSale record) throws QualityFlashSaleException{ - return qualityFlashSaleMapper.insertSelective(record); - } - - @Override - public int updateByPrimaryKey(QualityFlashSale record) throws QualityFlashSaleException { - return qualityFlashSaleMapper.updateByPrimaryKey(record); - } - - @Override - public int updateByPrimaryKeySelective(QualityFlashSale record) throws QualityFlashSaleException { - return qualityFlashSaleMapper.updateByPrimaryKeySelective(record); - } - - @Override - public int insertBatch(List<QualityFlashSale> list){ - return qualityFlashSaleMapper.insertBatch(list); - } - - @Override - public int updateBatchSelective(List<QualityFlashSale> list){ - return qualityFlashSaleMapper.updateBatchSelective(list); - } - - - @Override - public void deleteBatchByPrimaryKey(List<Long> list) throws QualityFlashSaleException{ - qualityFlashSaleMapper.deleteBatchByPrimaryKey(list); - } - - - - @Override - public int getNowType() { - int type = 0; - Calendar now = Calendar.getInstance(); - int hour = now.get(Calendar.HOUR_OF_DAY); - - if (hour < 9) { - type = 1; - } else if (hour >= 9 && hour < 12){ - type = 2; - } else if (hour >= 12 && hour < 14){ - type = 3; - } else if (hour >= 14 && hour < 16){ - type = 4; - } else if (hour >= 16 && hour < 20){ - type = 5; - } else if (hour >= 20 && hour < 22){ - type = 6; - } else if (hour >= 22){ - type = 7; - } - - return type; - } - - - @Override - public List<QualityFlashSale> listQueryByQualityID(List<Long> list) { - return qualityFlashSaleMapper.listQueryByQualityID(list); - } - - @Override - public List<Long> queryNeedRemove (long start, int count, int hour) throws QualityFlashSaleException { - return qualityFlashSaleMapper.queryNeedRemove(start, count, hour); - } - - - -} - +package com.yeshi.fanli.service.impl.lable; + +import java.util.Calendar; +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.yeshi.fanli.dao.mybatis.lable.QualityFlashSaleMapper; +import com.yeshi.fanli.entity.bus.lable.QualityFlashSale; +import com.yeshi.fanli.exception.goods.quality.QualityFlashSaleException; +import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService; + +@Service +public class QualityFlashSaleServiceImpl implements QualityFlashSaleService { + + @Resource + private QualityFlashSaleMapper qualityFlashSaleMapper; + + @Override + public int insertSelective(QualityFlashSale record) throws QualityFlashSaleException{ + return qualityFlashSaleMapper.insertSelective(record); + } + + @Override + public int updateByPrimaryKey(QualityFlashSale record) throws QualityFlashSaleException { + return qualityFlashSaleMapper.updateByPrimaryKey(record); + } + + @Override + public int updateByPrimaryKeySelective(QualityFlashSale record) throws QualityFlashSaleException { + return qualityFlashSaleMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int insertBatch(List<QualityFlashSale> list){ + return qualityFlashSaleMapper.insertBatch(list); + } + + @Override + public int updateBatchSelective(List<QualityFlashSale> list){ + return qualityFlashSaleMapper.updateBatchSelective(list); + } + + + @Override + public void deleteBatchByPrimaryKey(List<Long> list) throws QualityFlashSaleException{ + qualityFlashSaleMapper.deleteBatchByPrimaryKey(list); + } + + + + @Override + public int getNowType() { + int type = 0; + Calendar now = Calendar.getInstance(); + int hour = now.get(Calendar.HOUR_OF_DAY); + + if (hour < 9) { + type = 1; + } else if (hour >= 9 && hour < 12){ + type = 2; + } else if (hour >= 12 && hour < 14){ + type = 3; + } else if (hour >= 14 && hour < 16){ + type = 4; + } else if (hour >= 16 && hour < 20){ + type = 5; + } else if (hour >= 20 && hour < 22){ + type = 6; + } else if (hour >= 22){ + type = 7; + } + + return type; + } + + + @Override + public List<QualityFlashSale> listQueryByQualityID(List<Long> list) { + return qualityFlashSaleMapper.listQueryByQualityID(list); + } + + @Override + public List<Long> queryNeedRemove (long start, int count, int hour) throws QualityFlashSaleException { + return qualityFlashSaleMapper.queryNeedRemove(start, count, hour); + } + + + +} + -- Gitblit v1.8.0