文件上传https

This commit is contained in:
chen-xin-zhi 2025-03-18 15:08:40 +08:00
parent 8b6a558f03
commit 18df96e3b5
2 changed files with 98 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import com.cultural.heritage.model.entity.BookingTime;
import com.cultural.heritage.model.entity.PhotoProducts; import com.cultural.heritage.model.entity.PhotoProducts;
import com.cultural.heritage.model.vo.bookingDate.BookingDateVO; import com.cultural.heritage.model.vo.bookingDate.BookingDateVO;
import com.cultural.heritage.model.vo.bookingTime.BookingTimeVO; import com.cultural.heritage.model.vo.bookingTime.BookingTimeVO;
import com.cultural.heritage.model.vo.photoProducts.PhotoProductsMainInfoVO;
import com.cultural.heritage.model.vo.photoProducts.PhotoProductsVO; import com.cultural.heritage.model.vo.photoProducts.PhotoProductsVO;
import com.cultural.heritage.service.book.AdvanceOrderService; import com.cultural.heritage.service.book.AdvanceOrderService;
import com.cultural.heritage.service.book.BookingDateService; import com.cultural.heritage.service.book.BookingDateService;
@ -304,6 +305,27 @@ public class PhotoProductsController {
/**
* 小程序端用户根据id查询写真产品主要信息
* @param commonRequest 写真产品id
* @return 写真产品
*/
@PostMapping("/list/main/id")
@Operation(summary = "小程序端用户根据id查询写真产品主要信息", description = "参数写真产品id权限所有人方法名getPhotoProductsMainInfoById")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<PhotoProductsMainInfoVO> getPhotoProductsMainInfoById(@RequestBody CommonRequest commonRequest) {
if (commonRequest == null || commonRequest.getId() <= 0) {
throw new BusinessException(ErrorCode.PARAMS_ERROR);
}
Long id = commonRequest.getId();
PhotoProducts photoProducts = photoProductsService.getById(id);
PhotoProductsMainInfoVO photoProductsMainInfoVO = new PhotoProductsMainInfoVO();
BeanUtils.copyProperties(photoProducts, photoProductsMainInfoVO);
return ResultUtils.success(photoProductsMainInfoVO);
}
/** /**
* 小程序端用户根据id查询写真产品 * 小程序端用户根据id查询写真产品

View File

@ -0,0 +1,76 @@
package com.cultural.heritage.model.vo.photoProducts;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class PhotoProductsMainInfoVO implements Serializable {
/**
* 产品id
*/
private Long id;
/**
* 产品名称
*/
private String name;
/**
* 介绍图片
*/
private String introImg;
/**
* 产品详情富文本
*/
private String richText;
/**
* 最小预约人数
*/
private Integer minNumber;
/**
* 最大预约人数
*/
private Integer maxNumber;
/**
* 拍摄场景
*/
private String shotScene;
/**
* 产品价格
*/
private BigDecimal price;
/**
* 写真类别名称
*/
private String categoryName;
/**
* 是否上架
*/
private Integer isShelves;
@Serial
private static final long serialVersionUID = 1L;
}