| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.mapper.SiteBookingMapper; |
| | | import com.dsh.other.model.BillingRequestOfType; |
| | | import com.dsh.other.model.SiteBookingQuery; |
| | | import com.dsh.other.service.ISiteBookingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | */ |
| | | @Service |
| | | public class SiteBookingServiceImpl extends ServiceImpl<SiteBookingMapper, SiteBooking> implements ISiteBookingService { |
| | | @Autowired |
| | | private SiteBookingMapper siteBookingMapper; |
| | | |
| | | @Override |
| | | public List<BillingRequestOfType> queryDatas(Integer appUserId, String monthStart, String monthEnd) { |
| | | return this.baseMapper.queryDatas(appUserId, monthStart, monthEnd); |
| | | } |
| | | |
| | | @Override |
| | | public List<SiteBooking> listAll(SiteBookingQuery query) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | |
| | | return siteBookingMapper.listAll(query, STime, ETime, query.getAmount()); |
| | | } |
| | | |
| | | @Override |
| | | public Integer queryByCode(String code) { |
| | | return this.baseMapper.queryByCode(code); |
| | | } |
| | | } |