| New file | 
 |  |  | 
 |  |  | package com.dy.pipIrrSell.cancel; | 
 |  |  |  | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pipIrrGlobal.daoSe.SeCancelMapper; | 
 |  |  | import com.dy.pipIrrGlobal.pojoSe.SeCancel; | 
 |  |  | import com.dy.pipIrrGlobal.voSe.VoCancel; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author ZhuBaoMin | 
 |  |  |  * @date 2023/12/6 14:22 | 
 |  |  |  * @LastEditTime 2023/12/6 14:22 | 
 |  |  |  * @Description | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | @Slf4j | 
 |  |  | @Service | 
 |  |  | public class CancelSv { | 
 |  |  |     @Autowired | 
 |  |  |     private SeCancelMapper seCancelMapper; | 
 |  |  |  | 
 |  |  |     public QueryResultVo<List<VoCancel>> getCancels(QueryVo queryVo) { | 
 |  |  |         //完善查询注销记录的起止时间 | 
 |  |  |         String cancelTimeStart = queryVo.cancelTimeStart; | 
 |  |  |         String cancelTimeStop = queryVo.cancelTimeStop; | 
 |  |  |         if(cancelTimeStart != null) { | 
 |  |  |             cancelTimeStart = cancelTimeStart + " 00:00:00"; | 
 |  |  |             queryVo.setCancelTimeStart(cancelTimeStart); | 
 |  |  |         } | 
 |  |  |         if(cancelTimeStop != null) { | 
 |  |  |             cancelTimeStop = cancelTimeStop + " 23:59:59"; | 
 |  |  |             queryVo.setCancelTimeStop(cancelTimeStop); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); | 
 |  |  |  | 
 |  |  |         Long itemTotal = seCancelMapper.getRecordCount(params); | 
 |  |  |  | 
 |  |  |         QueryResultVo<List<VoCancel>> rsVo = new QueryResultVo<>() ; | 
 |  |  |         rsVo.pageSize = queryVo.pageSize ; | 
 |  |  |         rsVo.pageCurr = queryVo.pageCurr ; | 
 |  |  |  | 
 |  |  |         rsVo.calculateAndSet(itemTotal, params); | 
 |  |  |         rsVo.obj = seCancelMapper.getCancels(params); | 
 |  |  |         return rsVo ; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 添加注销记录 | 
 |  |  |      * @param po | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public Long add(SeCancel po) { | 
 |  |  |         seCancelMapper.insert(po); | 
 |  |  |         return po.getId(); | 
 |  |  |     } | 
 |  |  | } |