| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; |
| | | import com.stylefeng.guns.modular.system.model.TBill; |
| | | import com.stylefeng.guns.modular.system.dao.TBillMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITBillService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TBillServiceImpl extends ServiceImpl<TBillMapper, TBill> implements ITBillService { |
| | | |
| | | @Autowired |
| | | private TBillMapper tBillMapper; |
| | | |
| | | @Override |
| | | public EntityWrapper<TBill> getPageListWrapper(String createTime, String addresseePhone, Integer state, Integer billType, Integer billHeaderType) { |
| | |
| | | } |
| | | return wrapper; |
| | | } |
| | | |
| | | @Override |
| | | public List<TBill> getPageList(String createTime, String addresseePhone, Integer state, Integer billType, Integer billHeaderType) { |
| | | String startTime = null; |
| | | String endTime = null; |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]+" 00:00:00"; |
| | | endTime = split[1] + " 23:59:59"; |
| | | } |
| | | Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); |
| | | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | return tBillMapper.getPageList(startTime, endTime, addresseePhone,state,billType,billHeaderType,roleType,objectId); |
| | | } |
| | | } |