pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
@@ -1,8 +1,8 @@ package com.dy.pipIrrGlobal.daoMd; import com.dy.pipIrrGlobal.pojoBa.BaDivide; import com.dy.pipIrrGlobal.pojoMd.MdCrops; import com.dy.pipIrrGlobal.voMd.VoCrops; import com.dy.pipIrrGlobal.voMd.VoParam; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -43,6 +43,12 @@ List<VoCrops> selectSome(Map<?,?> params); /** * 查询所有实体 * @return 实体集合 * */ List<VoCrops> selectAll(); /** * 根据id逻辑删除 * @param id * @return pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdParamMapper.java
@@ -29,7 +29,7 @@ VoParam selectById(Long id); /** * 分页查询一些 * 查询所有实体 * @return 实体集合 * */ List<VoParam> selectAll(Long cropsId); pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
@@ -169,9 +169,7 @@ </select> <select id="selectSome" parameterType="java.util.Map" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> select <include refid="Part_Column_List" > <property name="alias" value="bd"/> </include> <include refid="Part_Column_List" /> from md_crops tb where tb.deleted != 1 <trim prefix="and" suffixOverrides="and"> @@ -187,6 +185,15 @@ </trim> </select> <select id="selectAll" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> select <include refid="Part_Column_List" > <property name="alias" value="tb"/> </include> from md_crops tb </select> <update id="deleteById" parameterType="java.lang.Long"> update md_crops set deleted = 1 pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdParamMapper.xml
@@ -113,9 +113,7 @@ <select id="selectAll" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voMd.VoParam"> select <include refid="Base_Column_List" > <property name="alias" value="bd"/> </include> <include refid="Base_Column_List" /> from md_param tb where crops_id = #{cropsId,jdbcType=BIGINT} </select> pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java
@@ -8,6 +8,7 @@ import com.dy.common.webUtil.ResultCodeMsg; import com.dy.pipIrrGlobal.pojoMd.MdCrops; import com.dy.pipIrrGlobal.voMd.VoCrops; import com.dy.pipIrrGlobal.voMd.VoParam; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -84,7 +85,30 @@ 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 = VoParam.class))} ) }) @GetMapping(path = "all") @SsoAop() public BaseResponse<List<VoCrops>> all(){ try { List<VoCrops> res = this.sv.selectAll() ; return BaseResponseUtils.buildSuccess(res); } catch (Exception e) { log.error("查询作物异常", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } /** * 新增保存作物 * @param po 新增保存作物form表单对象 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsSv.java
@@ -4,6 +4,7 @@ import com.dy.pipIrrGlobal.daoMd.MdCropsMapper; import com.dy.pipIrrGlobal.pojoMd.MdCrops; import com.dy.pipIrrGlobal.voMd.VoCrops; import com.dy.pipIrrGlobal.voMd.VoParam; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.common.utils.PojoUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -55,6 +56,14 @@ return rsVo ; } /** * 查询所有实体 * @return 包含实体集合的结果对象 */ @SuppressWarnings("unchecked") public List<VoCrops> selectAll(){ return this.mdCropsDao.selectAll() ; } /** * 添加实体 * @param po 实体 * @return 实体ID pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/param/ParamCtrl.java
@@ -58,14 +58,14 @@ return BaseResponseUtils.buildSuccess(this.sv.selectById(id)); } /** * 客户端请求得到一些计算参数数据 * @return 一些计算参数数据 * 客户端请求得到一个作物的所有计算参数数据 * @return 一个作物的所有计算参数数据 */ @Operation(summary = "获得一些计算参数", description = "返回一些分页计算参数数据") @Operation(summary = "获得一个作物的所有计算参数", description = "返回一个作物的所有计算参数数据") @ApiResponses(value = { @ApiResponse( responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, description = "返回一些计算参数数据(BaseResponse.content:QueryResultVo[{}])", description = "返回一个作物的所有计算参数数据(BaseResponse.content:QueryResultVo[{}])", content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = VoParam.class))} ) pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/param/ParamSv.java
@@ -35,7 +35,7 @@ } /** * 查询一些实体 * 查询所有实体 * @return 包含实体集合的结果对象 */ @SuppressWarnings("unchecked")