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
1e4cc452
Commit
1e4cc452
authored
Nov 15, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 素材分享
parent
8333afac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletions
+44
-1
ContentMaterialController.java
...age/web/controller/content/ContentMaterialController.java
+28
-1
ContentMaterialShareQO.java
.../haoban/manage/web/qo/content/ContentMaterialShareQO.java
+15
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+1
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentMaterialController.java
View file @
1e4cc452
...
...
@@ -6,9 +6,12 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.column.ContentColumnListDTO
;
import
com.gic.content.api.dto.material.ContentMaterialFrontDTO
;
import
com.gic.content.api.dto.material.ContentMaterialShareInfoDTO
;
import
com.gic.content.api.qdto.material.ContentMaterialPageFrontQDTO
;
import
com.gic.content.api.qdto.material.ContentMaterialShareQDTO
;
import
com.gic.content.api.service.ContentColumnApiService
;
import
com.gic.content.api.service.ContentMaterialApiService
;
import
com.gic.content.api.service.ContentMaterialShareApiService
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialQO
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialShareQO
;
...
...
@@ -16,6 +19,8 @@ import com.gic.haoban.manage.web.vo.content.ContentColumnInfoVO;
import
com.gic.haoban.manage.web.vo.content.ContentMaterialInfoVO
;
import
com.gic.haoban.manage.web.vo.content.ContentMaterialShareInfoVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -37,6 +42,8 @@ public class ContentMaterialController {
private
ContentColumnApiService
contentColumnApiService
;
@Autowired
private
ContentMaterialApiService
contentMaterialApiService
;
@Autowired
private
ContentMaterialShareApiService
contentMaterialShareApiService
;
/**
...
...
@@ -98,7 +105,27 @@ public class ContentMaterialController {
@RequestMapping
(
path
=
"/share-content-material"
)
public
RestResponse
<
ContentMaterialShareInfoVO
>
shareContentMaterial
(
ContentMaterialShareQO
contentMaterialShareQO
){
return
RestResponse
.
successResult
();
if
(
StringUtils
.
isAnyBlank
(
contentMaterialShareQO
.
getEnterpriseId
())){
return
RestResponse
.
failure
(
"-777"
,
"企业参数异常"
);
}
if
(
StringUtils
.
isBlank
(
contentMaterialShareQO
.
getGoodsId
())){
// 无商品id 不生成参数
return
RestResponse
.
successResult
();
}
ContentMaterialShareQDTO
contentMaterialShareQDTO
=
new
ContentMaterialShareQDTO
();
contentMaterialShareQDTO
.
setEnterpriseId
(
contentMaterialShareQO
.
getEnterpriseId
());
contentMaterialShareQDTO
.
setGoodsId
(
contentMaterialShareQO
.
getEnterpriseId
());
contentMaterialShareQDTO
.
setContentMaterialId
(
contentMaterialShareQO
.
getContentMaterialId
());
contentMaterialShareQDTO
.
setClerkId
(
contentMaterialShareQO
.
getClerkId
());
contentMaterialShareQDTO
.
setStoreId
(
contentMaterialShareQO
.
getStoreId
());
ServiceResponse
<
ContentMaterialShareInfoDTO
>
serviceResponse
=
contentMaterialShareApiService
.
shareContentMaterial
(
contentMaterialShareQDTO
);
if
(!
serviceResponse
.
isSuccess
()){
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
ContentMaterialShareInfoVO
shareInfoVO
=
new
ContentMaterialShareInfoVO
();
BeanUtils
.
copyProperties
(
serviceResponse
.
getResult
(),
shareInfoVO
);
return
RestResponse
.
successResult
(
shareInfoVO
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/ContentMaterialShareQO.java
View file @
1e4cc452
...
...
@@ -10,6 +10,13 @@ import java.io.Serializable;
**/
public
class
ContentMaterialShareQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3604528577220428693L
;
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 商品id
*/
...
...
@@ -40,6 +47,14 @@ public class ContentMaterialShareQO implements Serializable {
*/
private
String
storeCode
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getGoodsId
()
{
return
goodsId
;
}
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
1e4cc452
...
...
@@ -114,5 +114,6 @@
<dubbo:reference
interface=
"com.gic.content.api.service.ContentColumnApiService"
id=
"contentColumnApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentMaterialApiService"
id=
"contentMaterialApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentMaterialShareApiService"
id=
"contentMaterialShareApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
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