src/main/resources/mapper/CommonDao.xml
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.dao.CommonDao">
<select id="getOption" resultType="String" >
SELECT distinct ${column} FROM ${table}
where ${column} is not null and ${column} !=''
<if test = "level != null">
and level=#{level}
</if>
<if test = "parent != null">
and parent=#{parent}
</if>
</select>
<!--多表联查统计图标-->
<select id="chartBoth" resultType="map" parameterType="map">
select
b.index_name as mc,
count(*) as total
from ${table1} a left join ${table2} b
on a.${column1} = b.code_index
where b.dic_code = #{column1}
group by ${column1}
</select>
<select id="getFollowByOption" resultType="map" >
SELECT * FROM ${table} where ${column}=#{columnValue}
</select>
<update id="sh">
UPDATE ${table} set sfsh=#{sfsh} where id=#{id}
</update>
<select id="remindCount" resultType="int" >
SELECT count(1) FROM ${table}
where 1=1
<if test = "type == 1 ">
<if test = " remindstart != null ">
and ${column} >= #{remindstart}
</if>
<if test = " remindend != null ">
and ${column} <= #{remindend}
</if>
</if>
<if test = "type == 2 ">
<if test = " remindstart != null ">
and ${column} >= str_to_date(#{remindstart},'%Y-%m-%d')
</if>
<if test = " remindend != null ">
and ${column} <= str_to_date(#{remindend},'%Y-%m-%d')
</if>
</if>
</select>
<select id="selectCal" resultType="map" >
SELECT sum(${column}) sum,max(${column}) max,min(${column}) min,avg(${column}) avg FROM ${table}
</select>
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
