| | |
| | | |
| | | import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoCardInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | public Integer UpdateClientCard(SeClientCard po) { |
| | | return seClientCardMapper.updateByPrimaryKeySelective(po); |
| | | } |
| | | |
| | | /** |
| | | * 根据农户主键获取水卡列表 |
| | | * @param clientId |
| | | * @return |
| | | */ |
| | | public List<VoCardInfo> getCardInfoByClientId(Long clientId){ |
| | | List<VoCardInfo> list = Optional.ofNullable(seClientCardMapper.getCardInfoByClientId(clientId)).orElse(new ArrayList<>()); |
| | | if(list.size() > 0) { |
| | | return list; |
| | | }else { |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | } |