zoukankan      html  css  js  c++  java
  • 关联查询

    <sql id="checkOrgJoins">
    left join rf_check_org c on c.apply_id=a.id
    </sql>

    <sql id="column" >
    a.id,
    name,
    id_card as idCard,
    family_num as familyNum,
    phone,
    domicile_place as domicilePlace,
    family_address as familyAddress,
    hard_level as hardLevel,
    separate_status as separateStatus,
    is_village as isVillage,
    house_status as houseStatus,
    total_income as totalIncome,
    fee_income as feeIncome,
    manage_income as manageIncome,
    transfer_income as transferIncome,
    property_income as propertyIncome,
    other_income as otherIncome,
    medical_cost as medicalCost,
    edu_cost as eduCost,
    accident_cost as accidentCost,
    other_cost as otherCost,
    medical_cost_memo as medicalCostMemo,
    edu_cost_memo as eduCostMemo,
    accident_cost_memo as accidentCostMemo,
    other_cost_memo as otherCostMemo,
    hard_reason as hardReason,
    other_hard_reason as otherHardReason,
    need_hand as needHand,
    other_need as otherNeed,
    a.create_by as createBy,
    a.create_date as createDate,
    a.update_by as updateBy,
    a.update_date as updateDate,
    a.del_flag as delFlag,
    a.org_id as orgId,
    a.inspect_status as inspectStatus,
    a.check_status as checkStatus,
    a.sb_date as sbDate,
    a.is_bank_inspect as isBankInspect,
    a.is_police_inspect as isPoliceInspect,
    a.is_realEstateinspect as isRealEstateinspect,
    a.is_houseDept_inspect as isHouseDeptInspect,
    a.is_insuranceDept_inspect as isInsuranceDeptInspect
    </sql>

    <select id="selectFamilyByOrgId" resultType="RfApplyFamily" >
    select <include refid="column" />
    from rf_apply_family a
    <include refid="checkOrgJoins" />
    where c.org_id=#{orgId}
    </select>

    <select id="selectFamilyByOrgIdAndName" resultType="RfApplyFamily" >
    select <include refid="column" />
    from rf_apply_family a
    <include refid="checkOrgJoins" />
    where c.org_id=#{orgId} and name=#{name}
    </select>

  • 相关阅读:
    js 遇到问题
    table 排序 添加 删除 等操作
    json对象
    .style, .getComputedStyle(),.currentStyle区别
    3个div 宽度移入移出时变化
    运动 js
    OWASP Top 10之文件上传漏洞简析(二)
    owasp top10 之文件上传漏洞简析
    前台实现ajax 需注意的地方
    apache-Rewrite重写规则配置
  • 原文地址:https://www.cnblogs.com/fxx5/p/10785276.html
Copyright © 2011-2022 走看看