Commit 7f19b580 by songyinghui

feat: 素材列表支持 视频、最热同时排序

parent 98310460
......@@ -209,6 +209,12 @@
<artifactId>gic-content-api</artifactId>
<version>${gic-content-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-app-aggregation-api</artifactId>
<version>${haoban-app-aggregation-api}</version>
</dependency>
</dependencies>
<build>
......
package com.gic.haoban.manage.web.controller.content;
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;
......@@ -12,6 +13,7 @@ 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.app.aggregation.api.service.SettingApiService;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.web.qo.content.ContentMaterialQO;
......@@ -54,6 +56,8 @@ public class ContentMaterialController {
@Autowired
private StaffApiService staffApiService;
@Autowired
private SettingApiService settingApiService;
/**
......@@ -81,6 +85,10 @@ public class ContentMaterialController {
@RequestMapping(path = "/content-material-list")
public RestResponse<Page<ContentMaterialInfoVO>> queryContentMaterialList(@RequestBody ContentMaterialQO contentMaterialQO){
if (StringUtils.isBlank(contentMaterialQO.getEnterpriseId())){
log.info("企业id未传 {}", JSON.toJSONString(contentMaterialQO));
return RestResponse.failure("-777", "参数异常");
}
ContentMaterialPageFrontQDTO contentMaterialPageFrontQDTO = new ContentMaterialPageFrontQDTO();
contentMaterialPageFrontQDTO.setEnterpriseId(contentMaterialQO.getEnterpriseId());
contentMaterialPageFrontQDTO.setKeyWord(contentMaterialQO.getSearch());
......@@ -88,8 +96,6 @@ public class ContentMaterialController {
if (contentMaterialQO.getSortType() != null){
if (contentMaterialQO.getSortType() == 2){
contentMaterialPageFrontQDTO.setHotFlag(1);
}else if (contentMaterialQO.getSortType() == 3){
contentMaterialPageFrontQDTO.setMaterialType(4);
}
}
// if (StringUtils.isBlank(contentMaterialQO.getStoreId())){
......@@ -186,6 +192,7 @@ public class ContentMaterialController {
}
if (storeIds.size() == 1 && StringUtils.equals(storeIds.get(0), "-1")){
// 全部门店权限
log.info("区经有全部门店权限 {}", clerkId);
return Collections.emptyList();
}
return storeIds;
......
......@@ -32,11 +32,16 @@ public class ContentMaterialQO extends PageQo {
private String clerkId;
/**
* 1 最新; 2 最热; 3 视频
* 1 最新; 2 最热;
*/
private Integer sortType;
/**
* 素材类型1图文2纯文字3纯图片4视频
*/
private Integer materialType;
/**
* 素材搜索
*/
private String search;
......@@ -102,4 +107,12 @@ public class ContentMaterialQO extends PageQo {
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public Integer getMaterialType() {
return materialType;
}
public void setMaterialType(Integer materialType) {
this.materialType = materialType;
}
}
......@@ -115,5 +115,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"/>
<dubbo:reference id="settingApiService" interface="com.gic.haoban.app.aggregation.api.service.SettingApiService" timeout="10000" retries="0" check="false"/>
</beans>
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