|
@@ -7,10 +7,14 @@ import com.fdkankan.manage.entity.ServiceUpTip;
|
|
|
import com.fdkankan.manage.mapper.IServiceUpTipMapper;
|
|
|
import com.fdkankan.manage.service.IServiceUpTipService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.manage.util.Dateutils;
|
|
|
import com.fdkankan.manage.vo.request.ServiceUPTipParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 服务实现类
|
|
@@ -35,4 +39,20 @@ public class ServiceUpTipServiceImpl extends ServiceImpl<IServiceUpTipMapper, Se
|
|
|
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object getServiceUpTipByType(Integer type) {
|
|
|
+ LambdaQueryWrapper<ServiceUpTip> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(ServiceUpTip::getType,type);
|
|
|
+ wrapper.eq(ServiceUpTip::getBanStatus,0);
|
|
|
+
|
|
|
+ String date = Dateutils.getDate(new Date());
|
|
|
+ wrapper.ge(ServiceUpTip::getTipStartTime,date);
|
|
|
+ wrapper.le(ServiceUpTip::getTipEndTime,date);
|
|
|
+ List<ServiceUpTip> list = this.list(wrapper);
|
|
|
+ if(list == null || list.size()<=0){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return list.get(0);
|
|
|
+ }
|
|
|
}
|