记得上下班打卡 | git大法好,push需谨慎

Commit 8723ad53 authored by wangyifan's avatar wangyifan

商品详情页返回收钱吧商城名称

parent 70f2c4fa
...@@ -150,6 +150,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -150,6 +150,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String sqbSpuId; private String sqbSpuId;
@ApiModelProperty(position = 71, value = "收钱吧商城编号") @ApiModelProperty(position = 71, value = "收钱吧商城编号")
private String mallSn; private String mallSn;
@ApiModelProperty(position = 71, value = "收钱吧商城名称")
private String sqbStoreName;
public String getMarketType() { public String getMarketType() {
if (marketId == null) { if (marketId == null) {
......
...@@ -29,4 +29,12 @@ public interface IGoblinStoreMgtSqbGoodsService { ...@@ -29,4 +29,12 @@ public interface IGoblinStoreMgtSqbGoodsService {
*/ */
boolean sqbGoodsEditSpu(String uid, GoblinSqbPerfGoodsVo mgtGoodsSqbParam, GoblinGoodsInfoVo goodsInfoVo); boolean sqbGoodsEditSpu(String uid, GoblinSqbPerfGoodsVo mgtGoodsSqbParam, GoblinGoodsInfoVo goodsInfoVo);
/**
* 通过商城编号查询收钱吧商品
* @param mallSn
* @param sqbSpuId
* @param signature
* @return
*/
GoblinSqbPerfGoodsVo fetchSqbGoodsByMallAndSpu(String mallSn, String sqbSpuId, String signature);
} }
...@@ -164,7 +164,7 @@ public class GoblinStoreMgtSqbGoodsController { ...@@ -164,7 +164,7 @@ public class GoblinStoreMgtSqbGoodsController {
String mallSn = ext.getMallSn(); String mallSn = ext.getMallSn();
String sqbSpuId = ext.getSqbSpuId(); String sqbSpuId = ext.getSqbSpuId();
String signature = ext.getSignature(); String signature = ext.getSignature();
GoblinSqbPerfGoodsVo sqbGoods = fetchSqbGoodsByMallAndSpu(mallSn, sqbSpuId, signature); GoblinSqbPerfGoodsVo sqbGoods = goblinstoreMgtSqbGoodsService.fetchSqbGoodsByMallAndSpu(mallSn, sqbSpuId, signature);
if (sqbGoods == null) { if (sqbGoods == null) {
sqbNotFound++; sqbNotFound++;
continue; continue;
...@@ -267,29 +267,29 @@ public class GoblinStoreMgtSqbGoodsController { ...@@ -267,29 +267,29 @@ public class GoblinStoreMgtSqbGoodsController {
} }
} }
private GoblinSqbPerfGoodsVo fetchSqbGoodsByMallAndSpu(String mallSn, String sqbSpuId, String signature) { // private GoblinSqbPerfGoodsVo fetchSqbGoodsByMallAndSpu(String mallSn, String sqbSpuId, String signature) {
if (StringUtils.isBlank(mallSn) || StringUtils.isBlank(sqbSpuId) || StringUtils.isBlank(signature)) { // if (StringUtils.isBlank(mallSn) || StringUtils.isBlank(sqbSpuId) || StringUtils.isBlank(signature)) {
return null; // return null;
} // }
List<MallProductsQueryData> products = goblinShouQianBaService.queryMallProducts(mallSn, signature); // List<MallProductsQueryData> products = goblinShouQianBaService.queryMallProducts(mallSn, signature);
if (CollectionUtils.isEmpty(products)) { // if (CollectionUtils.isEmpty(products)) {
return null; // return null;
} // }
for (MallProductsQueryData product : products) { // for (MallProductsQueryData product : products) {
if (sqbSpuId.equals(product.getSpuId())) { // if (sqbSpuId.equals(product.getSpuId())) {
GoblinSqbPerfGoodsVo vo = new GoblinSqbPerfGoodsVo(); // GoblinSqbPerfGoodsVo vo = new GoblinSqbPerfGoodsVo();
vo.setMallSn(mallSn); // vo.setMallSn(mallSn);
vo.setSignature(signature); // vo.setSignature(signature);
vo.setSpuId(product.getSpuId()); // vo.setSpuId(product.getSpuId());
vo.setConverImages(product.getConverImages()); // vo.setConverImages(product.getConverImages());
vo.setProductIntroduction(product.getProductIntroduction()); // vo.setProductIntroduction(product.getProductIntroduction());
vo.setTitle(product.getTitle()); // vo.setTitle(product.getTitle());
vo.setSkuResults(product.getSkuResults()); // vo.setSkuResults(product.getSkuResults());
return vo; // return vo;
} // }
} // }
return null; // return null;
} // }
private String validateSqbGoodsForSync(GoblinSqbPerfGoodsVo sqbGoods) { private String validateSqbGoodsForSync(GoblinSqbPerfGoodsVo sqbGoods) {
if (sqbGoods == null) { if (sqbGoods == null) {
......
...@@ -19,6 +19,7 @@ import com.liquidnet.service.goblin.enums.GoblinStoreConf; ...@@ -19,6 +19,7 @@ import com.liquidnet.service.goblin.enums.GoblinStoreConf;
import com.liquidnet.service.goblin.mapper.GoblinGoodsMapper; import com.liquidnet.service.goblin.mapper.GoblinGoodsMapper;
import com.liquidnet.service.goblin.mapper.GoblinSqbGoodsExtMapper; import com.liquidnet.service.goblin.mapper.GoblinSqbGoodsExtMapper;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService; import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtSqbGoodsService;
import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService; import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService;
import com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService; import com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils; import com.liquidnet.service.goblin.util.GoblinMongoUtils;
...@@ -49,6 +50,8 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi ...@@ -49,6 +50,8 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
@Autowired @Autowired
IGoblinStoreMgtExtraService goblinStoreMgtExtraService; IGoblinStoreMgtExtraService goblinStoreMgtExtraService;
@Autowired @Autowired
private IGoblinStoreMgtSqbGoodsService goblinstoreMgtSqbGoodsService;
@Autowired
IGoblinZhengzaiService goblinZhengzaiService; IGoblinZhengzaiService goblinZhengzaiService;
@Autowired @Autowired
GoblinSqbGoodsExtMapper goblinSqbGoodsExtMapper; GoblinSqbGoodsExtMapper goblinSqbGoodsExtMapper;
...@@ -517,6 +520,12 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi ...@@ -517,6 +520,12 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
GoblinSqbGoodsExt ext = extList.get(0); GoblinSqbGoodsExt ext = extList.get(0);
goodsInfoVo.setSqbSpuId(ext.getSqbSpuId()); goodsInfoVo.setSqbSpuId(ext.getSqbSpuId());
goodsInfoVo.setMallSn(ext.getMallSn()); goodsInfoVo.setMallSn(ext.getMallSn());
// 添加收钱吧商城名称
GoblinSqbPerfGoodsVo sqbPerfGoodsVo = goblinstoreMgtSqbGoodsService.fetchSqbGoodsByMallAndSpu(ext.getMallSn(),
ext.getSqbSpuId(), ext.getSignature());
if (null != sqbPerfGoodsVo) {
goodsInfoVo.setSqbStoreName(sqbPerfGoodsVo.getMallName());
}
} }
} }
......
...@@ -374,6 +374,31 @@ public class GoblinStoreMgtSqbGoodsServiceImpl implements IGoblinStoreMgtSqbGood ...@@ -374,6 +374,31 @@ public class GoblinStoreMgtSqbGoodsServiceImpl implements IGoblinStoreMgtSqbGood
return false; return false;
} }
@Override
public GoblinSqbPerfGoodsVo fetchSqbGoodsByMallAndSpu(String mallSn, String sqbSpuId, String signature) {
if (StringUtils.isBlank(mallSn) || StringUtils.isBlank(sqbSpuId) || StringUtils.isBlank(signature)) {
return null;
}
List<MallProductsQueryData> products = goblinShouQianBaService.queryMallProducts(mallSn, signature);
if (CollectionUtils.isEmpty(products)) {
return null;
}
for (MallProductsQueryData product : products) {
if (sqbSpuId.equals(product.getSpuId())) {
GoblinSqbPerfGoodsVo vo = new GoblinSqbPerfGoodsVo();
vo.setMallSn(mallSn);
vo.setSignature(signature);
vo.setSpuId(product.getSpuId());
vo.setConverImages(product.getConverImages());
vo.setProductIntroduction(product.getProductIntroduction());
vo.setTitle(product.getTitle());
vo.setSkuResults(product.getSkuResults());
return vo;
}
}
return null;
}
public boolean sqbGoodsEditSku(String uid, GoblinSqbPerfGoodsVo mgtGoodsAddParam, public boolean sqbGoodsEditSku(String uid, GoblinSqbPerfGoodsVo mgtGoodsAddParam,
GoblinGoodsInfoVo goodsInfoVo) { GoblinGoodsInfoVo goodsInfoVo) {
......
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