feat (farm): 业务功能

- 农场首页,右侧天气弹框展示农场概要信息
- 管理中心,字典表内容整合
- 模拟测试数据
This commit is contained in:
达富斌
2025-08-17 18:29:23 +08:00
parent cbf3703c47
commit 130ff09807
26 changed files with 799 additions and 21 deletions

View File

@@ -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>