feat:预炸
This commit is contained in:
@@ -7,6 +7,7 @@ import com.cool.store.entity.PreFryQualificationApplyDO;
|
|||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.PreFryQualificationApplyMapper;
|
import com.cool.store.mapper.PreFryQualificationApplyMapper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ public class PreFryQualificationApplyDAO {
|
|||||||
public List<PreFryQualificationApplyDO> listByStoreCode(String storeCode) {
|
public List<PreFryQualificationApplyDO> listByStoreCode(String storeCode) {
|
||||||
// 参数校验
|
// 参数校验
|
||||||
if (StringUtils.isBlank(storeCode)) {
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED, "门店编码不能为空");
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return preFryQualificationApplyMapper.listByStoreCode(storeCode);
|
return preFryQualificationApplyMapper.listByStoreCode(storeCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,9 @@ import org.springframework.stereotype.Repository;
|
|||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public class PreFryRecordsDAO {
|
public class PreFryRecordsDAO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,9 @@ import com.cool.store.entity.PreFryRecordsDO;
|
|||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {
|
public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,6 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll
|
|||||||
jdbc.user= coolstore
|
jdbc.user= coolstore
|
||||||
jdbc.password = CSCErYcXniNYm7bT
|
jdbc.password = CSCErYcXniNYm7bT
|
||||||
|
|
||||||
table.name = xfsg_invoicing
|
table.name = xfsg_pre_fry_stage_changes
|
||||||
table.object.class = InvoicingDO
|
table.object.class = PreFryStageChangesDO
|
||||||
table.mapper = InvoicingMapper
|
table.mapper = PreFryStageChangesMapper
|
||||||
@@ -15,31 +15,31 @@ public class PreFriedProductsDetailDTO {
|
|||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ApiModelProperty(name = "产品编号")
|
@ApiModelProperty("产品编号")
|
||||||
private String productCode;
|
private String productCode;
|
||||||
|
|
||||||
@ApiModelProperty(name = "产品名称")
|
@ApiModelProperty("产品名称")
|
||||||
private String productName;
|
private String productName;
|
||||||
|
|
||||||
@ApiModelProperty(name = "产品图片URL")
|
@ApiModelProperty("产品图片URL")
|
||||||
private String productImage;
|
private String productImage;
|
||||||
|
|
||||||
@ApiModelProperty(name = "上架状态:0-下架,1-上架")
|
@ApiModelProperty("上架状态:0-下架,1-上架")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(name = "排序")
|
@ApiModelProperty("排序")
|
||||||
private Integer sortOrder;
|
private Integer sortOrder;
|
||||||
|
|
||||||
@ApiModelProperty(name = "创建时间")
|
@ApiModelProperty("创建时间")
|
||||||
private Date createdTime;
|
private Date createdTime;
|
||||||
|
|
||||||
@ApiModelProperty(name = "更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
private Date updatedTime;
|
private Date updatedTime;
|
||||||
|
|
||||||
@ApiModelProperty(name = "创建人")
|
@ApiModelProperty("创建人")
|
||||||
private String createdUserId;
|
private String createdUserId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "修改人")
|
@ApiModelProperty("修改人")
|
||||||
private String updatedUserId;
|
private String updatedUserId;
|
||||||
|
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.dto.pre.fry;
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
import com.cool.store.common.PageBasicInfo;
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,7 +11,10 @@ import lombok.Data;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class PreFriedProductsQueryDTO extends PageBasicInfo {
|
public class PreFriedProductsQueryDTO extends PageBasicInfo {
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
private String productCode;
|
private String productCode;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
private String productName;
|
private String productName;
|
||||||
|
@ApiModelProperty("产品状态")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 9:59
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryQualificationApplyDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -54,6 +54,12 @@ public class PreFryRecordsDO {
|
|||||||
@Column(name = "current_stage")
|
@Column(name = "current_stage")
|
||||||
private Integer currentStage;
|
private Integer currentStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交时所属 申请类型
|
||||||
|
*/
|
||||||
|
@Column(name = "current_apply_type")
|
||||||
|
private Integer currentApplyType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ public interface PreFryQualificationApplyService {
|
|||||||
*/
|
*/
|
||||||
Integer getMinApplyType(String storeCode);
|
Integer getMinApplyType(String storeCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店查询当前申请类型状态
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryQualificationApplyDTO> getListByStoreCode(String storeCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,24 @@ public class PreFryQualificationApplyServiceImpl implements PreFryQualificationA
|
|||||||
return minApplyTypeByStoreCode.getApplyType();
|
return minApplyTypeByStoreCode.getApplyType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PreFryQualificationApplyDTO> getListByStoreCode(String storeCode) {
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryQualificationApplyDO> preFryQualificationApplyDOS = preFryQualificationApplyDAO.listByStoreCode(storeCode);
|
||||||
|
List<PreFryQualificationApplyDTO> preFryQualificationApplyDTOS = new ArrayList<>();
|
||||||
|
preFryQualificationApplyDOS.forEach(x->{
|
||||||
|
PreFryQualificationApplyDTO preFryQualificationApplyDTO = new PreFryQualificationApplyDTO();
|
||||||
|
preFryQualificationApplyDTO.setId(x.getId());
|
||||||
|
preFryQualificationApplyDTO.setApplyType(x.getApplyType());
|
||||||
|
preFryQualificationApplyDTO.setAuditStatus(x.getAuditStatus());
|
||||||
|
preFryQualificationApplyDTO.setStoreCode(x.getStoreCode());
|
||||||
|
preFryQualificationApplyDTOS.add(preFryQualificationApplyDTO);
|
||||||
|
});
|
||||||
|
return preFryQualificationApplyDTOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void validateRequest(ApplyDTO request) {
|
private void validateRequest(ApplyDTO request) {
|
||||||
if (request == null || StringUtils.isBlank(request.getStoreCode())
|
if (request == null || StringUtils.isBlank(request.getStoreCode())
|
||||||
|
|||||||
@@ -69,9 +69,15 @@ public class MiniPreFryQualificationApplyController {
|
|||||||
|
|
||||||
|
|
||||||
@ApiOperation("获取门店最高优先级申请类型")
|
@ApiOperation("获取门店最高优先级申请类型")
|
||||||
@PostMapping("/getMinApplyType")
|
@GetMapping("/getMinApplyType")
|
||||||
public ResponseResult<Integer> getMinApplyType(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
public ResponseResult<Integer> getMinApplyType(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
||||||
return ResponseResult.success(preFryQualificationApplyService.getMinApplyType(storeCode));
|
return ResponseResult.success(preFryQualificationApplyService.getMinApplyType(storeCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据门店编码获取申请类型审批状态")
|
||||||
|
@GetMapping("/getListByStoreCode")
|
||||||
|
public ResponseResult<List<PreFryQualificationApplyDTO>> getListByStoreCode(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getListByStoreCode(storeCode));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user