商品库存、导出
This commit is contained in:
@ -127,5 +127,9 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode STORE_BUSINESS_NOT_EXISTS = new ErrorCode(1_004_017_001, "超市营业统计不存在");
|
||||
|
||||
ErrorCode STORE_SHOPPING_CART_NOT_EXISTS = new ErrorCode(1_004_018_001, "小程序商品购物车不存在");
|
||||
|
||||
ErrorCode STORE_GOODS_INVENTORY_NOT_EXISTS = new ErrorCode(1_004_019_001, "商品库存不存在");
|
||||
|
||||
ErrorCode STORE_GOODS_INVENTORY_RECORD_NOT_EXISTS = new ErrorCode(1_004_020_001, "商品出入库记录不存在");
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreOrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreSaleGoodsVO;
|
||||
import cn.iocoder.yudao.module.member.service.customizeExcel.CustomizeExcelService;
|
||||
import cn.iocoder.yudao.module.member.util.CustomMergeStrategy;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
@ -157,5 +158,17 @@ public class CustomizeExcelController {
|
||||
orderExcelVOS);
|
||||
}
|
||||
|
||||
@GetMapping("/storeSaleGoodsExcel")
|
||||
@Operation(summary = "导出超市商品售卖详情")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStoreSaleGoodsExcel(String startTime,String endTime,Long carteenId,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
||||
List<StoreSaleGoodsVO> orderExcelVOS = excelService.exportStoreSaleGoodsExcel(startTime, endTime,carteenId);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "商品售卖详情统计.xlsx", "数据", StoreSaleGoodsVO.class,
|
||||
orderExcelVOS);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.NumberFormat;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StoreSaleGoodsVO {
|
||||
|
||||
|
||||
@ExcelProperty("商品")
|
||||
private String goodsName;
|
||||
|
||||
@ExcelProperty("单价(元)")
|
||||
@NumberFormat("#0.00")
|
||||
private Double customPrice;
|
||||
|
||||
@ExcelProperty("数量")
|
||||
private Integer sumNum;
|
||||
|
||||
@ExcelProperty("总价")
|
||||
@NumberFormat("#0.00")
|
||||
private Double totalPrice;
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventory.StoreGoodsInventoryDO;
|
||||
import cn.iocoder.yudao.module.member.service.storegoodsinventory.StoreGoodsInventoryService;
|
||||
|
||||
@Tag(name = "管理后台 - 商品库存")
|
||||
@RestController
|
||||
@RequestMapping("/member/store-goods-inventory")
|
||||
@Validated
|
||||
public class StoreGoodsInventoryController {
|
||||
|
||||
@Resource
|
||||
private StoreGoodsInventoryService storeGoodsInventoryService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建商品库存")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:create')")
|
||||
public CommonResult<Integer> createStoreGoodsInventory(@Valid @RequestBody StoreGoodsInventorySaveReqVO createReqVO) {
|
||||
return success(storeGoodsInventoryService.createStoreGoodsInventory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新商品库存")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:update')")
|
||||
public CommonResult<Boolean> updateStoreGoodsInventory(@Valid @RequestBody StoreGoodsInventorySaveReqVO updateReqVO) {
|
||||
storeGoodsInventoryService.updateStoreGoodsInventory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除商品库存")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:delete')")
|
||||
public CommonResult<Boolean> deleteStoreGoodsInventory(@RequestParam("id") Integer id) {
|
||||
storeGoodsInventoryService.deleteStoreGoodsInventory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得商品库存")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:query')")
|
||||
public CommonResult<StoreGoodsInventoryRespVO> getStoreGoodsInventory(@RequestParam("id") Integer id) {
|
||||
StoreGoodsInventoryDO storeGoodsInventory = storeGoodsInventoryService.getStoreGoodsInventory(id);
|
||||
return success(BeanUtils.toBean(storeGoodsInventory, StoreGoodsInventoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得商品库存分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:query')")
|
||||
public CommonResult<PageResult<StoreGoodsInventoryRespVO>> getStoreGoodsInventoryPage(@Valid StoreGoodsInventoryPageReqVO pageReqVO) {
|
||||
PageResult<StoreGoodsInventoryDO> pageResult = storeGoodsInventoryService.getStoreGoodsInventoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StoreGoodsInventoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出商品库存 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStoreGoodsInventoryExcel(@Valid StoreGoodsInventoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StoreGoodsInventoryDO> list = storeGoodsInventoryService.getStoreGoodsInventoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "商品库存.xls", "数据", StoreGoodsInventoryRespVO.class,
|
||||
BeanUtils.toBean(list, StoreGoodsInventoryRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 商品库存分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StoreGoodsInventoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "商品ID", example = "16735")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "14609")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
private Double weight;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 商品库存 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StoreGoodsInventoryRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24517")
|
||||
@ExcelProperty("编号")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "商品ID", example = "16735")
|
||||
@ExcelProperty("商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "14609")
|
||||
@ExcelProperty("门店ID")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
@ExcelProperty("重量")
|
||||
private Double weight;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 商品库存新增/修改 Request VO")
|
||||
@Data
|
||||
public class StoreGoodsInventorySaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24517")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "商品ID", example = "16735")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "14609")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
private Double weight;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventoryrecord.StoreGoodsInventoryRecordDO;
|
||||
import cn.iocoder.yudao.module.member.service.storegoodsinventoryrecord.StoreGoodsInventoryRecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 商品出入库记录")
|
||||
@RestController
|
||||
@RequestMapping("/member/store-goods-inventory-record")
|
||||
@Validated
|
||||
public class StoreGoodsInventoryRecordController {
|
||||
|
||||
@Resource
|
||||
private StoreGoodsInventoryRecordService storeGoodsInventoryRecordService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建商品出入库记录")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:create')")
|
||||
public CommonResult<Integer> createStoreGoodsInventoryRecord(@Valid @RequestBody StoreGoodsInventoryRecordSaveReqVO createReqVO) {
|
||||
return success(storeGoodsInventoryRecordService.createStoreGoodsInventoryRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新商品出入库记录")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:update')")
|
||||
public CommonResult<Boolean> updateStoreGoodsInventoryRecord(@Valid @RequestBody StoreGoodsInventoryRecordSaveReqVO updateReqVO) {
|
||||
storeGoodsInventoryRecordService.updateStoreGoodsInventoryRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除商品出入库记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:delete')")
|
||||
public CommonResult<Boolean> deleteStoreGoodsInventoryRecord(@RequestParam("id") Integer id) {
|
||||
storeGoodsInventoryRecordService.deleteStoreGoodsInventoryRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得商品出入库记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:query')")
|
||||
public CommonResult<StoreGoodsInventoryRecordRespVO> getStoreGoodsInventoryRecord(@RequestParam("id") Integer id) {
|
||||
StoreGoodsInventoryRecordDO storeGoodsInventoryRecord = storeGoodsInventoryRecordService.getStoreGoodsInventoryRecord(id);
|
||||
return success(BeanUtils.toBean(storeGoodsInventoryRecord, StoreGoodsInventoryRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得商品出入库记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:query')")
|
||||
public CommonResult<PageResult<StoreGoodsInventoryRecordRespVO>> getStoreGoodsInventoryRecordPage(@Valid StoreGoodsInventoryRecordPageReqVO pageReqVO) {
|
||||
PageResult<StoreGoodsInventoryRecordDO> pageResult = storeGoodsInventoryRecordService.getStoreGoodsInventoryRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StoreGoodsInventoryRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出商品出入库记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('member:store-goods-inventory-record:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStoreGoodsInventoryRecordExcel(@Valid StoreGoodsInventoryRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StoreGoodsInventoryRecordDO> list = storeGoodsInventoryRecordService.getStoreGoodsInventoryRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "商品出入库记录.xls", "数据", StoreGoodsInventoryRecordRespVO.class,
|
||||
BeanUtils.toBean(list, StoreGoodsInventoryRecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 商品出入库记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StoreGoodsInventoryRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "商品ID", example = "24781")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "6917")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
private Double weight;
|
||||
|
||||
@Schema(description = "1-入库,2-出库", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "出库类型", example = "1")
|
||||
private Integer outType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 商品出入库记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StoreGoodsInventoryRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "14073")
|
||||
@ExcelProperty("编号")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "商品ID", example = "24781")
|
||||
@ExcelProperty("商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "6917")
|
||||
@ExcelProperty("门店ID")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
@ExcelProperty("重量")
|
||||
private Double weight;
|
||||
|
||||
@Schema(description = "1-入库,2-出库", example = "1")
|
||||
@ExcelProperty("1-入库,2-出库")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "出库类型", example = "1")
|
||||
@ExcelProperty("出库类型")
|
||||
private Integer outType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 商品出入库记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class StoreGoodsInventoryRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "14073")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "商品ID", example = "24781")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "门店ID", example = "6917")
|
||||
private Long carteenId;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "重量")
|
||||
private Double weight;
|
||||
|
||||
@Schema(description = "1-入库,2-出库", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "出库类型", example = "1")
|
||||
private Integer outType;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventory;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 商品库存 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("member_store_goods_inventory")
|
||||
@KeySequence("member_store_goods_inventory_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StoreGoodsInventoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer goodsId;
|
||||
/**
|
||||
* 门店ID
|
||||
*/
|
||||
private Long carteenId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer number;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private Double weight;
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventoryrecord;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 商品出入库记录 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("member_store_goods_inventory_record")
|
||||
@KeySequence("member_store_goods_inventory_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StoreGoodsInventoryRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer goodsId;
|
||||
/**
|
||||
* 门店ID
|
||||
*/
|
||||
private Long carteenId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer number;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private Double weight;
|
||||
/**
|
||||
* 1-入库,2-出库
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
private Integer outType;
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.member.dal.mysql.customizeExcel;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreOrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreSaleGoodsVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -16,4 +17,5 @@ public interface CustomizeExcelMapper {
|
||||
|
||||
List<StoreOrderExcelVO> selectStoreOrder(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("carteenId")Long carteenId);
|
||||
|
||||
List<StoreSaleGoodsVO> selectStoreSaleGoods(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("carteenId")Long carteenId);
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.member.dal.mysql.storegoodsinventory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventory.StoreGoodsInventoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo.*;
|
||||
|
||||
/**
|
||||
* 商品库存 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface StoreGoodsInventoryMapper extends BaseMapperX<StoreGoodsInventoryDO> {
|
||||
|
||||
default PageResult<StoreGoodsInventoryDO> selectPage(StoreGoodsInventoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<StoreGoodsInventoryDO>()
|
||||
.eqIfPresent(StoreGoodsInventoryDO::getGoodsId, reqVO.getGoodsId())
|
||||
.eqIfPresent(StoreGoodsInventoryDO::getCarteenId, reqVO.getCarteenId())
|
||||
.eqIfPresent(StoreGoodsInventoryDO::getNumber, reqVO.getNumber())
|
||||
.eqIfPresent(StoreGoodsInventoryDO::getWeight, reqVO.getWeight())
|
||||
.betweenIfPresent(StoreGoodsInventoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(StoreGoodsInventoryDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.member.dal.mysql.storegoodsinventoryrecord;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventoryrecord.StoreGoodsInventoryRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo.*;
|
||||
|
||||
/**
|
||||
* 商品出入库记录 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface StoreGoodsInventoryRecordMapper extends BaseMapperX<StoreGoodsInventoryRecordDO> {
|
||||
|
||||
default PageResult<StoreGoodsInventoryRecordDO> selectPage(StoreGoodsInventoryRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<StoreGoodsInventoryRecordDO>()
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getGoodsId, reqVO.getGoodsId())
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getCarteenId, reqVO.getCarteenId())
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getNumber, reqVO.getNumber())
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getWeight, reqVO.getWeight())
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getType, reqVO.getType())
|
||||
.eqIfPresent(StoreGoodsInventoryRecordDO::getOutType, reqVO.getOutType())
|
||||
.betweenIfPresent(StoreGoodsInventoryRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(StoreGoodsInventoryRecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.service.customizeExcel;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreOrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreSaleGoodsVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -14,4 +15,6 @@ public interface CustomizeExcelService {
|
||||
List<OrderExcelVO> exportOrderExcel(String startTime,String endTime,Long carteenId);
|
||||
|
||||
List<StoreOrderExcelVO> exportStoreOrderExcel(String startTime, String endTime, Long carteenId);
|
||||
|
||||
List<StoreSaleGoodsVO> exportStoreSaleGoodsExcel(String startTime, String endTime, Long carteenId);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.service.customizeExcel;
|
||||
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreOrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreSaleGoodsVO;
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.customizeExcel.CustomizeExcelMapper;
|
||||
import cn.iocoder.yudao.module.member.service.devicewarn.DeviceWarnService;
|
||||
import cn.iocoder.yudao.module.system.api.deviceInfo.DeviceInfoApi;
|
||||
@ -26,4 +27,9 @@ public class CustomizeExcelServiceImpl implements CustomizeExcelService {
|
||||
public List<StoreOrderExcelVO> exportStoreOrderExcel(String startTime, String endTime, Long carteenId) {
|
||||
return customizeExcelMapper.selectStoreOrder(startTime,endTime,carteenId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StoreSaleGoodsVO> exportStoreSaleGoodsExcel(String startTime, String endTime, Long carteenId) {
|
||||
return customizeExcelMapper.selectStoreSaleGoods(startTime,endTime,carteenId);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.member.service.storegoodsinventory;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventory.StoreGoodsInventoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 商品库存 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface StoreGoodsInventoryService {
|
||||
|
||||
/**
|
||||
* 创建商品库存
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createStoreGoodsInventory(@Valid StoreGoodsInventorySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新商品库存
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStoreGoodsInventory(@Valid StoreGoodsInventorySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除商品库存
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStoreGoodsInventory(Integer id);
|
||||
|
||||
/**
|
||||
* 获得商品库存
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 商品库存
|
||||
*/
|
||||
StoreGoodsInventoryDO getStoreGoodsInventory(Integer id);
|
||||
|
||||
/**
|
||||
* 获得商品库存分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 商品库存分页
|
||||
*/
|
||||
PageResult<StoreGoodsInventoryDO> getStoreGoodsInventoryPage(StoreGoodsInventoryPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.member.service.storegoodsinventory;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventory.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventory.StoreGoodsInventoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.storegoodsinventory.StoreGoodsInventoryMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 商品库存 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StoreGoodsInventoryServiceImpl implements StoreGoodsInventoryService {
|
||||
|
||||
@Resource
|
||||
private StoreGoodsInventoryMapper storeGoodsInventoryMapper;
|
||||
|
||||
@Override
|
||||
public Integer createStoreGoodsInventory(StoreGoodsInventorySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StoreGoodsInventoryDO storeGoodsInventory = BeanUtils.toBean(createReqVO, StoreGoodsInventoryDO.class);
|
||||
storeGoodsInventoryMapper.insert(storeGoodsInventory);
|
||||
// 返回
|
||||
return storeGoodsInventory.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStoreGoodsInventory(StoreGoodsInventorySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStoreGoodsInventoryExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StoreGoodsInventoryDO updateObj = BeanUtils.toBean(updateReqVO, StoreGoodsInventoryDO.class);
|
||||
storeGoodsInventoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStoreGoodsInventory(Integer id) {
|
||||
// 校验存在
|
||||
validateStoreGoodsInventoryExists(id);
|
||||
// 删除
|
||||
storeGoodsInventoryMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStoreGoodsInventoryExists(Integer id) {
|
||||
if (storeGoodsInventoryMapper.selectById(id) == null) {
|
||||
throw exception(STORE_GOODS_INVENTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StoreGoodsInventoryDO getStoreGoodsInventory(Integer id) {
|
||||
return storeGoodsInventoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StoreGoodsInventoryDO> getStoreGoodsInventoryPage(StoreGoodsInventoryPageReqVO pageReqVO) {
|
||||
return storeGoodsInventoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.member.service.storegoodsinventoryrecord;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventoryrecord.StoreGoodsInventoryRecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 商品出入库记录 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface StoreGoodsInventoryRecordService {
|
||||
|
||||
/**
|
||||
* 创建商品出入库记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createStoreGoodsInventoryRecord(@Valid StoreGoodsInventoryRecordSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新商品出入库记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStoreGoodsInventoryRecord(@Valid StoreGoodsInventoryRecordSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除商品出入库记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStoreGoodsInventoryRecord(Integer id);
|
||||
|
||||
/**
|
||||
* 获得商品出入库记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 商品出入库记录
|
||||
*/
|
||||
StoreGoodsInventoryRecordDO getStoreGoodsInventoryRecord(Integer id);
|
||||
|
||||
/**
|
||||
* 获得商品出入库记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 商品出入库记录分页
|
||||
*/
|
||||
PageResult<StoreGoodsInventoryRecordDO> getStoreGoodsInventoryRecordPage(StoreGoodsInventoryRecordPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.member.service.storegoodsinventoryrecord;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.storegoodsinventoryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.storegoodsinventoryrecord.StoreGoodsInventoryRecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.storegoodsinventoryrecord.StoreGoodsInventoryRecordMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 商品出入库记录 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StoreGoodsInventoryRecordServiceImpl implements StoreGoodsInventoryRecordService {
|
||||
|
||||
@Resource
|
||||
private StoreGoodsInventoryRecordMapper storeGoodsInventoryRecordMapper;
|
||||
|
||||
@Override
|
||||
public Integer createStoreGoodsInventoryRecord(StoreGoodsInventoryRecordSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StoreGoodsInventoryRecordDO storeGoodsInventoryRecord = BeanUtils.toBean(createReqVO, StoreGoodsInventoryRecordDO.class);
|
||||
storeGoodsInventoryRecordMapper.insert(storeGoodsInventoryRecord);
|
||||
// 返回
|
||||
return storeGoodsInventoryRecord.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStoreGoodsInventoryRecord(StoreGoodsInventoryRecordSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStoreGoodsInventoryRecordExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StoreGoodsInventoryRecordDO updateObj = BeanUtils.toBean(updateReqVO, StoreGoodsInventoryRecordDO.class);
|
||||
storeGoodsInventoryRecordMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStoreGoodsInventoryRecord(Integer id) {
|
||||
// 校验存在
|
||||
validateStoreGoodsInventoryRecordExists(id);
|
||||
// 删除
|
||||
storeGoodsInventoryRecordMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStoreGoodsInventoryRecordExists(Integer id) {
|
||||
if (storeGoodsInventoryRecordMapper.selectById(id) == null) {
|
||||
throw exception(STORE_GOODS_INVENTORY_RECORD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StoreGoodsInventoryRecordDO getStoreGoodsInventoryRecord(Integer id) {
|
||||
return storeGoodsInventoryRecordMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StoreGoodsInventoryRecordDO> getStoreGoodsInventoryRecordPage(StoreGoodsInventoryRecordPageReqVO pageReqVO) {
|
||||
return storeGoodsInventoryRecordMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -55,4 +55,18 @@
|
||||
order by mo.user_id,mo.order_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectStoreSaleGoods" resultType="cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.StoreSaleGoodsVO">
|
||||
select md.goods_name,
|
||||
md.custom_price,
|
||||
sum(md.number) as sumNum,
|
||||
sum(md.number * md.custom_price) as totalPrice
|
||||
from member_store_order_detail md
|
||||
left join member_store_order mo on md.order_id = mo.order_id
|
||||
where DATE_FORMAT(md.create_time, '%Y%m%d') between #{startTime} and #{endTime} and mo.carteen_id = #{carteenId}
|
||||
and md.deleted = false
|
||||
and mo.deleted = false
|
||||
group by md.goods_name, md.custom_price;
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user