扩展服务
This commit is contained in:
@@ -35,6 +35,11 @@
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.5.13</version> <!-- 推荐使用最新稳定版本 -->
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -31,4 +31,5 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode SKU_SERVICE_MATERIAL_NOT_EXISTS = new ErrorCode(10019, "服务物料详情不存在");
|
||||
ErrorCode SKU_SERVICES_FORM_NOT_EXISTS = new ErrorCode(10021, "商品SKU扩展服务表单不存在");
|
||||
ErrorCode SKU_SERVICE_TRANSPORT_NOT_EXISTS = new ErrorCode(10022, "服务遗体运输不存在");
|
||||
ErrorCode SKU_SERVICE_DETAILS_NOT_EXISTS = new ErrorCode(10023, "服务详情不存在");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.tashow.cloud.productapi.general;
|
||||
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处理 List<String> 与数据库逗号分隔字符串之间的转换
|
||||
*/
|
||||
public class StringListTypeHandler extends BaseTypeHandler<List<String>> {
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, List<String> parameter, JdbcType jdbcType) throws SQLException {
|
||||
// 将 List 转为逗号分隔的字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int j = 0; j < parameter.size(); j++) {
|
||||
if (j > 0) sb.append(",");
|
||||
sb.append(parameter.get(j));
|
||||
}
|
||||
ps.setString(i, sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
String str = rs.getString(columnName);
|
||||
return parseStringToList(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
String str = rs.getString(columnIndex);
|
||||
return parseStringToList(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||
String str = cs.getString(columnIndex);
|
||||
return parseStringToList(str);
|
||||
}
|
||||
|
||||
private List<String> parseStringToList(String str) {
|
||||
if (str == null || str.trim().length() == 0) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return Arrays.asList(str.split(","));
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,6 @@ public abstract class BaseDO implements Serializable, TransPojo {
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
<artifactId>tashow-framework-monitor</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- EasyExcel 核心库 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
||||
@@ -47,10 +47,21 @@ public class CategoryController {
|
||||
*/
|
||||
@PermitAll
|
||||
@GetMapping("/categoryList")
|
||||
public CommonResult<List<CategoryDO>> categoryList() {
|
||||
public CommonResult<List<CategoryDO>> categoryList( @RequestParam(value = "grade", required = false) Integer grade,
|
||||
@RequestParam(value = "categoryId", required = false) Long categoryId,
|
||||
@RequestParam(value = "status", required = false) Integer status) {
|
||||
LambdaQueryWrapper<CategoryDO> wrapper = new LambdaQueryWrapper<>();
|
||||
//TODO 获取当前登录用户
|
||||
wrapper.eq(CategoryDO::getShopId, 1L);
|
||||
if(grade != null) {
|
||||
wrapper.eq(CategoryDO::getGrade, grade);
|
||||
}
|
||||
if(categoryId != null) {
|
||||
wrapper.eq(CategoryDO::getCategoryId, categoryId);
|
||||
}
|
||||
if (status != null){
|
||||
wrapper.eq(CategoryDO::getStatus, status);
|
||||
}
|
||||
List<CategoryDO> categoryMenuList = categoryService.list(wrapper);
|
||||
return success(categoryMenuList);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ package com.tashow.cloud.product.controller;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuDO;
|
||||
import com.tashow.cloud.product.service.SkuService;
|
||||
import com.tashow.cloud.product.vo.prod.ProdServiceVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuExtendVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuPageReqVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuRespVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuSaveReqVO;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -46,6 +49,14 @@ public class SkuController {
|
||||
return success(skuService.createSku(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/createSkuExtend")
|
||||
@Operation(summary = "创建sku扩展服务配置")
|
||||
@PermitAll
|
||||
public CommonResult<Boolean> createSkuExtend(@Valid @RequestBody SkuExtendVO skuExtendVO) {
|
||||
skuService.createSkuExtend(skuExtendVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新单品SKU")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku:update')")
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.tashow.cloud.product.controller;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuServiceDetailsDO;
|
||||
import com.tashow.cloud.product.service.SkuServiceDetailsService;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsRespVO;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.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 jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.tashow.cloud.common.pojo.PageParam;
|
||||
import com.tashow.cloud.common.pojo.PageResult;
|
||||
import com.tashow.cloud.common.pojo.CommonResult;
|
||||
import com.tashow.cloud.common.util.object.BeanUtils;
|
||||
import static com.tashow.cloud.common.pojo.CommonResult.success;
|
||||
|
||||
import com.tashow.cloud.excel.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 服务详情")
|
||||
@RestController
|
||||
@RequestMapping("/tz/sku-service-details")
|
||||
@Validated
|
||||
public class SkuServiceDetailsController {
|
||||
|
||||
@Resource
|
||||
private SkuServiceDetailsService skuServiceDetailsService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建服务详情")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:create')")
|
||||
public CommonResult<Long> createSkuServiceDetails(@Valid @RequestBody SkuServiceDetailsSaveReqVO createReqVO) {
|
||||
return success(skuServiceDetailsService.createSkuServiceDetails(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新服务详情")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:update')")
|
||||
public CommonResult<Boolean> updateSkuServiceDetails(@Valid @RequestBody SkuServiceDetailsSaveReqVO updateReqVO) {
|
||||
skuServiceDetailsService.updateSkuServiceDetails(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除服务详情")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:delete')")
|
||||
public CommonResult<Boolean> deleteSkuServiceDetails(@RequestParam("id") Long id) {
|
||||
skuServiceDetailsService.deleteSkuServiceDetails(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得服务详情")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:query')")
|
||||
public CommonResult<SkuServiceDetailsRespVO> getSkuServiceDetails(@RequestParam("id") Long id) {
|
||||
SkuServiceDetailsDO skuServiceDetails = skuServiceDetailsService.getSkuServiceDetails(id);
|
||||
return success(BeanUtils.toBean(skuServiceDetails, SkuServiceDetailsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得服务详情分页")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:query')")
|
||||
public CommonResult<PageResult<SkuServiceDetailsRespVO>> getSkuServiceDetailsPage(@Valid SkuServiceDetailsPageReqVO pageReqVO) {
|
||||
PageResult<SkuServiceDetailsDO> pageResult = skuServiceDetailsService.getSkuServiceDetailsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SkuServiceDetailsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出服务详情 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('tz:sku-service-details:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSkuServiceDetailsExcel(@Valid SkuServiceDetailsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SkuServiceDetailsDO> list = skuServiceDetailsService.getSkuServiceDetailsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "服务详情.xls", "数据", SkuServiceDetailsRespVO.class,
|
||||
BeanUtils.toBean(list, SkuServiceDetailsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.tashow.cloud.product.dto;
|
||||
|
||||
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@@ -39,7 +40,7 @@ public class ProdDO extends BaseDO {
|
||||
/**
|
||||
* seo标题
|
||||
*/
|
||||
private String seoName;
|
||||
private String seoShortName;
|
||||
/**
|
||||
* seo搜索
|
||||
*/
|
||||
@@ -88,10 +89,21 @@ public class ProdDO extends BaseDO {
|
||||
*/
|
||||
private String imgs;
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private String video;
|
||||
|
||||
/**
|
||||
* 商品轮播图片,以,分割
|
||||
*/
|
||||
private String whiteImg;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
@TableField(typeHandler = StringListTypeHandler.class)
|
||||
private List<String> tag;
|
||||
|
||||
/**
|
||||
* 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SkuDO extends BaseDO {
|
||||
*/
|
||||
private String overview;
|
||||
/**
|
||||
* 库存
|
||||
* 库存(-1代表无限库存)
|
||||
*/
|
||||
private Integer stocks;
|
||||
/**
|
||||
@@ -124,13 +124,19 @@ public class SkuDO extends BaseDO {
|
||||
* 0 禁用 1 启用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 0 正常 1 已被删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
/**
|
||||
* 最小购买数量
|
||||
*/
|
||||
private Integer moq;
|
||||
/**
|
||||
* 是否上下架0下架1上架
|
||||
*/
|
||||
private Integer isShelf;
|
||||
|
||||
/**
|
||||
* 是否默认规则0否1是
|
||||
*/
|
||||
private Integer isSpecs;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.tashow.cloud.product.dto;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 服务详情 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("tz_sku_service_details")
|
||||
@KeySequence("tz_sku_service_details_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SkuServiceDetailsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 服务详情的唯一标识符
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 关联的扩展服务ID
|
||||
*/
|
||||
private Long serviceId;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String pic;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 是否收费0:免费1收费
|
||||
*/
|
||||
private Integer isCharge;
|
||||
/**
|
||||
* 是否默认值0否1是
|
||||
*/
|
||||
private Integer isDefault;
|
||||
/**
|
||||
* 类型:0:配置信息1:交付方式
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
private String adress;
|
||||
|
||||
/**
|
||||
* 触发节点名称
|
||||
*/
|
||||
private String trigger;
|
||||
|
||||
/**
|
||||
* 触发节点id
|
||||
*/
|
||||
private Long triggerId;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String describe;
|
||||
|
||||
|
||||
}
|
||||
@@ -43,6 +43,12 @@ public class SkuServicesFormDO extends BaseDO {
|
||||
* 是否启用该服务
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.tashow.cloud.product.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.tashow.cloud.common.pojo.PageResult;
|
||||
import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX;
|
||||
import com.tashow.cloud.product.dto.SkuServiceDetailsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 服务详情 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface SkuServiceDetailsMapper extends BaseMapperX<SkuServiceDetailsDO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.tashow.cloud.product.service;
|
||||
import java.util.*;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuDO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuExtendVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuPageReqVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
@@ -24,6 +25,13 @@ public interface SkuService {
|
||||
*/
|
||||
Long createSku(@Valid SkuSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 创建sku扩展服务配置
|
||||
*
|
||||
* @param skuExtendVO 更新信息
|
||||
*/
|
||||
void createSkuExtend(@Valid SkuExtendVO skuExtendVO);
|
||||
|
||||
/**
|
||||
* 更新单品SKU
|
||||
*
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.tashow.cloud.product.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuServiceDetailsDO;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.tashow.cloud.common.pojo.PageResult;
|
||||
import com.tashow.cloud.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 服务详情 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface SkuServiceDetailsService {
|
||||
|
||||
/**
|
||||
* 创建服务详情
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createSkuServiceDetails(@Valid SkuServiceDetailsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新服务详情
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSkuServiceDetails(@Valid SkuServiceDetailsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除服务详情
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSkuServiceDetails(Long id);
|
||||
|
||||
/**
|
||||
* 获得服务详情
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 服务详情
|
||||
*/
|
||||
SkuServiceDetailsDO getSkuServiceDetails(Long id);
|
||||
|
||||
/**
|
||||
* 获得服务详情分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 服务详情分页
|
||||
*/
|
||||
PageResult<SkuServiceDetailsDO> getSkuServiceDetailsPage(SkuServiceDetailsPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -64,6 +64,7 @@ public class ProdServiceImpl implements ProdService {
|
||||
private ProdWeightRangePricesMapper prodWeightRangePricesMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Long createProd(ProdSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProdDO prod = BeanUtils.toBean(createReqVO, ProdDO.class);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.tashow.cloud.product.service.impl;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuServiceDetailsDO;
|
||||
import com.tashow.cloud.product.mapper.SkuServiceDetailsMapper;
|
||||
import com.tashow.cloud.product.service.SkuServiceDetailsService;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO;
|
||||
import com.tashow.cloud.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO;
|
||||
import com.tashow.cloud.productapi.enums.ErrorCodeConstants;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.tashow.cloud.common.pojo.PageResult;
|
||||
import com.tashow.cloud.common.pojo.PageParam;
|
||||
import com.tashow.cloud.common.util.object.BeanUtils;
|
||||
import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception;
|
||||
|
||||
/**
|
||||
* 服务详情 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SkuServiceDetailsServiceImpl implements SkuServiceDetailsService {
|
||||
|
||||
@Resource
|
||||
private SkuServiceDetailsMapper skuServiceDetailsMapper;
|
||||
|
||||
@Override
|
||||
public Long createSkuServiceDetails(SkuServiceDetailsSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SkuServiceDetailsDO skuServiceDetails = BeanUtils.toBean(createReqVO, SkuServiceDetailsDO.class);
|
||||
skuServiceDetailsMapper.insert(skuServiceDetails);
|
||||
// 返回
|
||||
return skuServiceDetails.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkuServiceDetails(SkuServiceDetailsSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSkuServiceDetailsExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SkuServiceDetailsDO updateObj = BeanUtils.toBean(updateReqVO, SkuServiceDetailsDO.class);
|
||||
skuServiceDetailsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSkuServiceDetails(Long id) {
|
||||
// 校验存在
|
||||
validateSkuServiceDetailsExists(id);
|
||||
// 删除
|
||||
skuServiceDetailsMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateSkuServiceDetailsExists(Long id) {
|
||||
if (skuServiceDetailsMapper.selectById(id) == null) {
|
||||
throw exception(ErrorCodeConstants.SKU_SERVICE_DETAILS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkuServiceDetailsDO getSkuServiceDetails(Long id) {
|
||||
return skuServiceDetailsMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SkuServiceDetailsDO> getSkuServiceDetailsPage(SkuServiceDetailsPageReqVO pageReqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.tashow.cloud.product.service.impl;
|
||||
|
||||
import com.tashow.cloud.product.dto.SkuDO;
|
||||
import com.tashow.cloud.product.mapper.SkuMapper;
|
||||
import com.tashow.cloud.product.dto.*;
|
||||
import com.tashow.cloud.product.mapper.*;
|
||||
import com.tashow.cloud.product.service.SkuService;
|
||||
import com.tashow.cloud.product.vo.sku.SkuExtendVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuPageReqVO;
|
||||
import com.tashow.cloud.product.vo.sku.SkuSaveReqVO;
|
||||
import com.tashow.cloud.productapi.enums.BaseEnum;
|
||||
import com.tashow.cloud.productapi.enums.ErrorCodeConstants;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -30,6 +32,16 @@ public class SkuServiceImpl implements SkuService {
|
||||
|
||||
@Resource
|
||||
private SkuMapper skuMapper;
|
||||
@Resource
|
||||
private SkuServiceDetailsMapper skuServiceDetailsMapper;
|
||||
@Resource
|
||||
private SkuServicesFormMapper skuServicesFormMapper;
|
||||
@Resource
|
||||
private SkuServiceMaterialMapper skuServiceMaterialMapper;
|
||||
@Resource
|
||||
private SkuServiceTransportMapper skuServiceTransportMapper;
|
||||
@Resource
|
||||
private SkuServiceDeliverMapper skuServiceDeliverMapper;
|
||||
|
||||
@Override
|
||||
public Long createSku(SkuSaveReqVO createReqVO) {
|
||||
@@ -40,6 +52,164 @@ public class SkuServiceImpl implements SkuService {
|
||||
return sku.getSkuId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void createSkuExtend(SkuExtendVO skuExtendVO) {
|
||||
//接运车辆配置
|
||||
if(Objects.equals(skuExtendVO.getTransportCarSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("接运车辆配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(1);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceDetailsDO skuServiceDetailsDO:skuExtendVO.getTransportCarList()){
|
||||
skuServiceDetailsDO.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceDetailsMapper.insert(skuServiceDetailsDO);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("接运车辆服务物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(2);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getTransportCarMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
//遗体运输目的地配置
|
||||
if(Objects.equals(skuExtendVO.getTrafficSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("遗体运输目的地配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(3);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceTransportDO skuServiceTransportDO:skuExtendVO.getTrafficList()){
|
||||
skuServiceTransportDO.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceTransportMapper.insert(skuServiceTransportDO);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("遗体运输目的地物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(4);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getTrafficMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
//遗体清洁配置
|
||||
if(Objects.equals(skuExtendVO.getCleanSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("遗体清洁配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(5);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceDetailsDO skuServiceDetails:skuExtendVO.getCleanList()){
|
||||
skuServiceDetails.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceDetailsMapper.insert(skuServiceDetails);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("遗体清洁物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(6);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getCleanMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
//追思告别配置
|
||||
if(Objects.equals(skuExtendVO.getReflectionSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("追思告别配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(7);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceDetailsDO skuServiceDetails:skuExtendVO.getReflectionList()){
|
||||
skuServiceDetails.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceDetailsMapper.insert(skuServiceDetails);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("追思告别物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(8);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getReflectionMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
|
||||
//遗体火化配置
|
||||
if(Objects.equals(skuExtendVO.getCremationSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("遗体火化配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(9);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceDetailsDO skuServiceDetails:skuExtendVO.getCremationList()){
|
||||
skuServiceDetails.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceDetailsMapper.insert(skuServiceDetails);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("遗体火化物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(10);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getCremationMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
|
||||
//骨灰处理配置
|
||||
if(Objects.equals(skuExtendVO.getAshProcessingSwitch(),BaseEnum.YES_ONE.getKey())){
|
||||
SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO();
|
||||
skuServicesFormDO.setServiceName("骨灰处理配置");
|
||||
skuServicesFormDO.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesFormDO.setType(9);
|
||||
skuServicesFormDO.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesFormDO);
|
||||
for(SkuServiceDetailsDO skuServiceDetails:skuExtendVO.getAshProcessingList()){
|
||||
skuServiceDetails.setServiceId(skuServicesFormDO.getId());
|
||||
skuServiceDetailsMapper.insert(skuServiceDetails);
|
||||
}
|
||||
SkuServicesFormDO skuForm = new SkuServicesFormDO();
|
||||
skuForm.setServiceName("骨灰处理配送方式");
|
||||
skuForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuForm.setType(10);
|
||||
skuForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuForm);
|
||||
for(SkuServiceDeliverDO skuServiceDeliverDO:skuExtendVO.getAshProcessingDeliverList()){
|
||||
skuServiceDeliverDO.setServiceId(skuForm.getId());
|
||||
skuServiceDeliverMapper.insert(skuServiceDeliverDO);
|
||||
}
|
||||
SkuServicesFormDO skuServicesForm = new SkuServicesFormDO();
|
||||
skuServicesForm.setServiceName("骨灰处理物料");
|
||||
skuServicesForm.setIsEnabled(BaseEnum.YES.getKey());
|
||||
skuServicesForm.setType(10);
|
||||
skuServicesForm.setName(skuExtendVO.getSkuFormName());
|
||||
skuServicesFormMapper.insert(skuServicesForm);
|
||||
for(SkuServiceMaterialDO skuServiceMaterialDO:skuExtendVO.getAshProcessingMaterialList()){
|
||||
skuServiceMaterialDO.setServiceId(skuServicesForm.getId());
|
||||
skuServiceMaterialMapper.insert(skuServiceMaterialDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSku(SkuSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -24,7 +25,7 @@ public class ProdPageReqVO extends PageParam {
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "seo标题", example = "李四")
|
||||
private String seoName;
|
||||
private String seoShortName;
|
||||
|
||||
@Schema(description = "seo搜索")
|
||||
private String seoSearch;
|
||||
@@ -53,7 +54,7 @@ public class ProdPageReqVO extends PageParam {
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
public List<String> tag;
|
||||
|
||||
@Schema(description = "商品编号")
|
||||
private String prodNumber;
|
||||
@@ -64,6 +65,16 @@ public class ProdPageReqVO extends PageParam {
|
||||
@Schema(description = "商品轮播图片,以,分割")
|
||||
private String imgs;
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private String video;
|
||||
|
||||
/**
|
||||
* 商品轮播图片,以,分割
|
||||
*/
|
||||
private String whiteImg;
|
||||
|
||||
@Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2")
|
||||
private Integer status;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 商品 Response VO")
|
||||
@Data
|
||||
@@ -26,7 +27,8 @@ public class ProdRespVO {
|
||||
|
||||
@Schema(description = "seo标题", example = "李四")
|
||||
@ExcelProperty("seo标题")
|
||||
private String seoName;
|
||||
private String seoShortName;
|
||||
|
||||
|
||||
@Schema(description = "seo搜索")
|
||||
@ExcelProperty("seo搜索")
|
||||
@@ -64,6 +66,16 @@ public class ProdRespVO {
|
||||
@ExcelProperty("商品轮播图片,以,分割")
|
||||
private String imgs;
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private String video;
|
||||
|
||||
/**
|
||||
* 商品轮播图片,以,分割
|
||||
*/
|
||||
private String whiteImg;
|
||||
|
||||
@Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2")
|
||||
@ExcelProperty("默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核")
|
||||
private Integer status;
|
||||
@@ -88,7 +100,7 @@ public class ProdRespVO {
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
public List<String> tag;
|
||||
|
||||
@Schema(description = "分享话术")
|
||||
@ExcelProperty("分享话术")
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.tashow.cloud.product.vo.prod;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.tashow.cloud.product.dto.SkuDO;
|
||||
import com.tashow.cloud.product.vo.prodprop.ProdPropSaveReqVO;
|
||||
//import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import org.apache.ibatis.type.TypeHandler;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 商品新增/修改 Request VO")
|
||||
@@ -23,7 +25,7 @@ public class ProdSaveReqVO {
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "seo标题", example = "李四")
|
||||
private String seoName;
|
||||
private String seoShortName;
|
||||
|
||||
@Schema(description = "seo搜索")
|
||||
private String seoSearch;
|
||||
@@ -42,6 +44,15 @@ public class ProdSaveReqVO {
|
||||
|
||||
@Schema(description = "详细描述")
|
||||
private String content;
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private String video;
|
||||
|
||||
/**
|
||||
* 白底图
|
||||
*/
|
||||
private String whiteImg;
|
||||
|
||||
@Schema(description = "商品编号")
|
||||
private String prodNumber;
|
||||
@@ -74,7 +85,7 @@ public class ProdSaveReqVO {
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
public List<String> tag;
|
||||
|
||||
@Schema(description = "分享话术")
|
||||
private String shareContent;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.tashow.cloud.product.vo.sku;
|
||||
|
||||
import com.tashow.cloud.product.dto.*;
|
||||
import com.tashow.cloud.product.vo.prodemergencyresponse.ProdEmergencyInfoVO;
|
||||
import com.tashow.cloud.product.vo.prodserviceareas.ProdServiceAreasInfoVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "sku扩展服务配置 VO")
|
||||
@Data
|
||||
public class SkuExtendVO {
|
||||
|
||||
@Schema(description = "表单名称")
|
||||
private String skuFormName;
|
||||
|
||||
@Schema(description = "遗体接运车辆配置0关1开")
|
||||
private Integer transportCarSwitch;
|
||||
@Schema(description = "遗体接运扩展服务配置")
|
||||
public List<SkuServiceDetailsDO> transportCarList;
|
||||
@Schema(description = "遗体接运服务物料")
|
||||
public List<SkuServiceMaterialDO> transportCarMaterialList;
|
||||
|
||||
@Schema(description = "遗体运输目的地配置0关1开")
|
||||
private Integer trafficSwitch;
|
||||
@Schema(description = "遗体运输目的地配置")
|
||||
public List<SkuServiceTransportDO> trafficList;
|
||||
@Schema(description = "遗体运输目的地物料")
|
||||
public List<SkuServiceMaterialDO> trafficMaterialList;
|
||||
|
||||
@Schema(description = "遗体清洁配置0关1开")
|
||||
private Integer cleanSwitch;
|
||||
@Schema(description = "遗体清洁配置")
|
||||
public List<SkuServiceDetailsDO> cleanList;
|
||||
@Schema(description = "遗体清洁物料")
|
||||
public List<SkuServiceMaterialDO> cleanMaterialList;
|
||||
|
||||
@Schema(description = "追思告别配置0关1开")
|
||||
private Integer reflectionSwitch;
|
||||
@Schema(description = "追思告别配置")
|
||||
public List<SkuServiceDetailsDO> reflectionList;
|
||||
@Schema(description = "追思告别物料")
|
||||
public List<SkuServiceMaterialDO> reflectionMaterialList;
|
||||
|
||||
@Schema(description = "遗体火化配置0关1开")
|
||||
private Integer cremationSwitch;
|
||||
@Schema(description = "遗体火化配置")
|
||||
public List<SkuServiceDetailsDO> cremationList;
|
||||
@Schema(description = "遗体火化物料")
|
||||
public List<SkuServiceMaterialDO> cremationMaterialList;
|
||||
|
||||
@Schema(description = "骨灰处理配置0关1开")
|
||||
private Integer ashProcessingSwitch;
|
||||
@Schema(description = "骨灰处理配置")
|
||||
public List<SkuServiceDetailsDO> ashProcessingList;
|
||||
@Schema(description = "骨灰处理配送方式配置")
|
||||
public List<SkuServiceDeliverDO> ashProcessingDeliverList;
|
||||
@Schema(description = "骨灰处理物料")
|
||||
public List<SkuServiceMaterialDO> ashProcessingMaterialList;
|
||||
|
||||
}
|
||||
@@ -94,5 +94,13 @@ public class SkuPageReqVO extends PageParam {
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
/**
|
||||
* 是否上下架0下架1上架
|
||||
*/
|
||||
private Integer isShelf;
|
||||
|
||||
/**
|
||||
* 是否默认规则0否1是
|
||||
*/
|
||||
private Integer isSpecs;
|
||||
}
|
||||
@@ -120,5 +120,13 @@ public class SkuRespVO {
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 是否上下架0下架1上架
|
||||
*/
|
||||
private Integer isShelf;
|
||||
|
||||
/**
|
||||
* 是否默认规则0否1是
|
||||
*/
|
||||
private Integer isSpecs;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.tashow.cloud.product.vo.skuservicedetails;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.tashow.cloud.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 服务详情分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SkuServiceDetailsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关联的扩展服务ID", example = "21602")
|
||||
private Long serviceId;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String pic;
|
||||
|
||||
@Schema(description = "名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "价格", example = "16929")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "是否收费0:免费1收费")
|
||||
private Boolean isCharge;
|
||||
|
||||
@Schema(description = "是否默认值0否1是")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "类型:0:配置信息1:交付方式", example = "2")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String describe;
|
||||
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
private String adress;
|
||||
|
||||
/**
|
||||
* 触发节点名称
|
||||
*/
|
||||
private String trigger;
|
||||
|
||||
/**
|
||||
* 触发节点id
|
||||
*/
|
||||
private Long triggerId;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.tashow.cloud.product.vo.skuservicedetails;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 服务详情 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SkuServiceDetailsRespVO {
|
||||
|
||||
@Schema(description = "服务详情的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "17139")
|
||||
@ExcelProperty("服务详情的唯一标识符")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21602")
|
||||
@ExcelProperty("关联的扩展服务ID")
|
||||
private Long serviceId;
|
||||
|
||||
@Schema(description = "图片")
|
||||
@ExcelProperty("图片")
|
||||
private String pic;
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "价格", example = "16929")
|
||||
@ExcelProperty("价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "是否收费0:免费1收费")
|
||||
@ExcelProperty("是否收费0:免费1收费")
|
||||
private Boolean isCharge;
|
||||
|
||||
@Schema(description = "是否默认值0否1是")
|
||||
@ExcelProperty("是否默认值0否1是")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "类型:0:配置信息1:交付方式", example = "2")
|
||||
@ExcelProperty("类型:0:配置信息1:交付方式")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "描述")
|
||||
@ExcelProperty("描述")
|
||||
private String describe;
|
||||
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
private String adress;
|
||||
|
||||
/**
|
||||
* 触发节点名称
|
||||
*/
|
||||
private String trigger;
|
||||
|
||||
/**
|
||||
* 触发节点id
|
||||
*/
|
||||
private Long triggerId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.tashow.cloud.product.vo.skuservicedetails;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 服务详情新增/修改 Request VO")
|
||||
@Data
|
||||
public class SkuServiceDetailsSaveReqVO {
|
||||
|
||||
@Schema(description = "服务详情的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "17139")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21602")
|
||||
@NotNull(message = "关联的扩展服务ID不能为空")
|
||||
private Long serviceId;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String pic;
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "价格", example = "16929")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "是否收费0:免费1收费")
|
||||
private Boolean isCharge;
|
||||
|
||||
@Schema(description = "是否默认值0否1是")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "类型:0:配置信息1:交付方式", example = "2")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String describe;
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
private String adress;
|
||||
|
||||
/**
|
||||
* 触发节点名称
|
||||
*/
|
||||
private String trigger;
|
||||
|
||||
/**
|
||||
* 触发节点id
|
||||
*/
|
||||
private Long triggerId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tashow.cloud.product.mapper.SkuServiceDetailsMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user