feat: Add SHZ log inspection and HighGo database querying capabilities
- Introduced `inspect-shz-logs` skill for inspecting local and production logs with bounded read-only commands. - Added `view.sh` script for log viewing with options for following logs and filtering by keywords. - Created `query-shz-highgo` skill for querying the SHZ HighGo database through an SSH gateway. - Implemented read-only SQL execution with strict controls on allowed statements and query structure. - Added new domain and mapper classes for managing outdoor fair job associations. - Enhanced `OutdoorFairController` to support job listing and management for outdoor fairs. - Created SQL scripts for initializing outdoor fair job data and managing menu visibility.
This commit is contained in:
@@ -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.ruoyi.cms.mapper.OutdoorFairJobMapper">
|
||||
|
||||
<sql id="fairJobWhere">
|
||||
WHERE relation.fair_id = #{fairId}
|
||||
AND (relation.del_flag IS NULL OR relation.del_flag = '0')
|
||||
AND job.del_flag = '0'
|
||||
<if test="companyId != null">
|
||||
AND relation.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="companyName != null and companyName != ''">
|
||||
AND job.company_name LIKE concat(
|
||||
'%',
|
||||
cast(#{companyName, jdbcType=VARCHAR} as varchar),
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="jobTitle != null and jobTitle != ''">
|
||||
AND job.job_title LIKE concat(
|
||||
'%',
|
||||
cast(#{jobTitle, jdbcType=VARCHAR} as varchar),
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="education != null and education != ''">
|
||||
AND job.education = #{education}
|
||||
</if>
|
||||
<if test="experience != null and experience != ''">
|
||||
AND job.experience = #{experience}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectFairJobPage" resultType="com.ruoyi.cms.domain.Job">
|
||||
SELECT job.*
|
||||
FROM shz.cms_outdoor_fair_job relation
|
||||
INNER JOIN shz.job job ON job.job_id = relation.job_id
|
||||
<include refid="fairJobWhere"/>
|
||||
ORDER BY relation.id DESC
|
||||
LIMIT #{pageSize} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countFairJobs" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
FROM shz.cms_outdoor_fair_job relation
|
||||
INNER JOIN shz.job job ON job.job_id = relation.job_id
|
||||
<include refid="fairJobWhere"/>
|
||||
</select>
|
||||
|
||||
<select id="countJobsByCompany" resultType="java.util.Map">
|
||||
SELECT company_id AS "companyId", COUNT(*) AS "jobCount"
|
||||
FROM shz.cms_outdoor_fair_job
|
||||
WHERE fair_id = #{fairId}
|
||||
AND (del_flag IS NULL OR del_flag = '0')
|
||||
GROUP BY company_id
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user