Skip to content
切换导航面板
项目
群组
代码片段
帮助
zhangtai
/
zzhnc
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
文件
提交
分支
标签
贡献者
图像
比较
图表
Commit 0672e0e4
由
tyler
编写于
Dec 22, 2017
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
update fix error
1 个父辈
a7311f04
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
42 行增加
和
40 行删除
.classpath
WebContent/WEB-INF/classes/ActiveMQ.xml
build/classes/com/w1hd/zzhnc/enums/ActivityStatus.class
build/classes/com/w1hd/zzhnc/service/ActivityService.class
build/classes/com/w1hd/zzhnc/service/AutoreplyService.class
build/classes/com/w1hd/zzhnc/service/SalesService.class
build/classes/com/w1hd/zzhnc/socket/PcWebSocketHandler.class
build/classes/com/w1hd/zzhnc/socket/ZzHncTopicReceiver.class
build/classes/com/w1hd/zzhnc/util/QQFaceUtil.class
build/classes/org/theyeasy/weixin/service/impl/WxMiniServiceImpl.class
build/classes/org/theyeasy/weixin/service/impl/WxOpenServiceImpl.class
build/classes/org/theyeasy/weixin/util/SHA1.class
src/com/w1hd/zzhnc/enums/ActivityStatus.java
src/com/w1hd/zzhnc/service/ActivityService.java
src/com/w1hd/zzhnc/service/AutoreplyService.java
src/com/w1hd/zzhnc/service/SalesService.java
src/com/w1hd/zzhnc/socket/PcWebSocketHandler.java
src/com/w1hd/zzhnc/socket/ZzHncTopicReceiver.java
src/org/theyeasy/weixin/service/impl/WxMiniServiceImpl.java
src/org/theyeasy/weixin/service/impl/WxOpenServiceImpl.java
.classpath
查看文件 @
0672e0e
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER
/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_151
"
>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
>
<attributes>
<attribute
name=
"owner.project.facets"
value=
"java"
/>
</attributes>
...
...
WebContent/WEB-INF/classes/ActiveMQ.xml
查看文件 @
0672e0e
...
...
@@ -48,7 +48,7 @@
<jms:listener-container
destination-type=
"topic"
container-type=
"default"
connection-factory=
"connectionFactory"
acknowledge=
"auto"
>
<jms:listener
destination=
"zzhnc.topic"
ref=
"zz
h
ncTopicReceiver"
/>
<jms:listener
destination=
"zzhnc.topic"
ref=
"zz
H
ncTopicReceiver"
/>
</jms:listener-container>
<!-- 消息消费者 end -->
...
...
build/classes/com/w1hd/zzhnc/enums/ActivityStatus.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/service/ActivityService.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/service/AutoreplyService.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/service/SalesService.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/socket/PcWebSocketHandler.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/socket/ZzHncTopicReceiver.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/com/w1hd/zzhnc/util/QQFaceUtil.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/org/theyeasy/weixin/service/impl/WxMiniServiceImpl.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/org/theyeasy/weixin/service/impl/WxOpenServiceImpl.class
查看文件 @
0672e0e
此文件类型无法预览
build/classes/org/theyeasy/weixin/util/SHA1.class
查看文件 @
0672e0e
此文件类型无法预览
src/com/w1hd/zzhnc/enums/ActivityStatus.java
查看文件 @
0672e0e
...
...
@@ -2,7 +2,7 @@ package com.w1hd.zzhnc.enums;
public
enum
ActivityStatus
{
未开始
(
1
),
进行中
(
2
),
已结束
(
3
);
UNSTART
(
1
),
RUNNING
(
2
),
FINISH
(
3
);
ActivityStatus
(
int
index
){
this
.
index
=
index
;
...
...
src/com/w1hd/zzhnc/service/ActivityService.java
查看文件 @
0672e0e
...
...
@@ -41,7 +41,7 @@ public class ActivityService {
try
{
Activity
activity
=
null
;
Integer
turnid
=
1
;
Integer
status
=
ActivityStatus
.
鏈紑濮�
.
getIndex
();
Integer
status
=
ActivityStatus
.
UNSTART
.
getIndex
();
String
activityjson
=
RedisUtil
.
get
(
ACTIVITY_SETTING
);
if
(!
Strings
.
isNullOrEmpty
(
activityjson
))
{
activityjson
=
CommonUtil
.
JsonToObject
(
activityjson
);
...
...
@@ -137,12 +137,12 @@ public class ActivityService {
Activity
activity
=
CommonUtil
.
getEntity
(
activityjson
,
Activity
.
class
);
if
(
activity
==
null
)
return
"娲诲姩涓嶅瓨鍦�"
;
if
(
activity
.
getStatus
()
<=
0
||
activity
.
getStatus
()
!=
ActivityStatus
.
宸茬粨鏉�
.
getIndex
())
{
if
(
activity
.
getStatus
()
<=
0
||
activity
.
getStatus
()
!=
ActivityStatus
.
FINISH
.
getIndex
())
{
return
"褰撳墠娲诲姩杩樻湭缁撴潫锛岄渶娲诲姩缁撴潫鍚庢墠鍙噸鏂板紑鍚�"
;
}
int
turnid
=
activity
.
getTurn
();
if
(
activity
.
getStatus
()
==
ActivityStatus
.
宸茬粨鏉�
.
getIndex
())
{
activity
.
setStatus
(
ActivityStatus
.
鏈紑濮�
.
getIndex
());
if
(
activity
.
getStatus
()
==
ActivityStatus
.
FINISH
.
getIndex
())
{
activity
.
setStatus
(
ActivityStatus
.
UNSTART
.
getIndex
());
activity
.
setTurn
(
turnid
+
1
);
activity
.
setPlanMny
(
BigDecimal
.
ZERO
);
}
...
...
src/com/w1hd/zzhnc/service/AutoreplyService.java
查看文件 @
0672e0e
...
...
@@ -147,7 +147,7 @@ public class AutoreplyService {
for
(
RegexKeywordFilter
filter
:
filterList
)
{
Set
<
String
>
keys
=
Sets
.
newHashSet
();
filter
.
replace
(
string
,
new
ReplaceStrategy
()
{
@Override
public
String
replaceWith
(
String
keyword
)
{
keys
.
add
(
keyword
);
sets
.
add
(
keys
);
...
...
@@ -157,7 +157,7 @@ public class AutoreplyService {
}
Collections
.
sort
(
sets
,
new
Comparator
<
Set
>()
{
@Override
public
int
compare
(
Set
o1
,
Set
o2
)
{
if
(
o1
.
size
()
>
o2
.
size
())
{
return
-
1
;
...
...
@@ -182,7 +182,7 @@ public class AutoreplyService {
}
Collections
.
sort
(
autoreplys
,
new
Comparator
<
Autoreply
>()
{
@Override
public
int
compare
(
Autoreply
o1
,
Autoreply
o2
)
{
if
(
o1
.
getSort
()
<
o2
.
getSort
())
{
return
-
1
;
...
...
@@ -198,7 +198,7 @@ public class AutoreplyService {
}
@Override
public
PageResults
<
Autoreply
>
getAutoReplyList
(
Integer
page
,
String
keyword
,
Boolean
isRedirectStaff
,
Integer
projectId
)
{
Example
example
=
new
Example
(
Autoreply
.
class
);
...
...
@@ -234,7 +234,7 @@ public class AutoreplyService {
* com.w1hd.zzhnc.service.AutoreplyService#addAutoReply(java.lang.String,
* boolean, java.lang.String)
*/
@Override
public
String
addAutoReply
(
String
keywords
,
boolean
isRedirectStaff
,
String
content
,
Integer
projectId
,
String
projectName
,
Integer
sort
)
{
if
(
Strings
.
isNullOrEmpty
(
keywords
))
...
...
@@ -259,7 +259,7 @@ public class AutoreplyService {
return
row
>
0
?
"ok"
:
"添加失败,数据异常"
;
}
@Override
public
String
updateAutoReply
(
Integer
id
,
String
keywords
,
boolean
isRedirectStaff
,
String
content
,
Integer
projectId
,
String
projectName
,
Integer
sort
)
{
if
(
StringUtil
.
isZearoOrNull
(
id
))
...
...
@@ -280,7 +280,7 @@ public class AutoreplyService {
return
row
>
0
?
"ok"
:
"修改失败,数据异常"
;
}
@Override
public
String
deleteAutoReply
(
Integer
id
)
{
if
(
StringUtil
.
isZearoOrNull
(
id
))
return
"id 不能为空"
;
...
...
@@ -292,14 +292,14 @@ public class AutoreplyService {
return
row
>
0
?
"ok"
:
"删除失败,数据异常"
;
}
@Override
public
Autoreply
getAutoReply
(
Integer
id
)
{
if
(
StringUtil
.
isZearoOrNull
(
id
))
return
null
;
return
autoreplyDao
.
selectByPrimaryKey
(
id
);
}
@Override
public
String
KeywordsToString
()
{
Example
example
=
new
Example
(
Autoreply
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
...
...
src/com/w1hd/zzhnc/service/SalesService.java
查看文件 @
0672e0e
...
...
@@ -102,7 +102,7 @@ public class SalesService{
* @see com.w1hd.zzhnc.service.SalesService#getSalesList(java.lang.Integer,
* java.lang.String)
*/
@Override
public
PageResults
<
Sales_Vo
>
getSalesList
(
Integer
page
,
Integer
pagesize
,
String
keyword
,
Integer
projectid
,
Boolean
isvanker
)
{
...
...
@@ -124,7 +124,7 @@ public class SalesService{
* @see com.w1hd.zzhnc.service.SalesService#addSales(java.lang.String,
* java.lang.String, java.lang.Integer)
*/
@Override
public
String
addSales
(
String
name
,
String
phone
,
Integer
projectid
,
Boolean
isValid
,
Boolean
isVanker
)
{
// 判断销售是否已存在
...
...
@@ -151,7 +151,7 @@ public class SalesService{
* @see com.w1hd.zzhnc.service.SalesService#updateSales(java.lang.Integer,
* java.lang.String, java.lang.String, java.lang.Integer)
*/
@Override
public
String
updateSales
(
Integer
id
,
String
name
,
String
phone
,
Integer
projectid
,
Boolean
isValid
,
Boolean
isVanker
)
{
Sales
sale
=
saleDao
.
selectByPrimaryKey
(
id
);
...
...
@@ -185,7 +185,7 @@ public class SalesService{
*
* @see com.w1hd.zzhnc.service.SalesService#deleteSales(java.lang.Integer)
*/
@Override
public
String
deleteSales
(
Integer
id
)
{
// TODO Auto-generated method stub
Sales
sale
=
saleDao
.
selectByPrimaryKey
(
id
);
...
...
@@ -201,7 +201,7 @@ public class SalesService{
*
* @see com.w1hd.zzhnc.service.SalesService#getSales(java.lang.Integer)
*/
@Override
public
Sales
getSales
(
Integer
id
)
{
// TODO Auto-generated method stub
return
saleDao
.
selectByPrimaryKey
(
id
);
...
...
@@ -213,7 +213,7 @@ public class SalesService{
* @see com.w1hd.zzhnc.service.SalesService#ExcelSales(java.lang.String,
* java.io.InputStream)
*/
@Override
public
String
ExcelSales
(
String
suffix
,
InputStream
file
)
{
ReadExcel
readexcel
=
new
ReadExcel
();
int
row
=
0
;
...
...
@@ -281,7 +281,7 @@ public class SalesService{
return
0
;
}
@Override
public
Sales
updateSalesOpenId
(
String
phone
,
String
openId
)
{
Example
example
=
new
Example
(
Sales
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
);
...
...
@@ -294,7 +294,7 @@ public class SalesService{
/**
* 通过小程序openid获取销售,无效的或已删除的不会被获取。
*/
@Override
public
Sales
getSaleByMiniOpenId
(
String
miniOpenid
)
{
Example
example
=
new
Example
(
Sales
.
class
);
example
.
createCriteria
().
andEqualTo
(
"deleted"
,
false
).
andEqualTo
(
"isvalid"
,
1
).
andEqualTo
(
"miniopenid"
,
...
...
@@ -305,7 +305,7 @@ public class SalesService{
return
list
.
get
(
0
);
}
@Override
public
Vo_msg
updateSalesOpenId
(
String
phone
,
String
openId
,
String
wxMiniCode
)
{
Sales
sales
=
null
;
try
{
...
...
@@ -340,7 +340,7 @@ public class SalesService{
return
new
Vo_msg
(
0
,
sales
);
}
@Override
public
List
<
Sales
>
getVankers
()
{
Example
example
=
new
Example
(
Sales
.
class
);
example
.
createCriteria
().
andEqualTo
(
"deleted"
,
false
).
andEqualTo
(
"isvalid"
,
true
).
andEqualTo
(
"isvanker"
,
true
);
...
...
@@ -356,7 +356,7 @@ public class SalesService{
*
* @see com.w1hd.zzhnc.service.SalesService#CheckBinding(java.lang.String)
*/
@Override
public
String
CheckBinding
(
String
miniopenid
)
{
System
.
out
.
println
(
"miniopenid:"
+
miniopenid
);
if
(
Strings
.
isNullOrEmpty
(
miniopenid
))
...
...
@@ -386,7 +386,7 @@ public class SalesService{
* @see com.w1hd.zzhnc.service.SalesService#getSalesReportList(int,
* java.lang.String)
*/
@Override
public
PageResults
<
SalesReport_Vo
>
getSalesReportList
(
int
page
,
String
keyword
)
{
List
<
SalesReport_Vo
>
list
=
saleDao
.
getSalesReportList
((
page
-
1
)
*
10
,
10
,
keyword
);
int
total
=
saleDao
.
getSalesReportCount
(
keyword
);
...
...
@@ -401,7 +401,7 @@ public class SalesService{
@Autowired
ChatlogDao
chatlogDao
;
@Override
@Transactional
public
void
transferSales2Sales
(
int
salesId
,
int
newSalesId
,
int
fansId
)
{
Example
fansExample
=
new
Example
(
Fans
.
class
);
...
...
@@ -447,7 +447,7 @@ public class SalesService{
}
@Override
public
String
sendProudct
(
Integer
projectId
,
Integer
fansId
)
{
Fans
fans
=
fansService
.
getFansById
(
fansId
);
Projects
project
=
projectService
.
getProject
(
projectId
);
...
...
@@ -458,7 +458,7 @@ public class SalesService{
"pages/index/index?id="
+
projectId
,
project
.
getPicurl
(),
media_id
);
}
@Override
public
Sales
nextVanker
()
{
Example
example
=
new
Example
(
Sales
.
class
);
Criteria
criteria
=
example
.
createCriteria
();
...
...
@@ -487,7 +487,7 @@ public class SalesService{
}
}
@Override
public
void
addTags
(
Integer
saleId
,
String
tag
)
{
Sales
sales
=
saleDao
.
selectByPrimaryKey
(
saleId
);
String
tags
=
sales
.
getTags
();
...
...
src/com/w1hd/zzhnc/socket/PcWebSocketHandler.java
查看文件 @
0672e0e
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.socket.WebSocketSession;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Maps
;
import
com.w1hd.zzhnc.model.WebSockMsg
;
import
com.w1hd.zzhnc.service.ZzhncSocketService
;
import
com.w1hd.zzhnc.util.QQFaceUtil
;
public
class
PcWebSocketHandler
implements
WebSocketHandler
{
...
...
src/com/w1hd/zzhnc/socket/ZzHncTopicReceiver.java
查看文件 @
0672e0e
...
...
@@ -44,8 +44,7 @@ import com.w1hd.zzhnc.model.WebSockMsg;
* 消费者
*/
@Component
public
class
ZzHncTopicReceiver
implements
MessageListener
{
public
class
ZzHncTopicReceiver
implements
MessageListener
{
private
Logger
log
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
src/org/theyeasy/weixin/service/impl/WxMiniServiceImpl.java
查看文件 @
0672e0e
...
...
@@ -44,10 +44,11 @@ import com.w1hd.zzhnc.model.WebSockMsg;
import
com.w1hd.zzhnc.service.ActivityService
;
import
com.w1hd.zzhnc.service.AutoreplyService
;
import
com.w1hd.zzhnc.service.ChatLogService
;
import
com.w1hd.zzhnc.service.zzhncSocketService
;
import
com.w1hd.zzhnc.service.FansService
;
import
com.w1hd.zzhnc.service.PosterService
;
import
com.w1hd.zzhnc.service.SalesService
;
import
com.w1hd.zzhnc.service.ZzhncSocketService
;
import
com.w1hd.zzhnc.util.CommonUtil
;
import
com.w1hd.zzhnc.util.JsonMapper
;
import
com.w1hd.zzhnc.util.QQFaceUtil
;
...
...
@@ -62,7 +63,7 @@ import tk.mybatis.mapper.entity.Example.Criteria;
@Service
public
class
WxMiniServiceImpl
implements
WxMiniService
{
@Autowired
z
zhncSocketService
zzhncSocketService
;
Z
zhncSocketService
zzhncSocketService
;
@Autowired
WxOpenService
wxOpenService
;
...
...
@@ -165,7 +166,8 @@ public class WxMiniServiceImpl implements WxMiniService {
content
=
QQFaceUtil
.
regix
(
content
);
Activity
activitySetting
=
activityService
.
getActivitySetting
();
if
(
activitySetting
!=
null
&&
activitySetting
.
getStatus
()
>
ActivityStatus
.
未开始
.
getIndex
()
if
(
activitySetting
!=
null
&&
activitySetting
.
getStatus
()
>
ActivityStatus
.
UNSTART
.
getIndex
()
&&
!
content
.
equals
(
"人工万小二"
))
{
String
[]
keywords
=
activitySetting
.
getKeyword
().
split
(
"\\|"
);
boolean
containKeyword
=
false
;
...
...
@@ -460,7 +462,7 @@ public class WxMiniServiceImpl implements WxMiniService {
if
(
firstEnter
)
{
// 如果红包活动正在进行中,发送红包活动的提醒文字
Activity
activitySetting
=
activityService
.
getActivitySetting
();
if
(
activitySetting
!=
null
&&
activitySetting
.
getStatus
()
==
ActivityStatus
.
进行中
.
getIndex
())
{
if
(
activitySetting
!=
null
&&
activitySetting
.
getStatus
()
==
ActivityStatus
.
RUNNING
.
getIndex
())
{
welcome
=
activitySetting
.
getReplyWelcome
();
}
}
...
...
src/org/theyeasy/weixin/service/impl/WxOpenServiceImpl.java
查看文件 @
0672e0e
...
...
@@ -43,7 +43,7 @@ import com.google.gson.JsonElement;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
com.w1hd.zzhnc.model.SysWxauthorize
;
import
com.w1hd.zzhnc.service.
impl.SysWxauthorizeServiceImpl
;
import
com.w1hd.zzhnc.service.
SysWxauthorizeService
;
import
com.w1hd.zzhnc.util.CommonUtil
;
import
com.w1hd.zzhnc.util.PropertiesFileUtil
;
import
com.w1hd.zzhnc.util.RedisUtil
;
...
...
@@ -116,7 +116,7 @@ public class WxOpenServiceImpl implements WxOpenService {
private
SubscribeHandler
subscribeHandler
;
@Autowired
private
SysWxauthorizeService
Impl
sysWxauthorizeService
;
private
SysWxauthorizeService
sysWxauthorizeService
;
private
ConcurrentMap
<
String
,
WxMpMessageRouter
>
router
=
new
ConcurrentHashMap
<
String
,
WxMpMessageRouter
>();
...
...
编写
预览
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论