Commit edadc760 by songxiang

init uat

parents
*.iml
*target/
*.svn/
*.settings/
*.project
*.classpath
*logs/
*.idea/
*bin/
\ No newline at end of file
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pcloud.common</groupId>
<artifactId>pcloud-common-parent</artifactId>
<version>2.1.0-RELEASE</version>
</parent>
<artifactId>pcloud-common-config</artifactId>
<packaging>jar</packaging>
<version>${pcloud-common-config.version}</version>
<name>pcloud-common-config</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
## main
main.access.key.id = LTAIx8FODeVLN3bD
main.access.key.secret = eJbZwTzatZq4SMyDiQeh7NzIHkdAaO
## OSS
oss.region = oss-cn-hangzhou
oss.endpoint = http://oss-cn-hangzhou-internal.aliyuncs.com
file.bucket = whlg-oss-002
file.original.url = http://whlg-oss-002.oss-cn-hangzhou.aliyuncs.com/
oss.region.bj = oss-cn-beijing
oss.endpoint.bj = http://oss-cn-beijing-internal.aliyuncs.com
live.bucket = whlg-oss-livedev
live.original.url = http://whlg-oss-livedev.oss-cn-beijing.aliyuncs.com/
by.bucket = byfile-oss-01
by.original.url = http://byfile-oss-01.oss-cn-hangzhou.aliyuncs.com/
## mts
mts.region = cn-hangzhou
mts.endpoint = mts.cn-hangzhou.aliyuncs.com
pipelineid = a63c988125054b07b1d3bd6e10c327de
mp3TemplateId = d60210d2fd5bfcacce66238142437965
mp4TemplateId = 67745f7eb8b7ca9bcf74d96c2364e6c1
m3u8TemplateId = 283cd916aa504502b3704f3f5a45addc
mts.region.bj = cn-beijing
mts.endpoint.bj = mts.cn-beijing.aliyuncs.com
pipelineid.bj = 515ef1b1ae7543e096134c0fb0105b02
mp3TemplateId.bj = 37211787496c0e2b4c0402661cb5c20a
mp4TemplateId.bj = f4165d42e5eb680c8f919f960f35059c
## cdn
file.domain.name = oss.5rs.me
file.cdn.url = https://oss.5rs.me/
oss.cdn.urls = http://file.chubanyun.me/,http://file.techdc.cn/,https://file.raysyun.com/,http://file.raysgo.com/,https://file.5rs.me/,https://oss.5rs.me/,http://live.chubanyun.me/,https://download.5rs.me/,http://rays-adviser.chubanyun.me/,https://byfile.1wlshu.com/
rays.cdn.urls = https://file.5rs.me/,https://oss.5rs.me/
file.cdn.url.download = https://download.5rs.me/
file.cdn.url.live = http://live.chubanyun.me/
file.cdn.url.by = https://byfile.1wlshu.com/
\ No newline at end of file
spring:
cloud:
config:
discovery:
enabled: true
service-id: cloud-config
profile: default
label: prod
loadbalancer:
retry:
enabled: true
metrics:
influx:
uri: http://192.168.83.241:8086/write
step: PT10S
db: ${spring.application.name}
enabled: true
zipkin:
base-url: http://192.168.1.175:9399
locator:
discovery:
enabled: true
sleuth:
sampler:
percentage: 0.02
data:
solr:
zkHost: 192.168.1.102:9983,192.168.1.102:8574
redis:
cluster:
nodes:
- 192.168.1.161:7001
- 192.168.1.162:7002
- 192.168.1.163:7003
- 192.168.1.164:7004
- 192.168.1.165:7005
- 192.168.1.166:7006
- 192.168.1.167:7007
- 192.168.1.168:7008
- 192.168.1.169:7009
eureka:
client:
service-url:
defaultZone: http://192.168.1.100:9396/eureka/,http://192.168.1.101:9396/eureka/
registry-fetch-interval-seconds: 5
instance:
lease-expiration-duration-in-seconds: 30
lease-renewal-interval-in-seconds: 10
prefer-ip-address: true
a-s-g-name: ${spring.application.name}
metadata-map:
cluster: ${spring.application.name}
management:
security:
enabled: false
ribbon:
ServerListRefreshInterval: 5
OkToRetryOnAllOperations: true
MaxAutoRetriesNextServer: 1
MaxAutoRetries: 0
ReadTimeout: 60000
ConnectTimeout: 60000
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 30000
threadpool:
default:
coreSize: 300
\ No newline at end of file
email.fromEmail=rays_support@vip.163.com
email.password=chubanyun
email.reviewFromEmail=rays_review@vip.163.com
email.reviewPassword=lgsz2017
email.saysEmail=says_support@vip.163.com
email.saysPassword=2017sayschuban
\ No newline at end of file
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u8fd0\u8425)
wechat.perfix.operate.url=http://weixin{0}.chubanyun.me
#\u7ba1\u7406\u53f7\u57df\u540d
wechat.perfix.manage.url=http://wechat{0}.chubanyun.me
#\u670d\u52a1\u5668\u914d\u7f6eurl
wechat.server.perfix.url=http://{0}/wechat/wechat/init/
#\u652f\u4ed8\u56de\u8c03url
wechat.pay.callback.url=http://{0}/wechat/pay/back
#\u6388\u6743\u76ee\u5f55
wechat.pay.authoriz=http://{0}/
#\u57df\u540d
domain.operate.url=weixin{0}.chubanyun.me
#\u57df\u540d(\u7ba1\u7406\u53f7)
domain.manage.url=wachat{0}.chubanyun.me
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u8fd0\u8425)
weixin.perfix.url=weixin{0}
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u7ba1\u7406)
wechat.perfix.url=wechat{0}
\ No newline at end of file
# \u672a\u901a\u8fc7
AUDIT_STATE_NOT = -1
# \u5f85\u901a\u8fc7
AUDIT_STATE_WAIT = 0
# \u5ba1\u6838\u901a\u8fc7
AUDIT_STATE_PASS = 1
# \u5ba1\u6838\u62d2\u7edd
AUDIT_STATE_REFUSE = 2
# \u5de5\u7a0b\u8bbf\u95ee\u94fe\u63a5\u524d\u7f00
CONTEXT_PATH = resourcecenter/v1.0
## Dubbo
dubbo.registry.address=192.168.1.179:12181,192.168.1.182:12181,192.168.1.187:12181
#\u6570\u636E\u5E93\u65B9\u8A00
dialectClass=com.pcloud.common.core.mybatis.dialect.MySqlDialect
#Redis\u7F13\u5B58\u670D\u52A1\u5730\u5740
redis.host1=10.25.172.183
redis.host1.port=6379
## MQ\u5730\u5740
mq.brokerURL=failover:(tcp://192.168.1.191:61616,tcp://192.168.1.192:61616,tcp://192.168.1.193:61616)?initialReconnectDelay=100
##\u961F\u5217\u540D\u79F0
queueName.Message=message
##\u4E3B\u9898\u901A\u77E5
topicName.Topic=topic
##\u652F\u4ED8
topicName.Payment=VirtualTopic.PAYMENT
##\u53D1\u8D27
topicName.SendProduct=VirtualTopic.SENDPRODUCT
##\u786E\u8BA4\u6536\u8D27
topicName.ConfirmOrder=VirtualTopic.CONFIRMORDER
##\u5B8C\u6210\u8BA2\u5355
topicName.FinishOrder=VirtualTopic.FINISHORDER
##\u9000\u6B3E
topicName.Refund=VirtualTopic.REFUND
##\u540C\u610F\u9000\u8D27
topicName.ApplyRefund=VirtualTopic.APPLYREFUNDGOODS
##\u9000\u8D27
topicName.RefundProduct=VirtualTopic.REFUNDPRODUCT
##\u8D44\u6E90\u5220\u9664
topicName.ResourceDelete=VirtualTopic.RESOURCEDELETE
##\u626B\u7801\u8BB0\u5F55
topicName.ScanRecord=VirtualTopic.SCANRECORD
##\u6253\u8D4F
topicName.Tip=VirtualTopic.TIP
##\u5F53\u4E8B\u4EBA\u6CE8\u518C
topicName.RegisterParty=VirtualTopic.REGISTERPARTY
queueName.User=bm.add.user
topicName.Permission=VirtualTopic.PERMISSION
##\u53D6\u6D88\u8BA2\u5355
topicName.CancelOrder=VirtualTopic.CANCELORDER
##
topicName.Recharge=VirtualTopic.RECHARGE
#solr config
solr.cloud.host=192.168.1.102:8983,192.168.1.102:7574
solr.default.collection=solr-rays-prod
##\u5546\u6237\u7AEF\u5FEB\u9012100\u56DE\u8C03\u63A5\u53E3
express.Hudren=https://rm.5rs.me/tradecenter/v1.0/expressHundred/callback
##\u5FAE\u543C\u76F4\u64AD\u56DE\u8C03
live.check=https://rm.5rs.me/liveapp/v1.0/live/check
##\u79D8\u94A5\u5916\u5C42\u5730\u5740
key.Path=/home/pcloud/pcloud/service/key/
##\u79D8\u94A5\u540D\u79F0
key.Name=/apiclient_cert.p12
##\u5E73\u53F0\u7AEFid
pcloud.Id=0L
##
url.short=https://rm.5rs.me/commoncenter/v1.0/url/sendRedirect
##\u7F16\u521B\u8D5B\u62A5\u540D
appId = 1132
channelId = 1425
agentId= 1425
says_agent_Id = 1000604
xcx_official_account_id = 65741
raysTaskBetaAgents = 2,1362
##\u8C03\u7528rays\u63A5\u53E3\u7684\u5F00\u5173
IS_LISTEN_TRADE = 0
liveAppDownloadUrlForAndroid=https://oss.5rs.me/oss/uploadfe/png/9664623da6fe47b845068e1711c69091.png
liveAppDownLoadUrlForApple=https://oss.5rs.me/oss/uploadfe/png/9664623da6fe47b845068e1711c69091.png
uedLiveRequestUrl=http://rayscloud.chubanyun.net
sms.signName=\u73B0\u4EE3\u7EB8\u4E66
liveRunEnvironment = prod_
uedThirdPartyOrderUrl=https://rayscloud.chubanyun.net
## \u7CFB\u7EDF\u73AF\u5883
system.env = pro
\ No newline at end of file
#\u7528\u6237\u53d8\u91cf
#\u662f\u5426\u5f00\u53d1\u72b6\u6001
IS_DEV_STATUS=true
#\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u9650\u5236
PWD_ERROR_LIMIT_TIMES=5
#\u5bc6\u7801\u9519\u8bef\u65f6\u95f4\u9650\u5236
PWD_ERROR_LIMIT_TIME=30
#\u5bc6\u7801\u4fee\u6539\u9650\u5236\u65f6\u95f4
PWD_EDIT_LIMIT_TIME=3
#\u95e8\u6237\u662f\u5426\u4f7f\u7528\u9a8c\u8bc1\u7801 \u914d\u5408\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u503c\u4f7f\u7528
IS_USE_KAPTCHA = false
#\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u503c \u5c06 \u51fa\u73b0\u9a8c\u8bc1\u7801\uff0c\u5982\u679c\u503c\u4e3a0 \u5219\u6c38\u8fdc\u4e0d\u4f1a\u51fa\u73b0\u9a8c\u8bc1\u7801
PWD_TIMES_USE_KAPTCHA = 1
org.quartz.scheduler.instanceName = MyClusteredScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.idleWaitTime = 30000
#============================================================================
# Configure ThreadPool
#============================================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 2
org.quartz.threadPool.threadPriority = 5
org.quartz.scheduler.batchTriggerAcquisitionMaxCount=1000
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
#============================================================================
# Configure JobStore
#============================================================================
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.dataSource = myDS
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.maxMisfiresToHandleAtATime=20
org.quartz.jobStore.clusterCheckinInterval = 20000
#============================================================================
# Configure Datasources
#============================================================================
org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL = jdbc:mysql://rm-bp1wtm7tl51o3j6v0rw.mysql.rds.aliyuncs.com:3306/quartz?useUnicode=true&characterEncoding=utf-8&useSSL=false
org.quartz.dataSource.myDS.user = quartz
org.quartz.dataSource.myDS.password = quartz@6LgSc9!
org.quartz.dataSource.myDS.maxConnections = 100
#============================================================================
# Configure Provider Ip , Port
#============================================================================
# redis cluster
redis.cluster.host = 192.168.1.161:7001,192.168.1.162:7002,192.168.1.163:7003,192.168.1.164:7004,192.168.1.165:7005,192.168.1.166:7006,192.168.1.167:7007,192.168.1.168:7008,192.168.1.169:7009
redis.cluster.timeout = 300000
redis.cluster.maxRedirections = 6
# redis pool
redis.cluster.pool.maxTotal = 20000
redis.cluster.pool.minIdle = 0
redis.cluster.pool.maxIdle = 100
redis.cluster.pool.maxWaitMillis = 30000
redis.cluster.pool.timeBetweenEvictionRunsMillis = 30000
redis.cluster.pool.testOnBorrow = true
\ No newline at end of file
## main
main.access.key.id = LTAIx8FODeVLN3bD
main.access.key.secret = eJbZwTzatZq4SMyDiQeh7NzIHkdAaO
## OSS
oss.region = oss-cn-hangzhou
oss.endpoint = http://oss-cn-hangzhou.aliyuncs.com
file.bucket = whlg-oss-002
file.original.url = http://whlg-oss-002.oss-cn-hangzhou.aliyuncs.com/
oss.region.bj = oss-cn-beijing
oss.endpoint.bj = http://oss-cn-beijing.aliyuncs.com
live.bucket = whlg-oss-livedev
live.original.url = http://whlg-oss-livedev.oss-cn-beijing.aliyuncs.com/
by.bucket = byfile-oss-01
by.original.url = http://byfile-oss-01.oss-cn-hangzhou.aliyuncs.com/
## mts
mts.region = cn-hangzhou
mts.endpoint = mts.cn-hangzhou.aliyuncs.com
pipelineid = a63c988125054b07b1d3bd6e10c327de
mp3TemplateId = d60210d2fd5bfcacce66238142437965
mp4TemplateId = 67745f7eb8b7ca9bcf74d96c2364e6c1
m3u8TemplateId = 283cd916aa504502b3704f3f5a45addc
mts.region.bj = cn-beijing
mts.endpoint.bj = mts.cn-beijing.aliyuncs.com
pipelineid.bj = 515ef1b1ae7543e096134c0fb0105b02
mp3TemplateId.bj = 37211787496c0e2b4c0402661cb5c20a
mp4TemplateId.bj = f4165d42e5eb680c8f919f960f35059c
## cdn
file.domain.name = oss.5rs.me
file.cdn.url = https://oss.5rs.me/
oss.cdn.urls = http://file.chubanyun.me/,http://file.techdc.cn/,https://file.raysyun.com/,http://file.raysgo.com/,https://file.5rs.me/,https://oss.5rs.me/,http://live.chubanyun.me/,https://download.5rs.me/,http://rays-adviser.chubanyun.me/,https://byfile.1wlshu.com
rays.cdn.urls = https://file.5rs.me/,https://oss.5rs.me/
file.cdn.url.download = https://download.5rs.me/
file.cdn.url.live = http://live.chubanyun.me/
file.cdn.url.by = https://byfile.1wlshu.com
\ No newline at end of file
spring:
cloud:
config:
discovery:
enabled: true
service-id: cloud-config
profile: default
label: uat
loadbalancer:
retry:
enabled: true
metrics:
influx:
uri: http://192.168.83.241:8086/write
step: PT10S
db: ${spring.application.name}
enabled: false
zipkin:
base-url: http://192.168.93.57:9393
locator:
discovery:
enabled: true
sleuth:
sampler:
percentage: 1
data:
solr:
zkHost: 192.168.89.13:9983,192.168.89.13:8574
redis:
cluster:
nodes:
- 192.168.92.56:7000
- 192.168.92.56:7001
- 192.168.92.56:7002
- 192.168.92.57:7003
- 192.168.92.57:7004
- 192.168.92.57:7005
- 192.168.92.58:7006
- 192.168.92.58:7007
- 192.168.92.58:7008
eureka:
client:
registry-fetch-interval-seconds: 5
service-url:
defaultZone: http://192.168.92.56:9396/eureka/,http://192.168.92.57:9396/eureka/
instance:
lease-expiration-duration-in-seconds: 15
lease-renewal-interval-in-seconds: 5
prefer-ip-address: true
a-s-g-name: ${spring.application.name}
metadata-map:
cluster: ${spring.application.name}
management:
security:
enabled: false
endpoints:
shutdown:
enabled: true
sensitive: false
ribbon:
ServerListRefreshInterval: 5
OkToRetryOnAllOperations: true
MaxAutoRetriesNextServer: 1
MaxAutoRetries: 0
ReadTimeout: 60000
ConnectTimeout: 60000
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 30000
threadpool:
default:
coreSize: 300
\ No newline at end of file
email.fromEmail=rays_support@vip.163.com
email.password=chubanyun
email.reviewFromEmail=rays_review@vip.163.com
email.reviewPassword=lgsz2017
email.saysEmail=says_support@vip.163.com
email.saysPassword=2017sayschuban
\ No newline at end of file
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u8fd0\u8425)
wechat.perfix.operate.url=http://weixin{0}.chubanyun.me
#\u7ba1\u7406\u53f7\u57df\u540d
wechat.perfix.manage.url=http://wechat{0}.chubanyun.me
#\u670d\u52a1\u5668\u914d\u7f6eurl
wechat.server.perfix.url=http://{0}/wechat/wechat/init/
#\u652f\u4ed8\u56de\u8c03url
wechat.pay.callback.url=http://{0}/wechat/pay/back
#\u6388\u6743\u76ee\u5f55
wechat.pay.authoriz=http://{0}/
#\u57df\u540d
domain.operate.url=weixin{0}.chubanyun.me
#\u57df\u540d(\u7ba1\u7406\u53f7)
domain.manage.url=wachat{0}.chubanyun.me
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u8fd0\u8425)
weixin.perfix.url=weixin{0}
#\u5fae\u4fe1\u94fe\u63a5\u524d\u7f00(\u7ba1\u7406)
wechat.perfix.url=wechat{0}
\ No newline at end of file
# \u672a\u901a\u8fc7
AUDIT_STATE_NOT = -1
# \u5f85\u901a\u8fc7
AUDIT_STATE_WAIT = 0
# \u5ba1\u6838\u901a\u8fc7
AUDIT_STATE_PASS = 1
# \u5ba1\u6838\u62d2\u7edd
AUDIT_STATE_REFUSE = 2
# \u5de5\u7a0b\u8bbf\u95ee\u94fe\u63a5\u524d\u7f00
CONTEXT_PATH = resourcecenter/v1.0
## Dubbo
dubbo.registry.address=192.168.92.56:12181,192.168.92.57:12181,192.168.92.58:12181
#\u6570\u636E\u5E93\u65B9\u8A00
dialectClass=com.pcloud.common.core.mybatis.dialect.MySqlDialect
#Redis\u7F13\u5B58\u670D\u52A1\u5730\u5740
redis.host1=192.168.92.42
redis.host1.port=6379
#solr config
solr.cloud.host=192.168.89.13:8983,192.168.89.13:7574
solr.default.collection=solr-rays-uat
## MQ\u5730\u5740
## modify by songx at 2017-06-01 \u4FEE\u6539MQ\u4E3A\u96C6\u7FA4\u7684\u65B9\u5F0F
#mq.brokerURL=tcp\://192.168.92.12\:61616
mq.brokerURL=failover:(tcp://192.168.92.56:61616,tcp://192.168.92.57:61616,tcp://192.168.92.58:61616)?initialReconnectDelay=100
##\u961F\u5217\u540D\u79F0
queueName.Message=message
##\u4E3B\u9898\u901A\u77E5
topicName.Topic=topic
##\u652F\u4ED8
topicName.Payment=VirtualTopic.PAYMENT
##\u53D1\u8D27
topicName.SendProduct=VirtualTopic.SENDPRODUCT
##\u786E\u8BA4\u6536\u8D27
topicName.ConfirmOrder=VirtualTopic.CONFIRMORDER
##\u5B8C\u6210\u8BA2\u5355
topicName.FinishOrder=VirtualTopic.FINISHORDER
##\u9000\u6B3E
topicName.Refund=VirtualTopic.REFUND
##\u540C\u610F\u9000\u8D27
topicName.ApplyRefund=VirtualTopic.APPLYREFUNDGOODS
##\u9000\u8D27
topicName.RefundProduct=VirtualTopic.REFUNDPRODUCT
##\u8D44\u6E90\u5220\u9664
topicName.ResourceDelete=VirtualTopic.RESOURCEDELETE
##\u626B\u7801\u8BB0\u5F55
topicName.ScanRecord=VirtualTopic.SCANRECORD
##
topicName.Recharge=VirtualTopic.RECHARGE
##\u6253\u8D4F
topicName.Tip=VirtualTopic.TIP
queueName.User=bm.add.user
topicName.Permission=VirtualTopic.PERMISSION
##\u5F53\u4E8B\u4EBA\u6CE8\u518C
topicName.RegisterParty=VirtualTopic.REGISTERPARTY
##\u53D6\u6D88\u8BA2\u5355
topicName.CancelOrder=VirtualTopic.CANCELORDER
##\u5546\u6237\u7AEF\u5FEB\u9012100\u56DE\u8C03\u63A5\u53E3
express.Hudren=http://rm.raysyun.com/tradecenter/v1.0/expressHundred/callback
##\u5FAE\u543C\u76F4\u64AD\u56DE\u8C03
live.check=http://rm.raysyun.com/liveapp/v1.0/live/check
##\u79D8\u94A5\u5916\u5C42\u5730\u5740
key.Path=/home/pcloud/pcloud/service/key/
##\u79D8\u94A5\u540D\u79F0
key.Name=/apiclient_cert.p12
##\u5E73\u53F0\u7AEFid
pcloud.Id=0L
##
url.short=https://rm.raysyun.com/commoncenter/v1.0/url/sendRedirect
##\u7F16\u521B\u8D5B\u62A5\u540D
appId = 1132
channelId = 1425
agentId= 1425
says_agent_Id = 1000402
xcx_official_account_id = 65741
raysTaskBetaAgents = 12829
##\u8C03\u7528rays\u63A5\u53E3\u7684\u5F00\u5173
IS_LISTEN_TRADE = 0
liveAppDownloadUrlForAndroid=https://oss.5rs.me/oss/uploadfe/png/3ad7a09eea4c1c8b5642c036ccca927a.png
liveAppDownLoadUrlForApple=https://oss.5rs.me/oss/uploadfe/png/3ad7a09eea4c1c8b5642c036ccca927a.png
uedLiveRequestUrl=http://bluesea.chubanyun.net
sms.signName=\u73B0\u4EE3\u7EB8\u4E66
liveRunEnvironment = uat_
uedThirdPartyOrderUrl=http://deveapi.chubanyun.net
## \u7CFB\u7EDF\u73AF\u5883
system.env = uat
\ No newline at end of file
#\u7528\u6237\u53d8\u91cf
#\u662f\u5426\u5f00\u53d1\u72b6\u6001
IS_DEV_STATUS=true
#\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u9650\u5236
PWD_ERROR_LIMIT_TIMES=5
#\u5bc6\u7801\u9519\u8bef\u65f6\u95f4\u9650\u5236
PWD_ERROR_LIMIT_TIME=30
#\u5bc6\u7801\u4fee\u6539\u9650\u5236\u65f6\u95f4
PWD_EDIT_LIMIT_TIME=3
#\u95e8\u6237\u662f\u5426\u4f7f\u7528\u9a8c\u8bc1\u7801 \u914d\u5408\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u503c\u4f7f\u7528
IS_USE_KAPTCHA = false
#\u5bc6\u7801\u9519\u8bef\u6b21\u6570\u503c \u5c06 \u51fa\u73b0\u9a8c\u8bc1\u7801\uff0c\u5982\u679c\u503c\u4e3a0 \u5219\u6c38\u8fdc\u4e0d\u4f1a\u51fa\u73b0\u9a8c\u8bc1\u7801
PWD_TIMES_USE_KAPTCHA = 1
org.quartz.scheduler.instanceName = MyClusteredScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.idleWaitTime = 30000
#============================================================================
# Configure ThreadPool
#============================================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 2
org.quartz.threadPool.threadPriority = 5
org.quartz.scheduler.batchTriggerAcquisitionMaxCount=1000
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
#============================================================================
# Configure JobStore
#============================================================================
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.dataSource = myDS
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.maxMisfiresToHandleAtATime=20
org.quartz.jobStore.clusterCheckinInterval = 20000
#============================================================================
# Configure Datasources
#============================================================================
org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL = jdbc:mysql://192.168.92.42:3306/quartz?useUnicode=true&characterEncoding=utf-8&useSSL=false
org.quartz.dataSource.myDS.user = quartz
org.quartz.dataSource.myDS.password = quartz123
org.quartz.dataSource.myDS.maxConnections = 100
#============================================================================
# Configure Provider Ip , Port
#============================================================================
# redis cluster
redis.cluster.host = 192.168.92.56:7000,192.168.92.56:7001,192.168.92.56:7002,192.168.92.57:7003,192.168.92.57:7004,192.168.92.57:7005,192.168.92.58:7006,192.168.92.58:7007,192.168.92.58:7008
redis.cluster.timeout = 300000
redis.cluster.maxRedirections = 6
# redis pool
redis.cluster.pool.maxTotal = 1000
redis.cluster.pool.minIdle = 0
redis.cluster.pool.maxIdle = 50
redis.cluster.pool.maxWaitMillis = 30000
redis.cluster.pool.timeBetweenEvictionRunsMillis = 30000
redis.cluster.pool.testOnBorrow = true
\ No newline at end of file
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pcloud.common</groupId>
<artifactId>pcloud-common-parent</artifactId>
<version>2.1.0-RELEASE</version>
</parent>
<artifactId>pcloud-common-core</artifactId>
<packaging>jar</packaging>
<version>${pcloud-common-core.version}</version>
<name>pcloud-common-core</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.pcloud.common</groupId>
<artifactId>pcloud-common</artifactId>
<version>${pcloud-common.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Database connect Begin -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<!-- Database connect End -->
<!-- Mysql Driver Begin -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Mysql Driver End -->
<!-- ActiveMq Begin -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
</dependency>
<!-- ActiveMq End -->
<!-- Jackson Begin -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
<!-- Jackson End -->
<!-- Redis Begin -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<!-- Redis End -->
</dependencies>
</project>
package com.pcloud.common.core.aspect;
import java.util.Arrays;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import com.alibaba.fastjson.JSON;
/**
*
*
* @author:songx
* @date:2018年1月23日,上午11:34:42
*/
@Aspect
@Configuration
public class BaseBizAspect {
/**
*
*/
private final static Logger LOGGER = LoggerFactory.getLogger(BaseBizAspect.class);
@Pointcut("execution(* com.pcloud.*.*.biz.impl.*Impl.*(..))")
public void bizPoint() {
}
/**
* 方法执行前以后执行,暂时不提供使用,日志会比较多
*
* @param joinPoint
*/
@Before("bizPoint()")
public void doBefore(JoinPoint joinPoint) {
boolean bool = false;
if (bool)
LOGGER.info("【Biz Aspect】Before.[signature]=" + joinPoint.getSignature().toString() + ",[args]="
+ Arrays.toString(joinPoint.getArgs()));
}
/**
* 方法执行完以后执行,暂时不提供使用,日志会比较多
*
* @param object
*/
@AfterReturning(pointcut = "bizPoint()", returning = "result")
public void doAfterReturn(JoinPoint joinPoint, Object result) {
boolean bool = false;
if (bool)
LOGGER.info("【Biz Aspect】AfterReturning.[signature]=" + joinPoint.getSignature().toString() + ",[result]="
+ JSON.toJSONString(result));
}
}
/**
*
*/
package com.pcloud.common.core.aspect;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/**
*
* @author:songx
* @date:2018年4月26日,下午2:26:06
*/
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ParamLog {
/**
* 默认值
*
* @return
*/
@AliasFor("description")
String value() default "";
/**
* 是否输出入参
*
* @return
*/
boolean isBefore() default true;
/**
* 是否输出返回值
*
* @return
*/
boolean isAfterReturn() default true;
/**
* 描述
*
* @return
*/
@AliasFor("value")
String description() default "";
}
/**
*
*/
package com.pcloud.common.core.aspect;
import java.lang.reflect.Method;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import com.alibaba.fastjson.JSON;
import com.pcloud.common.utils.string.StringUtil;
/**
*
* @author:songx
* @date:2018年4月26日,下午2:32:36
*/
@Aspect
@Configuration
public class ParamLogAspect {
/**
*
*/
private final static Logger LOGGER = LoggerFactory.getLogger(ParamLogAspect.class);
@Pointcut("execution(* com.pcloud..*(..))")
public void bizPoint() {
}
/**
* 方法执行前以后执行
*
* @param joinPoint
*/
@Before("bizPoint()")
public void doBefore(JoinPoint joinPoint) {
ParamLog paramLog = checkAnnotation(joinPoint);
if (paramLog == null) {
return;
}
Signature signature = joinPoint.getSignature();
String methodName = signature.getName();
String description = paramLog.description();
StringBuffer msg = new StringBuffer("【" + methodName + " before】");
if (StringUtil.isEmpty(description)) {
msg.append(joinPoint.getSignature().toString());
} else {
msg.append(description);
}
if (!paramLog.isBefore()) {
LOGGER.info(msg.toString());
} else {
String argsJson = JSON.toJSONString(joinPoint.getArgs());
LOGGER.info(msg.append(",[Args]=").append(argsJson).toString());
}
}
/**
* 方法执行完以后执行
*
* @param object
*/
@AfterReturning(pointcut = "bizPoint()", returning = "result")
public void doAfterReturn(JoinPoint joinPoint, Object result) {
ParamLog paramLog = checkAnnotation(joinPoint);
if (paramLog == null) {
return;
}
Signature signature = joinPoint.getSignature();
String methodName = signature.getName();
String description = paramLog.description();
StringBuffer msg = new StringBuffer("【" + methodName + " afterReturn】");
if (StringUtil.isEmpty(description)) {
msg.append(joinPoint.getSignature().toString());
} else {
msg.append(description);
}
if (!paramLog.isAfterReturn()) {
LOGGER.info(msg.toString());
} else {
String resultJson = JSON.toJSONString(result);
LOGGER.info(msg.append(",[result]=").append(resultJson).toString());
}
}
private static ParamLog checkAnnotation(JoinPoint joinPoint) {
// 获取方法签名
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
// java reflect相关类,通过反射得到注解
Method method = signature.getMethod();
if (!method.isAnnotationPresent(ParamLog.class)) {
return null;
}
return method.getAnnotation(ParamLog.class);
}
}
package com.pcloud.common.core.biz;
import java.util.List;
import java.util.Map;
import com.pcloud.common.entity.BaseEntity;
import com.pcloud.common.page.PageBean;
import com.pcloud.common.page.PageParam;
/**
* @描述:基类Biz接口
* @作者:DiSeng.H
* @创建时间:2016年3月11日,下午3:35:24
* @版本:1.0
*/
public interface BaseBiz<T extends BaseEntity> {
/**
* 根据实体对象新增记录.
*
* @param entity
* .
* @return id .
*/
long create(T entity);
/**
* 批量保存对象.
*
* @param entity
* .
* @return id .
*/
long create(List<T> list);
/**
* 更新实体对应的记录.
*
* @param entity
* .
* @return
*/
long update(T entity);
/**
* 批量更新对象.
*
* @param entity
* .
* @return id .
*/
long update(List<T> list);
/**
* 根据ID删除记录.
*
* @param id
* .
* @return
*/
long deleteById(long id);
/**
* 根据ID查找记录.
*
* @param id
* .
* @return entity .
*/
T getById(long id);
/**
* 分页查询 .
*
* @param pageParam
* 分页参数.
* @param paramMap
* 业务条件查询参数.
* @return
*/
PageBean listPage(PageParam pageParam, Map<String, Object> paramMap);
PageBean listPage(PageParam pageParam, Map<String, Object> paramMap, String sqlId);
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回集合
*/
List<T> listBy(Map<String, Object> paramMap);
List<Object> listBy(Map<String, Object> paramMap, String sqlId);
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回实体
*/
T getBy(Map<String, Object> paramMap);
Object getBy(Map<String, Object> paramMap, String sqlId);
/**
* 根据序列名称获取下一个值
*
* @return
*/
String getSeqNextValue(String seqName);
}
package com.pcloud.common.core.biz;
import java.util.List;
import java.util.Map;
import com.pcloud.common.core.dao.BaseDao;
import com.pcloud.common.entity.BaseEntity;
import com.pcloud.common.page.PageBean;
import com.pcloud.common.page.PageParam;
/**
* @描述:基类Biz接口实现类
* @作者:DiSeng.H
* @创建时间:2016年3月11日,下午4:01:18
* @版本:1.0
*/
public abstract class BaseBizImpl<T extends BaseEntity> implements BaseBiz<T> {
protected abstract BaseDao<T> getDao();
public long create(T entity) {
return getDao().insert(entity);
}
public long create(List<T> list) {
return getDao().insert(list);
}
public long update(T entity) {
return getDao().update(entity);
}
public long update(List<T> list) {
return getDao().update(list);
}
public T getById(long id) {
return this.getDao().getById(id);
}
/**
* 根据ID删除记录.
*
* @param id
* .
* @return
*/
public long deleteById(long id) {
return this.getDao().deleteById(id);
}
/**
* 分页查询 .
*
* @param pageParam
* 分页参数.
* @param paramMap
* 业务条件查询参数.
* @return
*/
public PageBean listPage(PageParam pageParam, Map<String, Object> paramMap) {
return this.getDao().listPage(pageParam, paramMap);
}
public PageBean listPage(PageParam pageParam, Map<String, Object> paramMap, String sqlId) {
return this.getDao().listPage(pageParam, paramMap, sqlId);
}
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回集合
*/
public List<T> listBy(Map<String, Object> paramMap) {
return this.getDao().listBy(paramMap);
}
public List<Object> listBy(Map<String, Object> paramMap, String sqlId) {
return this.getDao().listBy(paramMap, sqlId);
}
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回实体
*/
public T getBy(Map<String, Object> paramMap) {
return this.getDao().getBy(paramMap);
}
public Object getBy(Map<String, Object> paramMap, String sqlId) {
return this.getDao().getBy(paramMap, sqlId);
}
/**
* 根据序列名称获取下一个值
*
* @return
*/
public String getSeqNextValue(String seqName) {
return this.getDao().getSeqNextValue(seqName);
}
}
/**
*
*/
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.ConvertQueueDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述:
*
* @作者:songx
* @创建时间:2017年2月27日,下午2:48:49
* @版本:1.0
*/
public interface ConvertQueueBiz {
/**
* 发送消息
*
* @param messageQueueDto
*/
public void sendConvertFileQueue(ConvertQueueDto convertQueueDto) throws BizException;
}
/**
*
*/
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import com.pcloud.common.core.dto.ConvertQueueDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述:
* @作者:songx
* @创建时间:2017年2月27日,下午2:49:38
* @版本:1.0
*/
@Service("convertQueueBiz")
public class ConvertQueueBizImpl implements ConvertQueueBiz {
/**
*
*/
private final static Logger logger=LoggerFactory.getLogger(ConvertQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsConvertTemplate")
private JmsTemplate jmsConvertTemplate;
/**
*
*/
@Override
public void sendConvertFileQueue(ConvertQueueDto convertFileQueueDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(convertFileQueueDto);
}
};
try {
jmsConvertTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage(), e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + convertFileQueueDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.ExapiMessageDto;
public interface ExapiQueueBiz {
void sendMessageQueue(ExapiMessageDto exapiMessageDto);
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.ExapiMessageDto;
import com.pcloud.common.exceptions.BizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
@Component("exapiQueueBiz")
public class ExapiQueueBizImpl implements ExapiQueueBiz{
private static final Logger LOGGER = LoggerFactory.getLogger(ExapiQueueBiz.class);
@Autowired(required = false)
@Qualifier("jmsExapiTemplate")
private JmsTemplate jmsExapiTemplate;
@Override
public void sendMessageQueue(ExapiMessageDto exapiMessageDto) {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(exapiMessageDto);
}
};
try {
jmsExapiTemplate.send(messageCreator);
} catch (Exception e) {
LOGGER.error("发送失败," + e.getMessage() + "," + exapiMessageDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
LOGGER.info("发送成功," + exapiMessageDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.ConvertQueueDto;
import com.pcloud.common.core.dto.FrontEventDto;
import com.pcloud.common.exceptions.BizException;
/**
* @author Shichunshan
* @date: Created in 2018/4/17 11:09
* @description:
*/
public interface FrontEventBiz {
/**
* 发送事件消息
*
* @param frontEventDto
*/
public void sendFrontEventQueue(FrontEventDto frontEventDto) throws BizException;
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.FrontEventDto;
import com.pcloud.common.exceptions.BizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
/**
* @author Shichunshan
* @date: Created in 2018/4/17 11:09
* @description:
*/
@Component("frontEventBiz")
public class FrontEventBizImpl implements FrontEventBiz{
/**
*
*/
private final static Logger logger= LoggerFactory.getLogger(ConvertQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsFrontEventTemplate")
private JmsTemplate jmsFrontEventTemplate;
/**
* 发送事件消息
*
* @param frontEventDto
*/
@Override
public void sendFrontEventQueue(FrontEventDto frontEventDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(frontEventDto);
}
};
try {
jmsFrontEventTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + frontEventDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + frontEventDto);
}
/**
* 生成(事件ID/漏斗ID)前缀
*
* @param targetClass
* @param targetType
*/
public static String generatePrefix(String targetClass,String targetType){
StringBuilder prefix = new StringBuilder();
prefix.append(targetClass.toLowerCase()+"_");
prefix.append(targetType.toLowerCase()+"_");
return prefix.toString();
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.FundMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @description 基金资源变更记录消息队列接口
* @author PENG
* @date 2017年10月18日 下午2:10:45
* @version 1.0
*/
public interface FundQueueBiz {
void sendFundMessage(FundMessageDto fundMessageDto) throws BizException;
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import com.pcloud.common.core.dto.FundMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @description 基金资源变更记录消息队列实现类
* @author PENG
* @date 2017年10月18日 下午2:11:52
* @version 1.0
*/
@Component("fundQueueBiz")
public class FundQueueBizImpl implements FundQueueBiz {
/**
* logger
*/
private final static Logger logger = LoggerFactory.getLogger(FundQueueBizImpl.class);
@Autowired(required = false)
@Qualifier("jmsFundTemplate")
private JmsTemplate jmsFundTemplate;
/**
* 发送队列
*/
@Override
public void sendFundMessage(FundMessageDto fundMessageDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(fundMessageDto);
}
};
try {
jmsFundTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + fundMessageDto.toString(), e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + fundMessageDto.toString());
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.constant.FunnelFlowStruct.FlowNode;
import com.pcloud.common.core.constant.FunnelFlowStruct.TargetRoleType;
import com.pcloud.common.core.constant.FunnelFlowStruct.TargetType;
import com.pcloud.common.core.dto.FunnelFlowQueueDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 用户漏斗流程消息队列接口
* @作者: shuyh
* @创建时间: 2017年5月23日
* @版本:1.0
*/
public interface FunnelFlowQueueBiz {
/**
* 发送消息
* @param FunnelFlowQueueDto
*/
public void sendMessageQueue(FunnelFlowQueueDto FunnelFlowQueueDto) throws BizException;
/**
* 发送消息
* @param targetType 如:账户、商品、应用
* @param targetRoleType 如:MERCHANT/ADVISER/CHANNEL/OFFICIAL_ACCOUNTS/AGENT
* @param flowNode 如:流程节点
*/
void sendMessageQueue(TargetType targetType, TargetRoleType targetRoleType, FlowNode flowNode, String ip, String userAgent) throws BizException;
/**
* 发送消息
* @param targetType 如:账户、商品、应用
* @param targetId 如:账户ID、商品ID、应用ID
* @param targetRoleType 如:MERCHANT/ADVISER/CHANNEL/OFFICIAL_ACCOUNTS/AGENT
* @param targetRoleId 如:MERCHANTID
* @param flowNode 如:流程节点
*/
void sendMessageQueue(TargetType targetType, Long targetId, TargetRoleType targetRoleType,
Long targetRoleId, FlowNode flowNode) throws BizException;
/**
* 发送消息
* @param targetType 如:账户、商品、应用
* @param targetId 如:账户ID、商品ID、应用ID
* @param subtypeCode 如:读者圈(GROUP)
* @param targetRoleType 如:MERCHANT/ADVISER/CHANNEL/OFFICIAL_ACCOUNTS/AGENT
* @param targetRoleId 如:MERCHANTID
* @param flowNode 如:流程节点
*/
void sendMessageQueue(TargetType targetType, Long targetId,
String subtypeCode, TargetRoleType targetRoleType,
Long targetRoleId, FlowNode flowNode) throws BizException;
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.apache.activemq.command.ActiveMQQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import com.pcloud.common.core.constant.FunnelFlowStruct.FlowNode;
import com.pcloud.common.core.constant.FunnelFlowStruct.TargetRoleType;
import com.pcloud.common.core.constant.FunnelFlowStruct.TargetType;
import com.pcloud.common.core.dto.FunnelFlowQueueDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 发送模板消息队列实现类
* @作者: shuyh
* @创建时间: 2018年1月9日
* @版本:1.0
*/
@Component("funnelFlowQueueBiz")
public class FunnelFlowQueueBizImpl implements FunnelFlowQueueBiz{
/**
*
*/
private final static Logger logger=LoggerFactory.getLogger(FunnelFlowQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsFunnelFlowTemplate")
private JmsTemplate jmsFunnelFlowTemplate;
@Autowired(required=false)
@Qualifier("funnelFlowQueue")
private ActiveMQQueue funnelFlowQueue;
/**
* 发送队列
*/
@Override
public void sendMessageQueue(FunnelFlowQueueDto funnelFlowQueueDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(funnelFlowQueueDto);
}
};
try {
jmsFunnelFlowTemplate.send(funnelFlowQueue, messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + funnelFlowQueueDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + funnelFlowQueueDto);
}
/**
* 发送队列
*/
@Override
public void sendMessageQueue(TargetType targetType, TargetRoleType targetRoleType, FlowNode flowNode, String ip, String userAgent) throws BizException {
FunnelFlowQueueDto funnelFlowQueueDto = new FunnelFlowQueueDto(targetType, targetRoleType, flowNode, ip, userAgent);
sendMessageQueue(funnelFlowQueueDto);
}
/**
* 发送队列
*/
@Override
public void sendMessageQueue(TargetType targetType, Long targetId, TargetRoleType targetRoleType, Long targetRoleId, FlowNode flowNode) throws BizException {
FunnelFlowQueueDto funnelFlowQueueDto = new FunnelFlowQueueDto(targetType, targetId, targetRoleType, targetRoleId, flowNode);
sendMessageQueue(funnelFlowQueueDto);
}
/**
* 发送队列
*/
@Override
public void sendMessageQueue(TargetType targetType, Long targetId, String subtypeCode, TargetRoleType targetRoleType, Long targetRoleId, FlowNode flowNode) throws BizException {
FunnelFlowQueueDto funnelFlowQueueDto = new FunnelFlowQueueDto(targetType, targetId, subtypeCode, targetRoleType, targetRoleId, flowNode);
sendMessageQueue(funnelFlowQueueDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.LabelUsedMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 标签使用队列接口
* @作者: shuyh
* @创建时间: 2017年5月23日
* @版本:1.0
*/
public interface LabelUsedQueueBiz {
/**
* 发送消息
* @param labelUsedMessageDto
*/
public void sendMessageQueue(LabelUsedMessageDto labelUsedMessageDto) throws BizException;
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import com.pcloud.common.core.dto.LabelUsedMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 标签使用队列实现类
* @作者: shuyh
* @创建时间: 2017年5月23日
* @版本:1.0
*/
@Component("labelUsedQueueBiz")
public class LabelUsedQueueBizImpl implements LabelUsedQueueBiz{
/**
*
*/
private final static Logger logger = LoggerFactory.getLogger(LabelUsedQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsLabelUsedTemplate")
private JmsTemplate jmsLabelUsedTemplate;
/**
* 发送队列
*/
@Override
public void sendMessageQueue(LabelUsedMessageDto labelUsedMessageDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(labelUsedMessageDto);
}
};
try {
jmsLabelUsedTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + labelUsedMessageDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + labelUsedMessageDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.DynamicDto;
/**
* @描述:
* @作者:lucas
* @创建时间:2017年12月14日,15:57
* @版本:1.0
*/
public interface MerchantDynamicQueueBiz {
void send(DynamicDto dynamicDto);
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.DynamicDto;
import com.pcloud.common.exceptions.BizException;
import org.apache.activemq.command.ActiveMQQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
/**
* @描述:
* @作者:lucas
* @创建时间:2017年12月14日,15:58
* @版本:1.0
*/
@Component("merchantDynamicQueueBiz")
public class MerchantDynamicQueueBizImpl implements MerchantDynamicQueueBiz {
private final static Logger logger= LoggerFactory.getLogger(MerchantDynamicQueueBizImpl.class);
/**
* 消息模板
*/
@Autowired(required=false)
@Qualifier("jmsDynamicTemplate")
private JmsTemplate jmsDynamicTemplate;
@Override
public void send(DynamicDto dynamicDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(dynamicDto);
}
};
try {
jmsDynamicTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败,"+e.getMessage()+","+dynamicDto,e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功,"+dynamicDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.SendEmailDto;
import com.pcloud.common.core.dto.SendMessageDto;
import com.pcloud.common.core.dto.SendNotifyDto;
/**
*
* @描述:邮件业务
* @作者:shichunshan
* @创建时间:2016年6月24日,下午2:17:36
* @版本:1.0
*/
public interface MessageBiz {
/**
* 发邮件
*
* @author zhuyajie
* @date 2016年11月29日 下午5:55:43
* @param SendEmailDto
*/
void sendEmail(SendEmailDto sendEmailDto);
/**
* 发站内信
*
* @author zhuyajie
* @date 2016年11月26日 上午11:52:04
* @param sendNotifyDto
*/
void sendLetter(SendNotifyDto sendNotifyDto);
/**
* 发短信
*
* @author zhuyajie
* @date 2016年11月29日 下午5:55:56
* @param sendSMSDto
*/
void sendSMS(SendMessageDto smsParam);
}
package com.pcloud.common.core.biz;
import java.io.IOException;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import com.pcloud.common.core.dto.SendEmailDto;
import com.pcloud.common.core.dto.SendMessageDto;
import com.pcloud.common.core.dto.SendNotifyDto;
import com.pcloud.common.utils.mq.MqMessage;
import com.pcloud.common.utils.mq.MqMessageTypeEnum;
/**
*
* @描述:邮件业务实现
* @作者:shichunshan
* @创建时间:2016年6月24日,下午2:19:27
* @版本:1.0
*/
@Component("mailBiz")
public class MessageBizImpl implements MessageBiz{
private final static Logger logger=LoggerFactory.getLogger(MessageBizImpl.class);
/**
* 消息模板
*/
@Autowired(required = false)
@Qualifier("jmsMessageTemplate")
private JmsTemplate jmsMessageTemplate;
@Override
public void sendEmail(SendEmailDto sendEmailDto) {
MessageCreator messageCreator = new MessageCreator() {
@Override
public Message createMessage(Session session) throws JMSException {
MqMessage mqMessage = null;
try {
mqMessage = formateMessage(sendEmailDto);
logger.info("mqMessage+++++++++++" + mqMessage);
} catch (IOException e) {
logger.error("邮件发送失败," + sendEmailDto);
return null;
}
return session.createObjectMessage(mqMessage);
}
};
try {
jmsMessageTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("邮件发送失败," + e.getMessage() + "," + sendEmailDto, e);
return;
}
logger.info("邮件发送成功," + sendEmailDto);
}
/**
* 格式化邮件内容
*
* @param mailParam
* 邮件参数
* @return 队列消息
* @throws IOException
* 序列化为json错误
*/
private MqMessage formateMessage(SendEmailDto sendEmailDto) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
String content = objectMapper.writeValueAsString(sendEmailDto);
return new MqMessage(MqMessageTypeEnum.EMAIL, content);
}
@Override
public void sendLetter(SendNotifyDto sendNotifyDto) {
MessageCreator messageCreator = new MessageCreator() {
@Override
public Message createMessage(Session session) throws JMSException {
MqMessage mqMessage = null;
try {
mqMessage = formateMessage(sendNotifyDto);
logger.info("mqMessage+++++++++++" + mqMessage);
} catch (IOException e) {
logger.error("站内信发送失败," + sendNotifyDto);
return null;
}
return session.createObjectMessage(mqMessage);
}
};
try {
jmsMessageTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("站内信发送失败," + e.getMessage() + "," + sendNotifyDto, e);
return;
}
logger.info("站内信发送成功," + sendNotifyDto);
}
/**
* 格式化站内信内容
*
* @param sendNotifyDto
* 站内信参数
* @return 队列消息
* @throws IOException
* 序列化为json错误
*/
private MqMessage formateMessage(SendNotifyDto sendNotifyDto) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
String content = objectMapper.writeValueAsString(sendNotifyDto);
return new MqMessage(MqMessageTypeEnum.LETTER, content);
}
@Override
public void sendSMS(SendMessageDto smsParam) {
MessageCreator messageCreator = new MessageCreator() {
@Override
public Message createMessage(Session session) throws JMSException {
MqMessage mqMessage = null;
try {
mqMessage = formateMessage(smsParam);
logger.info("mqMessage+++++++++++" + mqMessage);
} catch (IOException e) {
logger.error("短信发送失败," + smsParam);
return null;
}
return session.createObjectMessage(mqMessage);
}
};
try {
jmsMessageTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("短信发送失败," + e.getMessage() + "," + smsParam, e);
return;
}
logger.info("短信发送成功," + smsParam);
}
/**
* 格式化内容
*
* @param sendSMSDto
* 邮件参数
* @return 队列消息
* @throws IOException
* 序列化为json错误
*/
private MqMessage formateMessage(SendMessageDto smsParam) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
String content = objectMapper.writeValueAsString(smsParam);
return new MqMessage(MqMessageTypeEnum.SHORT_MESSAGE, content);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.OperationLogDto;
/**
*
* @描述:日志队列发送
* @作者:zhuyajie
* @创建时间:2016年11月4日 下午4:29:11
* @版本:1.0
*/
public interface OperationLogQueueBiz {
void send(OperationLogDto operationLogDto);
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import com.pcloud.common.core.dto.OperationLogDto;
import com.pcloud.common.exceptions.BizException;
@Service("operationLogQueueBiz")
public class OperationLogQueueBizImpl implements OperationLogQueueBiz {
/**
*
*/
private final static Logger logger = LoggerFactory.getLogger(OperationLogQueueBizImpl.class);
/**
* 消息模板
*/
@Autowired(required = false)
@Qualifier("jmsLogTemplate")
private JmsTemplate jmsLogTemplate;
@Override
public void send(OperationLogDto operationLog) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(operationLog);
}
};
try {
jmsLogTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + operationLog, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + operationLog);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.PromotionTaskDto;
/**
* @Description:促销任务队列
* @Author:lixg
* @Date:2018/6/12
* @Version:1.0
*/
public interface PromotionTaskQueueBiz {
void send(PromotionTaskDto promotionTaskDto);
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.PromotionTaskDto;
import com.pcloud.common.exceptions.BizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
@Service("promotionTaskQueueBiz")
public class PromotionTaskQueueBizImpl implements PromotionTaskQueueBiz {
/**
*
*/
private final static Logger logger = LoggerFactory.getLogger(PromotionTaskQueueBizImpl.class);
/**
* 消息模板
*/
@Autowired(required = false)
@Qualifier("jmsPromotionTaskTemplate")
private JmsTemplate jmsPromotionTaskTemplate;
@Override
public void send(PromotionTaskDto promotionTaskDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(promotionTaskDto);
}
};
try {
jmsPromotionTaskTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + promotionTaskDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + promotionTaskDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.PromotionTerminateDto;
/**
* @Description:促销终止队列
* @Author:lixg
* @Date:2018/6/12
* @Version:1.0
*/
public interface PromotionTerminateQueueBiz {
void send(PromotionTerminateDto promotionTerminateDto);
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.PromotionTerminateDto;
import com.pcloud.common.exceptions.BizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
@Service("promotionTerminateQueueBiz")
public class PromotionTerminateQueueBizImpl implements PromotionTerminateQueueBiz {
/**
*
*/
private final static Logger logger = LoggerFactory.getLogger(PromotionTerminateQueueBizImpl.class);
/**
* 消息模板
*/
@Autowired(required = false)
@Qualifier("jmsPromotionTerminateTemplate")
private JmsTemplate jmsPromotionTerminateTemplate;
@Override
public void send(PromotionTerminateDto promotionTerminateDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(promotionTerminateDto);
}
};
try {
jmsPromotionTerminateTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + promotionTerminateDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + promotionTerminateDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.TemplateMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
*
* @描述:发送模板消息队列接口
* @作者:songx
* @创建时间:2016年11月23日,下午4:54:24
* @版本:1.0
*/
public interface TemplateQueueBiz {
/**
* 发送消息
*
* @param messageQueueDto
*/
public void sendMessageQueue(TemplateMessageDto templateMessageDto) throws BizException;
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import com.pcloud.common.core.dto.TemplateMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
*
* @描述:发送模板消息队列实现类
* @作者:songx
* @创建时间:2016年11月23日,下午4:53:43
* @版本:1.0
*/
@Component("templateQueueBiz")
public class TemplateQueueBizImpl implements TemplateQueueBiz {
/**
*
*/
private final static Logger logger=LoggerFactory.getLogger(TemplateQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsTemplateTemplate")
private JmsTemplate jmsTemplateTemplate;
/**
* 发送队列
*/
@Override
public void sendMessageQueue(TemplateMessageDto templateMessageDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(templateMessageDto);
}
};
try {
jmsTemplateTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + templateMessageDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + templateMessageDto);
}
}
/**
*
*/
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.TranscodeMQDTO;
import com.pcloud.common.exceptions.BizException;
/**
*
*
* @author:songx
* @date:2018年5月17日,下午4:26:54
*/
public interface TranscodeQueueBiz {
/**
* 发送消息
*
* @param messageQueueDto
*/
void sendTranscodeQueue(TranscodeMQDTO transcodeMQDTO) throws BizException;
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.UserActionMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 用户行为动作消息队列接口
* @作者: shuyh
* @创建时间: 2017年5月23日
* @版本:1.0
*/
public interface UserActionQueueBiz {
/**
* 发送消息
* @param userActionMessageDto
*/
public void sendMessageQueue(UserActionMessageDto userActionMessageDto) throws BizException;
}
package com.pcloud.common.core.biz;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import com.pcloud.common.core.dto.UserActionMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* @描述: 发送模板消息队列实现类
* @作者: shuyh
* @创建时间: 2017年5月23日
* @版本:1.0
*/
@Service("userActionQueueBiz")
public class UserActionQueueBizImpl implements UserActionQueueBiz{
/**
*
*/
private final static Logger logger=LoggerFactory.getLogger(UserActionQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsUserActionTemplate")
private JmsTemplate jmsUserActionTemplate;
/**
* 发送队列
*/
@Override
public void sendMessageQueue(UserActionMessageDto userActionMessageDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(userActionMessageDto);
}
};
try {
jmsUserActionTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + userActionMessageDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + userActionMessageDto);
}
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.WeektaskMessageDto;
import com.pcloud.common.exceptions.BizException;
/**
* 编辑周任务队列
*
* @author huanghui
* @create 2017-09-21 09:31
**/
public interface WeektaskQueueBiz {
void sendMessageQueue(WeektaskMessageDto weektaskMessageDto) throws BizException;
}
package com.pcloud.common.core.biz;
import com.pcloud.common.core.dto.WeektaskMessageDto;
import com.pcloud.common.exceptions.BizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
/**
* 编辑周任务队列实现
*
* @author huanghui
* @create 2017-09-21 09:33
**/
@Component("weektaskQueueBiz")
public class WeektaskQueueBizImpl implements WeektaskQueueBiz{
private final static Logger logger= LoggerFactory.getLogger(WeektaskQueueBizImpl.class);
@Autowired(required=false)
@Qualifier("jmsWeektaskTemplate")
private JmsTemplate jmsWeekstaskTemplate;
// @Autowired(required= false)
// @Qualifier("raystask")
// private ActiveMQQueue templateQueue;
/**
* 发送队列
*/
@Override
public void sendMessageQueue(WeektaskMessageDto weektaskMessageDto) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(weektaskMessageDto);
}
};
try {
jmsWeekstaskTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("发送失败," + e.getMessage() + "," + weektaskMessageDto, e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("发送成功," + weektaskMessageDto);
}
}
/**
*
*/
package com.pcloud.common.core.biz.impl;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import com.pcloud.common.core.biz.TranscodeQueueBiz;
import com.pcloud.common.core.dto.TranscodeMQDTO;
import com.pcloud.common.exceptions.BizException;
/**
*
*
* @author:songx
* @date:2018年5月17日,下午4:19:54
*/
@Service("transcodeQueueBiz")
public class TranscodeQueueBizImpl implements TranscodeQueueBiz {
/**
*
*/
private final static Logger logger = LoggerFactory.getLogger(TranscodeQueueBizImpl.class);
@Autowired(required = false)
@Qualifier("jmsTranscodeTemplate")
private JmsTemplate jmsTranscodeTemplate;
/**
*
*/
@Override
public void sendTranscodeQueue(TranscodeMQDTO transcodeMQDTO) throws BizException {
MessageCreator messageCreator = new MessageCreator() {
@Override
public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(transcodeMQDTO);
}
};
try {
jmsTranscodeTemplate.send(messageCreator);
} catch (Exception e) {
logger.error("【文件转码】MQ发送失败:" + e.getMessage(), e);
throw BizException.SEND_QUEUE_FAIL;
}
logger.info("【文件转码】MQ发送成功.[transcodeMQDTO]=" + transcodeMQDTO);
}
}
package com.pcloud.common.core.constant;
public enum AgentTypeEnum {
AGENT_TYPE_CBS(1,"出版社"), //出版社
AGENT_TYPE_QKS(2,"期刊社"), //期刊社
Agent_Type_BY(3,"版元"), //版元
AGENT_TYPE_WYS(4,"外研社"), //外研社
AGENT_TYPE_XLS(5,"小蓝书"); //小蓝书
private Integer code;
private String value;
private AgentTypeEnum(Integer code,String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return this.code;
}
}
package com.pcloud.common.core.constant;
/**
* 应用类型
* @author 作者 : lili
* @date 创建时间:2016年12月2日 上午9:10:49
* @version 1.0
* @return
*/
public enum AppTypeEnum {
/**
* 一对一辅导
*/
CC("cc"),
/**
* 圈子
*/
GROUP("group"),
/**
* 扫扫看
*/
KK("kk"),
/**
* 专题
*/
ST("st"),
/**
* 背单词
*/
WD("wd"),
/**
* 数据采集/问卷调查
*/
QN("qn"),
/**
* 报名
*/
REPLY_SCENE("mt"),
/**
* 投票
*/
VT("vt"),
/**
* 题库
*/
PRETEST("pretest"),
/**
* 标准分
*/
ZSCORE("zscore"),
/**
* 读书卡片
*/
BOOKCARD("card"),
/**
* 教育表格
*/
TB("tb"),
/**
* 打卡
*/
CLOCK("clock");
/**
* 值
*/
public final String value;
/**
* 构造
*
* @param value
*/
private AppTypeEnum(String value) {
this.value = value;
}
}
/**
*
*/
package com.pcloud.common.core.constant;
/**
* @描述:
*
* @作者:songx
* @创建时间:2017年2月27日,下午4:29:06 @版本:1.0
*/
public enum ConvertEnum {
/**
* 应用转码
*/
APP("APP", "convert2App"),
/**
* 资源中心转码
*/
RESOURCE("RESOURCE", "convert2Resource"),
/**
* 报名时的视频转换
*/
MATCH("MATCH", "convert2Resource"),
/**
* 资源中心即时转换
*/
INSTANT_RESOURCE("INSTANT_RESOURCE", "convert2Resource"),
/**
* 报名应用
*/
MATCH_APP("MATCH_APP", "convert2MatchApp"),
/**
* 内容中心
*/
CONTENT("CONTENT", "convert2Content"),
/**
* 内容中心->题库:文件记忆功能
*/
PRETEST_FILEMEMORY("PRETEST_FILEMEMORY", "convert2PretestFilememory"),
/**
* 小游戏
*/
RAYSTASK("RAYSTASK", "convert2Raystask"),
/**
* 圈子应用
*/
GROUP_APP("GROUP_APP", "convert2GroupApp"),
/**
* 投票应用
*/
VOTE_APP("VOTE_APP", "convert2VoteApp"),
/**
* 教育表格应用
*/
EF_APP("EF_APP", "convert2EfApp"),
/**
* 测试工具
*/
TEST_APP("TEST_APP", "convert2TestApp"),
/**
* 直播工具
*/
LIVE_APP("LIVE_APP","convert2LiveApp");
/**
* 值
*/
public final String value;
/**
* 模板名称
*/
public final String jmsTemplate;
/**
* 构造
*
* @param value
*/
private ConvertEnum(String value, String jmsTemplate) {
this.value = value;
this.jmsTemplate = jmsTemplate;
}
}
package com.pcloud.common.core.constant;
/**
* Description 基金资源变更记录操作内容枚举类
* Created by PENG on 2017/10/18.
*/
public enum FundOperationCodeEnum {
/**
* 作品内容修改(不包含协议价变化)
*/
PRODUCT_INFO("PRODUCT_INFO"),
/**
* 应用内容修改(不包含销售价变化)
*/
APP_INFO("APP_INFO"),
/**
* 作品协议价修改
*/
PRODUCT_DEAL_PRICE("PRODUCT_DEAL_PRICE"),
/**
* 作品销售价修改
*/
PRODUCT_RETAIL_PRICE("PRODUCT_RETAIL_PRICE"),
/**
* 应用销售价修改
*/
APP_RETAIL_PRICE("APP_RETAIL_PRICE"),
/**
* 作品删除
*/
PRODUCT_DELETE("PRODUCT_DELETE"),
/**
* 应用删除
*/
APP_DELETE("APP_DELETE"),
/**
* 作品下架
*/
PRODUCT_OFF_SHELVES("PRODUCT_OFF_SHELVES"),
/**
* 作品停止出售
*/
PRODUCT_OFF_SALE("PRODUCT_OFF_SALE"),
/**
* 二维码关联内容修改
*/
QRCODE_ATTACH("QRCODE_ATTACH"),
/**
* 书刊二维码取消关联
*/
BOOK_QRCODE_DISASSOCIATION("BOOK_QRCODE_DISASSOCIATION"),
/**
* 作品资源关联
*/
PRODUCT_RESOURCE_RELATION("PRODUCT_RESOURCE_RELATION"),
/**
* 应用资源关联
*/
APP_RESOURCE_RELATION("APP_RESOURCE_RELATION"),
/**
* 内容修改
*/
CONTENT_MODIFY("CONTENT_MODIFY"),
/**
* 内容删除
*/
CONTENT_DELETE("CONTENT_DELETE");
/**
* 值
*/
public final String value;
FundOperationCodeEnum(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
/**
* @description
* @author PENG
* @date 2017年10月18日 下午2:21:31
* @version 1.0
*/
public enum FundTargetCodeEnum {
/**
* 作品
*/
PRODUCT("PRODUCT"),
/**
* 应用
*/
APP("APP"),
/**
* 资源内容
*/
CONTENT("CONTENT"),
/**
* 二维码
*/
QRCODE("QRCODE"),
/**
* 书刊二维码
*/
BOOK_QRCODE("BOOK_QRCODE");
/**
* 值
*/
public final String value;
FundTargetCodeEnum(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
/**
* @描述: 漏斗流程常量结构体
* @作者: shuyh
* @创建时间: 2018年1月8日
* @版本:1.0
*/
public class FunnelFlowStruct {
protected enum FlowType {
REGIST(1, "REGIST", "注册", "注册流程", 1),
TASK(2, "TASK", "任务", "任务流程", 2);
private long id;
private String code;
private String name;
private String desc;
private long orderNo;
private FlowType(long id, String code, String name, String desc, long orderNo) {
this.id = id;
this.code = code;
this.name = name;
this.desc = desc;
this.orderNo = orderNo;
}
public long getId() {
return id;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getDesc() {
return desc;
}
public long getOrderNo() {
return orderNo;
}
}
protected enum Flow {
REGIST_ACCOUNT(1, "REGIST_ACCOUNT", "账户注册", "账户注册流程", FlowType.REGIST.id, 1);
private long id;
private String code;
private String name;
private String desc;
private long typeId;
private long orderNo;
private Flow(long id, String code, String name, String desc,
long typeId, long orderNo) {
this.id = id;
this.code = code;
this.name = name;
this.desc = desc;
this.typeId = typeId;
this.orderNo = orderNo;
}
public long getId() {
return id;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getDesc() {
return desc;
}
public long getTypeId() {
return typeId;
}
public long getOrderNo() {
return orderNo;
}
}
public enum FlowNode {
REGIST_ACCOUNT$1LANDING_NODE(1, "LANDING", "起始页", "起始页", Flow.REGIST_ACCOUNT.id, 1),
REGIST_ACCOUNT$2SMSVERIFY_NODE(2, "SMS_VERIFY", "手机短信验证", "手机短信验证", Flow.REGIST_ACCOUNT.id, 2),
REGIST_ACCOUNT$3REGIST_NODE(3, "REGIST", "账户注册", "账户注册", Flow.REGIST_ACCOUNT.id, 3);
private long id;
private String code;
private String name;
private String desc;
private long flowId;
private long orderNo;
private FlowNode(long id, String code, String name, String desc,
long flowId, long orderNo) {
this.id = id;
this.code = code;
this.name = name;
this.desc = desc;
this.flowId = flowId;
this.orderNo = orderNo;
}
public long getId() {
return id;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getDesc() {
return desc;
}
public long getFlowId() {
return flowId;
}
public long getOrderNo() {
return orderNo;
}
}
public enum TargetType {
ACCOUNT, APP, PRODUCT
}
public enum TargetRoleType {
MERCHANT, ADVISER, CHANNEL, OFFICIAL_ACCOUNTS, AGENT, ADMIN
}
}
/*
* 武汉理工数字传播工程有限公司源代码,版权归武汉理工数字传播工程有限公司所有. 项目名称 : pcloud-common-core 创建日期 : 2017年1月4日 修改历史 : 1. [2017年1月4日]创建文件 by xnxqs
*/
package com.pcloud.common.core.constant;
/**
* //TODO 添加类/接口功能描述.
*
* @author xnxqs
*/
public enum MessageAppliedStatus {
START(0, "开始处理"), FINISH(1, "处理完成"), ERR(2, "处理失败"), CONNERR(3, "链接失败");
int code;
String value;
private MessageAppliedStatus(int code, String value) {
this.code = code;
this.value = value;
}
/**
* @return Returns the code.
*/
public int getCode() {
return code;
}
/**
* @param code
* The code to set.
*/
public void setCode(int code) {
this.code = code;
}
/**
* @return Returns the value.
*/
public String getValue() {
return value;
}
/**
* @param value
* The value to set.
*/
public void setValue(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
public enum MessageAppliedType {
INNER("inner"),MESSAGE("message");
String value;
private MessageAppliedType(String value) {
this.value = value;
}
/**
* @return Returns the value.
*/
public String getValue() {
return value;
}
/**
* @param value
* The value to set.
*/
public void setValue(String value) {
this.value = value;
}
}
/*
* 武汉理工数字传播工程有限公司源代码,版权归武汉理工数字传播工程有限公司所有. 项目名称 : pcloud-common-core 创建日期 : 2017年1月4日 修改历史 : 1. [2017年1月4日]创建文件 by xnxqs
*/
package com.pcloud.common.core.constant;
/**
* //TODO 添加类/接口功能描述.
*
* @author xnxqs
*/
public interface OperationNode {
public String getValue();
public void setValue(String value);
// public String name();
}
package com.pcloud.common.core.constant;
/**
* Description 作品类型常量类
* @author PENG
* @date 2018/4/26
*/
public class ProductTypeConstant {
/**
* 普通实体商品
*/
public static final String COMMON = "COMMON";
/**
* 音频
*/
public static final String AUDIO = "AUDIO";
/**
* 视频
*/
public static final String VIDEO = "VIDEO";
/**
* PDF
*/
public static final String PDF = "PDF";
/**
* 相册
*/
public static final String ALBUM = "ALBUM";
/**
* 问答
*/
public static final String QA = "QA";
/**
* 问答资讯
*/
public static final String QANEWS = "QANEWS";
/**
* 书籍
*/
public static final String BOOK = "BOOK";
/**
* 电子书
*/
public static final String EBOOK = "EBOOK";
/**
* 报名
*/
public static final String MATCH = "MATCH";
/**
* 序列号
*/
public static final String NUMBER = "NUMBER";
/**
* 会员
*/
public static final String MEMBER = "MEMBER";
/**
* 题库
*/
public static final String PRETEST = "PRETEST";
/**
* 普通虚拟商品
*/
public static final String VIRTUAL = "VIRTUAL";
/**
* 看一看商品
*/
public static final String LOOK = "LOOK";
/**
* 直播商品
*/
public static final String LIVE = "LIVE";
/**
* 专家审稿
*/
public static final String REVIEW = "REVIEW";
/**
* 工具商品
*/
public static final String TOOL = "TOOL";
/**
* 一对一辅导
*/
public static final String TUTOR = "TUTOR";
/**
* 圈子商品
*/
public static final String GROUP = "GROUP";
/**
* 标准分
*/
public static final String ZSCORE = "ZSCORE";
/**
* 服务商品
*/
public static final String QS = "QS";
/**
* 听力原文资源
*/
public static final String LISTEN = "LISTEN";
/**
* 多格式资源
*/
public static final String FORMAT = "FORMAT";
/**
* 背单词商品
*/
public static final String WORD = "WORD";
/**
* 文章资源
*/
public static final String ARTICLE = "ARTICLE";
/**
* 第三方服务
*/
public static final String THIRDPARTY = "THIRDPARTY";
/**
* 投票
*/
public static final String VOTE = "VOTE";
/**
* 打卡
*/
public static final String CLOCK = "CLOCK";
/**
* 测试
*/
public static final String TEST = "TEST";
/**
* 直播课表
*/
public static final String SCHEDULE = "SCHEDULE";
/**
* 音频
*/
public static final String AUDIOAPP = "AUDIOAPP";
/**
* 答案
*/
public static final String ANSWER = "ANSWER";
/**
* 教育表格
*/
public static final String EF = "EF";
/**
* 绘本配乐库
*/
public static final String PBMUSIC = "PBMUSIC";
/**
* 一对一辅导
*/
public static final String TUTORIAL = "TUTORIAL";
/**
* 热门作品类型
*/
public static final String[] HOT_PRODUCT_TYPE = {QA, PDF, VIDEO, PRETEST};
/**
* 资源型作品(免费即可体验)
*/
public static final String[] RESOURCE_PRODUCT = {AUDIO, VIDEO, PDF, EBOOK, ALBUM, PRETEST, QANEWS,
FORMAT, WORD, ARTICLE, LISTEN, SCHEDULE, PBMUSIC, TUTORIAL};
/**
* 服务型作品(需要特殊操作方可完成使用)
*/
public static final String[] SERVICE_PRODUCT = {COMMON, QA, BOOK, MATCH, NUMBER, MEMBER, REVIEW, TOOL, QS, THIRDPARTY};
/**
* 应用型作品(伴随应用使用)
*/
public static final String[] APP_PRODUCT = {LOOK, LIVE, TUTOR, GROUP, ZSCORE, VOTE, CLOCK, TEST, AUDIOAPP, ANSWER, EF};
/**
* 数据平台埋点型作品
*/
public static final String[] TRACK_PRODUCT = {COMMON, AUDIO, VIDEO, PDF, EBOOK, BOOK, MATCH, ALBUM, NUMBER, MEMBER, PRETEST, QANEWS, REVIEW, TOOL, QS, FORMAT, WORD, ARTICLE};
}
/*
* 武汉理工数字传播工程有限公司源代码,版权归武汉理工数字传播工程有限公司所有. 项目名称 : pcloud-common-core 创建日期 : 2017年1月4日 修改历史 : 1. [2017年1月4日]创建文件 by xnxqs
*/
package com.pcloud.common.core.constant;
/**
* 业务节点名称 因某业务触发一系列动作,该业务的名称
*
* @author xnxqs
*/
public enum RafficNode {
// 微信支付后的回调函数动作,其值为执行最终步骤的全路径
WECHAT_PAYMENT_CALLBACK("com.pcloud.message.service.impl.endprocess.WechatPaymentCallbackEndProcess");
public String value;;
RafficNode(String value) {
this.setValue(value);
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(this.value);
}
}
package com.pcloud.common.core.constant;
/**
* 统一管理Redis中的KEY前缀等一些常量信息
* Created by hejinxu on 2017/3/22.
*/
public class RedisKeyConstant {
//redis的微信粉丝同步状态key前缀
public static final String PREFIX_WECHAT_USER_SYNC_STATUS = "WECHAT_USER_SYNC_STATUS_";
}
/**
*
*/
package com.pcloud.common.core.constant;
/**
* @描述:角色编码
* @作者:songx
* @创建时间:2017年7月24日,下午2:50:48
* @版本:1.0
*/
public enum RoleCodeEnum {
merchant("merchant"), // 商户
channel("channel"), // 渠道
agent("agent"), // 代理
adviser("adviser"); // 顾问
/**
* 值
*/
public final String value;
private RoleCodeEnum(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
/**
* 短信签名
* @描述:
* @作者:zhuyajie
* @创建时间:2017年8月24日 下午7:55:33
* @版本:1.0
*/
public class SMSSignNameConstant {
public static final String SIGN_1 = "出版云平台";
public static final String SIGN_2 = "现代纸书";
public static final String SAYS_SIGN_1 = "开放科学OSID";
}
package com.pcloud.common.core.constant;
/**
* 短信模板常量 @描述:
*
* @作者:zhuyajie
* @创建时间:2017年8月24日 下午7:55:33 @版本:1.0
*/
public class SMSTemplateConstant {
/*-----usercenter-------*/
/**
* 您的${role}手机号重置成功,${relateRole}重置后密码:
* 123456,绑定手机号:${phone},请使用登录名:${phone}登录${loginRole},为确保账号安全,请及时修改新的密码。
*/
public static final String PHONE_RESET_CODE = "SMS_89950008";
/**
* 亲爱的${name},恭喜您注册成功,请登录系统。
*/
public static final String REGISTER_SUCCESS_CODE = "SMS_89990007";
/**
* 您好,您的实名认证已审核通过,请登录PC端查看,您的提现微信为您实名认证的微信账户,昵称:${nickName},请知悉!
*/
public static final String AUTHENTICATE_SUCCESS_CODE = "SMS_90025012";
/**
* 您好,您的实名认证审核不通过,不通过原因${reason},为便于您提现,请尽快登录PC端重新提交实名信息,感谢您的配合!
*/
public static final String AUTHENTICATE_FAILURE_CODE = "SMS_90065014";
/**
* 亲爱的${name},非常遗憾,您的注册失败了,失败原因是:${reason}。
*/
public static final String REGISTER_FAILURE_REASON_CODE = "SMS_89970014";
/**
* 亲爱的${name},非常遗憾,您的注册失败了,请重新注册。
*/
public static final String REGISTER_FAILURE_CODE = "SMS_90060011";
/**
* 尊敬的客户,蓝海系统将在${days}天内到期,如需继续使用请尽快与蓝海工作人员联系。
*/
public static final String EXPIRE_NOTICE_CODE = "SMS_90800001";
/*------appcenter------*/
/**
* ${name},您申请的一键式新增服务已完成,请登录帐户查看,感谢支持!
*/
public static final String ASSIST_CODE = "SMS_89990009";
/**
* 应用${name}资源压缩包下载地址为:https://download.5rs.me/${info},请复制地址至电脑端下载。
*/
public static final String APP_RESOURCE_DOWNLOAD_CODE = "SMS_90235053";
/**
* 应用${name}资源压缩包下载地址为:https://surl.5rs.me/${info},请复制地址至电脑端下载。
*/
public static final String APP_RESOURCE_DOWNLOAD_CODE_NEW = "SMS_100660002";
/*--- messagecenter---*/
/**
* 您好,来自${company}公司的${name}客户对蓝海产品很感兴趣,有意向与您建立合作关系,
* 他的联系方式为:${phone},请尽快与他联系,详细的信息请登录邮箱查看,如果收不到邮件,请注意查看垃圾邮箱。
*/
public static final String INVITE_CODE = "SMS_89930016";
/**
* 您的注册验证码是${code},验证码有效期5分钟。如非本人操作,请勿理会。
*/
public static final String REGISTER_VERIFY_CODE = "SMS_90310026";
/**
* 您的下载验证码是${code},验证码有效期5分钟。如非本人操作,请勿理会。
*/
public static final String DOWNLOAD_VERIFY_CODE = "SMS_90215028";
/**
* 您的验证码是${code},验证码有效期5分钟。如非本人操作,请勿理会。
*/
public static final String VERIFY_CODE = "SMS_90180049";
/**
* 您的验证码为${code},验证码有效期5分钟,此验证码用于绑定手机号到蓝海平台。如非本人操作,请勿理会。
*/
public static final String PHONE_BIND_VERIFY_CODE = "SMS_90060013";
/**
* 书刊${bookName}中的${targetName}已被${partyName}修改。
*/
public static final String FUND_QRCODE_MODIFY = "SMS_105400057";
/**
* 书刊${bookName}中的${targetName}已修改,详情见RAYS平台端书刊内容监控。
*/
public static final String FUND_APP_OR_PRODUCT_MODIFY = "SMS_120406308";
/**
* 书刊${bookName}中的${targetName}已被${partyName}修改价格,详情见RAYS平台端基金书刊监控。
*/
public static final String FUND_APP_OR_PRODUCT_MODIFY_PRICE = "SMS_105375039";
/**
* 书刊${bookName}中的${targetName}已被${partyName}取消关联。
*/
public static final String FUND_QRCODE_DISASSOCIATION = "SMS_109555262";
/**
* 书刊${bookName}中的${targetName}已被${partyName}调整资源,详情见RAYS平台端基金书刊监控。
*/
public static final String FUND_APP_OR_PRODUCT_RESOURCE_RELATION = "SMS_111300042";
/*-------resourcecenter------*/
/**
* 您购买的${name}下载地址为:https://download.5rs.me/${info},请复制至电脑端下载。
*/
public static final String RESOURCE_DOWNLOAD_CODE = "SMS_90285033";
/**
* 您购买的${name}下载地址为:https://surl.5rs.me/${info},请复制至电脑端下载。
*/
public static final String RESOURCE_DOWNLOAD_CODE_NEW = "SMS_101365018";
/*------settlementcenter------*/
/**
* 您收到一条提现审核申请,${name}出版社申请提现${money}元,请抽空处理。
*/
public static final String WITHDRAW_CODE = "SMS_90055008";
/*-----bm------*/
/**
* 抱歉,您的报名申请审核失败。
*/
public static final String BM_AUDIT_FAIL_CODE = "SMS_90645005";
/**
* 恭喜您,您所提交的参赛方案${name}已入围,请至出版融合技术编辑创新大赛官方渠道查看详情。
*/
public static final String BM_AUDIT_PASS_CODE = "SMS_90690004";
/*-----questionair-------*/
/**
* https://download.5rs.me/${info},有效期48小时,请及时下载。
*/
public static final String QUESTIONAIR_DOWNLOAD_CODE = "SMS_90720002";
/*----liveapp-----*/
/**
* 您预约的直播还有一个小时开始。
*/
public static final String APPOINTMENT_CODE = "SMS_90735003";
/*----------tradecenter------------*/
/**
* 您有一个超过24小时的订单没有发货,请及时处理!
*/
public static final String ORDER_NOTICE_CODE = "SMS_101360013";
/*----------channelcenter------------*/
/**
* 论文邮件提醒 亲爱的作者${merchantName},恭喜您,您的论文《${sceneName}》被录取了,请注意查收邮件,谢谢!
*/
public static final String OSID_EMAIL_CODE = "SMS_116370078";
/**
* 应用${name}资源压缩包下载地址为:https://s.5rs.me/${info},请复制地址至电脑端下载。
*/
public static final String APP_RESOURCE_DOWNLOAD_CODE_OWN = "SMS_117235043";
/**
* 您购买的${name}下载地址为:https://s.5rs.me/${info},请复制至电脑端下载。
*/
public static final String RESOURCE_DOWNLOAD_CODE_OWN = "SMS_117165049";
/**
* ${agentName}的${name},注册了RAYS蓝海的体验账号,联系方式为:${phone}。
*/
public static final String USER_INFO_CODE = "SMS_125025597";
/**
*您好,有${count}位客户对RAYS蓝海产品很感兴趣,有意向体验,详细信息请登录邮箱${mailName}@dcrays.cn查看,
* 如果收不到邮件,请注意查看垃圾邮箱。
*/
public static final String EXPERIENCE_CODE = "SMS_125021237";
/**
* ${name}您好,现${agentName}出版社与我司合作分成协议将于${date}到期。请您书面通知该单位,并联系市场部项目负责人跟进续约事宜。
*/
public static final String DEALINE_CODE = "SMS_126350961";
}
package com.pcloud.common.core.constant;
/**
* 场景值
* @author 作者 : lili
* @date 创建时间:2016年12月2日 上午9:10:49
* @version 1.0
* @return
*/
public enum SceneCode {
/**
* 服务完成通知
*/
SERVICE_FINISH_SCENE("SERVICE_FINISH_SCENE"),
/**
* 新订单通知
*/
NEW_ORDER_SCENE("NEW_ORDER_SCENE"),
/**
* 订单支付成功
*/
PAY_SUCCESS_SCENE("PAY_SUCCESS_SCENE"),
/**
* 报名成功提醒
*/
BM_SUCCESS_SCENE("BM_SUCCESS_SCENE"),
/**
* 商家回复提醒
*/
REPLY_SCENE("REPLY_SCENE"),
/**
* 拒绝提醒
*/
REFUSE_SCENE("REFUSE_SCENE"),
/**
* 用户提问通知
*/
USER_QUESTION_SCENE("USER_QUESTION_SCENE"),
/**
* 退货申请提醒
*/
REFUND_APPLICATION_SCENE("REFUND_APPLICATION_SCENE"),
/**
* 退货失败通知
*/
REFUND_REFUSE_SCENE("REFUND_REFUSE_SCENE"),
/**
* 退货确认通知
*/
REFUND_CONFIRM_SCENE("REFUND_CONFIRM_SCENE"),
/**
* 订单确认收货通知
*/
CONFIRM_GOODS_SCENE("CONFIRM_GOODS_SCENE"),
/**
* 退款成功
*/
REFUND_SUCCESS_SCENE("REFUND_SUCCESS_SCENE"),
/**
* 订单发货提醒
*/
SIPPING_SCENE("SIPPING_SCENE"),
/**
* 审核结果通知
*/
AUDIT_RESULT_SCENE("AUDIT_RESULT_SCENE"),
/**
* 任务处理结果提醒
*/
TASK_HANDLE_RESULT_SCENE("TASK_HANDLE_RESULT_SCENE"),
/**
* 订单消息通知
*/
ORDER_MESSAGE_SCENE("ORDER_MESSAGE_SCENE"),
/**
* 退货申请结果通知
*/
REFUND_APPLICATION_RESULT_SCENE("REFUND_APPLICATION_RESULT_SCENE"),
/**
* 确认登录提醒
*/
CONFIRM_LOGIN_SCENE("CONFIRM_LOGIN_SCENE"),
/**
* 成功报名付费通知
*/
ENROLL_SUCCESS_SCENE("ENROLL_SUCCESS_SCENE"),
/**
* 预约提醒
*/
APPOINT_SCENE("APPOINT_SCENE"),
/**
* 排名通知
*/
RANK_SCENE("RANK_SCENE"),
/**
* 学习进度提醒
*/
LEARN_PROGRESS_SCENE("LEARN_PROGRESS_SCENE"),
/**
* 项目任务提醒
*/
PROJECT_TASK_SCENE("PROJECT_TASK_SCENE"),
/**
* 中奖提醒
*/
PRIZE_SCENE("PRIZE_SCENE"),
/**
* 课表通知
*/
TIMETABLE_SCENE("TIMETABLE_SCENE"),
/**
* 会员到期提醒
*/
MEMBERSHIP_EXPIRE("MEMBERSHIP_EXPIRE");
/**
* 值
*/
public final String value;
/**
* 构造
*
* @param value
*/
private SceneCode(String value) {
this.value = value;
}
}
/**
*
*/
package com.pcloud.common.core.constant;
/**
* @描述:模板消息发送的类型
* @作者:songx
* @创建时间:2016年12月2日,上午9:53:01
* @版本:1.0
*/
public enum SendType {
/**
* 通过微信用户标识发送
*/
SEND_BY_WECHAT_USER_ID("0"),
/**
* 通过微信用户openId发送
*/
SEND_BY_OPENID("1"),
/**
* 通过当事人发送
*/
SEND_BY_PARTY_ID("2"),
/**
* 通过当事人发送
*/
SEND_BY_PARTY_ID_INCLUDE_MEMBER("3"),
/**
* 通过成员账号发送
*/
SEND_BY_MEMBER("4"),
/**
* 通过公众号ID发送
*/
SEND_BY_WECHAT("SEND_BY_WECHAT");
/**
* 值
*/
public final String value;
/**
* 构造
*
* @param value
*/
private SendType(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
/**
*
* @描述:系统权限code
* @作者:wanghongyang
* @创建时间:2016年9月9日,上午10:40:52
* @版本:1.0
*/
public enum SystemCode {
pcloud("pcloud"), //云平台
merchant("merchant"), //商户
channel("channel"), //渠道
agent("agent"), //代理
adviser("adviser"), //顾问
bigdata("bigdata"), //数据平台
wechat("wechat"), //微信客户端
adviser_wechat("adviser_wechat"); //顾问微信管理端
public String code;
SystemCode(String code) {
this.setCode(code);
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
/**
*
*/
package com.pcloud.common.core.constant;
/**
* @描述:接收方类型常量
* @作者:songx
* @创建时间:2016年12月2日,上午9:40:27
* @版本:1.0
*/
public enum TargetCode {
/**
* 用户
*/
USER("USER"),
/**
* 客服
*/
AIRLINES("AIRLINES");
/**
* 值
*/
public final String value;
/**
* 构造方法
*
* @param value
*/
private TargetCode(String value) {
this.value = value;
}
}
package com.pcloud.common.core.constant;
/**
*
* @描述:做任务过程中的各种行为的枚举类
* @作者:huanghui
* @创建时间:2017年7月27日
* @版本:1.0
*/
public enum TaskBehaviorCode {
/**
* 创建
*/
CREATE(0),
/**
* 审核,书籍完成申诉
*/
AUDIT(1),
/**
* 提交申诉
*/
COMMIT_APPEAL(2),
/**
* 其他操作
*
* 只有一个步骤的任务,包括:新增书刊、创建二维码、添加应用推广作品、设置应用悬浮商品、配置扫码回复、书刊关联二维码、添加书刊配套资源
* 、确认问答、审核评论、回复评论、创建一键式新增服务、设置作者语音、配置智能推送
*/
OTHER(3);
public int code;
TaskBehaviorCode(int code) {
this.setCode(code);
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
/**
*
*/
package com.pcloud.common.core.constant;
/**
* @描述:公号所属当事人的角色
* @作者:songx
* @创建时间:2016年12月2日,上午9:43:28
* @版本:1.0
*/
public enum WechatCode {
/**
* 渠道
*/
CHANNEL("CHANNEL"),
/**
* 代理
*/
AGENT("AGENT");
/**
* 值
*/
public final String value;
/**
* 构造方法
*
* @param value
*/
private WechatCode(String value) {
this.value = value;
}
}
/*
* 武汉理工数字传播工程有限公司源代码,版权归武汉理工数字传播工程有限公司所有.
* 项目名称 : pcloud-common-core
* 创建日期 : 2017年1月4日
* 修改历史 :
* 1. [2017年1月4日]创建文件 by xnxqs
*/
package com.pcloud.common.core.constant;
/**
* 微信支付后的回调函数 中 应执行的步骤 该类的名称应为RafficNode中的枚举类的名称(去除下划线)。
*
* @author xnxqs
*/
public enum WechatPaymentCallbackStep implements OperationNode {
// 微信支付后的回调函数动作
USERCENTER_OP("msgToUsercenter"),
SETTLEMENT_OP("settlement"),
ANALYSISEENGINE_OP("analysisengine"),
RESOURCECENTER_OP("resourcecenter"),
MSG_TO_WECHATUSER("msgToWechatUser"),
MSG_TO_MERCHANT("msgToMerchant"),
MSG_TO_NOTIFY("msgToNotify"),
CANCEL_COMMIT_TASK("cancelCommitTask"),
SET_REMIND_TASK("setRemindTask"),
END("end");
public String value;
WechatPaymentCallbackStep(String value) {
this.setValue(value);
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String toString() {
return this.name();
}
}
package com.pcloud.common.core.constant;
/**
* 做任务过程中的各种行为的枚举类
* @author huanghui
* @create 2017-09-20 18:03
**/
public enum WeektaskBehaviorCode {
STEP_ONE(0),
STEP_TWO(1);
public int code;
WeektaskBehaviorCode(int code) {
this.setCode(code);
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
package com.pcloud.common.core.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import com.pcloud.common.page.PageBean;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam;
/**
* @描述:数据访问层基础支撑接口. @作者:DiSeng.H
* @创建时间:2016年3月11日,下午4:02:32 @版本:1.0
*/
public interface BaseDao<T> {
/**
* 根据实体对象新增记录.
*
* @param entity
* .
* @return id .
*/
long insert(T entity);
/**
* 批量保存对象.
*
* @param entity
* .
* @return id .
*/
long insert(List<T> list);
/**
* 更新实体对应的记录.
*
* @param entity
* .
* @return
*/
long update(T entity);
/**
* 更新实体对应的记录.
*
* @param entity
* @param sqlId
* @return
*/
long update(T entity, String sqlId);
/**
* 批量更新对象.
*
* @param entity
* .
* @return int .
*/
long update(List<T> list);
/**
* 根据ID查找记录.
*
* @param id
* .
* @return entity .
*/
T getById(long id);
/**
* 根据ID删除记录.
*
* @param id
* .
* @return
*/
long deleteById(long id);
/**
* 分页查询 .
*
* @param pageParam
* 分页参数.
* @param paramMap
* 业务条件查询参数.
* @return
*/
PageBean listPage(PageParam pageParam, Map<String, Object> paramMap);
PageBean listSimplePage(PageParam pageParam, Map<String, Object> paramMap, String sqlId);
PageBean listPage(PageParam pageParam, Map<String, Object> paramMap, String sqlId);
<C> PageBeanNew<C> listPageNew(PageParam pageParam, Map<String, Object> paramMap, String sqlId);
PageBean listPage(PageParam pageParam, Map<String, Object> paramMap, String sqlId, String countSqlId);
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回集合
*/
List<T> listBy(Map<String, Object> paramMap);
List<Object> listBy(Map<String, Object> paramMap, String sqlId);
/**
* 根据条件查询 listBy: <br/>
*
* @param paramMap
* @return 返回实体
*/
T getBy(Map<String, Object> paramMap);
Object getBy(Map<String, Object> paramMap, String sqlId);
/**
* 根据序列名称获取下一个值
*
* @return
*/
String getSeqNextValue(String seqName);
SqlSessionTemplate getSessionTemplate();
SqlSession getSqlSession();
}
package com.pcloud.common.core.datasource;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.sql.DataSource;
import com.pcloud.common.core.mybatis.interceptor.ExecutorInterceptor;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import com.alibaba.druid.pool.DruidDataSource;
@Configuration
@MapperScan(basePackages = DataSourceConfig.PACKAGE,sqlSessionFactoryRef = "sqlSessionFactory")
public class DataSourceConfig {
private Logger logger = LoggerFactory.getLogger(DataSourceConfig.class);
static final String PACKAGE = "com.pcloud.common.core.dao";
@Value("${spring.datasource.url}")
private String dbUrl;
@Value("${spring.datasource.type}")
private String dbType;
@Value("${spring.datasource.username}")
private String username;
@Value("${spring.datasource.password}")
private String password;
@Value("${spring.datasource.driver-class-name}")
private String driverClassName;
@Value("${spring.datasource.initialSize}")
private int initialSize;
@Value("${spring.datasource.minIdle}")
private int minIdle;
@Value("${spring.datasource.maxActive}")
private int maxActive;
@Value("${spring.datasource.maxWait}")
private int maxWait;
@Value("${spring.datasource.timeBetweenEvictionRunsMillis}")
private int timeBetweenEvictionRunsMillis;
@Value("${spring.datasource.minEvictableIdleTimeMillis}")
private int minEvictableIdleTimeMillis;
@Value("${spring.datasource.validationQuery}")
private String validationQuery;
@Value("${spring.datasource.testWhileIdle}")
private boolean testWhileIdle;
@Value("${spring.datasource.testOnBorrow}")
private boolean testOnBorrow;
@Value("${spring.datasource.testOnReturn}")
private boolean testOnReturn;
@Value("${spring.datasource.poolPreparedStatements}")
private boolean poolPreparedStatements;
@Value("${spring.datasource.filters}")
private String filters;
@Value("${spring.datasource.connectionProperties}")
private String connectionProperties;
@Value("${mybatis.mapper-locations}")
private String mapperLocations;
@Value("${mybatis.type-aliases-package}")
private String typeAliasesPackage;
// @Value("${spring.datasource.useGlobalDataSourceStat}")
// private boolean useGlobalDataSourceStat;
//
// @Value("${spring.datasource.druidLoginName}")
// private String druidLoginName;
//
// @Value("${spring.datasource.druidPassword}")
// private String druidPassword;
@Bean(name="druidDataSource")
@Primary //不要漏了这
public DataSource dataSource(){
DruidDataSource datasource = new DruidDataSource();
try {
datasource.setUrl(this.dbUrl);
datasource.setDbType(dbType);
datasource.setUsername(username);
datasource.setPassword(password);
datasource.setDriverClassName(driverClassName);
datasource.setInitialSize(initialSize);
datasource.setMinIdle(minIdle);
datasource.setMaxActive(maxActive);
datasource.setMaxWait(maxWait);
datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
datasource.setValidationQuery(validationQuery);
datasource.setTestWhileIdle(testWhileIdle);
datasource.setTestOnBorrow(testOnBorrow);
datasource.setTestOnReturn(testOnReturn);
datasource.setPoolPreparedStatements(poolPreparedStatements);
datasource.setFilters(filters);
datasource.setConnectionProperties(connectionProperties);
// datasource.setUseGlobalDataSourceStat(useGlobalDataSourceStat);
ArrayList<String> arr = new ArrayList<>();
arr.add("set names utf8mb4;");
datasource.setConnectionInitSqls(arr);
} catch (SQLException e) {
logger.error("druid configuration initialization filter", e);
}
return datasource;
}
@Bean(name = "transactionManager")
public DataSourceTransactionManager transactionManager() {
logger.info("【DataSource】初始化TransactionManager事务管理器,<START>");
return new DataSourceTransactionManager(dataSource());
}
@Bean(name = "sqlSessionFactory")
@Autowired
public SqlSessionFactory sqlSessionFactory(ExecutorInterceptor interceptor) throws Exception {
logger.info("【DataSource】初始化SqlSessionFactory,<START>");
final SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
sessionFactoryBean.setDataSource(dataSource());
sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
sessionFactoryBean.setVfs(SpringBootVFS.class);
sessionFactoryBean.setTypeAliasesPackage(typeAliasesPackage);
sessionFactoryBean.setPlugins(new Interceptor[]{interceptor});
return sessionFactoryBean.getObject();
}
@Bean(name = "sqlSessionTemplate")
@Autowired
public SqlSessionTemplate sqlSessionTemplate(ExecutorInterceptor interceptor) throws Exception {
logger.info("【DataSource】初始化SqlSessionTemplate,<START>");
final SqlSessionTemplate sessionFactoryBean = new SqlSessionTemplate(sqlSessionFactory(interceptor));
return sessionFactoryBean;
}
}
/**
*
*/
package com.pcloud.common.core.dto;
import java.io.Serializable;
/**
* @描述:
*
* @作者:songx
* @创建时间:2017年2月27日,上午11:23:29 @版本:1.0
*/
public class ConvertQueueDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 7968821573480010447L;
/**
* 标识
*/
private Long id;
/**
* 文件UUID
*/
private String fileId;
/**
* 来源类型
*/
private String fromType;
/**
* 来源标识
*/
private Long fromId;
/**
* 文件路径
*/
private String fileUrl;
/**
* 文件大小
*/
private Long fileSize;
/**
* 文件类型
*/
private String fileType;
/**
* 在缓存中被处理的次数
*/
private int processTimes = 0;
/**
* 转换成功标记,true:成功,false失败
*/
private Boolean state;
/**
* 封面图
*/
private String coverImg;
/**
* 使用地址
*/
private String pilotUrl;
/**
* 视频时长
*/
private Integer duration;
/**
* 视频m3u8地址
*/
private String m3u8Url;
public String getM3u8Url() {
return m3u8Url;
}
public void setM3u8Url(String m3u8Url) {
this.m3u8Url = m3u8Url;
}
public Integer getDuration() {
return duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
public Long getFromId() {
return fromId;
}
public void setFromId(Long fromId) {
this.fromId = fromId;
}
public String getPilotUrl() {
return pilotUrl;
}
public void setPilotUrl(String pilotUrl) {
this.pilotUrl = pilotUrl;
}
public String getCoverImg() {
return coverImg;
}
public void setCoverImg(String coverImg) {
this.coverImg = coverImg;
}
public Boolean getState() {
return state;
}
public void setState(Boolean state) {
this.state = state;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFromType() {
return fromType;
}
public void setFromType(String fromType) {
this.fromType = fromType;
}
/**
* @return Returns the fileUrl.
*/
public String getFileUrl() {
return fileUrl;
}
/**
* @param fileUrl
* The fileUrl to set.
*/
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
/**
* @return Returns the fileSize.
*/
public Long getFileSize() {
return fileSize;
}
/**
* @param fileSize
* The fileSize to set.
*/
public void setFileSize(Long fileSize) {
this.fileSize = fileSize;
}
public int getProcessTimes() {
return processTimes;
}
public void setProcessTimes(int processTimes) {
this.processTimes = processTimes;
}
@Override
public String toString() {
return "ConvertQueueDto [fileId=" + fileId + ", fromType=" + fromType + ", fileUrl=" + fileUrl + ", fileSize="
+ fileSize + ", fileType=" + fileType + ", state=" + state + ", coverImg=" + coverImg + ", pilotUrl="
+ pilotUrl + "]";
}
}
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment