Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
0b165c81
Commit
0b165c81
authored
Jan 03, 2025
by
guojx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-canvas' into feature-canvas
parents
a1d8d24e
fe47fbe7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
121 additions
and
3 deletions
+121
-3
CombinedQDTO.java
...com/gic/haoban/manage/api/qdto/combined/CombinedQDTO.java
+27
-2
WxUserAddLogMapper.java
...oban/manage/service/dao/mapper/hm/WxUserAddLogMapper.java
+2
-0
WxUserAddLogServiceImpl.java
...nage/service/service/hm/impl/WxUserAddLogServiceImpl.java
+10
-0
MaterialServiceImpl.java
...oban/manage/service/service/impl/MaterialServiceImpl.java
+23
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
WxUserAddLogMapper.xml
...rvice/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
+9
-0
ClerkTaskController.java
.../manage/web/controller/clerktask/ClerkTaskController.java
+2
-1
ContentMaterialController.java
...age/web/controller/content/ContentMaterialController.java
+4
-0
CombinedQO.java
...ava/com/gic/haoban/manage/web/qo/combined/CombinedQO.java
+10
-0
ContentMaterialShareQO.java
.../haoban/manage/web/qo/content/ContentMaterialShareQO.java
+32
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/qdto/combined/CombinedQDTO.java
View file @
0b165c81
...
...
@@ -6,6 +6,10 @@ public class CombinedQDTO implements Serializable {
private
static
final
long
serialVersionUID
=
-
28454620622119889L
;
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 主图url
*/
private
String
imageUrl
;
...
...
@@ -27,11 +31,16 @@ public class CombinedQDTO implements Serializable {
private
String
lineTwo
;
/**
* 1群发 2朋友圈
* 1群发 2朋友圈
3合成图片
*/
private
Integer
mediaType
;
/**
* 额外参数
*/
private
String
extend
=
""
;
/**
* 导购id(作标识)
*/
private
String
clerkId
;
...
...
@@ -41,6 +50,14 @@ public class CombinedQDTO implements Serializable {
*/
private
String
businessId
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getImageUrl
()
{
return
imageUrl
;
}
...
...
@@ -89,8 +106,16 @@ public class CombinedQDTO implements Serializable {
this
.
mediaType
=
mediaType
;
}
public
String
getExtend
()
{
return
extend
;
}
public
void
setExtend
(
String
extend
)
{
this
.
extend
=
extend
;
}
public
String
getUnionString
()
{
return
this
.
getImageUrl
()
+
this
.
getQrCodeUrl
()
+
this
.
getShowStyle
()
+
this
.
getLineOne
()
+
this
.
getLineTwo
()
+
this
.
getMediaType
();
return
this
.
getImageUrl
()
+
this
.
getQrCodeUrl
()
+
this
.
getShowStyle
()
+
this
.
getLineOne
()
+
this
.
getLineTwo
()
+
this
.
getMediaType
()
+
this
.
getExtend
()
;
}
public
String
getClerkId
()
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/WxUserAddLogMapper.java
View file @
0b165c81
...
...
@@ -39,6 +39,8 @@ public interface WxUserAddLogMapper {
*/
public
List
<
TabWxUserAddLog
>
listAllForDel
(
String
externalUserid
);
TabWxUserAddLog
getForTask
(
@Param
(
"externalUserid"
)
String
externalUserid
)
;
/**
*
* @Title: selectNewLog
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/WxUserAddLogServiceImpl.java
View file @
0b165c81
...
...
@@ -19,6 +19,7 @@ import com.gic.haoban.manage.service.service.hm.HmClerkRelationService;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
com.gic.haoban.task.api.service.TelTaskApiService
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.tag.api.dto.MemberTagDTO
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
...
...
@@ -49,6 +50,8 @@ public class WxUserAddLogServiceImpl implements WxUserAddLogService {
private
MemberTagApiService
memberTagApiService
;
@Autowired
private
HmClerkRelationService
hmClerkRelationService
;
@Autowired
private
TelTaskApiService
telTaskApiService
;
@Override
public
void
save
(
WxUserAddLogQDTO
qdto
)
{
...
...
@@ -158,6 +161,13 @@ public class WxUserAddLogServiceImpl implements WxUserAddLogService {
entity
.
setFriendStoreId
(
qdto
.
getFriendStoreId
());
entity
.
setDelType
(
qdto
.
getDelType
());
entity
.
setDelIsSingle
(
qdto
.
getDelIsSingle
());
if
(
null
!=
qdto
.
getAddWay
()
&&
qdto
.
getAddWay
().
equals
(
202
)
&&
null
!=
entity
.
getMemberId
())
{
TabWxUserAddLog
delUser
=
this
.
wxUserAddLogMapper
.
getForTask
(
externalUserid
)
;
if
(
null
!=
delUser
&&
null
!=
delUser
.
getStoreId
()
&&
delUser
.
getStoreId
().
equals
(
entity
.
getStoreId
()))
{
String
overClerkId
=
delUser
.
getClerkId
()
;
this
.
telTaskApiService
.
distributeTask
(
qdto
.
getEnterpriseId
(),
overClerkId
,
Arrays
.
asList
(
entity
.
getMemberId
()),
entity
.
getClerkId
());
}
}
this
.
wxUserAddLogMapper
.
insert
(
entity
);
}
catch
(
Exception
e
)
{
log
.
info
(
"异常"
,
e
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MaterialServiceImpl.java
View file @
0b165c81
...
...
@@ -8,10 +8,16 @@ import java.util.stream.Collectors;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.HttpClient
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.haoban.manage.api.qdto.combined.CombinedQDTO
;
import
com.gic.haoban.manage.service.context.combined.ImageCombined
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.pojo.CloudFileInfo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.slf4j.Logger
;
...
...
@@ -48,6 +54,8 @@ public class MaterialServiceImpl implements MaterialService {
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
private
Config
config
;
...
...
@@ -375,11 +383,26 @@ public class MaterialServiceImpl implements MaterialService {
arr
=
imageUrl
.
split
(
"/"
);
}
JSONResponse
json
=
null
;
Integer
mediaType
=
combinedQDTO
.
getMediaType
();
if
(
Objects
.
equals
(
1
,
mediaType
))
{
json
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
combinedImageData
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
else
if
(
Objects
.
equals
(
2
,
mediaType
))
{
json
=
qywxSuiteApiService
.
uploadAttachment
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
combinedImageData
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
else
if
(
Objects
.
equals
(
3
,
mediaType
))
{
EnterpriseDTO
enterprise
=
enterpriseService
.
getEnterpriseById
(
combinedQDTO
.
getEnterpriseId
());
if
(
enterprise
==
null
)
{
return
jsonResponse
;
}
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadFile
(
combinedImageData
,
"jpg"
,
CloudFileTypeEnum
.
IMAGE
,
enterprise
.
getFactoryCode
(),
CloudFileBusinessOptEnum
.
COMMON
)
;
String
orgFileUrl
=
uploadInfo
.
getOrgFileUrl
();
if
(
StringUtils
.
isBlank
(
orgFileUrl
))
{
return
jsonResponse
;
}
json
=
new
JSONResponse
();
json
.
setErrorCode
(
0
);
json
.
setSuccess
(
true
);
json
.
setResult
(
orgFileUrl
);
}
return
json
;
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
0b165c81
...
...
@@ -253,5 +253,6 @@
<dubbo:reference
id=
"coupCardDistributionService"
interface=
"com.gic.marketing.api.service.CoupCardDistributionService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseWxaLinkService"
interface=
"com.gic.enterprise.api.service.EnterpriseWxaLinkService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"qywxGroupSendCanvasApiService"
interface=
"com.gic.haoban.task.manage.api.service.QywxGroupSendCanvasApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.haoban.task.api.service.TelTaskApiService"
id=
"telTaskApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
View file @
0b165c81
...
...
@@ -171,6 +171,15 @@
create_time asc
</select>
<select
id=
"getForTask"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where
external_userid=#{externalUserid} and status_flag = 2 and add_channel = 4 order by
create_time desc limit 1
</select>
<select
id=
"selectNewLog"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/clerktask/ClerkTaskController.java
View file @
0b165c81
...
...
@@ -35,7 +35,8 @@ import java.util.stream.Collectors;
* 导购任务-好办小程序
*/
@Controller
@RequestMapping
(
"clerk/task"
)
public
class
ClerkTaskController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ClerkTaskController
.
class
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentMaterialController.java
View file @
0b165c81
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.column.ContentColumnListDTO
;
import
com.gic.content.api.dto.material.ContentMaterialDTO
;
...
...
@@ -244,6 +245,9 @@ public class ContentMaterialController {
}
ContentMaterialShareQDTO
contentMaterialShareQDTO
=
new
ContentMaterialShareQDTO
();
BeanUtils
.
copyProperties
(
contentMaterialShareQO
,
contentMaterialShareQDTO
);
if
(
null
!=
contentMaterialShareQO
.
getMarketingTime
())
{
contentMaterialShareQDTO
.
setMarketingTime
(
DateUtil
.
strToDate
(
contentMaterialShareQO
.
getMarketingTime
(),
"yyyy-MM-dd HH:mm:ss"
));
}
ServiceResponse
<
ContentMaterialShareInfoDTO
>
serviceResponse
=
contentMaterialShareApiService
.
shareContentMaterial
(
contentMaterialShareQDTO
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/combined/CombinedQO.java
View file @
0b165c81
...
...
@@ -5,6 +5,8 @@ import java.io.Serializable;
public
class
CombinedQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
28454620622119889L
;
private
String
enterpriseId
;
private
String
wxEnterpriseId
;
/**
* 主图url
...
...
@@ -40,6 +42,14 @@ public class CombinedQO implements Serializable {
*/
private
String
businessId
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/ContentMaterialShareQO.java
View file @
0b165c81
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author MUSI
...
...
@@ -57,6 +58,37 @@ public class ContentMaterialShareQO implements Serializable {
*/
private
Integer
isPreview
;
//活动id
private
Long
canvasId
;
// 节点id
private
Long
nodeId
;
// 营销时间(任务创建时间)
private
String
marketingTime
;
public
Long
getCanvasId
()
{
return
canvasId
;
}
public
void
setCanvasId
(
Long
canvasId
)
{
this
.
canvasId
=
canvasId
;
}
public
Long
getNodeId
()
{
return
nodeId
;
}
public
void
setNodeId
(
Long
nodeId
)
{
this
.
nodeId
=
nodeId
;
}
public
String
getMarketingTime
()
{
return
marketingTime
;
}
public
void
setMarketingTime
(
String
marketingTime
)
{
this
.
marketingTime
=
marketingTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment