Administrator
2023-12-11 bc230a4679ee851d5bd9cab83ad6316e483a5764
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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);
    }
}