package com.dy.pipIrrSell.clientCard;
|
|
import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper;
|
import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
/**
|
* @author ZhuBaoMin
|
* @date 2023/12/7 9:18
|
* @LastEditTime 2023/12/7 9:18
|
* @Description
|
*/
|
|
@Slf4j
|
@Service
|
public class ClientCardSv {
|
@Autowired
|
private SeClientCardMapper seClientCardMapper;
|
|
/**
|
* 添加农户水卡记录
|
* @param po
|
* @return
|
*/
|
public Long add(SeClientCard po) {
|
seClientCardMapper.insert(po);
|
return po.getId();
|
}
|
|
/**
|
* 依据水卡地址获取水卡编号(主键)
|
* @param cardAddr
|
* @return
|
*/
|
public Long getCardIdByAddr(String cardAddr) {
|
return seClientCardMapper.getCardIdByAddr(cardAddr);
|
}
|
|
/**
|
* 根据水卡编号(主键)修改农户卡信息
|
* @param po
|
* @return
|
*/
|
public Integer UpdateClientCard(SeClientCard po) {
|
return seClientCardMapper.updateByPrimaryKeySelective(po);
|
}
|
}
|