Просмотр исходного кода

增加缺少的is_delete字段

jiakai 3 месяцев назад
Родитель
Сommit
6ad09a9458
22 измененных файлов с 480 добавлено и 404 удалено
  1. 1 1
      authentication/src/main/resources/mapper/SysSystemMapper.xml
  2. 7 0
      commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlAgreementUrl.java
  3. 10 4
      commons/src/main/java/com/jzg/commons/entity/po/SysCommonFunction.java
  4. 7 0
      commons/src/main/java/com/jzg/commons/entity/po/SysMenu.java
  5. 6 0
      commons/src/main/java/com/jzg/commons/entity/po/SysSystemMenu.java
  6. 1 1
      platform/src/main/java/com/jzg/mapper/SysRolePermsMapper.java
  7. 1 1
      platform/src/main/java/com/jzg/mapper/SysUserRoleMapper.java
  8. 7 1
      platform/src/main/java/com/jzg/service/impl/SysMenuServiceImpl.java
  9. 5 1
      platform/src/main/java/com/jzg/service/impl/SysUserServiceImpl.java
  10. 122 124
      platform/src/main/resources/mapper/EsmInsCompanyMapper.xml
  11. 58 51
      platform/src/main/resources/mapper/InsCompanyClauseMapper.xml
  12. 21 19
      platform/src/main/resources/mapper/JyxConfigMapper.xml
  13. 33 33
      platform/src/main/resources/mapper/PtlAgreementAttributionMapper.xml
  14. 7 5
      platform/src/main/resources/mapper/PtlAgreementMapper.xml
  15. 10 9
      platform/src/main/resources/mapper/PtlAgreementUrlMapper.xml
  16. 32 18
      platform/src/main/resources/mapper/SysMenuMapper.xml
  17. 17 13
      platform/src/main/resources/mapper/SysRoleMapper.xml
  18. 16 13
      platform/src/main/resources/mapper/SysRolePermsMapper.xml
  19. 28 26
      platform/src/main/resources/mapper/SysSystemMapper.xml
  20. 54 50
      platform/src/main/resources/mapper/SysUserJzgInfoMapper.xml
  21. 27 26
      platform/src/main/resources/mapper/SysUserMapper.xml
  22. 10 8
      platform/src/main/resources/mapper/SysUserRoleMapper.xml

+ 1 - 1
authentication/src/main/resources/mapper/SysSystemMapper.xml

@@ -42,6 +42,6 @@
                business_size,legal_name,create_by,
                create_time,update_by,update_time,
                is_delete
-        from sys_system where is_delete = 0
+        from sys_system
     </sql>
 </mapper>

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlAgreementUrl.java

@@ -1,7 +1,9 @@
 package com.jzg.commons.entity.agreement.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jzg.commons.entity.agreement.vo.PtlAgreementUrlVo;
 import com.jzg.commons.util.idgen.IdGenerate;
@@ -40,6 +42,11 @@ public class PtlAgreementUrl {
     @TableField(exist = false)
     private String companyName;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
     public PtlAgreementUrl(PtlAgreementUrlVo ptlAgreementUrlVo) {
         this.id = IdGenerate.nextId();
         this.name = ptlAgreementUrlVo.getName();

+ 10 - 4
commons/src/main/java/com/jzg/commons/entity/po/SysCommonFunction.java

@@ -1,10 +1,11 @@
 package com.jzg.commons.entity.po;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.baomidou.mybatisplus.annotation.*;
+
 import java.io.Serializable;
+
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 /**
@@ -38,6 +39,11 @@ public class SysCommonFunction implements Serializable {
     @TableField(value = "menu_id")
     private Long menuId;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysMenu.java

@@ -1,8 +1,10 @@
 package com.jzg.commons.entity.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -78,4 +80,9 @@ public class SysMenu {
     @Schema(description = "菜单类型 1 车险 2.控制台")
     private String sysType;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 }

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysSystemMenu.java

@@ -1,8 +1,10 @@
 package com.jzg.commons.entity.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -23,4 +25,8 @@ public class SysSystemMenu {
     @Schema(description = "菜单名称")
     private String menuId;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
 }

+ 1 - 1
platform/src/main/java/com/jzg/mapper/SysRolePermsMapper.java

@@ -26,5 +26,5 @@ public interface SysRolePermsMapper extends BaseMapper<SysRolePerms> {
      * @author lipf
      * @date 2026/5/11 16:39
      */
-    void deleteByMenuId(String menuId);
+//    void deleteByMenuId(String menuId);
 }

+ 1 - 1
platform/src/main/java/com/jzg/mapper/SysUserRoleMapper.java

@@ -11,7 +11,7 @@ import java.util.List;
 public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
 
 
-    void deleteByUserId(@Param("userId") String userId);
+//    void deleteByUserId(@Param("userId") String userId);
 
     List<SysUserRole> selectByUserIdAndSysCodeOne(@Param("userId") String userId, @Param("systemCode") String systemCode);
 }

+ 7 - 1
platform/src/main/java/com/jzg/service/impl/SysMenuServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.entity.dto.SysCommonFunctionDto;
 import com.jzg.commons.entity.po.SysMenu;
+import com.jzg.commons.entity.po.SysRolePerms;
 import com.jzg.commons.entity.po.SysSystemMenu;
 import com.jzg.commons.entity.po.SysUserRole;
 import com.jzg.commons.entity.vo.SystemMenuVo;
@@ -271,7 +272,12 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu>
     @Override
     public boolean deleteMenuById(String menuId) {
         log.info("根据序号删除对应的菜单信息:menuId=[{}]", menuId);
-        sysRolePermsMapper.deleteByMenuId(menuId);
+//        sysRolePermsMapper.deleteByMenuId(menuId);
+        // 定义查询条件
+        LambdaQueryWrapper<SysRolePerms> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(SysRolePerms::getPermsId, menuId);
+        // 执行删除操作,返回受影响的行数
+        sysRolePermsMapper.delete(lambdaQueryWrapper);
         return this.removeById(menuId);
     }
 }

+ 5 - 1
platform/src/main/java/com/jzg/service/impl/SysUserServiceImpl.java

@@ -198,7 +198,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser>
         this.updateById(user);
 
         // 删除当前用户与角色的关联信息
-        sysUserRoleMapper.deleteByUserId(user.getId());
+//        sysUserRoleMapper.deleteByUserId(user.getId());
+        LambdaQueryWrapper<SysUserRole> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(SysUserRole::getUserId, user.getId());
+        // 执行删除操作,返回受影响的行数
+        sysUserRoleMapper.delete(lambdaQueryWrapper);
 
         // 角色信息关联
         List<String> roleList = param.getRoleIdList();

+ 122 - 124
platform/src/main/resources/mapper/EsmInsCompanyMapper.xml

@@ -32,128 +32,130 @@
     <select id="getByLowerId80" resultType="java.lang.String">
         with recursive temp as (select id
                                 from esm_ins_company
-                                where id = #{companyId}
+                                where id = #{companyId} and is_delete = 0
                                 union all
                                 select t.id
                                 from esm_ins_company t
-                                         inner join temp t2 on t2.id = t.parent_id)
+                                         inner join temp t2 on t2.id = t.parent_id
+                                where t.is_delete = 0)
         select id
         from temp
     </select>
 
     <select id="getByLowerId57" resultType="java.lang.String">
         SELECT id
-        FROM (SELECT * FROM esm_ins_company ORDER BY parent_id, id) products_sorted,
+        FROM (SELECT * FROM esm_ins_company WHERE is_delete = 0 ORDER BY parent_id, id) products_sorted,
              (SELECT @pv := #{companyId}) initialisation
         WHERE find_in_set(parent_id, @pv)
-          AND length(
-                @pv := concat(@pv, ',', id))
+          AND length(@pv := concat(@pv, ',', id))
         UNION
         SELECT id
         FROM esm_ins_company
-        WHERE id = #{companyId}
+        WHERE id = #{companyId} and is_delete = 0
     </select>
 
     <select id="queryListByParentId" resultType="com.jzg.commons.entity.po.EsmInsCompany">
         select
-            a.name as "name",
-            a.id as "id"
-        from
-            esm_ins_company   a
+        a.name as "name",
+        a.id as "id"
+        from esm_ins_company a
         <where>
-            <if test="parentId  !=null  and  parentId  !=''">
-                a.parent_id=#{parentId}
+            a.is_delete = 0
+            <if test="parentId != null and parentId != ''">
+                and a.parent_id = #{parentId}
             </if>
         </where>
-
-
     </select>
+
     <select id="findOrderCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
         SELECT DISTINCT
-            ins.company_id AS id,
-            eic.name_simple AS NAME
-        FROM
-            ins_orders ins
-                LEFT JOIN esm_ins_company eic ON ins.company_id = eic.id
-        WHERE
-            IFNULL( ins.company_id, '' )!= ''
-	        AND IFNULL( eic.id, '' )!= ''
-        GROUP BY
-            ins.company_id
+        ins.company_id AS id,
+        eic.name_simple AS name
+        FROM ins_orders ins
+        LEFT JOIN esm_ins_company eic
+        ON ins.company_id = eic.id AND eic.is_delete = 0
+        <where>
+            ins.is_delete = 0
+            AND ins.company_id IS NOT NULL
+            AND ins.company_id != ''
+            AND eic.id IS NOT NULL
+            AND eic.id != ''
+        </where>
+        GROUP BY ins.company_id
     </select>
 
     <select id="getExternalAgreementCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
         SELECT DISTINCT
-            insurance_company_id AS id,
-            insurance_company AS NAME
-        FROM
-            ptl_agreement
+        pa.company_id AS id,
+        eic.name AS name
+        FROM ptl_agreement pa
+        LEFT JOIN esm_ins_company eic
+        ON pa.company_id = eic.id AND eic.is_delete = 0
         <where>
-            is_external = '1'
+            pa.is_external = '1' and pa.is_delete = 0
             <if test="name != null and name != ''">
-                and insurance_company like  concat('%',#{name},'%')
+                and eic.name like concat('%',#{name},'%')
             </if>
-
         </where>
-        GROUP BY
-            insurance_company_id,
-            insurance_company
+        GROUP BY pa.company_id
     </select>
+
     <select id="liveCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
         SELECT
-            eic.id,
-            eic.name,
-            eic.name_simple,
-            eic.remark
-        FROM
-            ptl_agreement pa
-                LEFT JOIN esm_ins_company eic ON pa.company_id = eic.id
-        where
-            pa.is_external = 0
-        GROUP BY
-            eic.id
+        eic.id,
+        eic.name,
+        eic.name_simple,
+        eic.remark
+        FROM ptl_agreement pa
+        LEFT JOIN esm_ins_company eic
+        ON pa.company_id = eic.id AND eic.is_delete = 0
+        <where>
+            pa.is_delete = 0
+            AND pa.is_external = 0
+            AND eic.id IS NOT NULL
+        </where>
+        GROUP BY eic.id
     </select>
-    <select id="findOrderPartnerCompanyList"
-            resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+
+    <!-- 该sql不能使用,没有ins_area_company表 -->
+    <select id="findOrderPartnerCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
         SELECT DISTINCT
-            agree.partner_companies_id AS id,
-            company.name_simple AS NAME
-        FROM
-            ins_area_company iac
-                left join
-            ptl_agreement agree on iac.agreement_id= agree.id
-                left join
-            esm_ins_company company on agree.partner_companies_id= company.id
-        WHERE
-            IFNULL( agree.partner_companies_id, '' )!= ''
-        GROUP BY
-            agree.partner_companies_id,
-            company.name_simple
+        agree.partner_companies_id AS id,
+        company.name_simple AS name
+        FROM ins_area_company iac
+        LEFT JOIN ptl_agreement agree
+        ON iac.agreement_id = agree.id and agree.is_delete = 0
+        LEFT JOIN esm_ins_company company
+        ON agree.partner_companies_id = company.id AND company.is_delete = 0
+        <where>
+            iac.is_delete = 0
+            AND agree.partner_companies_id IS NOT NULL
+            AND agree.partner_companies_id != ''
+        </where>
+        GROUP BY agree.partner_companies_id, company.name_simple
     </select>
 
-
     <select id="leftList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
         SELECT
-            eic.id,
-            eic.name,
-            eic.name_simple,
-            eic.company_code,
-            eic.remark,
-            eic.parent_id,
-            eic.order_num,
-            eic.cn_name,
-            eic.type,
-            eic.logo
-        FROM
-            esm_ins_company eic
-        WHERE
-            1=1
-        <if test="name != null and name != ''">
-            and eic.name like  concat('%',#{name},'%')
-        </if>
+        eic.id,
+        eic.name,
+        eic.name_simple,
+        eic.company_code,
+        eic.remark,
+        eic.parent_id,
+        eic.order_num,
+        eic.cn_name,
+        eic.type,
+        eic.logo
+        FROM esm_ins_company eic
+        <where>
+            eic.is_delete = 0
+            <if test="name != null and name != ''">
+                and eic.name like concat('%',#{name},'%')
+            </if>
+        </where>
     </select>
 
-
     <resultMap id="EsmInsCompanyVo" type="com.jzg.commons.entity.vo.EsmInsCompanyVo">
         <id property="id" column="id" jdbcType="VARCHAR"/>
         <result property="code" column="code" jdbcType="VARCHAR"/>
@@ -181,72 +183,68 @@
 
     <select id="findTree" resultMap="EsmInsCompanyVo">
         SELECT
-            eic.id,
-            eic.code,
-            eic.name,
-            eic.name_simple,
-            eic.remark,
-            eic.company_code,
-            eic.parent_id,
-            eic.order_num,
-            eic.cn_name,
-            eic.type,
-            eic.logo,
-            suf.id logoFileId,
-            suf.file_name,
-            suf.file_type,
-            suf.bucket_name,
-            suf.etag
-        FROM
-            esm_ins_company eic
-        left join sys_upload_files suf on eic.logo = suf.id
-        WHERE
+        eic.id,
+        eic.code,
+        eic.name,
+        eic.name_simple,
+        eic.remark,
+        eic.company_code,
+        eic.parent_id,
+        eic.order_num,
+        eic.cn_name,
+        eic.type,
+        eic.logo,
+        suf.id logoFileId,
+        suf.file_name,
+        suf.file_type,
+        suf.bucket_name,
+        suf.etag
+        FROM esm_ins_company eic
+        LEFT JOIN sys_upload_files suf
+        ON eic.logo = suf.id AND suf.is_delete = 0
+        <where>
             eic.is_delete = 0
-        <if test="name != null and name != ''">
-            and eic.name like  concat('%',#{name},'%')
-        </if>
-        <if test="type != null and type != ''">
-            and eic.type = #{type}
-        </if>
+            <if test="name != null and name != ''">
+                and eic.name like concat('%',#{name},'%')
+            </if>
+            <if test="type != null and type != ''">
+                and eic.type = #{type}
+            </if>
+        </where>
     </select>
 
     <select id="getParentIds" resultType="String">
         WITH RECURSIVE t AS (
-            SELECT id
-            FROM esm_ins_company
-            WHERE id in
-        <foreach collection="companyIds"
-                 item="id"
-                 open="("
-                 close=")"
-                 separator=",">
+        SELECT id
+        FROM esm_ins_company
+        WHERE id in
+        <foreach collection="companyIds" item="id" open="(" close=")" separator=",">
             #{id}
         </foreach>
-            UNION ALL
-
-            SELECT c.id
-            FROM esm_ins_company c
-                     JOIN t ON c.parent_id = t.id
+        AND is_delete = 0
+        UNION ALL
+        SELECT c.id
+        FROM esm_ins_company c
+        JOIN t ON c.parent_id = t.id
+        WHERE c.is_delete = 0
         )
-        SELECT *
-        FROM t;
+        SELECT id FROM t;
     </select>
 
     <select id="getTopCompanyId" resultType="String">
         WITH RECURSIVE t AS (
             SELECT id, parent_id
             FROM esm_ins_company
-            WHERE id = ${companyId}
-
+            WHERE id = #{companyId} AND is_delete = 0
             UNION ALL
             SELECT c.id, c.parent_id
             FROM esm_ins_company c
                      INNER JOIN t pt ON c.id = pt.parent_id
+            WHERE c.is_delete = 0
         )
         SELECT id
         FROM t
         where parent_id = 0;
     </select>
 
-
-</mapper>
+</mapper>

+ 58 - 51
platform/src/main/resources/mapper/InsCompanyClauseMapper.xml

@@ -6,30 +6,32 @@
 
     <select id="getClausePage" resultType="com.jzg.commons.entity.vo.InsCompanyClauseVo">
         SELECT
-            eic.name_simple AS company_name,
-            eic.company_code AS company_code,
-            icc.*
+        eic.name_simple AS company_name,
+        eic.company_code AS company_code,
+        icc.*
         FROM
-            ins_company_clause icc
-            INNER JOIN esm_ins_company eic ON eic.id = icc.company_id
-        where
-            1=1
-          AND icc.is_delete = 0
-        <if test="param.companyId != null and param.companyId != ''">
-            AND company_id = #{param.companyId}
-        </if>
-        <if test="param.riskCode != null and param.riskCode != ''">
-            AND risk_code = #{param.riskCode}
-        </if>
-        <if test="param.clauseCode != null and param.clauseCode != ''">
-            AND clause_code LIKE CONCAT('%', #{param.clauseCode}, '%')
-        </if>
-        <if test="param.clauseName != null and param.clauseName != ''">
-            AND clause_name LIKE CONCAT('%', #{param.clauseName}, '%')
-        </if>
-        <if test="param.clauseContent != null and param.clauseContent != ''">
-            AND clause_content LIKE CONCAT('%', #{param.clauseContent}, '%')
-        </if>
+        ins_company_clause icc
+        INNER JOIN esm_ins_company eic
+        ON eic.id = icc.company_id
+        AND eic.is_delete = 0
+        <where>
+            AND icc.is_delete = 0
+            <if test="param.companyId != null and param.companyId != ''">
+                AND company_id = #{param.companyId}
+            </if>
+            <if test="param.riskCode != null and param.riskCode != ''">
+                AND risk_code = #{param.riskCode}
+            </if>
+            <if test="param.clauseCode != null and param.clauseCode != ''">
+                AND clause_code LIKE CONCAT('%', #{param.clauseCode}, '%')
+            </if>
+            <if test="param.clauseName != null and param.clauseName != ''">
+                AND clause_name LIKE CONCAT('%', #{param.clauseName}, '%')
+            </if>
+            <if test="param.clauseContent != null and param.clauseContent != ''">
+                AND clause_content LIKE CONCAT('%', #{param.clauseContent}, '%')
+            </if>
+        </where>
         order by icc.create_time desc
     </select>
 
@@ -40,37 +42,42 @@
         icc.*
         FROM
         ins_company_clause icc
-        INNER JOIN esm_ins_company eic ON eic.id = icc.company_id
-        where
-        1=1
-        AND icc.is_delete = 0
-        <if test="param.companyId != null and param.companyId != ''">
-            AND company_id = #{param.companyId}
-        </if>
-        <if test="param.riskCode != null and param.riskCode != ''">
-            AND risk_code = #{param.riskCode}
-        </if>
-        <if test="param.clauseCode != null and param.clauseCode != ''">
-            AND clause_code LIKE CONCAT('%', #{param.clauseCode}, '%')
-        </if>
-        <if test="param.clauseName != null and param.clauseName != ''">
-            AND clause_name LIKE CONCAT('%', #{param.clauseName}, '%')
-        </if>
-        <if test="param.clauseContent != null and param.clauseContent != ''">
-            AND clause_content LIKE CONCAT('%', #{param.clauseContent}, '%')
-        </if>
+        INNER JOIN esm_ins_company eic
+        ON eic.id = icc.company_id
+        AND eic.is_delete = 0
+        <where>
+            AND icc.is_delete = 0
+            <if test="param.companyId != null and param.companyId != ''">
+                AND company_id = #{param.companyId}
+            </if>
+            <if test="param.riskCode != null and param.riskCode != ''">
+                AND risk_code = #{param.riskCode}
+            </if>
+            <if test="param.clauseCode != null and param.clauseCode != ''">
+                AND clause_code LIKE CONCAT('%', #{param.clauseCode}, '%')
+            </if>
+            <if test="param.clauseName != null and param.clauseName != ''">
+                AND clause_name LIKE CONCAT('%', #{param.clauseName}, '%')
+            </if>
+            <if test="param.clauseContent != null and param.clauseContent != ''">
+                AND clause_content LIKE CONCAT('%', #{param.clauseContent}, '%')
+            </if>
+        </where>
     </select>
 
     <select id="getClause" resultType="com.jzg.commons.entity.vo.InsCompanyClauseVo">
         SELECT
-            eic.name_simple AS company_name,
-            eic.company_code AS company_code,
-            icc.*
+        eic.name_simple AS company_name,
+        eic.company_code AS company_code,
+        icc.*
         FROM
-            ins_company_clause icc
-            INNER JOIN esm_ins_company eic ON eic.id = icc.company_id
-        where
-            1=1
-          AND icc.id = #{id}
+        ins_company_clause icc
+        INNER JOIN esm_ins_company eic
+        ON eic.id = icc.company_id
+        AND eic.is_delete = 0
+        <where>
+            AND icc.is_delete = 0
+            AND icc.id = #{id}
+        </where>
     </select>
-</mapper>
+</mapper>

+ 21 - 19
platform/src/main/resources/mapper/JyxConfigMapper.xml

@@ -28,30 +28,30 @@
             <result column="blame_jyx_config_id" property="jyxConfigId"/>
         </collection>
         <collection property="settingList" ofType="com.jzg.commons.entity.po.jyxSetting">
-                <id column="setting_id" property="id"/>
-                <result column="seats" property="seats"/>
-                <result column="setting_coverage" property="coverage"/>
-                <result column="setting_premium" property="premium"/>
-                <result column="setting_system_code" property="systemCode"/>
-                <result column="setting_jyx_config_id" property="jyxConfigId"/>
+            <id column="setting_id" property="id"/>
+            <result column="seats" property="seats"/>
+            <result column="setting_coverage" property="coverage"/>
+            <result column="setting_premium" property="premium"/>
+            <result column="setting_system_code" property="systemCode"/>
+            <result column="setting_jyx_config_id" property="jyxConfigId"/>
         </collection>
     </resultMap>
 
 
     <sql id="params">
-       jc.`id`, jc.`product_type`,jc.`parent_id`, jc.`product_name`,jc.`alias`,jc.`company`, jc.`product_code`,jc.`connection_method`,jc.`premium_setting`, jc.`coverage` as jsCoverage, jc.`premium` as jsPremium, jc.`system_code`, jc.`is_delete` as isDelete
+        jc.`id`, jc.`product_type`,jc.`parent_id`, jc.`product_name`,jc.`alias`,jc.`company`, jc.`product_code`,jc.`connection_method`,jc.`premium_setting`, jc.`coverage` as jsCoverage, jc.`premium` as jsPremium, jc.`system_code`, jc.`is_delete` as isDelete
     </sql>
 
     <select id="jyxList" resultMap="jyxConfigVo">
         select
         <include refid="params"/> ,
-            jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
-            js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
-            from jyx_config jc
-            left join jyx_blame jb on jc.id = jb.jyx_config_id
-            left join jyx_setting js on jc.id = js.jyx_config_id
+        jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
+        js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
+        from jyx_config jc
+        left join jyx_blame jb on jc.id = jb.jyx_config_id AND jb.is_delete = 0
+        left join jyx_setting js on jc.id = js.jyx_config_id AND js.is_delete = 0
         <where>
-                jc.is_delete = 0
+            jc.is_delete = 0
             <if test="params != null and params != ''">
                 and (jc.product_name like concat('%',#{params},'%') or jc.alias like concat('%',#{params},'%'))
             </if>
@@ -78,9 +78,10 @@
         jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
         js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
         from jyx_config jc
-        left join jyx_blame jb on jc.id = jb.jyx_config_id
-        left join jyx_setting js on jc.id = js.jyx_config_id
+        left join jyx_blame jb on jc.id = jb.jyx_config_id AND jb.is_delete = 0
+        left join jyx_setting js on jc.id = js.jyx_config_id AND js.is_delete = 0
         <where>
+            jc.is_delete = 0
             <if test="ids != null and ids != ''">
                 and jc.id in
                 <foreach collection="ids" item="id" open="(" separator="," close=")">
@@ -99,9 +100,10 @@
         jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
         js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
         from jyx_config jc
-        left join jyx_blame jb on jc.id = jb.jyx_config_id
-        left join jyx_setting js on jc.id = js.jyx_config_id
+        left join jyx_blame jb on jc.id = jb.jyx_config_id AND jb.is_delete = 0
+        left join jyx_setting js on jc.id = js.jyx_config_id AND js.is_delete = 0
         <where>
+            jc.is_delete = 0
             <if test="ids != null and ids != ''">
                 and jc.id in
                 <foreach collection="ids" item="id" open="(" separator="," close=")">
@@ -120,8 +122,8 @@
         jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
         js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
         from jyx_config jc
-        left join jyx_blame jb on jc.id = jb.jyx_config_id
-        left join jyx_setting js on jc.id = js.jyx_config_id
+        left join jyx_blame jb on jc.id = jb.jyx_config_id AND jb.is_delete = 0
+        left join jyx_setting js on jc.id = js.jyx_config_id AND js.is_delete = 0
         <where>
             jc.is_delete = 0 and jc.parent_id = 0
             <if test="company != null and company != ''">

+ 33 - 33
platform/src/main/resources/mapper/PtlAgreementAttributionMapper.xml

@@ -28,29 +28,29 @@
         sd.name as deptName
         from
         ptl_agreement_attribution paa
-        left join ptl_agreement_url pau on paa.login_url = pau.id
-        left join sys_dept sd on paa.user_dept = sd.id
-        left join esm_ins_company eic on paa.ins_company_id = eic.id
-        where
-        1=1
-        and paa.is_delete = '0'
-        <if test="ptlAgreementAttributionQueryVo.username != null and ptlAgreementAttributionQueryVo.username != ''">
-            and (paa.username like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
-            or paa.user_abbr like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
-            or eic.name_simple like concat('%',#{ptlAgreementAttributionQueryVo.username},'%'))
-        </if>
-        <if test="ptlAgreementAttributionQueryVo.quoteStatus != null and ptlAgreementAttributionQueryVo.quoteStatus != ''">
-            and paa.quote_status = #{ptlAgreementAttributionQueryVo.quoteStatus}
-        </if>
-        <if test="ptlAgreementAttributionQueryVo.insCompanyId != null and ptlAgreementAttributionQueryVo.insCompanyId != ''">
-            and paa.ins_company_id = #{ptlAgreementAttributionQueryVo.insCompanyId}
-        </if>
-        <if test="ptlAgreementAttributionQueryVo.useStatus != null and ptlAgreementAttributionQueryVo.useStatus != ''">
-            and paa.use_status = #{ptlAgreementAttributionQueryVo.useStatus}
-        </if>
-        <if test="ptlAgreementAttributionQueryVo.userDept != null and ptlAgreementAttributionQueryVo.userDept != ''">
-            and paa.user_dept = #{ptlAgreementAttributionQueryVo.userDept}
-        </if>
+        left join ptl_agreement_url pau on paa.login_url = pau.id and pau.is_delete = '0'
+        left join sys_dept sd on paa.user_dept = sd.id and sd.is_delete = '0'
+        left join esm_ins_company eic on paa.ins_company_id = eic.id and eic.is_delete = '0'
+        <where>
+            and paa.is_delete = '0'
+            <if test="ptlAgreementAttributionQueryVo.username != null and ptlAgreementAttributionQueryVo.username != ''">
+                and (paa.username like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
+                or paa.user_abbr like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
+                or eic.name_simple like concat('%',#{ptlAgreementAttributionQueryVo.username},'%'))
+            </if>
+            <if test="ptlAgreementAttributionQueryVo.quoteStatus != null and ptlAgreementAttributionQueryVo.quoteStatus != ''">
+                and paa.quote_status = #{ptlAgreementAttributionQueryVo.quoteStatus}
+            </if>
+            <if test="ptlAgreementAttributionQueryVo.insCompanyId != null and ptlAgreementAttributionQueryVo.insCompanyId != ''">
+                and paa.ins_company_id = #{ptlAgreementAttributionQueryVo.insCompanyId}
+            </if>
+            <if test="ptlAgreementAttributionQueryVo.useStatus != null and ptlAgreementAttributionQueryVo.useStatus != ''">
+                and paa.use_status = #{ptlAgreementAttributionQueryVo.useStatus}
+            </if>
+            <if test="ptlAgreementAttributionQueryVo.userDept != null and ptlAgreementAttributionQueryVo.userDept != ''">
+                and paa.user_dept = #{ptlAgreementAttributionQueryVo.userDept}
+            </if>
+        </where>
         order by paa.create_time desc
     </select>
 
@@ -62,14 +62,14 @@
         eic.company_code as companyCode
         from
         ptl_agreement_attribution paa
-        left join ptl_agreement_url pau on paa.login_url = pau.id
-        left join sys_dept sd on paa.user_dept = sd.id
-        left join esm_ins_company eic on paa.ins_company_id = eic.id
-        where
-        1=1
-        and paa.is_delete = '0'
-        <if test="id != null and id != ''">
-            and paa.id = #{id}
-        </if>
+        left join ptl_agreement_url pau on paa.login_url = pau.id and pau.is_delete = '0'
+        left join sys_dept sd on paa.user_dept = sd.id and sd.is_delete = '0'
+        left join esm_ins_company eic on paa.ins_company_id = eic.id and eic.is_delete = '0'
+        <where>
+            and paa.is_delete = '0'
+            <if test="id != null and id != ''">
+                and paa.id = #{id}
+            </if>
+        </where>
     </select>
-</mapper>
+</mapper>

+ 7 - 5
platform/src/main/resources/mapper/PtlAgreementMapper.xml

@@ -10,18 +10,20 @@
         <foreach collection="companyIds" item="cid" open="(" separator="," close=")">
             #{cid}
         </foreach>
-
+        AND is_delete = 0
         UNION ALL
-
         SELECT c.id
         FROM esm_ins_company c
         JOIN company_tree ct ON c.parent_id = ct.id
+        WHERE c.is_delete = 0
         )
         SELECT pa.*
         FROM ptl_agreement_dept pad
-        JOIN ptl_agreement pa ON pad.agreement_id = pa.id
+        JOIN ptl_agreement pa ON pad.agreement_id = pa.id AND pa.is_delete = 0
         JOIN company_tree ct ON pa.company_id = ct.id
-        WHERE pa.is_delete = 0
-        AND pad.dept_id = #{deptId}
+        <where>
+            AND pad.is_delete = 0
+            AND pad.dept_id = #{deptId}
+        </where>
     </select>
 </mapper>

+ 10 - 9
platform/src/main/resources/mapper/PtlAgreementUrlMapper.xml

@@ -11,14 +11,15 @@
         eic.name as companyName
         from
         ptl_agreement_url pau
-        left join esm_ins_company eic on pau.company_id = eic.id
-        where
-        1=1
-        <if test="ptlAgreementUrlVo.companyId != null and ptlAgreementUrlVo.companyId != ''">
-            and pau.company_id = #{ptlAgreementUrlVo.companyId}
-        </if>
-        <if test="ptlAgreementUrlVo.name != null and ptlAgreementUrlVo.name != ''">
-            and pau.name like concat('%',#{ptlAgreementUrlVo.name},'%')
-        </if>
+        left join esm_ins_company eic on pau.company_id = eic.id and eic.is_delete = 0
+        <where>
+            pau.is_delete = 0
+            <if test="ptlAgreementUrlVo.companyId != null and ptlAgreementUrlVo.companyId != ''">
+                and pau.company_id = #{ptlAgreementUrlVo.companyId}
+            </if>
+            <if test="ptlAgreementUrlVo.name != null and ptlAgreementUrlVo.name != ''">
+                and pau.name like concat('%',#{ptlAgreementUrlVo.name},'%')
+            </if>
+        </where>
     </select>
 </mapper>

+ 32 - 18
platform/src/main/resources/mapper/SysMenuMapper.xml

@@ -4,23 +4,29 @@
     <select id="getSystemMenus" resultType="com.jzg.commons.entity.po.SysMenu">
         SELECT sm.*
         FROM sys_system_menu ssm
-                 LEFT JOIN sys_menu sm ON ssm.menu_id = sm.id
-        WHERE ssm.system_code = #{systemCode}
+        LEFT JOIN sys_menu sm ON ssm.menu_id = sm.id AND sm.is_delete = 0
+        <where>
+            ssm.is_delete = 0
+            AND ssm.system_code = #{systemCode}
+        </where>
     </select>
 
     <select id="getSystemMenusRecursion" resultType="com.jzg.commons.entity.po.SysMenu">
         WITH RECURSIVE company_tree AS (SELECT sm.*
                                         FROM sys_system_menu ssm
-                                                 LEFT JOIN sys_menu sm ON ssm.menu_id = sm.id
+                                                 LEFT JOIN sys_menu sm ON ssm.menu_id = sm.id AND sm.is_delete = 0
                                         WHERE ssm.system_code = #{systemCode}
+                                          AND ssm.is_delete = 0
 
                                         UNION ALL
 
                                         SELECT sm.*
                                         FROM sys_menu sm
-                                                 INNER JOIN company_tree mt ON sm.parent_id = mt.id)
+                                                 INNER JOIN company_tree mt ON sm.parent_id = mt.id
+                                        WHERE sm.is_delete = 0)
         SELECT *
         FROM company_tree
+        WHERE is_delete = 0
         ORDER BY parent_id, id;
 
     </select>
@@ -28,24 +34,32 @@
     <select id="getMenuByRoleId" resultType="com.jzg.commons.entity.po.SysMenu">
         SELECT sm.*
         FROM sys_role_perms srp
-        LEFT JOIN sys_menu sm ON srp.perms_id = sm.id
-        WHERE srp.role_id IN
-        <foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
-            #{roleId}
-        </foreach>
+        LEFT JOIN sys_menu sm ON srp.perms_id = sm.id AND sm.is_delete = 0
+        <where>
+            srp.is_delete = 0
+            <if test="roleIds != null and roleIds.size > 0">
+                AND srp.role_id IN
+                <foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
+                    #{roleId}
+                </foreach>
+            </if>
+        </where>
     </select>
 
     <select id="getCommonFunction" resultType="com.jzg.commons.entity.dto.SysCommonFunctionDto">
         select scf.id, scf.title, sm.name, scf.ican
         from sys_common_function scf
-                 left join sys_menu sm on scf.menu_id = sm.id
-        where sm.id in (select srp.perms_id
-                        from sys_role_perms srp
-                                 left join sys_user_role sur on sur.role_id = srp.role_id
-                                 left join sys_user_jzg_info suji on suji.user_id = sur.user_id
-                        where suji.user_id = #{userId}
-                          and suji.system_code = #{systemCode})
+        left join sys_menu sm on scf.menu_id = sm.id AND sm.is_delete = 0
+        <where>
+            scf.is_delete = 0
+            AND sm.id in (select srp.perms_id
+            from sys_role_perms srp
+            left join sys_user_role sur on sur.role_id = srp.role_id AND sur.is_delete = 0
+            left join sys_user_jzg_info suji on suji.user_id = sur.user_id AND suji.is_delete = 0
+            where suji.user_id = #{userId}
+            and suji.system_code = #{systemCode}
+            and srp.is_delete = 0)
+        </where>
     </select>
 
-
-</mapper>
+</mapper>

+ 17 - 13
platform/src/main/resources/mapper/SysRoleMapper.xml

@@ -21,18 +21,21 @@
 
     <select id="getAllRoleMenu" resultMap="RoleMenuMap">
         SELECT
-            ss.id,
-            ss.sys_code as systemCode,
-            ss.sys_name as systemName,
-            sr.id as roleId,
-            sr.name as roleName,
-            sr.remark,
-            srp.perms_id as permsId,
-            srp.perms
+        ss.id,
+        ss.sys_code as systemCode,
+        ss.sys_name as systemName,
+        sr.id as roleId,
+        sr.name as roleName,
+        sr.remark,
+        srp.perms_id as permsId,
+        srp.perms
         FROM
-            sys_system ss
-                LEFT JOIN sys_role sr ON sr.system_code = ss.sys_code
-                LEFT JOIN sys_role_perms srp ON sr.id = srp.role_id
+        sys_system ss
+        LEFT JOIN sys_role sr ON sr.system_code = ss.sys_code AND sr.is_delete = 0
+        LEFT JOIN sys_role_perms srp ON sr.id = srp.role_id AND srp.is_delete = 0
+        <where>
+            ss.is_delete = 0
+        </where>
     </select>
 
     <select id="queryByUserIds" resultType="com.jzg.commons.entity.po.SysUserRole">
@@ -40,8 +43,9 @@
         sur.role_id, sur.user_id,sr.name
         FROM
         sys_user_role sur
-        LEFT JOIN sys_role sr ON sur.role_id = sr.id
+        LEFT JOIN sys_role sr ON sur.role_id = sr.id AND sr.is_delete = 0
         <where>
+            sur.is_delete = 0
             <if test="idList != null and idList.size()" >
                 AND sur.user_id in
                 <foreach collection="idList" item="item" open="(" separator="," close=")">
@@ -50,4 +54,4 @@
             </if>
         </where>
     </select>
-</mapper>
+</mapper>

+ 16 - 13
platform/src/main/resources/mapper/SysRolePermsMapper.xml

@@ -3,31 +3,34 @@
 <mapper namespace="com.jzg.mapper.SysRolePermsMapper">
 
     <!--根据菜单序号删除菜单和角色的对应关系 2026年5月11日16:41:08 lipf -->
-    <delete id="deleteByMenuId">
+   <!-- <delete id="deleteByMenuId">
         delete  from sys_role_perms srp where srp.perms_id = #{menuId}
-    </delete>
+    </delete>-->
 
     <select id="getByRoleId" resultType="com.jzg.commons.entity.po.SysRolePerms">
         select id, role_id as roleId, perms_id as permsId, perms
         from sys_role_perms
         <where>
+            is_delete = 0
             <if test="id != null and id != ''">
-                role_id = #{id}
+                AND role_id = #{id}
             </if>
         </where>
     </select>
 
     <select id="getByRoleIdNew" resultType="com.jzg.commons.entity.po.SysRolePerms">
         SELECT
-            srp.id AS role_id,
-            sm.id AS perms_id,
-            sm.perms,
-            sm.type,
-            srp.half_checked
+        srp.id AS role_id,
+        sm.id AS perms_id,
+        sm.perms,
+        sm.type,
+        srp.half_checked
         FROM
-            sys_menu sm
-                LEFT JOIN sys_role_perms srp ON srp.perms_id = sm.id
-        WHERE
-            role_id = #{roleId}
+        sys_menu sm
+        LEFT JOIN sys_role_perms srp ON srp.perms_id = sm.id AND srp.is_delete = 0
+        <where>
+            sm.is_delete = 0
+            AND srp.role_id = #{roleId}
+        </where>
     </select>
-</mapper>
+</mapper>

+ 28 - 26
platform/src/main/resources/mapper/SysSystemMapper.xml

@@ -47,6 +47,7 @@
     <select id="queryPage" resultType="com.jzg.commons.entity.vo.SysSystemVo">
         <include refid="selectSystemVo"/>
         <where>
+            is_delete = 0
             <if test="sysSystemVo.provinceId != null and sysSystemVo.provinceId != ''">
                 and province_id = #{sysSystemVo.provinceId}
             </if>
@@ -72,6 +73,7 @@
     <select id="queryList" resultType="com.jzg.commons.entity.vo.SysSystemVo">
         <include refid="selectSystemVo"/>
         <where>
+            is_delete = 0
             <if test="sysSystemVo.searchValue != null and sysSystemVo.searchValue != ''">
                 AND (
                 sys_name LIKE concat('%', #{sysSystemVo.searchValue}, '%')
@@ -85,34 +87,34 @@
 
     <select id="getCompanyList" resultType="com.jzg.commons.entity.po.EsmInsCompany">
         SELECT
-            eic.id,
-            eic.code,
-            eic.company_code,
-            eic.name,
-            eic.parent_id,
-            eic.name_simple,
-            eic.remark,
-            eic.order_num,
-            eic.cn_name,
-            eic.type,
-            count(psi.id) as count,
-            suf.file_name as logo
+        eic.id,
+        eic.code,
+        eic.company_code,
+        eic.name,
+        eic.parent_id,
+        eic.name_simple,
+        eic.remark,
+        eic.order_num,
+        eic.cn_name,
+        eic.type,
+        count(psi.id) as count,
+        suf.file_name as logo
         FROM
-            esm_ins_company eic
-                left join sys_upload_files suf on eic.logo = suf.id
-                left join ptl_scheme ps on eic.id = ps.company_id
-                left join ptl_scheme_info psi on ps.id = psi.scheme_id
-        WHERE
+        esm_ins_company eic
+        left join sys_upload_files suf on eic.logo = suf.id and suf.is_delete = 0
+        left join ptl_scheme ps on eic.id = ps.company_id and ps.is_delete = 0
+        left join ptl_scheme_info psi on ps.id = psi.scheme_id and psi.is_delete = 0
+        <where>
             eic.parent_id = 0
-          AND
-            eic.is_delete = 0
-        <if test="companyIds != null and companyIds.size() > 0">
-            and eic.id in
-            <foreach collection="companyIds" item="item" index="index" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+            AND eic.is_delete = 0
+            <if test="companyIds != null and companyIds.size() > 0">
+                and eic.id in
+                <foreach collection="companyIds" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
         group by eic.id
         order by count desc
     </select>
-</mapper>
+</mapper>

+ 54 - 50
platform/src/main/resources/mapper/SysUserJzgInfoMapper.xml

@@ -5,54 +5,54 @@
 <mapper namespace="com.jzg.mapper.SysUserJzgInfoMapper">
 
     <resultMap id="BaseResultMap" type="com.jzg.commons.entity.po.SysUserJzgInfo">
-            <id property="id" column="id" jdbcType="VARCHAR"/>
-            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
-            <result property="systemCode" column="system_code" jdbcType="VARCHAR"/>
-            <result property="status" column="status" jdbcType="TINYINT"/>
-            <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
-            <result property="openId" column="open_id" jdbcType="VARCHAR"/>
-            <result property="alipay" column="alipay" jdbcType="VARCHAR"/>
-            <result property="approvalOpinion" column="approval_opinion" jdbcType="VARCHAR"/>
-            <result property="identity" column="identity" jdbcType="VARCHAR"/>
-            <result property="identityTimeStart" column="identity_time_start" jdbcType="VARCHAR"/>
-            <result property="identityTimeEnd" column="identity_time_end" jdbcType="VARCHAR"/>
-            <result property="logoutTime" column="logout_time" jdbcType="DATE"/>
-            <result property="headSculpture" column="head_sculpture" jdbcType="VARCHAR"/>
-            <result property="factorVerify" column="factor_verify" jdbcType="TINYINT"/>
-            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
-            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
-            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
-            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
-            <result property="address" column="address" jdbcType="VARCHAR"/>
-            <result property="nations" column="nations" jdbcType="VARCHAR"/>
-            <result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
-            <result property="bankCardId" column="bank_card_id" jdbcType="VARCHAR"/>
-            <result property="koseki" column="koseki" jdbcType="VARCHAR"/>
-            <result property="birthday" column="birthday" jdbcType="DATE"/>
-            <result property="maritalStatus" column="marital_status" jdbcType="VARCHAR"/>
-            <result property="politicsStatus" column="politics_status" jdbcType="VARCHAR"/>
-            <result property="health" column="health" jdbcType="VARCHAR"/>
-            <result property="postalCode" column="postal_code" jdbcType="VARCHAR"/>
-            <result property="bloodType" column="blood_type" jdbcType="VARCHAR"/>
-            <result property="education" column="education" jdbcType="VARCHAR"/>
-            <result property="school" column="school" jdbcType="VARCHAR"/>
-            <result property="graduationTime" column="graduation_time" jdbcType="DATE"/>
-            <result property="isComputer" column="is_computer" jdbcType="TINYINT"/>
-            <result property="formerEmployer" column="former_employer" jdbcType="VARCHAR"/>
-            <result property="entryTime" column="entry_time" jdbcType="DATE"/>
-            <result property="agentQualificationCode" column="agent_qualification_code" jdbcType="VARCHAR"/>
-            <result property="emergencyContactTel" column="emergency_contact_tel" jdbcType="VARCHAR"/>
-            <result property="emergencyContactName" column="emergency_contact_name" jdbcType="VARCHAR"/>
-            <result property="remark" column="remark" jdbcType="VARCHAR"/>
-            <result property="email" column="email" jdbcType="VARCHAR"/>
-            <result property="sex" column="sex" jdbcType="VARCHAR"/>
-            <result property="speciality" column="speciality" jdbcType="VARCHAR"/>
-            <result property="salary" column="salary" jdbcType="DECIMAL"/>
-            <result property="salaryLevel" column="salary_level" jdbcType="VARCHAR"/>
-            <result property="liveAddress" column="live_address" jdbcType="VARCHAR"/>
-            <result property="province" column="province" jdbcType="VARCHAR"/>
-            <result property="city" column="city" jdbcType="VARCHAR"/>
-            <result property="district" column="district" jdbcType="VARCHAR"/>
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+        <result property="systemCode" column="system_code" jdbcType="VARCHAR"/>
+        <result property="status" column="status" jdbcType="TINYINT"/>
+        <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
+        <result property="openId" column="open_id" jdbcType="VARCHAR"/>
+        <result property="alipay" column="alipay" jdbcType="VARCHAR"/>
+        <result property="approvalOpinion" column="approval_opinion" jdbcType="VARCHAR"/>
+        <result property="identity" column="identity" jdbcType="VARCHAR"/>
+        <result property="identityTimeStart" column="identity_time_start" jdbcType="VARCHAR"/>
+        <result property="identityTimeEnd" column="identity_time_end" jdbcType="VARCHAR"/>
+        <result property="logoutTime" column="logout_time" jdbcType="DATE"/>
+        <result property="headSculpture" column="head_sculpture" jdbcType="VARCHAR"/>
+        <result property="factorVerify" column="factor_verify" jdbcType="TINYINT"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="address" column="address" jdbcType="VARCHAR"/>
+        <result property="nations" column="nations" jdbcType="VARCHAR"/>
+        <result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
+        <result property="bankCardId" column="bank_card_id" jdbcType="VARCHAR"/>
+        <result property="koseki" column="koseki" jdbcType="VARCHAR"/>
+        <result property="birthday" column="birthday" jdbcType="DATE"/>
+        <result property="maritalStatus" column="marital_status" jdbcType="VARCHAR"/>
+        <result property="politicsStatus" column="politics_status" jdbcType="VARCHAR"/>
+        <result property="health" column="health" jdbcType="VARCHAR"/>
+        <result property="postalCode" column="postal_code" jdbcType="VARCHAR"/>
+        <result property="bloodType" column="blood_type" jdbcType="VARCHAR"/>
+        <result property="education" column="education" jdbcType="VARCHAR"/>
+        <result property="school" column="school" jdbcType="VARCHAR"/>
+        <result property="graduationTime" column="graduation_time" jdbcType="DATE"/>
+        <result property="isComputer" column="is_computer" jdbcType="TINYINT"/>
+        <result property="formerEmployer" column="former_employer" jdbcType="VARCHAR"/>
+        <result property="entryTime" column="entry_time" jdbcType="DATE"/>
+        <result property="agentQualificationCode" column="agent_qualification_code" jdbcType="VARCHAR"/>
+        <result property="emergencyContactTel" column="emergency_contact_tel" jdbcType="VARCHAR"/>
+        <result property="emergencyContactName" column="emergency_contact_name" jdbcType="VARCHAR"/>
+        <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="email" column="email" jdbcType="VARCHAR"/>
+        <result property="sex" column="sex" jdbcType="VARCHAR"/>
+        <result property="speciality" column="speciality" jdbcType="VARCHAR"/>
+        <result property="salary" column="salary" jdbcType="DECIMAL"/>
+        <result property="salaryLevel" column="salary_level" jdbcType="VARCHAR"/>
+        <result property="liveAddress" column="live_address" jdbcType="VARCHAR"/>
+        <result property="province" column="province" jdbcType="VARCHAR"/>
+        <result property="city" column="city" jdbcType="VARCHAR"/>
+        <result property="district" column="district" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -75,6 +75,10 @@
     </sql>
     <!-- 一个业务员可能存在于多个租户 lipf 2026年4月24日17:56:31  -->
     <select id="queryJzgInfoByUserId" resultMap="BaseResultMap">
-        select * from sys_user_jzg_info a where a.user_id  = #{userId,jdbcType=DECIMAL} and a.is_delete = 0
+        select * from sys_user_jzg_info a
+        <where>
+            a.user_id = #{userId,jdbcType=DECIMAL}
+            and a.is_delete = 0
+        </where>
     </select>
-</mapper>
+</mapper>

+ 27 - 26
platform/src/main/resources/mapper/SysUserMapper.xml

@@ -5,24 +5,24 @@
 <mapper namespace="com.jzg.mapper.SysUserMapper">
 
     <resultMap id="SysUserResult" type="com.jzg.commons.entity.po.SysUser">
-            <id property="id" column="id" jdbcType="VARCHAR"/>
-            <result property="username" column="username" jdbcType="VARCHAR"/>
-            <result property="password" column="password" jdbcType="VARCHAR"/>
-            <result property="salt" column="salt" jdbcType="VARCHAR"/>
-            <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
-            <result property="accountStatus" column="account_status" jdbcType="TINYINT"/>
-            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
-            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
-            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
-            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
-            <result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="username" column="username" jdbcType="VARCHAR"/>
+        <result property="password" column="password" jdbcType="VARCHAR"/>
+        <result property="salt" column="salt" jdbcType="VARCHAR"/>
+        <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
+        <result property="accountStatus" column="account_status" jdbcType="TINYINT"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
     </resultMap>
 
     <sql id="selectUserVo">
         SELECT id,username,password,
-        salt,mobile,account_status,
-        create_by,create_time,update_by,
-        update_time,is_delete
+               salt,mobile,account_status,
+               create_by,create_time,update_by,
+               update_time,is_delete
         FROM sys_user
     </sql>
     <select id="queryPage" resultType="com.jzg.commons.entity.vo.SysUserVo">
@@ -31,15 +31,15 @@
         sr.create_by,sr.create_time,sr.update_by,
         sr.update_time,sr.is_delete,si.is_enable as isEnable
         FROM sys_user sr
-        LEFT JOIN sys_user_plate_info si on sr.id = si.user_id
+        LEFT JOIN sys_user_plate_info si on sr.id = si.user_id AND si.is_delete = 0
         <where>
+            and sr.is_delete = 0 and si.system_code = 'PLATFORM'
             <if test="param.isEnable != null">
                 and si.is_enable = #{param.isEnable}
             </if>
             <if test="param.searchValue != null and param.searchValue != ''">
                 and ( sr.username = #{param.searchValue} or sr.mobile = #{param.searchValue} or sr.id = #{param.searchValue})
             </if>
-             and sr.is_delete = 0 and si.system_code = 'PLATFORM'
         </where>
         ORDER BY create_time DESC
     </select>
@@ -49,14 +49,15 @@
         *
         FROM
         sys_user su
-        LEFT JOIN sys_user_jzg_info suji ON su.id = suji.user_id
-        WHERE
-        1=1
-        <if test="param.id != null and param.id != ''">
-            AND su.id = #{param.id}
-        </if>
-        <if test="param.deptId != null and param.deptId != ''">
-            AND suji.dept_id = #{param.deptId}
-        </if>
+        LEFT JOIN sys_user_jzg_info suji ON su.id = suji.user_id AND suji.is_delete = 0
+        <where>
+            AND su.is_delete = 0
+            <if test="param.id != null and param.id != ''">
+                AND su.id = #{param.id}
+            </if>
+            <if test="param.deptId != null and param.deptId != ''">
+                AND suji.dept_id = #{param.deptId}
+            </if>
+        </where>
     </select>
-</mapper>
+</mapper>

+ 10 - 8
platform/src/main/resources/mapper/SysUserRoleMapper.xml

@@ -3,19 +3,21 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jzg.mapper.SysUserRoleMapper">
-    <delete id="deleteByUserId">
+    <!--<delete id="deleteByUserId">
         delete from sys_user_role where user_id = #{userId}
-    </delete>
+    </delete>-->
 
     <select id="selectByUserIdAndSysCodeOne" resultType="com.jzg.commons.entity.po.SysUserRole">
         SELECT
-            ur.*
+        ur.*
         FROM
-            sys_user_role ur
-                LEFT JOIN sys_role r ON  r.id = ur.role_id
-        WHERE
+        sys_user_role ur
+        LEFT JOIN sys_role r ON r.id = ur.role_id AND r.is_delete = 0
+        <where>
             ur.is_delete = 0
-          AND ur.user_id = #{userId} AND r.system_code = #{systemCode}
+            AND ur.user_id = #{userId}
+            AND r.system_code = #{systemCode}
+        </where>
     </select>
 
-</mapper>
+</mapper>