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

Commit 9884d79e authored by wangyifan's avatar wangyifan

Merge branch 'dev-1.6-shouqianba' into container-test

parents 8d604a63 8723ad53
......@@ -150,6 +150,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String sqbSpuId;
@ApiModelProperty(position = 71, value = "收钱吧商城编号")
private String mallSn;
@ApiModelProperty(position = 71, value = "收钱吧商城名称")
private String sqbStoreName;
public String getMarketType() {
if (marketId == null) {
......
......@@ -29,4 +29,12 @@ public interface IGoblinStoreMgtSqbGoodsService {
*/
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 {
String mallSn = ext.getMallSn();
String sqbSpuId = ext.getSqbSpuId();
String signature = ext.getSignature();
GoblinSqbPerfGoodsVo sqbGoods = fetchSqbGoodsByMallAndSpu(mallSn, sqbSpuId, signature);
GoblinSqbPerfGoodsVo sqbGoods = goblinstoreMgtSqbGoodsService.fetchSqbGoodsByMallAndSpu(mallSn, sqbSpuId, signature);
if (sqbGoods == null) {
sqbNotFound++;
continue;
......@@ -267,29 +267,29 @@ public class GoblinStoreMgtSqbGoodsController {
}
}
private 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;
}
// private 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;
// }
private String validateSqbGoodsForSync(GoblinSqbPerfGoodsVo sqbGoods) {
if (sqbGoods == null) {
......
......@@ -19,6 +19,7 @@ import com.liquidnet.service.goblin.enums.GoblinStoreConf;
import com.liquidnet.service.goblin.mapper.GoblinGoodsMapper;
import com.liquidnet.service.goblin.mapper.GoblinSqbGoodsExtMapper;
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.IGoblinstoreMgtGoodsService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
......@@ -49,6 +50,8 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
@Autowired
IGoblinStoreMgtExtraService goblinStoreMgtExtraService;
@Autowired
private IGoblinStoreMgtSqbGoodsService goblinstoreMgtSqbGoodsService;
@Autowired
IGoblinZhengzaiService goblinZhengzaiService;
@Autowired
GoblinSqbGoodsExtMapper goblinSqbGoodsExtMapper;
......@@ -517,6 +520,12 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
GoblinSqbGoodsExt ext = extList.get(0);
goodsInfoVo.setSqbSpuId(ext.getSqbSpuId());
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
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,
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