forked from rongchao/epmet-cloud-rizhao
11 changed files with 493 additions and 0 deletions
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.dto.form.yantai; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description 运营端,统一认证 列表查询入参 |
||||
|
* @Author yzm |
||||
|
* @Date 2022/10/18 11:12 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class YtUserPageFormDTO extends PageFormDTO { |
||||
|
/** |
||||
|
* 0本机 |
||||
|
* 1本级及下级 |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 组织id |
||||
|
* data_sync_org_data.ORGANIZATION_ID |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
/** |
||||
|
* 0未创建、已创建 |
||||
|
*/ |
||||
|
private String status; |
||||
|
} |
||||
|
|
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.dto.result.yantai; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description 运营端,统一认证 列表返参 |
||||
|
* @Author yzm |
||||
|
* @Date 2022/10/18 11:53 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class YtUserPageResDTO { |
||||
|
/** |
||||
|
* 统一用户编码 |
||||
|
*/ |
||||
|
private String userGuid; |
||||
|
/** |
||||
|
* data_sync_org_data.组织机构ID; |
||||
|
*/ |
||||
|
private String organizationId; |
||||
|
/** |
||||
|
* XXX-XXX |
||||
|
*/ |
||||
|
private String orgName; |
||||
|
/** |
||||
|
* 用户姓名 |
||||
|
*/ |
||||
|
private String userName; |
||||
|
|
||||
|
/** |
||||
|
* 电话号码 |
||||
|
*/ |
||||
|
private String telephoneNumber; |
||||
|
|
||||
|
/** |
||||
|
* 性别:0未知1男2女 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
|
||||
|
/** |
||||
|
* 0未创建、已创建 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* customer_staff.userId |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 备注;目前为空 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
} |
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao.yantai; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.yantai.DataSyncOrgDataEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface DataSyncOrgDataDao extends BaseDao<DataSyncOrgDataEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dao.yantai; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.form.yantai.YtUserPageFormDTO; |
||||
|
import com.epmet.dto.result.yantai.YtUserPageResDTO; |
||||
|
import com.epmet.entity.yantai.DataSyncUserDataEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface DataSyncUserDataDao extends BaseDao<DataSyncUserDataEntity> { |
||||
|
/** |
||||
|
* 运营端,统一认证 列表查询 |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
List<YtUserPageResDTO> pageUser(YtUserPageFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package com.epmet.entity.yantai; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("data_sync_org_data") |
||||
|
public class DataSyncOrgDataEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 联系人姓名 |
||||
|
*/ |
||||
|
private String contact; |
||||
|
|
||||
|
/** |
||||
|
* 联系电话号码 |
||||
|
*/ |
||||
|
private String contacttelephoneNumber; |
||||
|
|
||||
|
/** |
||||
|
* 详细地址 |
||||
|
*/ |
||||
|
private String detailAddress; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构第一名称 |
||||
|
*/ |
||||
|
private String firstnameofOrganization; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构全称 |
||||
|
*/ |
||||
|
private String nameofOrganization; |
||||
|
|
||||
|
/** |
||||
|
* 排序号码 |
||||
|
*/ |
||||
|
private String orderNumber; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构简称 |
||||
|
*/ |
||||
|
private String organizatioNabbreviation; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构ID |
||||
|
*/ |
||||
|
private String organizationId; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构级别 |
||||
|
*/ |
||||
|
private String organizationLevel; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构路径 |
||||
|
*/ |
||||
|
private String organizationPath; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构类型 |
||||
|
*/ |
||||
|
private String organizationType; |
||||
|
|
||||
|
/** |
||||
|
* 注册类型 |
||||
|
*/ |
||||
|
private String registrationType; |
||||
|
|
||||
|
/** |
||||
|
* 统一社会信用代码 |
||||
|
*/ |
||||
|
private String unifiedsocialcreditId; |
||||
|
|
||||
|
/** |
||||
|
* 客户id;烟台id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织机构id:ORGANIZATION_ID |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织机构名称:ORGANIZATIO_NABBREVIATION |
||||
|
*/ |
||||
|
private String parentOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级组织。不包含本身! |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.epmet.entity.yantai; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("data_sync_user_data") |
||||
|
public class DataSyncUserDataEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 性别:0未知1男2女 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
|
||||
|
/** |
||||
|
* 手机号码 |
||||
|
*/ |
||||
|
private String mobileTelephoneNumber; |
||||
|
|
||||
|
/** |
||||
|
* 排序号码 |
||||
|
*/ |
||||
|
private String orderNumber; |
||||
|
|
||||
|
/** |
||||
|
* 职务 |
||||
|
*/ |
||||
|
private String position; |
||||
|
|
||||
|
/** |
||||
|
* 职级 |
||||
|
*/ |
||||
|
private String positionLevel; |
||||
|
|
||||
|
/** |
||||
|
* 电话号码 |
||||
|
*/ |
||||
|
private String telephoneNumber; |
||||
|
|
||||
|
/** |
||||
|
* 统一用户编码 |
||||
|
*/ |
||||
|
private String userGuid; |
||||
|
|
||||
|
/** |
||||
|
* 用户姓名 |
||||
|
*/ |
||||
|
private String userName; |
||||
|
|
||||
|
/** |
||||
|
* 人员路径 |
||||
|
*/ |
||||
|
private String userPath; |
||||
|
|
||||
|
/** |
||||
|
* data_sync_org_data.组织机构ID; |
||||
|
*/ |
||||
|
private String organizationId; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 0未创建、已创建 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* customer_staff.userId |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 备注;目前为空 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
<?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.epmet.dao.yantai.DataSyncOrgDataDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.yantai.DataSyncOrgDataEntity" id="dataSyncOrgDataMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="contact" column="CONTACT"/> |
||||
|
<result property="contacttelephoneNumber" column="CONTACTTELEPHONE_NUMBER"/> |
||||
|
<result property="detailAddress" column="DETAIL_ADDRESS"/> |
||||
|
<result property="firstnameofOrganization" column="FIRSTNAMEOF_ORGANIZATION"/> |
||||
|
<result property="nameofOrganization" column="NAMEOF_ORGANIZATION"/> |
||||
|
<result property="orderNumber" column="ORDER_NUMBER"/> |
||||
|
<result property="organizatioNabbreviation" column="ORGANIZATIO_NABBREVIATION"/> |
||||
|
<result property="organizationId" column="ORGANIZATION_ID"/> |
||||
|
<result property="organizationLevel" column="ORGANIZATION_LEVEL"/> |
||||
|
<result property="organizationPath" column="ORGANIZATION_PATH"/> |
||||
|
<result property="organizationType" column="ORGANIZATION_TYPE"/> |
||||
|
<result property="registrationType" column="REGISTRATION_TYPE"/> |
||||
|
<result property="unifiedsocialcreditId" column="UNIFIEDSOCIALCREDIT_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="pid" column="PID"/> |
||||
|
<result property="parentOrgName" column="PARENT_ORG_NAME"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,76 @@ |
|||||
|
<?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.epmet.dao.yantai.DataSyncUserDataDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.yantai.DataSyncUserDataEntity" id="dataSyncUserDataMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="gender" column="GENDER"/> |
||||
|
<result property="mobileTelephoneNumber" column="MOBILE_TELEPHONE_NUMBER"/> |
||||
|
<result property="orderNumber" column="ORDER_NUMBER"/> |
||||
|
<result property="position" column="POSITION"/> |
||||
|
<result property="positionLevel" column="POSITION_LEVEL"/> |
||||
|
<result property="telephoneNumber" column="TELEPHONE_NUMBER"/> |
||||
|
<result property="userGuid" column="USER_GUID"/> |
||||
|
<result property="userName" column="USER_NAME"/> |
||||
|
<result property="userPath" column="USER_PATH"/> |
||||
|
<result property="organizationId" column="ORGANIZATION_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="status" column="STATUS"/> |
||||
|
<result property="staffId" column="STAFF_ID"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 运营端,统一认证 列表返参 --> |
||||
|
<select id="pageUser" parameterType="com.epmet.dto.form.yantai.YtUserPageFormDTO" resultType="com.epmet.dto.result.yantai.YtUserPageResDTO"> |
||||
|
SELECT |
||||
|
u.USER_GUID AS userGuid, |
||||
|
u.ORGANIZATION_ID AS organizationId, |
||||
|
(case when o.PARENT_ORG_NAME is not null and LENGTH(o.PARENT_ORG_NAME)>0 |
||||
|
then concat(o.PARENT_ORG_NAME,o.ORGANIZATIO_NABBREVIATION) |
||||
|
else o.ORGANIZATIO_NABBREVIATION |
||||
|
end)as orgName, |
||||
|
u.USER_NAME AS userName, |
||||
|
u.TELEPHONE_NUMBER AS telephoneNumber, |
||||
|
u.GENDER AS gender, |
||||
|
u.`STATUS` AS status, |
||||
|
IFNULL(u.STAFF_ID,'') AS staffId, |
||||
|
IFNULL(u.REMARK, '' ) AS remark |
||||
|
FROM |
||||
|
data_sync_user_data u |
||||
|
LEFT JOIN data_sync_org_data o ON ( u.ORGANIZATION_ID = o.ORGANIZATION_ID ) |
||||
|
WHERE |
||||
|
u.DEL_FLAG = '0' |
||||
|
AND o.DEL_FLAG = '0' |
||||
|
<if test="null != type and type =='0'"> |
||||
|
<if test='null != orgId and "" != orgId'> |
||||
|
AND u.ORGANIZATION_ID = #{orgId} |
||||
|
</if> |
||||
|
</if> |
||||
|
|
||||
|
<if test="null != type and type =='1'"> |
||||
|
<if test='null != orgId and "" != orgId'> |
||||
|
AND (o.ORGANIZATION_ID = #{orgId} OR o.pids LIKE concat( '%', #{orgId}, '%' ) ) |
||||
|
</if> |
||||
|
</if> |
||||
|
|
||||
|
<if test='null != name and "" != name'> |
||||
|
AND u.USER_NAME LIKE concat( '%', #{name}, '%' ) |
||||
|
</if> |
||||
|
|
||||
|
<if test='null != mobile and "" != mobile'> |
||||
|
AND u.MOBILE_TELEPHONE_NUMBER LIKE concat( '%', #{mobile}, '%' ) |
||||
|
</if> |
||||
|
|
||||
|
<if test='null != status and "" != status'> |
||||
|
AND u.`STATUS` = #{status} |
||||
|
</if> |
||||
|
order by o.ORDER_NUMBER asc,u.ORDER_NUMBER asc |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue