律所系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB

<?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="net.lab1024.sa.admin.module.penalty.dao.PenaltyLawyerDao">
<!-- 查询结果列 -->
<sql id="base_columns">
t_penalty_lawyer.id,
t_penalty_lawyer.name,
t_penalty_lawyer.principal,
t_penalty_lawyer.license_no,
t_penalty_lawyer.phone,
t_penalty_lawyer.address,
t_penalty_lawyer.unified_credit_code,
t_penalty_lawyer.governing_body,
t_penalty_lawyer.organizational_form,
t_penalty_lawyer.branch_form,
t_penalty_lawyer.party_member_count,
t_penalty_lawyer.party_organization_name,
t_penalty_lawyer.party_organization_form,
t_penalty_lawyer.party_branch_principal,
t_penalty_lawyer.city,
t_penalty_lawyer.district,
t_penalty_lawyer.created_at,
t_penalty_lawyer.updated_at
</sql>
<!-- 分页查询 -->
<select id="queryPage" resultType="net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyLawyerVO">
SELECT
<include refid="base_columns"/>
FROM t_penalty_lawyer
</select>
<select id="selectLawyerPunishList" resultType="com.alibaba.fastjson.JSONObject">
select *
from t_lawyer_punish_people
where name = #{licenseNo} and punish_time >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR)
</select>
<select id="queryNoName" resultType="com.alibaba.fastjson.JSONObject">
select *
from t_lawyer_punish_people
where name is null and dept_name = #{departmentName} and punish_time >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR)
</select>
</mapper>