0.00.0100005050NY50000YN1000100-2019/05/21 19:06:33.293-2019/05/21 19:06:33.293H4sIAAAAAAAAAAMAAAAAAAAAAAA=NMallSqlserver192.168.50.32MSSQLNATIVENativeMall1433saEncrypted 2be98afc819c69e8ea300ff228dd38f99EXTRA_OPTION_MSSQLNATIVE.defaultRowPrefetch200EXTRA_OPTION_MSSQLNATIVE.readTimeout60FORCE_IDENTIFIERS_TO_LOWERCASENFORCE_IDENTIFIERS_TO_UPPERCASENINITIAL_POOL_SIZE100IS_CLUSTEREDNMAXIMUM_POOL_SIZE300MSSQLUseIntegratedSecurityfalseMSSQL_DOUBLE_DECIMAL_SEPARATORNPORT_NUMBER1433PRESERVE_RESERVED_WORD_CASEYQUOTE_ALL_FIELDSNSUPPORTS_BOOLEAN_DATA_TYPEYSUPPORTS_TIMESTAMP_DATA_TYPEYUSE_POOLINGY表输入 2Elasticsearch bulk insert 2YElasticsearch bulk insert 2ElasticSearchBulkY1nonecrm_memberbase_doc5000100SECONDSNMemberKeyYNYMemberKeyMemberKeyMemberGenderMemberGenderMemberNickNameMemberNickNameMemUsualPhoneMemUsualPhoneMemPhone1MemPhone1MemPhone2MemPhone2MemPhone3MemPhone3MemUsualAddressMemUsualAddressOriginTypeOriginTypeRegisterTimeRegisterTimeMemUsualAreaCodeMemUsualAreaCodeMemUsualCityCodeMemUsualCityCodeMemUsualProvinceCodeMemUsualProvinceCodeHasOrderHasOrderRegisterYearRegisterYearRegisterMonthRegisterMonthRegisterDayRegisterDayorder_join_fieldorder_join_field
192.168.50.32
9300cluster.nameescustom.aliase.sourcemem_memberbase_pcustom.fields.HasOrder{"type":"boolean"}custom.fields.MemDesc{"type":"text","analyzer": "ik_smart",
"search_analyzer":"ik_smart","index":true}custom.fields.MemberBirthday{"type":"date","format":"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||strict_date_optional_time||epoch_millis"}custom.fields.RegisterTime{"type":"date","format":"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||strict_date_optional_time||epoch_millis"}custom.fields.order_join_field{ "type": "join","relations": {"Member": ["Order", "OriginType"] }}custom.index.number_of_replicas1custom.index.number_of_shards11256272Y表输入 2TableInputY1noneMallSqlserverselect * from (
select ROW_NUMBER() over (order by AConsigneePhone2 asc ) as MemberKey,
case when sex= ''then 1 else sex end as MemberGender,
Consignee as MemberNickName,
case when AConsigneePhone2= '' then
(case
when AconsigneePhone1!='' then dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone1)
else ''end)
ELSE dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone2) end as MemUsualPhone,--电话号码
case when AConsigneePhone3= '' then ''
ELSE dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone1) end as MemPhone1,--
case when AConsigneePhone3= '' then ''
ELSE dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone2) end as MemPhone2,--
case when AConsigneePhone1= '' then ''
ELSE dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone3) end as MemPhone3,--
case when ADeliveryAddress= '' then ''
ELSE dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',ADeliveryAddress) end as MemUsualAddress,
OriginType,
( select CONVERT(varchar(100), min(b.OrderTime), 20) from orders b where b.AConsigneePhone2=a.AConsigneePhone2
and b.OrderTime!='1800/01/01 00:00:00'
group by b.AConsigneePhone2
)
as RegisterTime,
case when b0.Level= 3 then a.RegionCode else null end as MemUsualAreaCode,
case when b1.Level= 2 then b.ParentCode else b.AreaCode end as MemUsualCityCode,
case when c1.Level= 1 then c.ParentCode else c.AreaCode end as MemUsualProvinceCode
,'true' as HasOrder
,convert(varchar,datepart(year,getdate())) as RegisterYear
,convert(varchar,datepart(month,getdate())) as RegisterMonth
,convert(varchar,datepart(day,getdate())) as RegisterDay
,'Member' as order_join_field
from orders a
left join Areamap b0 on b0.MappingCode=a.RegionCode
left join AreaRegion b on b.AreaCode=a.RegionCode left join Areamap b1 on b1.MappingCode=b.ParentCode
left join AreaRegion c on c.AreaCode=b.ParentCode left join Areamap c1 on c1.MappingCode=c.ParentCode
where 1=1 and (a.AConsigneePhone2!= '' or a.AConsigneePhone1!= '')
)a where MemberKey = 10
--order by AConsigneePhone2 asc
--offset ((${page}-1)*${pagesize}) rows fetch NEXT (${pagesize}) rows only
--offset 0 rows fetch NEXT 2 rows only
0NNN256112YN