整改超市
This commit is contained in:
1 parent
3a79cd6928
commit
a6f06bcb3e
5 files changed
+98
-4
No files matched your search
+2
-2
@@ -139,7 +139,7 @@ public class SmErpSpuEntity extends Model<SmErpSpuEntity> {
|
||||
* 规格
|
||||
*/
|
||||
@Schema(description="规格")
|
||||
private String specification;
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 产地
|
||||
@@ -151,7 +151,7 @@ public class SmErpSpuEntity extends Model<SmErpSpuEntity> {
|
||||
* 装数
|
||||
*/
|
||||
@Schema(description="装数")
|
||||
private Integer packingQuantity;
|
||||
private Integer packageNum;
|
||||
|
||||
/**
|
||||
* 进价(分为单位)
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.bsd.pjcloud.supermarket.vo.sm;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.bsd.pjcloud.common.core.util.MoneyDeserializer;
|
||||
import com.bsd.pjcloud.common.core.util.MoneySerializer;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(description = "后台线上商品-选择库存商品-查询包装单位信息")
|
||||
public class SmErpUnitVo {
|
||||
|
||||
|
||||
/**
|
||||
* 包装单位id
|
||||
*/
|
||||
@Schema(description="包装单位id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 条码
|
||||
*/
|
||||
@Schema(description="条码")
|
||||
private String barCode;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@Schema(description="规格")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(description="单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 内装数量
|
||||
*/
|
||||
@Schema(description="内装")
|
||||
private Integer packageNum;
|
||||
|
||||
|
||||
/**
|
||||
* 零售价/单位分
|
||||
*/
|
||||
@Schema(description="零售价/单位分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer retailPrice;
|
||||
|
||||
/**
|
||||
* spuID
|
||||
*/
|
||||
@Schema(description="spuID")
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 促销价
|
||||
*/
|
||||
@Schema(description="促销价")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer promotionPrice;
|
||||
|
||||
}
|
||||
+1
@@ -87,6 +87,7 @@ public class SmErpSpuController {
|
||||
wrapper.eq(null!=supermarketSpu.getCategoryId(), SmErpSpuEntity::getCategoryId,supermarketSpu.getCategoryId());
|
||||
return R.ok(smErpSpuService.OnlineSpuPageScope(page, wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询商品spu
|
||||
* @param id id
|
||||
|
||||
+21
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpAuxiliaryCodeEntity;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpSpuEntity;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpUnitEntity;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpUnitService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -67,6 +69,25 @@ public class SmErpUnitController {
|
||||
return R.ok(smErpUnitService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询-线上商城通过id查询商品详情
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询详情" , description = "通过id查询" )
|
||||
@GetMapping("/getOnlineSkuBySpuId/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_supermarketUnit_view')" )
|
||||
public R getOnlineSkuBySpuId(@PathVariable("id" ) Long id) {
|
||||
LambdaQueryWrapper<SmErpUnitEntity> smErpUnitEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
smErpUnitEntityLambdaQueryWrapper.eq(SmErpUnitEntity::getSpuId, id);
|
||||
//过滤停售的
|
||||
smErpUnitEntityLambdaQueryWrapper.eq(SmErpUnitEntity::getStatus, "0");
|
||||
|
||||
List<SmErpUnitEntity> list = smErpUnitService.list(smErpUnitEntityLambdaQueryWrapper);
|
||||
|
||||
|
||||
return R.ok(list);
|
||||
}
|
||||
/**
|
||||
* 新增商品包装单位(sku)
|
||||
* @param supermarketUnit 商品包装单位(sku)
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@
|
||||
<result property="giveIntegral" column="give_integral"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="specification" column="specification"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="origin" column="origin"/>
|
||||
<result property="packingQuantity" column="packing_quantity"/>
|
||||
<result property="packageNum" column="package_num"/>
|
||||
<result property="purchasePrice" column="purchase_price"/>
|
||||
<result property="retailPrice" column="retail_price"/>
|
||||
<result property="memberPrice1" column="member_price1"/>
|
||||
|
||||
Reference in new issue
Block a user