Commit cc03b90b by songyinghui

feat: 素材分享 短链和二维码生成

parent fc8d5933
...@@ -215,6 +215,12 @@ ...@@ -215,6 +215,12 @@
<artifactId>haoban-app-aggregation-api</artifactId> <artifactId>haoban-app-aggregation-api</artifactId>
<version>${haoban-app-aggregation-api}</version> <version>${haoban-app-aggregation-api}</version>
</dependency> </dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-store-goods-api</artifactId>
<version>${gic-store-goods-api}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.gic.haoban.manage.web.controller.goods;
import com.gic.haoban.app.aggregation.api.dto.GoodsSettingDTO;
import com.gic.haoban.app.aggregation.api.service.SettingApiService;
import com.gic.haoban.manage.web.qo.content.ContentMaterialQO;
import com.gic.store.goods.service.GoodsInfoOutApiService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @Author MUSI
* @Date 2023/3/16 10:19 PM
* @Description
* @Version
**/
@Component
public class GoodsInfoAdaptor {
@Autowired
private SettingApiService settingApiService;
@Autowired
private GoodsInfoOutApiService goodsInfoOutApiService;
public List<String> queryGoodsIdWithSearch(String enterpriseId, String search) {
// 根据关键字查询1000个商品
return Collections.emptyList();
}
/**
* 查询好办商品展示的商品状态
*
* @param enterpriseId
* @return
*/
public List<Integer> getGoodsShowStatus(String enterpriseId) {
if (StringUtils.isBlank(enterpriseId)) {
return Collections.emptyList();
}
GoodsSettingDTO goodsSettingDTO = settingApiService.getSetting(enterpriseId);
List<Integer> showStatus = new ArrayList<>();
if (goodsSettingDTO != null) {
int salesGoodsFlag = goodsSettingDTO.getSalesGoodsFlag();
int notSalesGoodsFlag = goodsSettingDTO.getNotSalesGoodsFlag();
if (salesGoodsFlag == 1 && notSalesGoodsFlag == 1) {
//已上架和未上架
showStatus.add(1);
showStatus.add(2);
} else if (salesGoodsFlag == 1) {
//已上架
showStatus.add(1);
} else if (notSalesGoodsFlag == 1) {
//未上架
showStatus.add(2);
} else {
//啥都未打开
showStatus.add(-99);
}
} else {
// 默认展示已上架和未上架的数据
showStatus.add(1);
showStatus.add(2);
}
return showStatus;
}
}
...@@ -52,9 +52,11 @@ public class ContentMaterialQO extends PageQo { ...@@ -52,9 +52,11 @@ public class ContentMaterialQO extends PageQo {
private Long contentColumnId; private Long contentColumnId;
/** /**
* 商品id * 搜索类型
* 0 搜索素材内容
* 1 搜索商品
*/ */
private String goodsId; private Integer searchType;
public Integer getSortType() { public Integer getSortType() {
...@@ -121,11 +123,11 @@ public class ContentMaterialQO extends PageQo { ...@@ -121,11 +123,11 @@ public class ContentMaterialQO extends PageQo {
this.materialType = materialType; this.materialType = materialType;
} }
public String getGoodsId() { public Integer getSearchType() {
return goodsId; return searchType;
} }
public void setGoodsId(String goodsId) { public void setSearchType(Integer searchType) {
this.goodsId = goodsId; this.searchType = searchType;
} }
} }
...@@ -18,11 +18,6 @@ public class ContentMaterialShareQO implements Serializable { ...@@ -18,11 +18,6 @@ public class ContentMaterialShareQO implements Serializable {
private String enterpriseId; private String enterpriseId;
/** /**
* 商品id
*/
private String goodsId;
/**
* 商品货号 * 商品货号
*/ */
private String goodsCode; private String goodsCode;
...@@ -47,6 +42,11 @@ public class ContentMaterialShareQO implements Serializable { ...@@ -47,6 +42,11 @@ public class ContentMaterialShareQO implements Serializable {
*/ */
private String storeCode; private String storeCode;
/**
* 1朋友圈; 2客户群; 3 对话框; 0其他
*/
private String channelSource;
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
...@@ -55,14 +55,6 @@ public class ContentMaterialShareQO implements Serializable { ...@@ -55,14 +55,6 @@ public class ContentMaterialShareQO implements Serializable {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getGoodsId() {
return goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public Long getContentMaterialId() { public Long getContentMaterialId() {
return contentMaterialId; return contentMaterialId;
} }
...@@ -102,4 +94,12 @@ public class ContentMaterialShareQO implements Serializable { ...@@ -102,4 +94,12 @@ public class ContentMaterialShareQO implements Serializable {
public void setGoodsCode(String goodsCode) { public void setGoodsCode(String goodsCode) {
this.goodsCode = goodsCode; this.goodsCode = goodsCode;
} }
public String getChannelSource() {
return channelSource;
}
public void setChannelSource(String channelSource) {
this.channelSource = channelSource;
}
} }
...@@ -125,5 +125,6 @@ ...@@ -125,5 +125,6 @@
<dubbo:reference id="newDataTargetConfigApiService" interface="com.gic.enterprise.api.service.target.NewDataTargetConfigApiService" timeout="100000" retries="0" check="false" /> <dubbo:reference id="newDataTargetConfigApiService" interface="com.gic.enterprise.api.service.target.NewDataTargetConfigApiService" timeout="100000" retries="0" check="false" />
<dubbo:reference interface="com.gic.store.goods.service.GoodsInfoOutApiService" id="goodsInfoOutApiService" timeout="100000" retries="0" check="false" />
</beans> </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