feat (farm): 业务功能
- 农场首页,右侧天气弹框展示农场概要信息 - 管理中心,字典表内容整合 - 模拟测试数据
This commit is contained in:
@@ -9,4 +9,45 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<sql id="all_fields">
|
||||
id,
|
||||
farming_code,
|
||||
farming_name,
|
||||
use_status,
|
||||
creator,
|
||||
create_time,
|
||||
updater,
|
||||
update_time,
|
||||
deleted,
|
||||
base_id,
|
||||
base_name,
|
||||
plot_id,
|
||||
plot_name,
|
||||
tenant_id
|
||||
</sql>
|
||||
|
||||
<select id="listForFarmingType"
|
||||
parameterType="cn.iocoder.yudao.module.farm.controller.admin.farmingtypemaintenance.vo.FarmingTypeMaintenanceSaveReqVO"
|
||||
resultType="cn.iocoder.yudao.module.farm.dal.dataobject.farmingtypemaintenance.FarmingTypeMaintenanceDO">
|
||||
|
||||
SELECT <include refid="all_fields"/> FROM farm_farming_type_maintenance t
|
||||
<where>
|
||||
<if test="req.id != null and req.id != ''">
|
||||
AND t.id = #{req.id}
|
||||
</if>
|
||||
<if test="req.farmingCode != null and req.farmingCode != ''">
|
||||
AND t.farming_code = #{req.farmingCode}
|
||||
</if>
|
||||
<if test="req.farmingName != null and req.farmingName != ''">
|
||||
AND t.farming_name LIKE CONCAT('%', #{req.farmingName}, '%')
|
||||
</if>
|
||||
<if test="req.useStatus != null">
|
||||
AND t.use_status = #{req.useStatus}
|
||||
</if>
|
||||
<if test="req.deleted != null">
|
||||
AND t.deleted = #{req.deleted}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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="cn.iocoder.yudao.module.farm.dal.mysql.speciesclassifylibrary.SpeciesClassifyLibraryMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<sql id="all_fields">
|
||||
id,
|
||||
primary_class_code,
|
||||
primary_class_name,
|
||||
secondary_class_code,
|
||||
secondary_class_name,
|
||||
use_status,
|
||||
creator,
|
||||
create_time,
|
||||
updater,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<select id="getSpeciesClassifyLibraryList"
|
||||
parameterType="cn.iocoder.yudao.module.farm.controller.admin.dict.vo.SpeciesClassifyLibraryReqVO"
|
||||
resultType="cn.iocoder.yudao.module.farm.dal.dataobject.speciesclassifylibrary.SpeciesClassifyLibraryDO">
|
||||
|
||||
SELECT <include refid="all_fields"/> FROM farm_species_classify_library t
|
||||
<where>
|
||||
<if test="req.id != null">
|
||||
AND id = #{req.id}
|
||||
</if>
|
||||
<if test="req.primaryClassCode != null and req.primaryClassCode != ''">
|
||||
AND primary_class_code = #{req.primaryClassCode}
|
||||
</if>
|
||||
<if test="req.primaryClassName != null and req.primaryClassName != ''">
|
||||
AND primary_class_name LIKE CONCAT('%', #{req.primaryClassName}, '%')
|
||||
</if>
|
||||
<if test="req.secondaryClassCode != null and req.secondaryClassCode != ''">
|
||||
AND secondary_class_code = #{req.secondaryClassCode}
|
||||
</if>
|
||||
<if test="req.secondaryClassName != null and req.secondaryClassName != ''">
|
||||
AND secondary_class_name LIKE CONCAT('%', #{req.secondaryClassName}, '%')
|
||||
</if>
|
||||
<if test="req.useStatus != null">
|
||||
AND use_status = #{req.useStatus}
|
||||
</if>
|
||||
<if test="req.creator != null and req.creator != ''">
|
||||
AND creator = #{req.creator}
|
||||
</if>
|
||||
<if test="req.createTime != null">
|
||||
AND create_time >= #{req.createTime}
|
||||
</if>
|
||||
<if test="req.updater != null and req.updater != ''">
|
||||
AND updater = #{req.updater}
|
||||
</if>
|
||||
<if test="req.updateTime != null">
|
||||
AND update_time >= #{req.updateTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY t.id DESC
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user