Administrator
2023-12-25 b7ea296dcc09cf12a11aa1b649401f77b5520215
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java
@@ -48,6 +48,16 @@
    }
    /**
     * 根据主键获取农户对象
     * @param id 农户主键
     * @return 农户对象
     */
    public VoClient getOneClient(Long id) {
        SeClient seClient = seClientMapper.selectByPrimaryKey(id);
        VoClient voClient = SeClientToVoClient.INSTANCT.po2vo(seClient);
        return voClient;
    }
    /**
     * 增开农户
     * @param po
     * @return
@@ -73,4 +83,30 @@
    public Map getDistrictsByVillageId(Long villageId) {
        return baDistrictMapper.getDistrictsByVillageId(villageId);
    }
    /**
     * 根据农户ID逻辑删除农户
     */
    public Integer deleteClientById(Long id) {
        return seClientMapper.deleteClientById(id);
    }
    /**
     * 修改农户对象
     * @param po 农户对象
     * @return 修改记录条数
     */
    public Integer updateByPrimaryKey(SeClient po) {
        return seClientMapper.updateByPrimaryKey(po);
    }
    /**
     * 根据主键获取村ID
     * @param id
     * @return
     */
    public Long getVillageIdById(Long id) {
        return seClientMapper.getVillageIdById(id);
    }
}