This commit is contained in:
dzc committed 2025-06-21 14:26:33 +08:00
commit 40ac5855d0
7 files changed
+15 -10

No files matched your search

@@ -63,7 +63,7 @@ public class OnlineShopVo {
* 自编码/条码
*/
@Schema(description="自编码/条码")
private String barcode;
private String barCode;
/**
* 商品名称
@@ -24,7 +24,7 @@ public class SmErpPageScopeVo {
* 自编码/条码
*/
@Schema(description="自编码/条码")
private String barcode;
private String barCode;
/**
* 商品名称
@@ -34,7 +34,7 @@ public class StockWarnVO {
* 自编码/条码
*/
@Schema(description="自编码/条码")
private String barcode;
private String barCode;
/**
* 商品名称
@@ -174,5 +174,10 @@ public class ShopSpuEntity extends Model<ShopSpuEntity> {
@ExcelIgnore
@TableField(exist = false)
@EntityMapping(thisField = "id", joinField = "spuId")
private List<ShopSkuEntity> shopSkuList;
private List<ShopSkuEntity> skuList;
@TableField(exist = false)
@Schema(description="关联的商户id")
private List<Long> merchantIds;
}
@@ -30,7 +30,7 @@ public class ShopSpuServiceImpl extends ServiceImpl<ShopSpuMapper, ShopSpuEntity
@Transactional(rollbackFor = Exception.class)
public Boolean saveDeep(ShopSpuEntity shopSpu) {
baseMapper.insert(shopSpu);
for (ShopSkuEntity shopSku : shopSpu.getShopSkuList()) {
for (ShopSkuEntity shopSku : shopSpu.getSkuList()) {
shopSku.setSpuId(shopSpu.getId());
shopSkuMapper.insert( shopSku);
}
@@ -42,7 +42,7 @@ public class ShopSpuServiceImpl extends ServiceImpl<ShopSpuMapper, ShopSpuEntity
@Transactional(rollbackFor = Exception.class)
public Boolean updateDeep(ShopSpuEntity shopSpu) {
baseMapper.updateById(shopSpu);
for (ShopSkuEntity shopSku : shopSpu.getShopSkuList()) {
for (ShopSkuEntity shopSku : shopSpu.getSkuList()) {
if (Objects.isNull(shopSku.getId())) {
shopSku.setSpuId(shopSpu.getId());
shopSkuMapper.insert(shopSku);
@@ -40,7 +40,7 @@
stock.current_stock as stock,
spu.product_code,
spu.product_name,
spu.barcode,
spu.bar_code,
spu.spec,
spu.unit,
spu.package_num,
@@ -61,7 +61,7 @@
AND spu.product_code = #{param.productCode}
</if>
<if test="param.barcode != null and param.barcode != ''">
AND spu.barcode = #{param.barcode}
AND spu.bar_code = #{param.barCode}
</if>
<if test="param.productName != null and param.productName != ''">
AND spu.product_name LIKE CONCAT('%', #{param.productName}, '%')
@@ -21,7 +21,7 @@
<result property="tenantId" column="tenant_id"/>
</resultMap>
<select id="selectSmErpPageScopeVo" resultType="com.bsd.pjcloud.supermarket.vo.sm.smspu.SmSpuPageVo">
select esp.id as erp_spu_id,esp.product_code,esp.barcode,esp.product_name,esp.category_id,
select esp.id as erp_spu_id,esp.product_code,esp.bar_code,esp.product_name,esp.category_id,
esp.pic_url,esp.sort,esp.status,esp.merchant_id,esp.dept_id,
sp.create_time,sp.id,sp.slider_pic_urls,
eca.name as category_name
@@ -60,7 +60,7 @@
</where>
</select>
<select id="getOnlineShopList" resultType="com.bsd.pjcloud.supermarket.vo.OnlineShopVo">
SELECT esp.id as erp_spu_id,esp.product_code,esp.barcode,esp.product_name,esp.category_id,
SELECT esp.id as erp_spu_id,esp.product_code,esp.bar_code,esp.product_name,esp.category_id,
esp.pic_url,esp.sort,esp.status,esp.merchant_id,esp.dept_id,esp.bar_code,
sp.create_time,sp.id,sp.slider_pic_urls,sp.description,
eca.name as category_name,