| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TComplaintResp; |
| | | import com.stylefeng.guns.modular.system.dao.TAppUserMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TDriverMapper; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.dao.TComplaintMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITComplaintService; |
| | | 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.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 投诉管理 服务实现类 |
| | | * 投诉 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-09 |
| | | * @author stylefeng |
| | | * @since 2023-03-02 |
| | | */ |
| | | @Service |
| | | public class TComplaintServiceImpl extends ServiceImpl<TComplaintMapper, TComplaint> implements ITComplaintService { |
| | | |
| | | @Autowired |
| | | private TComplaintMapper tComplaintMapper; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getComplaintList(Page<Map<String, Object>> page, Integer roleType, Integer nowUserId, String beginTime, String endTime, String userName, String userPhone, String driverPhone, Integer isHandle) { |
| | | return this.baseMapper.getComplaintList(page, roleType, nowUserId, beginTime, endTime, userName, userPhone, driverPhone, isHandle); |
| | | public List<TComplaintResp> getPageList(String createTime, String userName, String userPhone, String driverPhone, Integer state) { |
| | | 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 tComplaintMapper.getPageList(startTime,endTime,userName,userPhone,driverPhone,state,roleType,objectId); |
| | | } |
| | | } |