feat(pc): 添加景区项目管理功能

- 新增项目管理相关的 Controller、Service、Mapper 及模型类
- 实现项目分页查询、列表查询、详情查询、新增、修改、删除等功能
- 添加项目状态更新和二维码下载功能
- 集成微信小程序二维码生成和存储服务
This commit is contained in:
2025-09-15 17:17:06 +08:00
parent ccddab37ea
commit 4b58c03ad2
8 changed files with 490 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<?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.ycwl.basic.mapper.ProjectMapper">
<insert id="add">
insert into project(scenic_id, `name`, min_play_time, max_play_time, status, create_at, update_at)
values (#{scenicId}, #{name}, #{minPlayTime}, #{maxPlayTime}, #{status}, now(), now())
</insert>
<update id="update">
update project set
`name` = #{name},
min_play_time = #{minPlayTime},
max_play_time = #{maxPlayTime},
status = #{status},
update_at = now()
where id = #{id}
</update>
<update id="updateStatus">
update project
set status = (CASE
status
WHEN 1 THEN
0
WHEN 0 THEN
1
ELSE 1
END),
update_at = now()
where id = #{id}
</update>
<delete id="deleteById">
delete from project where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.project.resp.ProjectRespVO">
select p.id, p.scenic_id, p.`name`, p.min_play_time, p.max_play_time, p.status, p.create_at, p.update_at
from project p
<where>
<if test="scenicId != null">
and p.scenic_id = #{scenicId}
</if>
<if test="name != null and name != ''">
and p.`name` like concat('%', #{name}, '%')
</if>
<if test="status != null">
and p.`status` = #{status}
</if>
</where>
order by p.create_at desc
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.project.resp.ProjectRespVO">
select p.id, p.scenic_id, p.`name`, p.min_play_time, p.max_play_time, p.status, p.create_at, p.update_at
from project p
where p.id = #{id}
</select>
</mapper>