| | |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | Long itemTotal = seRechargeMapper.getRecordCount(params); |
| | | |
| | | QueryResultVo<List<VoRecharge>> rsVo = new QueryResultVo<>() ; |
| | | Integer pageCurr = 0; |
| | | Integer pageSize = 10000; |
| | | rsVo.pageCurr = 1; |
| | | rsVo.pageSize = 10000; |
| | | if(queryVo.pageSize != null && queryVo.pageCurr != null) { |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | pageSize = queryVo.pageSize ; |
| | | pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); |
| | | } |
| | | params.put("pageCurr", pageCurr); |
| | | params.put("pageSize", pageSize); |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = seRechargeMapper.getRecharges(params); |
| | |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡id获取最近一条充值记录id |
| | | * @param cardId |
| | | * @return |
| | | */ |
| | | public Long selectIdByCardId(Long cardId){ |
| | | SeRecharge seRecharge = seRechargeMapper.selectByCardId(cardId); |
| | | return seRecharge.getId(); |
| | | } |
| | | } |