优化接口 获得一个取水口接口 优化传参方式、增加片区名称和地址两个字段
4个文件已修改
38 ■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
@@ -25,7 +25,7 @@
     * @param id primary key
     * @return object by primary key
     */
    PrIntake selectByPrimaryKey(Long id);
    VoAllIntake selectByPrimaryKey(Long id);
    /**
     * 得到全部实体
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -34,13 +34,33 @@
        operateDt,
        deleted
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voPr.VoAllIntake">
        <!--@mbg.generated-->
        select
        <include refid="Base_Column_List"/>
        from pr_intake
        where id = #{id,jdbcType=BIGINT}
        and deleted = 0
        ge.id,
        ge.countyId,
        ge.townId,
        ge.villageId,
        ge.divideId,
        ge.blockId,
        ge.`name`,
        ge.lng,
        ge.lat,
        ge.remarks,
        ge.`operator`,
        ge.operateDt,
        blo.`name`                                          AS blockName,
        CONCAT(country.`name`, town.`name`, village.`name`)              AS address
        FROM pr_intake ge
        INNER JOIN pr_divide divi ON ge.divideId = divi.id
        INNER JOIN ba_block blo ON divi.blockId = blo.id
        LEFT JOIN ba_district country ON ge.countyId = country.id
        LEFT JOIN ba_district town ON ge.townId = town.id
        LEFT JOIN ba_district village ON ge.villageId = village.id
        where ge.id = #{id,jdbcType=BIGINT}
        AND ge.deleted = 0
        AND divi.deleted = 0
        AND blo.deleted = 0
    </select>
    <delete id="deleteLogicById" parameterType="java.lang.Long">
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
@@ -104,9 +104,9 @@
                            schema = @Schema(implementation = PrIntake.class))}
            )
    })
    @GetMapping(path = "one/{id}")
    @GetMapping(path = "one")
    @SsoAop()
    public BaseResponse<PrIntake> one(@PathVariable("id") Long id) {
    public BaseResponse<VoAllIntake> one(@RequestParam("id") Long id) {
        if (this.intakeSv.selectById(id) == null) {
            return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_INTAKES.getMessage());
        } else {
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -177,7 +177,7 @@
     * @param id 取水口ID
     * @return 取水口实体
     */
    public PrIntake selectById(Long id) {
    public VoAllIntake selectById(Long id) {
        return this.prIntakeMapper.selectByPrimaryKey(id);
    }