1、行政区保存功能,修改自动加上行政区级别,及删除标志
2、单点登录中增加了获得所有组织机构的功能,及增加组织机构枚举类型
3、增加农户实体、农户类型实体、分水口实体等相关功能
1 文件已重命名
16个文件已添加
11个文件已修改
1445 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaClientMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaClientTypeMapper.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaDivideMapper.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaBlock.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClient.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClientType.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDistrict.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDivide.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaRole.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/Org.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientTypeMapper.xml 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDivideMapper.xml 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaRoleMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/QueryVo.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java 224 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeSv.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/QueryVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoSv.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/增加一个应用机构.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaClientMapper.java
New file
@@ -0,0 +1,22 @@
package com.dy.pipIrrGlobal.daoBa;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoBa.BaClient;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BaClientMapper extends BaseMapper<BaClient> {
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BaClient record);
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaClient record);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaClientTypeMapper.java
New file
@@ -0,0 +1,81 @@
package com.dy.pipIrrGlobal.daoBa;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import com.dy.pipIrrGlobal.pojoBa.BaRole;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface BaClientTypeMapper extends BaseMapper<BaClientType> {
    /**
     * é€šè¿‡ID得到类型名称
     * @param id
     * @return
     */
    String selectNameById(Long id) ;
    /**
     * å¾—到全部实体
     * @return å…¨éƒ¨å®žä½“
     */
    List<BaClientType> selectAll() ;
    /**
     * é€šè¿‡ID得到实体
     * @param id å®žä½“ID
     * @return å®žä½“
     */
    BaClientType selectByPrimaryKey(Long id) ;
    /**
     * æŸ¥è¯¢æ€»æ•°
     * @param params æŸ¥è¯¢æ¡ä»¶
     * @return æ€»æ•°
     */
    Long selectTotal(Map<?, ?> params) ;
    /**
     * åˆ†é¡µæŸ¥è¯¢ä¸€äº›
     * @param params æŸ¥è¯¢æ¡ä»¶
     * @return å®žä½“集合
     */
    List<BaClientType> selectSome(Map<?, ?> params) ;
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BaClientType record);
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaClientType record);
    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(BaClientType record);
    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(BaClientType record);
    /**
     * é€šè¿‡ID删除
     * @param id
     */
    void deleteByPrimaryKey(Long id) ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaDivideMapper.java
New file
@@ -0,0 +1,49 @@
package com.dy.pipIrrGlobal.daoBa;
import com.dy.pipIrrGlobal.pojoBa.BaDivide;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BaDivideMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BaDivide record);
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaDivide record);
    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    BaDivide selectByPrimaryKey(Long id);
    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(BaDivide record);
    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(BaDivide record);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaBlock.java
@@ -37,14 +37,14 @@
     */
    @Schema(description = "片区名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "片区名称不能为空") //不能为空也不能为null
    @Length(message = "片区名称不大于{max}字符,不小于{min}字符", min = 1, max = 25)
    @Length(message = "片区名称不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
     * è´Ÿè´£äºº
     */
    @Schema(description = "片区负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "片区负责人姓名不大于{max}字符,不小于{min}字符", min = 1, max = 25)
    @Length(message = "片区负责人姓名不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String header;
    /**
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClient.java
New file
@@ -0,0 +1,165 @@
package com.dy.pipIrrGlobal.pojoBa;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.mybatis.envm.Deleted;
import com.dy.common.mybatis.envm.Disabled;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
/**
 * å†œæˆ·å®žä½“
 */
@TableName(value="ba_client", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "农户实体")
public class BaClient implements BaseEntity {
    public static final long serialVersionUID = 202311141539001L;
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id ;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在县不能为空") //不能为空也不能为null
    public Long countyId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在镇不能为空") //不能为空也不能为null
    public Long townId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在村不能为空") //不能为空也不能为null
    public Long villageId;
    /**
     * å¤–键,指向片区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在片区不能为空") //不能为空也不能为null
    public Long blockId;
    /**
     * å¤–键,指向分水房
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在分水房ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在分水房不能为空") //不能为空也不能为null
    public Long divideId;
    /**
     * å¤–键,指向农户类型
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "农户类型ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "农户类型不能为空") //不能为空也不能为null
    public Long typeId;
    /**
     * å§“名
     */
    @Schema(description = "农户姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "农户姓名不能为空") //不能为空也不能为null
    @Length(message = "农户姓名不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
     * ç¼–号
     */
    @Schema(description = "农户编号(系统自动生成)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer num;
    /**
     * æ‰‹æœºå·
     */
    @Schema(description = "农户手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "农户手机号不能为空") //不能为空也不能为null
    @Length(message = "农户手机号必须{max}位数据", min = 11, max = 11)
    public String phone;
    /**
     * èº«ä»½è¯å·
     */
    @Schema(description = "农户身份证号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "农户身份证号不能为空") //不能为空也不能为null
    @Length(message = "农户身份证号必须{max}位数据", min = 18, max = 18)
    public String idcard;
    /**
     * ç§æ¤é¢ç§¯
     */
    @Schema(description = "农户种植面积", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double area;
    /**
     * åŽ¿åç§°+镇名称+村名称,不可填写,自动生成
     */
    //@Schema(description = "县名称+镇名称+村名称")
    public String district;
    /**
     * è¡—道+门牌号
     */
    @Schema(description = "街道+门牌号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "地址不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String address;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String remark;
    /**
     * æ˜¯å¦ç¦ç”¨ 0:否,1:是
     */
    @Schema(description = "是否禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Max(message = "是否禁用只能0或1", value = 1)
    @Min(message = "是否禁用只能0或1",value = 0)
    public Disabled disabled;
    /**
     * æ˜¯å¦åˆ é™¤: 0表示未删除  1表示删除.
     */
    @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Deleted deleted;
    @TableField(exist = false)
    @Schema(description = "所在片区名称,只在查询中有效")
    public String blockName ;
    @TableField(exist = false)
    @Schema(description = "所属农户类型名称,只在查询中有效")
    public String typeName ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClientType.java
New file
@@ -0,0 +1,42 @@
package com.dy.pipIrrGlobal.pojoBa;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
/**
 * å†œæˆ·ç±»åž‹å®žä½“
 */
@TableName(value="ba_client", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "农户类型实体")
public class BaClientType implements BaseEntity {
    public static final long serialVersionUID = 202311141553001L;
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id ;
    /**
    * å†œæˆ·ç±»åž‹åç§°
    */
    @Schema(description = "农户类型名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "农户类型名称不能为空") //不能为空也不能为null
    @Length(message = "农户类型名称不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDistrict.java
@@ -49,7 +49,7 @@
     */
    @Schema(description = "行政区名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行政区名称不能为空") //不能为空也不能为null
    @Length(message = "行政区名称不大于{max}字符,不小于{min}字符", min = 1, max = 25)
    @Length(message = "行政区名称不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
@@ -64,7 +64,7 @@
    /**
     * è¡Œæ”¿åŒºçº§åˆ«
     */
    @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.REQUIRED)
    @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "行政区级别不能为空") //不能为空也不能为null
    @Max(message = "行政区级别不大于10", value = 10)
    @Min(message = "行政区级别不小于0",value = 0)
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDivide.java
New file
@@ -0,0 +1,125 @@
package com.dy.pipIrrGlobal.pojoBa;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
/**
 * åˆ†æ°´å£å®žä½“
 */
@TableName(value="ba_divide", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "分水口实体")
public class BaDivide implements BaseEntity {
    public static final long serialVersionUID = 202311141539001L;
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id ;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在县不能为空") //不能为空也不能为null
    public Long countyId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在镇不能为空") //不能为空也不能为null
    public Long townId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在村不能为空") //不能为空也不能为null
    public Long villageId;
    /**
     * å¤–键,指向片区
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在片区不能为空") //不能为空也不能为null
    public Long blockId;
    /**
     * åˆ†æ°´å£åç§°æˆ–编号
     */
    @Schema(description = "分水口名称或编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "分水口名称或编号不能为空") //不能为空也不能为null
    @Length(message = "分水口名称或编号不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
    * è¦†ç›–村
    */
    @Schema(description = "农户编号(系统自动生成)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String villages;
    /**
    * è¦†ç›–面积(平方公里)
    */
    @Schema(description = "覆盖面积(平方公里)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double area;
    /**
    * è´Ÿè´£äºº
    */
    @Schema(description = "负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "负责人不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String header;
    /**
    * è”系电话
    */
    @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "联系电话不能为空") //不能为空也不能为null
    @Length(message = "联系电话必须{max}位数据", min = 11, max = 11)
    public String phone;
    /**
    * ç»åº¦
    */
    @Schema(description = "经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lng;
    /**
    * çº¬åº¦
    */
    @Schema(description = "纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lat;
    /**
    * å¤‡æ³¨
    */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String remark;
    /**
    * åˆ é™¤æ ‡å¿—
    */
    @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaRole.java
@@ -40,7 +40,7 @@
     */
    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "名称不能为空") //不能为空也不能为null
    @Length(message = "名称不大于{max}字符,不小于{min}字符", min = 2, max = 25)
    @Length(message = "名称不大于{max}字,不小于{min}字", min = 2, max = 25)
    public String name ;
    /**
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java
@@ -59,7 +59,7 @@
     */
    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "姓名不能为空") //不能为空也不能为null
    @Length(message = "姓名不大于{max}字符,不小于{min}字符", min = 2, max = 25)
    @Length(message = "姓名不大于{max}字,不小于{min}字", min = 2, max = 25)
    public String name;
    /**
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/Org.java
New file
@@ -0,0 +1,33 @@
package com.dy.pipIrrGlobal.util;
public enum Org {
    Ym("ym", "元谋"),
    Pj("pj", "片角镇") ;
    public String tag ;
    public String name ;
    Org(String tag, String name){
        this.tag = tag ;
        this.name = name ;
    }
    public String getTag() {
        return this.tag ;
    }
    public String getName() {
        return this.name ;
    }
    public static Org get(String tag){
        if(tag.equals(Ym.tag)){
            return Ym ;
        }else if(tag.equals(Pj.tag)){
            return Pj ;
        }
        return null ;
    }
}
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml
New file
@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoBa.BaClientMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaClient">
    <!--@mbg.generated-->
    <!--@Table ba_client-->
    <result column="id" jdbcType="BIGINT" property="id" />
    <result column="countyId" jdbcType="BIGINT" property="countyId" />
    <result column="townId" jdbcType="BIGINT" property="townId" />
    <result column="villageId" jdbcType="BIGINT" property="villageId" />
    <result column="blockId" jdbcType="BIGINT" property="blockId" />
    <result column="divideId" jdbcType="BIGINT" property="divideId" />
    <result column="typeId" jdbcType="BIGINT" property="typeId" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="num" jdbcType="INTEGER" property="num" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="idCard" jdbcType="VARCHAR" property="idcard" />
    <result column="area" jdbcType="FLOAT" property="area" />
    <result column="district" jdbcType="VARCHAR" property="district" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="disabled" jdbcType="TINYINT" property="disabled" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, countyId, townId, villageId, blockId, divideId, typeId, `name`, num, phone, idCard, area, district,address, remark,
    disabled, deleted
  </sql>
  <sql id="part_Column_List">
    <!--@mbg.generated-->
    id, countyId, townId, villageId, blockId, divideId, typeId, `name`, num, phone, idCard, area, district,address, remark,
    disabled
  </sql>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClient">
    <!--@mbg.generated-->
    insert into ba_client (id, countyId, townId, villageId, blockId, divideId,
      typeId, `name`, num, phone,
      idCard, area, district, address,
      remark, disabled, deleted
      )
    values (#{id,jdbcType=BIGINT}, #{countyId,jdbcType=BIGINT},
      #{townId,jdbcType=BIGINT}, #{villageId,jdbcType=BIGINT},
      #{blockId,jdbcType=BIGINT}, #{divideId,jdbcType=BIGINT}, #{typeId,jdbcType=BIGINT},
      #{name,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
      #{phone,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR},
      #{area,jdbcType=FLOAT}, #{district,jdbcType=VARCHAR},
      #{address,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},
      #{disabled,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
      #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClient">
    <!--@mbg.generated-->
    insert into ba_client
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="countyId != null">
        countyId,
      </if>
      <if test="townId != null">
        townId,
      </if>
      <if test="villageId != null">
        villageId,
      </if>
      <if test="divideId != null">
        divideId,
      </if>
     <if test="blockId != null">
        blockId,
      </if>
      <if test="typeId != null">
        typeId,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="num != null">
        num,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="idcard != null">
        idCard,
      </if>
      <if test="area != null">
        area,
      </if>
      <if test="district != null">
        district,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="disabled != null">
        disabled,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="countyId != null">
        #{countyId,jdbcType=BIGINT},
      </if>
      <if test="townId != null">
        #{townId,jdbcType=BIGINT},
      </if>
      <if test="villageId != null">
        #{villageId,jdbcType=BIGINT},
      </if>
      <if test="divideId != null">
        #{divideId,jdbcType=BIGINT},
      </if>
     <if test="blockId != null">
        #{blockId,jdbcType=BIGINT},
      </if>
      <if test="typeId != null">
        #{typeId,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="num != null">
        #{num,jdbcType=INTEGER},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="idcard != null">
        #{idcard,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        #{area,jdbcType=FLOAT},
      </if>
      <if test="district != null">
        #{district,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="disabled != null">
        #{disabled,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
      </if>
      <if test="deleted != null">
        #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientTypeMapper.xml
New file
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoBa.BaClientTypeMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaClientType">
    <!--@mbg.generated-->
    <!--@Table ba_client_type-->
    <result column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`
  </sql>
  <select id="selectNameById" parameterType="long" resultType="string">
    select name
    from ba_client_type
    where id=#{id, jdbcType=BIGINT}
  </select>
  <select id="selectAll" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from ba_client_type
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from ba_client_type
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long">
    select
    count(*)
    from ba_client_type
    <trim prefix="where" suffixOverrides="and">
      <if test="name != null">
        name like concat('%', #{name}, '%')
      </if>
    </trim>
  </select>
  <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from ba_client_type
    <trim prefix="where" suffixOverrides="and">
      <if test="name != null">
        name like concat('%', #{name}, '%')
      </if>
    </trim>
    order by id DESC
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start}, #{count}
      </if>
    </trim>
  </select>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType">
    <!--@mbg.generated-->
    insert into ba_client_type (id, `name`)
    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType">
    <!--@mbg.generated-->
    insert into ba_client_type
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        `name`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType">
    update ba_role
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType">
    update ba_role
    set `name` = #{name,jdbcType=VARCHAR},
    where id = #{id,jdbcType=BIGINT}
  </update>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from ba_client_type
    where id = #{id,jdbcType=BIGINT}
  </delete>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDivideMapper.xml
New file
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoBa.BaDivideMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaDivide">
    <!--@mbg.generated-->
    <!--@Table ba_divide-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="countyId" jdbcType="BIGINT" property="countyid" />
    <result column="townId" jdbcType="BIGINT" property="townid" />
    <result column="villageId" jdbcType="BIGINT" property="villageid" />
    <result column="blockId" jdbcType="BIGINT" property="blockid" />
    <result column="villages" jdbcType="VARCHAR" property="villages" />
    <result column="area" jdbcType="FLOAT" property="area" />
    <result column="header" jdbcType="VARCHAR" property="header" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="lng" jdbcType="DOUBLE" property="lng" />
    <result column="lat" jdbcType="DOUBLE" property="lat" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`, countyId, townId, villageId, blockId, villages, area, `header`, phone,
    lng, lat, remark, deleted
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from ba_divide
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from ba_divide
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDivide">
    <!--@mbg.generated-->
    insert into ba_divide (id, `name`, countyId,
      townId, villageId, blockId,
      villages, area, `header`,
      phone, lng, lat, remark,
      deleted)
    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{countyid,jdbcType=BIGINT},
      #{townid,jdbcType=BIGINT}, #{villageid,jdbcType=BIGINT}, #{blockid,jdbcType=BIGINT},
      #{villages,jdbcType=VARCHAR}, #{area,jdbcType=FLOAT}, #{header,jdbcType=VARCHAR},
      #{phone,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
      #{deleted,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDivide">
    <!--@mbg.generated-->
    insert into ba_divide
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="countyid != null">
        countyId,
      </if>
      <if test="townid != null">
        townId,
      </if>
      <if test="villageid != null">
        villageId,
      </if>
      <if test="blockid != null">
        blockId,
      </if>
      <if test="villages != null">
        villages,
      </if>
      <if test="area != null">
        area,
      </if>
      <if test="header != null">
        `header`,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="lng != null">
        lng,
      </if>
      <if test="lat != null">
        lat,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="countyid != null">
        #{countyid,jdbcType=BIGINT},
      </if>
      <if test="townid != null">
        #{townid,jdbcType=BIGINT},
      </if>
      <if test="villageid != null">
        #{villageid,jdbcType=BIGINT},
      </if>
      <if test="blockid != null">
        #{blockid,jdbcType=BIGINT},
      </if>
      <if test="villages != null">
        #{villages,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        #{area,jdbcType=FLOAT},
      </if>
      <if test="header != null">
        #{header,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDivide">
    <!--@mbg.generated-->
    update ba_divide
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="countyid != null">
        countyId = #{countyid,jdbcType=BIGINT},
      </if>
      <if test="townid != null">
        townId = #{townid,jdbcType=BIGINT},
      </if>
      <if test="villageid != null">
        villageId = #{villageid,jdbcType=BIGINT},
      </if>
      <if test="blockid != null">
        blockId = #{blockid,jdbcType=BIGINT},
      </if>
      <if test="villages != null">
        villages = #{villages,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        area = #{area,jdbcType=FLOAT},
      </if>
      <if test="header != null">
        `header` = #{header,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        lng = #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        lat = #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDivide">
    <!--@mbg.generated-->
    update ba_divide
    set `name` = #{name,jdbcType=VARCHAR},
      countyId = #{countyid,jdbcType=BIGINT},
      townId = #{townid,jdbcType=BIGINT},
      villageId = #{villageid,jdbcType=BIGINT},
      blockId = #{blockid,jdbcType=BIGINT},
      villages = #{villages,jdbcType=VARCHAR},
      area = #{area,jdbcType=FLOAT},
      `header` = #{header,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      lng = #{lng,jdbcType=DOUBLE},
      lat = #{lat,jdbcType=DOUBLE},
      remark = #{remark,jdbcType=VARCHAR},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaRoleMapper.xml
@@ -105,7 +105,7 @@
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUser">
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRole">
    update ba_role
    <set>
      <if test="name != null">
@@ -118,7 +118,7 @@
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUser">
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRole">
    update ba_role
    set `name` = #{name,jdbcType=VARCHAR},
     deleted = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java
New file
@@ -0,0 +1,4 @@
package com.dy.pipIrrBase.client;
public class ClientCtrl {
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java
New file
@@ -0,0 +1,4 @@
package com.dy.pipIrrBase.client;
public class ClientSv {
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/QueryVo.java
New file
@@ -0,0 +1,31 @@
package com.dy.pipIrrBase.client;
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(name = "农户查询条件")
public class QueryVo extends QueryConditionVo {
    public Long countyId ;
    public Long townId ;
    public Long villageId ;
    @Schema(description = "农户姓名")
    public String name;
    @Schema(description = "农户编号")
    public String num;
    @Schema(description = "农户电话")
    public String phone;
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java
New file
@@ -0,0 +1,224 @@
package com.dy.pipIrrBase.clientType;
import com.dy.common.aop.SsoAop;
import com.dy.common.mybatis.envm.Deleted;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrBase.role.RoleSv;
import com.dy.pipIrrBase.user.QueryVo;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Objects;
@Slf4j
@Tag(name = "农户类型管理", description = "农户类型增删改查等操作")
@RestController
@RequestMapping(path="role")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class ClientTypeCtrl {
    private ClientTypeSv sv ;
    @Autowired
    private void setSv(ClientTypeSv sv){
        this.sv = sv ;
    }
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚得到所有农户类型数据
     * @return æ‰€æœ‰å†œæˆ·ç±»åž‹æ•°æ®
     */
    @Operation(summary = "获得全部农户类型", description = "返回全部农户类型数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回全部农户类型数据(BaseResponse.content:QueryResultVo[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = BaClientType.class))}
            )
    })
    @GetMapping(path = "all")
    @SsoAop("-1")
    public BaseResponse<QueryResultVo<List<BaClientType>>> all(){
        try {
            QueryResultVo<List<BaClientType>> res = this.sv.selectAll() ;
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询农户类型异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚得到一页农户类型数据
     * @return æ‰€æœ‰å†œæˆ·ç±»åž‹æ•°æ®
     */
    @Operation(summary = "获得一页农户类型", description = "返回一页农户类型数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回一页农户类型数据(BaseResponse.content:QueryResultVo[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = BaClientType.class))}
            )
    })
    @PostMapping(path = "some", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    @SsoAop("-1")
    public BaseResponse<QueryResultVo<List<BaClientType>>> some(@Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){
        try {
            QueryResultVo<List<BaClientType>> res = this.sv.selectSome(vo) ;
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询农户类型异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * å¾—到一个农户类型数据
     * @return ä¸€ä¸ªå†œæˆ·ç±»åž‹æ•°æ®
     */
    @Operation(summary = "一个农户类型", description = "得到一个农户类型数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回一个农户类型数据(BaseResponse.content:{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = BaClientType.class))}
            )
    })
    @GetMapping(path = "one")
    @SsoAop("-1")
    public BaseResponse<BaClientType> one(@Parameter(description = "实体id", required = true) Long id){
        return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
    }
    /**
     * ä¿å­˜å†œæˆ·ç±»åž‹
     * @param po ä¿å­˜å†œæˆ·ç±»åž‹form表单对象
     * @return æ˜¯å¦æˆåŠŸ
     */
    @Operation(summary = "保存农户类型", description = "提交农户类型数据(form表单),进行保存")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "操作结果:true:成功,false:失败(BaseResponse.content)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Boolean.class))}
            )
    })
    @PostMapping(path = "save", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> save(@Parameter(description = "form表单数据", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){
        if(bindingResult != null && bindingResult.hasErrors()){
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        po.id = null ;
        int count;
        try {
            count = this.sv.save(po);
        } catch (Exception e) {
            log.error("保存农户类型异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        }
    }
    /**
     * ç¼–辑修改农户类型
     * @param po ä¿å­˜å†œæˆ·ç±»åž‹form表单对象
     * @return æ˜¯å¦æˆåŠŸ
     */
    @Operation(summary = "编辑修改农户类型", description = "提交农户类型数据(form表单),进行修改")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "操作结果:true:成功,false:失败(BaseResponse.content)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Boolean.class))}
            )
    })
    @PostMapping(path = "update", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> update(@Parameter(description = "form表单数据", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){
        if(bindingResult != null && bindingResult.hasErrors()){
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        if(po.id == null){
            return BaseResponseUtils.buildFail("无数据实体ID") ;
        }
        int count;
        try {
            count = this.sv.update(po);
        } catch (Exception e) {
            log.error("保存农户类型异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        }
    }
    /**
     * åˆ é™¤å†œæˆ·ç±»åž‹
     * @param id å†œæˆ·ç±»åž‹ID
     * @return æ˜¯å¦æˆåŠŸ
     */
    @Operation(summary = "删除农户类型", description = "提交农户类型ID,进行逻辑删除")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "操作结果:true:成功,false:失败(BaseResponse.content)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Boolean.class))}
            )
    })
    @GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> delete(@Parameter(description = "实体id", required = true) Long id){
        if(id == null){
            return BaseResponseUtils.buildFail("id不能为空") ;
        }
        int count;
        try {
            count = this.sv.delete(id);
        } catch (Exception e) {
            log.error("保存农户类型异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeSv.java
New file
@@ -0,0 +1,106 @@
package com.dy.pipIrrBase.clientType;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrBase.user.QueryVo;
import com.dy.pipIrrGlobal.daoBa.BaClientTypeMapper;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class ClientTypeSv {
    private BaClientTypeMapper dao;
    @Autowired
    private void setDao(BaClientTypeMapper dao){
        this.dao = dao;
    }
    /**
     * å¾—到所有农户类型
     * @return æ‰€æœ‰å†œæˆ·ç±»åž‹é›†åˆ
     */
    public QueryResultVo<List<BaClientType>> selectAll(){
        QueryResultVo<List<BaClientType>> rsVo = new QueryResultVo<>() ;
        rsVo.obj = this.dao.selectAll() ;
        return rsVo ;
    }
    /**
     * å¾—到一个农户类型
     * @param id å†œæˆ·ç±»åž‹ID
     * @return å†œæˆ·ç±»åž‹å®žä½“
     */
    public BaClientType selectById(Long id){
        return this.dao.selectById(id) ;
    }
    /**
     * å¾—到一个用户
     * @param vo æŸ¥è¯¢æ¡ä»¶å€¼å¯¹è±¡
     * @return ç”¨æˆ·å®žä½“
     */
    @SuppressWarnings("unchecked")
    public QueryResultVo<List<BaClientType>> selectSome(QueryVo vo){
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo) ;
        Long itemTotal = this.dao.selectTotal(params) ;
        QueryResultVo<List<BaClientType>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = vo.pageSize ;
        rsVo.pageCurr = vo.pageCurr ;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = this.dao.selectSome(params) ;
        return rsVo ;
    }
    /**
     * ä¿å­˜å®žä½“
     * @param po å®žä½“
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int save(BaClientType po){
        return this.dao.insertSelective(po) ;
    }
    /**
     * ä¿å­˜ä¿®æ”¹å®žä½“
     * @param po å®žä½“
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int update(BaClientType po){
        return this.dao.updateByPrimaryKeySelective(po) ;
    }
    /**
     * ä¿å­˜ä¿®æ”¹å®žä½“
     * @param id å®žä½“ID
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int delete(Long id){
        //int count = this.dao.deleteLogicById(id) ;
        //逻辑删除,所以不实际删除其关联的权限
        //if(count > 0){
        //    this.rolePrivDao.deleteByRoleId(id) ;
        //}
        //return count ;
        return 0 ;// this.dao.deleteLogicById(id) ;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/QueryVo.java
New file
@@ -0,0 +1,20 @@
package com.dy.pipIrrBase.clientType;
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(name = "农户类型查询条件")
public class QueryVo extends QueryConditionVo {
    @Schema(description = "农户类型名称")
    public String name;
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
@@ -1,6 +1,7 @@
package com.dy.pipIrrBase.district;
import com.dy.common.aop.SsoAop;
import com.dy.common.mybatis.envm.Deleted;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.ResultCodeMsg;
@@ -119,6 +120,13 @@
        BaDistrict po = DistrictVoMapper.INSTANCT.convert(vo);
        int count;
        try {
            BaDistrict supperPo = this.sv.selectById(po.supperId) ;
            if(supperPo == null){
                return BaseResponseUtils.buildFail("出错,未得到上级行政区") ;
            }else{
                po.level = DistrictLevel.get((byte)(supperPo.level.code + 1)) ;
            }
            po.deleted = Deleted.NO ;
            count = this.sv.save(po);
        } catch (Exception e) {
            log.error("保存行政区异常", e);
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictVo.java
@@ -18,7 +18,7 @@
    @Schema(description = "行政区实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id;
    @Schema(description = "上级行政区ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Schema(description = "上级行政区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    public Long supperId ;
    @Schema(description = "行政区名称", requiredMode = Schema.RequiredMode.REQUIRED)
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java
@@ -52,7 +52,7 @@
                            schema = @Schema(implementation = BaRole.class))}
            )
    })
    @PostMapping(path = "all")
    @GetMapping(path = "all")
    @SsoAop("-1")
    public BaseResponse<QueryResultVo<List<BaRole>>> all(){
        try {
@@ -65,7 +65,7 @@
    }
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚得到所有角色数据
     * å®¢æˆ·ç«¯è¯·æ±‚得到一页角色数据
     * @return æ‰€æœ‰è§’色数据
     */
    @Operation(summary = "获得一页角色", description = "返回一页角色数据")
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java
@@ -7,6 +7,8 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoBa.BaUser;
import com.dy.pipIrrGlobal.util.DistrictLevel;
import com.dy.pipIrrGlobal.util.Org;
import com.mysql.cj.util.StringUtils;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
@@ -25,6 +27,8 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
@@ -54,6 +58,24 @@
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚得到所有组织机构
     * @return æ‰€æœ‰ç»„织机构数据
     */
    @Operation(summary = "所有组织机构", description = "返回所有所有组织机构数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回所有组织机构数据(BaseResponse.content:[ { \"tag\":\"ym\", \"name\":\"元谋\" }, { \"tag\":\"片角\", \"name\":\"片角镇\" }])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Org.class))}
            )
    })
    @GetMapping(path = "allOrg")
    public BaseResponse<List<Org>> allOrg(){
        List<Org> list = Arrays.asList(Org.Ym, Org.Pj) ;
        return BaseResponseUtils.buildSuccess(list);
    }
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚用户登录,客户端提交Json数据
     * @param vo ç”¨æˆ·ç™»å½•值对象
     * @param bindingResult è¾“入验证
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoSv.java
@@ -28,6 +28,7 @@
        this.baPrivilegeMapper = baPrivilegeMapper ;
    }
    /**
     * éœ€è¦BaUserMapper.xml
     * @param uuid ç»™ç™»å½•成功的用户赋值其token
pipIrr-platform/Îĵµ/Ôö¼ÓÒ»¸öÓ¦Óûú¹¹.docx
Binary files differ