清除custorg相关
This commit is contained in:
parent
63b9752eff
commit
36cd73d0b9
|
|
@ -1,10 +1,6 @@
|
|||
package com.bonus.canteen.core.customer.business;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgPageDTO;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.canteen.core.customer.vo.CustOrgVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import com.bonus.canteen.core.customer.dto.SaveFaceInfoResult;
|
|||
import com.bonus.canteen.core.customer.model.CustAccTemp;
|
||||
import com.bonus.canteen.core.customer.model.CustAddr;
|
||||
import com.bonus.canteen.core.customer.model.CustInfo;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.canteen.core.customer.service.CustAccTempService;
|
||||
import com.bonus.canteen.core.customer.service.CustAddrService;
|
||||
import com.bonus.canteen.core.customer.service.CustInfoService;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,10 @@
|
|||
package com.bonus.canteen.core.customer.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bonus.canteen.core.auth.config.LeNiuDataPermission;
|
||||
import com.bonus.canteen.core.auth.enums.DataPermissionTypeEnum;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgPageDTO;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgTreeDTO;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.canteen.core.customer.openapi.vo.OrgQueryVO;
|
||||
import com.bonus.canteen.core.customer.po.QueryOrgsBasicInfoPO;
|
||||
import com.bonus.canteen.core.customer.po.UpdateChildOrgPO;
|
||||
import com.bonus.canteen.core.customer.vo.CustOrgVO;
|
||||
import com.bonus.canteen.core.customer.vo.OrgBasicInfoVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
|
|
|
|||
|
|
@ -1,285 +0,0 @@
|
|||
package com.bonus.canteen.core.customer.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.bonus.canteen.core.common.utils.SysUtil;
|
||||
import com.bonus.common.houqin.utils.ValidationGroups;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
//@TableName("cust_org")
|
||||
//@ApiModel("组织机构表")
|
||||
@Data
|
||||
public class CustOrg {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId
|
||||
@ApiModelProperty("主键自增")
|
||||
private Long id;
|
||||
@ApiModelProperty("机构id")
|
||||
private @NotNull(
|
||||
message = "{customer.org.orgId.nonNull}",
|
||||
groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}
|
||||
) Long orgId;
|
||||
@ApiModelProperty("机构全路径id")
|
||||
private String orgFullId;
|
||||
@ApiModelProperty("机构编号")
|
||||
private @Size(
|
||||
max = 128,
|
||||
message = "{customer.org.num.size.limit}"
|
||||
) String orgNum;
|
||||
@ApiModelProperty("机构名称")
|
||||
private @Size(
|
||||
min = 1,
|
||||
max = 50,
|
||||
message = "{customer.org.name.size.limit}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) String orgName;
|
||||
@ApiModelProperty("机构全称")
|
||||
private String orgFullName;
|
||||
@ApiModelProperty("机构级别")
|
||||
private Integer orgLevel;
|
||||
@ApiModelProperty("上级机构id")
|
||||
private @NotNull(
|
||||
message = "{customer.org.superOrgId.nonNull}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) Long superId;
|
||||
@ApiModelProperty("机构负责人")
|
||||
private String orgHead;
|
||||
@ApiModelProperty("组织负责人id(cust_id)")
|
||||
private Long orgHeadId;
|
||||
@ApiModelProperty("机构电话")
|
||||
private String orgTel;
|
||||
@ApiModelProperty("组织图片")
|
||||
private String picture;
|
||||
@ApiModelProperty("有效日期")
|
||||
private LocalDate endDate;
|
||||
@ApiModelProperty("就餐地(为新增人员提供默认值)")
|
||||
private JsonNode diningPlace;
|
||||
@ApiModelProperty("备注描述")
|
||||
private @Size(
|
||||
max = 512,
|
||||
message = "{customer.org.remark.size.limit}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) String remarks;
|
||||
@ApiModelProperty("是否删除")
|
||||
private Integer ifDel;
|
||||
@ApiModelProperty("乐观锁")
|
||||
private Integer revision;
|
||||
@ApiModelProperty("创建人")
|
||||
private String crby;
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime crtime;
|
||||
@ApiModelProperty("更新人")
|
||||
private String upby;
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime uptime;
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sort;
|
||||
|
||||
public CustOrg setPicture(String picture) {
|
||||
this.picture = SysUtil.getCutPath(picture);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Long getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public String getOrgFullId() {
|
||||
return this.orgFullId;
|
||||
}
|
||||
|
||||
public String getOrgNum() {
|
||||
return this.orgNum;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return this.orgName;
|
||||
}
|
||||
|
||||
public String getOrgFullName() {
|
||||
return this.orgFullName;
|
||||
}
|
||||
|
||||
public Integer getOrgLevel() {
|
||||
return this.orgLevel;
|
||||
}
|
||||
|
||||
public Long getSuperId() {
|
||||
return this.superId;
|
||||
}
|
||||
|
||||
public String getOrgHead() {
|
||||
return this.orgHead;
|
||||
}
|
||||
|
||||
public Long getOrgHeadId() {
|
||||
return this.orgHeadId;
|
||||
}
|
||||
|
||||
public String getOrgTel() {
|
||||
return this.orgTel;
|
||||
}
|
||||
|
||||
public String getPicture() {
|
||||
return this.picture;
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public JsonNode getDiningPlace() {
|
||||
return this.diningPlace;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public Integer getIfDel() {
|
||||
return this.ifDel;
|
||||
}
|
||||
|
||||
public Integer getRevision() {
|
||||
return this.revision;
|
||||
}
|
||||
|
||||
public String getCrby() {
|
||||
return this.crby;
|
||||
}
|
||||
|
||||
public LocalDateTime getCrtime() {
|
||||
return this.crtime;
|
||||
}
|
||||
|
||||
public String getUpby() {
|
||||
return this.upby;
|
||||
}
|
||||
|
||||
public LocalDateTime getUptime() {
|
||||
return this.uptime;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return this.sort;
|
||||
}
|
||||
|
||||
public CustOrg setId(final Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgId(final Long orgId) {
|
||||
this.orgId = orgId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgFullId(final String orgFullId) {
|
||||
this.orgFullId = orgFullId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgNum(final String orgNum) {
|
||||
this.orgNum = orgNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgName(final String orgName) {
|
||||
this.orgName = orgName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgFullName(final String orgFullName) {
|
||||
this.orgFullName = orgFullName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgLevel(final Integer orgLevel) {
|
||||
this.orgLevel = orgLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setSuperId(final Long superId) {
|
||||
this.superId = superId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgHead(final String orgHead) {
|
||||
this.orgHead = orgHead;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgHeadId(final Long orgHeadId) {
|
||||
this.orgHeadId = orgHeadId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setOrgTel(final String orgTel) {
|
||||
this.orgTel = orgTel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setEndDate(final LocalDate endDate) {
|
||||
this.endDate = endDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setDiningPlace(final JsonNode diningPlace) {
|
||||
this.diningPlace = diningPlace;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setRemarks(final String remarks) {
|
||||
this.remarks = remarks;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setIfDel(final Integer ifDel) {
|
||||
this.ifDel = ifDel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setRevision(final Integer revision) {
|
||||
this.revision = revision;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setCrby(final String crby) {
|
||||
this.crby = crby;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setCrtime(final LocalDateTime crtime) {
|
||||
this.crtime = crtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setUpby(final String upby) {
|
||||
this.upby = upby;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setUptime(final LocalDateTime uptime) {
|
||||
this.uptime = uptime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustOrg setSort(final Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +1,7 @@
|
|||
package com.bonus.canteen.core.customer.service;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.houqin.constant.LeConstants;
|
||||
import com.bonus.canteen.core.customer.constants.PersonalStatusEnum;
|
||||
import com.bonus.canteen.core.customer.mapper.CustOrgMapper;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.common.houqin.i18n.I18n;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
package com.bonus.canteen.core.customer.service;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bonus.canteen.core.customer.dto.CustAccExcelModel;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgPageDTO;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgTreeDTO;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.canteen.core.customer.po.QueryOrgsBasicInfoPO;
|
||||
import com.bonus.canteen.core.customer.vo.CustOrgVO;
|
||||
import com.bonus.canteen.core.customer.vo.OrgBasicInfoVO;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import com.bonus.canteen.core.customer.dto.CustAccExcelModel;
|
|||
import com.bonus.canteen.core.customer.dto.CustOrgPageDTO;
|
||||
import com.bonus.canteen.core.customer.dto.CustOrgTreeDTO;
|
||||
import com.bonus.canteen.core.customer.mapper.CustOrgMapper;
|
||||
import com.bonus.canteen.core.customer.model.CustInfo;
|
||||
import com.bonus.canteen.core.customer.model.CustOrg;
|
||||
import com.bonus.canteen.core.customer.po.QueryOrgsBasicInfoPO;
|
||||
import com.bonus.canteen.core.customer.po.UpdateChildOrgPO;
|
||||
import com.bonus.canteen.core.customer.service.CustInfoService;
|
||||
|
|
|
|||
|
|
@ -1,251 +1,6 @@
|
|||
<?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.bonus.canteen.core.customer.mapper.CustOrgMapper">
|
||||
<resultMap id="custOrgMap" type="com.bonus.canteen.core.customer.model.CustOrg">
|
||||
<id property="id" column="id"/>
|
||||
<result property="orgId" column="org_id"/>
|
||||
<result property="orgNum" column="org_num"/>
|
||||
<result property="orgName" column="org_name"/>
|
||||
<result property="orgFullName" column="org_full_name"/>
|
||||
<result property="orgLevel" column="org_level"/>
|
||||
<result property="superId" column="super_id"/>
|
||||
<result property="orgHead" column="org_head"/>
|
||||
<result property="orgTel" column="org_tel"/>
|
||||
<result property="endDate" column="end_date"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="ifDel" column="if_del"/>
|
||||
<result property="revision" column="revision"/>
|
||||
<result property="crby" column="crby"/>
|
||||
<result property="crtime" column="crtime"/>
|
||||
<result property="upby" column="upby"/>
|
||||
<result property="uptime" column="uptime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- <update id="updateChildOrg">-->
|
||||
<!-- UPDATE cust_org-->
|
||||
<!-- SET-->
|
||||
<!-- org_full_name = REPLACE(org_full_name, #{params.oldOrgFullName}, #{params.orgFullName}),-->
|
||||
<!-- org_full_id = REPLACE(org_full_id, #{params.oldOrgFullId}, #{params.orgFullId}),-->
|
||||
<!-- org_level = org_level + 1,-->
|
||||
<!-- end_date = IF(end_date IS NOT NULL && (#{params.endDate} IS NULL || end_date > #{params.endDate} ), #{params.endDate}, end_date)-->
|
||||
<!-- <where>-->
|
||||
<!-- org_id IN-->
|
||||
<!-- <foreach collection="params.childOrgIdList" item="orgId" separator="," open="(" close=")">-->
|
||||
<!-- #{orgId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </where>-->
|
||||
|
||||
<!-- </update>-->
|
||||
|
||||
<!-- <select id="getOrgLazyTree" resultType="com.bonus.canteen.core.customer.dto.CustOrgTreeDTO">-->
|
||||
<!-- select *,-->
|
||||
<!-- EXISTS(SELECT 1 FROM cust_org WHERE super_id = t.org_id AND if_del = 2) AS hasChildren-->
|
||||
<!-- from (-->
|
||||
<!-- SELECT c.org_id,-->
|
||||
<!-- c.org_num,-->
|
||||
<!-- c.org_name,-->
|
||||
<!-- c.org_full_name,-->
|
||||
<!-- c.org_level,-->
|
||||
<!-- c.super_id-->
|
||||
<!-- FROM cust_org c-->
|
||||
<!-- LEFT JOIN mkt_effective_detail e ON e.org_id = c.org_id-->
|
||||
<!-- WHERE 1 = 1-->
|
||||
<!-- <![CDATA[ AND e.org_id <> - 1 ]]>-->
|
||||
<!-- AND c.if_del = 2-->
|
||||
<!-- <if test="effId != -1">-->
|
||||
<!-- and e.eff_id = #{effId}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- UNION ALL-->
|
||||
|
||||
<!-- SELECT c.org_id,-->
|
||||
<!-- c.org_num,-->
|
||||
<!-- c.org_name,-->
|
||||
<!-- c.org_full_name,-->
|
||||
<!-- c.org_level,-->
|
||||
<!-- c.super_id-->
|
||||
<!-- FROM cust_org c-->
|
||||
<!-- WHERE c.super_id = - 1-->
|
||||
<!-- AND c.if_del = 2) t where 1 = 1-->
|
||||
<!-- <if test="superId != null">-->
|
||||
<!-- and t.super_id = #{superId}-->
|
||||
<!-- </if>-->
|
||||
<!-- order by t.org_num-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="listAllOrg" resultType="com.bonus.canteen.core.customer.dto.CustOrgTreeDTO">-->
|
||||
<!-- SELECT c.org_id,-->
|
||||
<!-- org_num,-->
|
||||
<!-- org_name,-->
|
||||
<!-- org_full_name,-->
|
||||
<!-- org_level,-->
|
||||
<!-- super_id,-->
|
||||
<!-- sort-->
|
||||
<!-- FROM cust_org c-->
|
||||
<!-- WHERE c.if_del = 2-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="pageCustOrgByParams" resultType="com.bonus.canteen.core.customer.vo.CustOrgVO">-->
|
||||
<!-- SELECT * FROM cust_org org-->
|
||||
<!-- <where>-->
|
||||
<!-- org.if_del = 2-->
|
||||
<!-- <if test="custOrg.keyword != null and custOrg.keyword != ''">-->
|
||||
<!-- AND (org.org_name LIKE CONCAT('%',#{custOrg.keyword},'%') OR org.org_num LIKE CONCAT('%',#{custOrg.keyword},'%'))-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="custOrg.orgFullId != null and custOrg.orgFullId != ''">-->
|
||||
<!-- AND org.org_full_id LIKE concat(#{custOrg.orgFullId}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="custOrg.orgIdList != null and custOrg.orgIdList.size() > 0">-->
|
||||
<!-- AND org.org_id IN-->
|
||||
<!-- <foreach collection="custOrg.orgIdList" item="orgId" separator="," open="(" close=")">-->
|
||||
<!-- #{orgId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="custOrg.endDate != null">-->
|
||||
<!-- AND (org.end_date >= #{custOrg.endDate} OR org.end_date IS NULL)-->
|
||||
<!-- </if>-->
|
||||
<!-- ORDER BY org.org_level, org.sort-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="queryPageCustOrg" resultType="com.bonus.canteen.core.customer.vo.CustOrgVO">-->
|
||||
<!-- SELECT id,-->
|
||||
<!-- c.org_id,-->
|
||||
<!-- org_num,-->
|
||||
<!-- org_name,-->
|
||||
<!-- org_full_name,-->
|
||||
<!-- org_level,-->
|
||||
<!-- super_id,-->
|
||||
<!-- org_head,-->
|
||||
<!-- org_tel,-->
|
||||
<!-- end_date,-->
|
||||
<!-- remarks,-->
|
||||
<!-- if_del,-->
|
||||
<!-- revision,-->
|
||||
<!-- crby,-->
|
||||
<!-- crtime,-->
|
||||
<!-- upby,-->
|
||||
<!-- uptime,-->
|
||||
<!-- sort,-->
|
||||
<!-- org_head_id,-->
|
||||
<!-- dining_place-->
|
||||
<!-- FROM-->
|
||||
<!-- (-->
|
||||
<!-- select *-->
|
||||
<!-- from (select org_id,-->
|
||||
<!-- half_select,-->
|
||||
<!-- @rownum := if(@id = org_id, @rownum := @rownum + 1, 1) as rn,-->
|
||||
<!-- @id := org_id as last_id-->
|
||||
<!-- from (-->
|
||||
<!-- SELECT o.org_id,-->
|
||||
<!-- o.half_select-->
|
||||
<!-- FROM mgr_role_org o-->
|
||||
<!-- LEFT JOIN mgr_role r ON r.role_id = o.role_id-->
|
||||
<!-- LEFT JOIN mgr_user_role u ON o.role_id = u.role_id-->
|
||||
<!-- WHERE r.del_flag = 2-->
|
||||
<!-- AND u.user_id = #{userId}-->
|
||||
<!-- ) s,-->
|
||||
<!-- (select @rownum := 0, @id := null) c-->
|
||||
<!-- ORDER BY org_id, half_select) t-->
|
||||
<!-- having rn = 1-->
|
||||
<!-- ) t-->
|
||||
<!-- LEFT JOIN cust_org c ON c.org_id = t.org_id-->
|
||||
<!-- WHERE c.if_del = 2-->
|
||||
|
||||
<!-- <if test="custOrg.orgFullId != null and custOrg.orgFullId != ''">-->
|
||||
<!-- and c.org_full_id like concat(#{custOrg.orgFullId}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="custOrg.orgName != null and custOrg.orgName != ''">-->
|
||||
<!-- and c.org_name like concat('%', #{custOrg.orgName}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="custOrg.orgIdList != null and custOrg.orgIdList.size() > 0">-->
|
||||
<!-- and c.org_id in-->
|
||||
<!-- <foreach collection="custOrg.orgIdList" item="orgId" separator="," open="(" close=")">-->
|
||||
<!-- #{orgId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- order by org_level, sort-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="superInDescendantNode" resultType="java.lang.Boolean">-->
|
||||
<!-- SELECT COUNT(id)-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- WHERE-->
|
||||
<!-- org_id = #{superId}-->
|
||||
<!-- AND org_full_id LIKE CONCAT(#{orgFullId},'%')-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="queryCustOrgVOList" resultType="com.bonus.canteen.core.customer.vo.CustOrgVO">-->
|
||||
<!-- SELECT id, org_id, org_num, org_name, org_full_name, org_level, super_id, org_head, org_tel, end_date, remarks, if_del, revision, crby, crtime, upby, uptime, sort-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- WHERE org_id in-->
|
||||
<!-- <foreach collection="orgIdList" item="orgId" separator="," open="(" close=")">-->
|
||||
<!-- #{orgId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="listDescendantOrgIdByOrgFullId" resultType="java.lang.Long">-->
|
||||
<!-- SELECT org_id-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- WHERE-->
|
||||
<!-- org_full_id LIKE CONCAT(#{orgFullId},'_%');-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="listChildOrgIdByOrgId" resultType="java.lang.Long">-->
|
||||
<!-- SELECT org_id-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- WHERE-->
|
||||
<!-- org_full_id LIKE CONCAT(-->
|
||||
<!-- (-->
|
||||
<!-- SELECT org_full_id-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- WHERE org_id = #{orgId}-->
|
||||
<!-- )-->
|
||||
<!-- ,'_%');-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="listOrgBasicInfoByParams" resultType="com.bonus.canteen.core.customer.vo.OrgBasicInfoVO">-->
|
||||
<!-- SELECT id, org_id, org_num, org_name, org_full_name, super_id, if_del-->
|
||||
<!-- FROM cust_org-->
|
||||
<!-- <where>-->
|
||||
|
||||
<!-- <if test="params.delFlags != null and params.delFlags.size() > 0">-->
|
||||
<!-- if_del IN-->
|
||||
<!-- <foreach collection="params.delFlags" item="item" separator="," open="(" close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="params.orgNums != null and params.orgNums.size() > 0">-->
|
||||
<!-- AND org_num IN-->
|
||||
<!-- <foreach collection="params.orgNums" item="item" separator="," open="(" close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="params.orgIds != null and params.orgIds.size() > 0">-->
|
||||
<!-- AND org_id IN-->
|
||||
<!-- <foreach collection="params.orgIds" item="item" separator="," open="(" close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="params.ids != null and params.ids.size() > 0">-->
|
||||
<!-- AND id IN-->
|
||||
<!-- <foreach collection="params.ids" item="item" separator="," open="(" close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="params.superIds != null and params.superIds.size() > 0">-->
|
||||
<!-- AND super_id IN-->
|
||||
<!-- <foreach collection="params.superIds" item="item" separator="," open="(" close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="listOrgBasicInfoByParams" resultType="com.bonus.canteen.core.customer.vo.OrgBasicInfoVO">
|
||||
SELECT dept_id as org_id, dept_name as org_name, parent_id as super_id, del_flag as if_del
|
||||
FROM sys_dept
|
||||
|
|
@ -275,12 +30,4 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<!-- <select id="getOrgByCustId" resultType="com.bonus.canteen.core.customer.model.CustOrg">-->
|
||||
<!-- SELECT t2.org_id,-->
|
||||
<!-- t2.org_full_id-->
|
||||
<!-- FROM cust_org t2-->
|
||||
<!-- INNER JOIN cust_info t1 ON t1.org_id = t2.org_id-->
|
||||
<!-- WHERE t1.cust_id = #{custId}-->
|
||||
<!-- </select>-->
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue