feat:预炸
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author su'zh
|
||||||
|
* 审批操作类型枚举
|
||||||
|
*/
|
||||||
|
public enum AuditOperationTypeEnum {
|
||||||
|
/**
|
||||||
|
* 申请操作
|
||||||
|
*/
|
||||||
|
APPLY(1, "申请"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批通过
|
||||||
|
*/
|
||||||
|
APPROVE(2, "审批成功"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批拒绝
|
||||||
|
*/
|
||||||
|
REJECT(3, "审批失败");
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
AuditOperationTypeEnum(Integer code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static AuditOperationTypeEnum getByCode(Integer code) {
|
||||||
|
for (AuditOperationTypeEnum value : values()) {
|
||||||
|
if (value.getCode().equals(code)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -275,6 +275,10 @@ public enum ErrorCodeEnum {
|
|||||||
XGJ_COLLECTION_STATUS_COMPLETE(1511027,"新管家收费状态已完成,请确认!",null),
|
XGJ_COLLECTION_STATUS_COMPLETE(1511027,"新管家收费状态已完成,请确认!",null),
|
||||||
PAY_AMOUNT_ERROR(1511028,"缴费金额不能大于未缴金额",null),
|
PAY_AMOUNT_ERROR(1511028,"缴费金额不能大于未缴金额",null),
|
||||||
|
|
||||||
|
|
||||||
|
PRE_FRY_PRODUCT_NOT_EXIST(1511029,"预炸品不存在",null),
|
||||||
|
PRE_FRY_RECORD_EXIST(1511030,"当前门店已存在同类型预炸资质申请记录",null),
|
||||||
|
PRE_FRY_APPLY_NOT_EXIST(1511030,"预炸资质申请信息不存在",null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.cool.store.mapper.PreFriedProductsMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:11
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFriedProductsDAO {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsMapper preFriedProductsMapper;
|
||||||
|
|
||||||
|
public int createProduct(PreFriedProductsDO preFriedProductsDO){
|
||||||
|
return preFriedProductsMapper.insertSelective(preFriedProductsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateProduct(PreFriedProductsDO product) {
|
||||||
|
return preFriedProductsMapper.forceUpdate(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreFriedProductsDO queryById(Long id){
|
||||||
|
return preFriedProductsMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFriedProductsDO> selectByCondition(String productCode, String productName, Integer status){
|
||||||
|
return preFriedProductsMapper.selectByCondition(productCode,productName,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除(带业务校验)
|
||||||
|
*/
|
||||||
|
public int batchDeleteProducts(List<Long> ids, String userId) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.batchDelete(ids,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
*/
|
||||||
|
public int batchUpdateProductStatus(List<Long> ids, Integer status, String userId) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.batchUpdateStatus(ids, status,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int forceUpdate(PreFriedProductsDO preFriedProductsDO, String userId) {
|
||||||
|
if (preFriedProductsDO!=null&&preFriedProductsDO.getId()!=null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.forceUpdate(preFriedProductsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFryApprovalRecordsMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:12
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryApprovalRecordsDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryApprovalRecordsMapper preFryApprovalRecordsMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int createApprovalRecord(PreFryApprovalRecordsDO preFryApprovalRecordsDO) {
|
||||||
|
return preFryApprovalRecordsMapper.insertSelective(preFryApprovalRecordsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询申请的所有审批记录(按时间正序)
|
||||||
|
*/
|
||||||
|
public List<PreFryApprovalRecordsDO> getRecordsByApplyId(Long applyId) {
|
||||||
|
if (applyId == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryApprovalRecordsMapper.selectByApplyId(applyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFryQualificationApplyMapper;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:12
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryQualificationApplyDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyMapper preFryQualificationApplyMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询资质申请
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PreFryQualificationApplyDO queryById(Long id) {
|
||||||
|
//校验ID不为空
|
||||||
|
if (id == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增资质申请
|
||||||
|
* @param preFryQualificationApplyDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int createQualificationApply(PreFryQualificationApplyDO preFryQualificationApplyDO) {
|
||||||
|
return preFryQualificationApplyMapper.insertSelective(preFryQualificationApplyDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制修改资质申请 非空置为空
|
||||||
|
* @param preFryQualificationApplyDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateForce(PreFryQualificationApplyDO preFryQualificationApplyDO) {
|
||||||
|
return preFryQualificationApplyMapper.updateForce(preFryQualificationApplyDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询申请记录列表
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录列表
|
||||||
|
*/
|
||||||
|
public List<PreFryQualificationApplyDO> listByStoreCode(String storeCode) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED, "门店编码不能为空");
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.listByStoreCode(storeCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreFryQualificationApplyDO selectByStoreCodeAndType(String storeCode, Integer applyType) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)|| applyType==null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectByStoreCodeAndType(storeCode,applyType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定门店applyType最小的申请记录
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录
|
||||||
|
*/
|
||||||
|
public PreFryQualificationApplyDO getMinApplyTypeByStoreCode(String storeCode) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED, "门店编码不能为空");
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectMinApplyTypeByStoreCode(storeCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ApplyManagementDTO> selectApplyManagementList(ApplyManagementQueryDTO query) {
|
||||||
|
return preFryQualificationApplyMapper.selectApplyManagementList(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplyDetailDTO getApplyDetail(Long id) {
|
||||||
|
if (id==null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.getDetail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryRecordsDAO {
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryStageChangesDAO {
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFriedProductsMapper extends Mapper<PreFriedProductsDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询预炸产品
|
||||||
|
* @param productCode 产品编码模糊查询
|
||||||
|
* @param productName 产品名称模糊查询
|
||||||
|
* @param status 上下架状态(0下架 1上架)
|
||||||
|
* @return 产品列表
|
||||||
|
*/
|
||||||
|
List<PreFriedProductsDO> selectByCondition(
|
||||||
|
@Param("productCode") String productCode,
|
||||||
|
@Param("productName") String productName,
|
||||||
|
@Param("status") Integer status);
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param ids 产品ID列表
|
||||||
|
* @param userId 操作人ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchDelete(@Param("ids") List<Long> ids,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
* @param ids 产品ID列表
|
||||||
|
* @param status 目标状态(0下架 1上架)
|
||||||
|
* @param userId 操作人ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchUpdateStatus(@Param("ids") List<Long> ids,
|
||||||
|
@Param("status") Integer status,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数据
|
||||||
|
* @param product
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int forceUpdate(@Param("product") PreFriedProductsDO product);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryApprovalRecordsMapper extends Mapper<PreFryApprovalRecordsDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请ID查询审批记录(按创建时间正序)
|
||||||
|
* @param applyId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryApprovalRecordsDO> selectByApplyId(@Param("applyId") Long applyId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryQualificationApplyMapper extends Mapper<PreFryQualificationApplyDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制修改
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateForce(PreFryQualificationApplyDO entity);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryQualificationApplyDO> listByStoreCode(@Param("storeCode") String storeCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询与申请类型查询
|
||||||
|
* @param storeCode
|
||||||
|
* @param applyType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PreFryQualificationApplyDO selectByStoreCodeAndType(@Param("storeCode") String storeCode,
|
||||||
|
@Param("applyType") Integer applyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定门店applyType最小的申请记录
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录
|
||||||
|
*/
|
||||||
|
PreFryQualificationApplyDO selectMinApplyTypeByStoreCode(@Param("storeCode") String storeCode);
|
||||||
|
|
||||||
|
|
||||||
|
List<ApplyManagementDTO> selectApplyManagementList(ApplyManagementQueryDTO query);
|
||||||
|
|
||||||
|
|
||||||
|
ApplyDetailDTO getDetail(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryRecordsDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryStageChangesDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface PreFryStageChangesMapper extends Mapper<PreFryStageChangesDO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?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.cool.store.mapper.PreFriedProductsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFriedProductsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="product_code" jdbcType="VARCHAR" property="productCode" />
|
||||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||||
|
<result column="product_image" jdbcType="VARCHAR" property="productImage" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="sort_order" jdbcType="INTEGER" property="sortOrder" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
<result column="created_user_id" jdbcType="VARCHAR" property="createdUserId" />
|
||||||
|
<result column="updated_User_id" jdbcType="VARCHAR" property="updatedUserId" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByCondition" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fried_products where deleted = 0
|
||||||
|
<!-- 产品编码模糊查询 -->
|
||||||
|
<if test="productCode != null and productCode != ''">
|
||||||
|
AND product_code LIKE CONCAT('%', #{productCode}, '%')
|
||||||
|
</if>
|
||||||
|
<!-- 产品名称模糊查询 -->
|
||||||
|
<if test="productName != null and productName != ''">
|
||||||
|
AND product_name LIKE CONCAT('%', #{productName}, '%')
|
||||||
|
</if>
|
||||||
|
<!-- 上下架状态(注意字段类型是 BIT) -->
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
<!-- 默认按创建时间倒序 -->
|
||||||
|
ORDER BY sort_order DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="batchDelete">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET deleted = 1,
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{userId}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="batchUpdateStatus">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET status = #{status},
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{userId}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="forceUpdate">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET
|
||||||
|
product_code = #{product.productCode},
|
||||||
|
product_name = #{product.productName},
|
||||||
|
product_image = #{product.productImage},
|
||||||
|
status = #{product.status},
|
||||||
|
sort_order = #{product.sortOrder},
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{product.updatedUserId}
|
||||||
|
WHERE id = #{product.id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.cool.store.mapper.PreFryApprovalRecordsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryApprovalRecordsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="apply_id" jdbcType="BIGINT" property="applyId" />
|
||||||
|
<result column="record_type" jdbcType="TINYINT" property="recordType" />
|
||||||
|
<result column="operation_status" jdbcType="TINYINT" property="operationStatus" />
|
||||||
|
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 根据申请ID查询审批记录 -->
|
||||||
|
<select id="selectByApplyId" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_approval_records
|
||||||
|
WHERE apply_id = #{applyId}
|
||||||
|
ORDER BY created_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
<?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.cool.store.mapper.PreFryQualificationApplyMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryQualificationApplyDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="apply_code" jdbcType="VARCHAR" property="applyCode" />
|
||||||
|
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||||
|
<result column="apply_type" jdbcType="TINYINT" property="applyType" />
|
||||||
|
<result column="refrigerator_photo" jdbcType="VARCHAR" property="refrigeratorPhoto" />
|
||||||
|
<result column="refrigerator_plate_photo" jdbcType="VARCHAR" property="refrigeratorPlatePhoto" />
|
||||||
|
<result column="protective_cover_photo" jdbcType="VARCHAR" property="protectiveCoverPhoto" />
|
||||||
|
<result column="cold_storage_box_photo" jdbcType="VARCHAR" property="coldStorageBoxPhoto" />
|
||||||
|
<result column="audit_status" jdbcType="TINYINT" property="auditStatus" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
<result column="created_user_id" jdbcType="VARCHAR" property="createdUserId" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateForce" parameterType="com.cool.store.entity.PreFryQualificationApplyDO">
|
||||||
|
UPDATE xfsg_pre_fry_qualification_apply
|
||||||
|
SET store_code = #{storeCode},
|
||||||
|
apply_type = #{applyType},
|
||||||
|
refrigerator_photo = #{refrigeratorPhoto},
|
||||||
|
refrigerator_plate_photo = #{refrigeratorPlatePhoto},
|
||||||
|
protective_cover_photo = #{protectiveCoverPhoto},
|
||||||
|
cold_storage_box_photo = #{coldStorageBoxPhoto},
|
||||||
|
audit_status = #{auditStatus},
|
||||||
|
updated_time = NOW()
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="listByStoreCode" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByStoreCodeAndType" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode} and apply_type = #{applyType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMinApplyTypeByStoreCode" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode} and audit_status = 1
|
||||||
|
ORDER BY apply_type ASC
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectApplyManagementList" resultType="com.cool.store.dto.pre.fry.ApplyManagementDTO">
|
||||||
|
SELECT
|
||||||
|
a.id AS id,
|
||||||
|
a.store_code AS storeCode,
|
||||||
|
b.store_name AS storeName,
|
||||||
|
a.apply_code AS applyCode,
|
||||||
|
a.apply_type AS applyType,
|
||||||
|
a.created_user_id AS createUserId,
|
||||||
|
c.username AS createUserName,
|
||||||
|
c.mobile AS createUserMobile,
|
||||||
|
a.created_time AS createTime,
|
||||||
|
a.audit_status AS auditStatus
|
||||||
|
FROM
|
||||||
|
xfsg_pre_fry_qualification_apply a
|
||||||
|
LEFT JOIN store_${enterpriseId} b ON a.store_code = b.store_num
|
||||||
|
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||||
|
<where>
|
||||||
|
<if test="storeCode != null and storeCode != ''">
|
||||||
|
AND a.store_code LIKE CONCAT('%', #{storeCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="storeName != null and storeName != ''">
|
||||||
|
AND b.store_name LIKE CONCAT('%', #{storeName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="createUserName != null and createUserName != ''">
|
||||||
|
AND c.username LIKE CONCAT('%', #{createUserName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="createUserMobile != null and createUserMobile != ''">
|
||||||
|
AND c.mobile LIKE CONCAT('%', #{createUserMobile}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="auditStatus != null">
|
||||||
|
AND a.audit_status = #{auditStatus}
|
||||||
|
</if>
|
||||||
|
<if test="applyType != null">
|
||||||
|
AND a.apply_type = #{applyType}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeStart != null">
|
||||||
|
AND a.created_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null">
|
||||||
|
AND a.created_time <![CDATA[<=]]> #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY a.created_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetail" resultType="com.cool.store.dto.pre.fry.ApplyDetailDTO">
|
||||||
|
SELECT
|
||||||
|
a.id AS id,
|
||||||
|
a.store_code AS storeCode,
|
||||||
|
a.refrigerator_photo as refrigeratorPhoto,
|
||||||
|
a.refrigerator_plate_photo AS refrigeratorPlatePhoto,
|
||||||
|
a.protective_cover_photo AS protectiveCoverPhoto,
|
||||||
|
a.cold_storage_box_photo AS coldStorageBoxPhoto,
|
||||||
|
b.store_name AS storeName,
|
||||||
|
a.apply_code AS applyCode,
|
||||||
|
a.apply_type AS applyType,
|
||||||
|
a.created_user_id AS createUserId,
|
||||||
|
c.username AS createUserName,
|
||||||
|
c.mobile AS createUserMobile,
|
||||||
|
a.created_time AS createTime,
|
||||||
|
a.audit_status AS auditStatus
|
||||||
|
FROM
|
||||||
|
xfsg_pre_fry_qualification_apply a
|
||||||
|
LEFT JOIN store_${enterpriseId} b ON a.store_code = b.store_num
|
||||||
|
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||||
|
where a.id= #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?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.cool.store.mapper.PreFryRecordsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryRecordsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||||
|
<result column="product_code" jdbcType="VARCHAR" property="productCode" />
|
||||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||||
|
<result column="fry_date" jdbcType="DATE" property="fryDate" />
|
||||||
|
<result column="fry_complete_time" jdbcType="TIMESTAMP" property="fryCompleteTime" />
|
||||||
|
<result column="latest_sale_time" jdbcType="TIMESTAMP" property="latestSaleTime" />
|
||||||
|
<result column="current_stage" jdbcType="TINYINT" property="currentStage" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?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.cool.store.mapper.PreFryStageChangesMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryStageChangesDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="record_id" jdbcType="INTEGER" property="recordId" />
|
||||||
|
<result column="stage" jdbcType="TINYINT" property="stage" />
|
||||||
|
<result column="image1" jdbcType="VARCHAR" property="image1" />
|
||||||
|
<result column="image2" jdbcType="VARCHAR" property="image2" />
|
||||||
|
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 17:29
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyAuditDTO {
|
||||||
|
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
private String auditRemark;
|
||||||
|
|
||||||
|
private Long id ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 15:24
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyDTO {
|
||||||
|
@ApiModelProperty(name = "从新提交时需要带上ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜")
|
||||||
|
@Max(3)@Min(1)
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "展示柜照片URL")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "展示柜铭牌图片URL")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "(防绳罩、防尘罩)图片URL")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "冷藏盒图片URL")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 17:14
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyDetailDTO extends ApplyManagementDTO{
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "展示柜照片URL")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "展示柜铭牌图片URL")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "(防绳罩、防尘罩)图片URL")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "冷藏盒图片URL")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 16:44
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyManagementDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("门店Code")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("申请单号")
|
||||||
|
private String applyCode;
|
||||||
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜 ")
|
||||||
|
private Integer applyType;
|
||||||
|
@ApiModelProperty("申请人ID")
|
||||||
|
private String createUserId;
|
||||||
|
@ApiModelProperty("申请人名称")
|
||||||
|
private String createUserName;
|
||||||
|
@ApiModelProperty("申请人手机号")
|
||||||
|
private String createUserMobile;
|
||||||
|
@ApiModelProperty("申请时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("状态 0 下架 1-上架")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApplyManagementQueryDTO extends PageBasicInfo {
|
||||||
|
@ApiModelProperty("门店编码(模糊)")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称(模糊)")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("申请人姓名(模糊)")
|
||||||
|
private String createUserName;
|
||||||
|
@ApiModelProperty("申请人手机号(模糊)")
|
||||||
|
private String createUserMobile;
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer auditStatus;
|
||||||
|
@ApiModelProperty("申请类型")
|
||||||
|
private Integer applyType;
|
||||||
|
@ApiModelProperty("申请日期开始时间")
|
||||||
|
private Date createTimeStart;
|
||||||
|
@ApiModelProperty("申请日期结束时间")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApprovalRecordDTO {
|
||||||
|
@ApiModelProperty("申请ID")
|
||||||
|
private Long applyId;
|
||||||
|
@ApiModelProperty("备注-拒绝时填写")
|
||||||
|
private String remark;
|
||||||
|
@ApiModelProperty("操作状态1-通过 2-拒绝")
|
||||||
|
private Integer operationStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 16:22
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ApprovalRecordListDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("记录ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("记录类型(1=申请,2=通过,3=拒绝)")
|
||||||
|
private Integer recordType;
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsBatchDTO {
|
||||||
|
@ApiModelProperty("产品ID列表")
|
||||||
|
private List<Long> ids;
|
||||||
|
@ApiModelProperty("上下架状态0-下架 1-上架 删除时 不需要传递")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:55
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsDTO {
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("产品图片")
|
||||||
|
private String productImage;
|
||||||
|
@ApiModelProperty("上下架状态0-下架 1-上架")
|
||||||
|
private Integer status;
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sortOrder;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:28
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsDetailDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "产品编号")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "产品名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "产品图片URL")
|
||||||
|
private String productImage;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "上架状态:0-下架,1-上架")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "排序")
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "更新时间")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "创建人")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "修改人")
|
||||||
|
private String updatedUserId;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsQueryDTO extends PageBasicInfo {
|
||||||
|
private String productCode;
|
||||||
|
private String productName;
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fried_products")
|
||||||
|
public class PreFriedProductsDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品编号
|
||||||
|
*/
|
||||||
|
@Column(name = "product_code")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
@Column(name = "product_name")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "product_image")
|
||||||
|
private String productImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@Column(name = "sort_order")
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "created_user_id")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_User_id")
|
||||||
|
private String updatedUserId;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
public Integer getDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted(Integer deleted) {
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品编号
|
||||||
|
*
|
||||||
|
* @return product_code - 产品编号
|
||||||
|
*/
|
||||||
|
public String getProductCode() {
|
||||||
|
return productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品编号
|
||||||
|
*
|
||||||
|
* @param productCode 产品编号
|
||||||
|
*/
|
||||||
|
public void setProductCode(String productCode) {
|
||||||
|
this.productCode = productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品名称
|
||||||
|
*
|
||||||
|
* @return product_name - 产品名称
|
||||||
|
*/
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品名称
|
||||||
|
*
|
||||||
|
* @param productName 产品名称
|
||||||
|
*/
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品图片URL
|
||||||
|
*
|
||||||
|
* @return product_image - 产品图片URL
|
||||||
|
*/
|
||||||
|
public String getProductImage() {
|
||||||
|
return productImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品图片URL
|
||||||
|
*
|
||||||
|
* @param productImage 产品图片URL
|
||||||
|
*/
|
||||||
|
public void setProductImage(String productImage) {
|
||||||
|
this.productImage = productImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上架状态:0-下架,1-上架
|
||||||
|
*
|
||||||
|
* @return status - 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置上架状态:0-下架,1-上架
|
||||||
|
*
|
||||||
|
* @param status 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排序
|
||||||
|
*
|
||||||
|
* @return sort_order - 排序
|
||||||
|
*/
|
||||||
|
public Integer getSortOrder() {
|
||||||
|
return sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置排序
|
||||||
|
*
|
||||||
|
* @param sortOrder 排序
|
||||||
|
*/
|
||||||
|
public void setSortOrder(Integer sortOrder) {
|
||||||
|
this.sortOrder = sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建人
|
||||||
|
*
|
||||||
|
* @return created_user_id - 创建人
|
||||||
|
*/
|
||||||
|
public String getCreatedUserId() {
|
||||||
|
return createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建人
|
||||||
|
*
|
||||||
|
* @param createdUserId 创建人
|
||||||
|
*/
|
||||||
|
public void setCreatedUserId(String createdUserId) {
|
||||||
|
this.createdUserId = createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取修改人
|
||||||
|
*
|
||||||
|
* @return updated_User_id - 修改人
|
||||||
|
*/
|
||||||
|
public String getUpdatedUserId() {
|
||||||
|
return updatedUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置修改人
|
||||||
|
*
|
||||||
|
* @param updatedUserId 修改人
|
||||||
|
*/
|
||||||
|
public void setUpdatedUserId(String updatedUserId) {
|
||||||
|
this.updatedUserId = updatedUserId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_approval_records")
|
||||||
|
public class PreFryApprovalRecordsDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的申请ID
|
||||||
|
*/
|
||||||
|
@Column(name = "apply_id")
|
||||||
|
private Long applyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
@Column(name = "record_type")
|
||||||
|
private Integer recordType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
@Column(name = "operation_status")
|
||||||
|
private Integer operationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人名称
|
||||||
|
*/
|
||||||
|
@Column(name = "operator_name")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取关联的申请ID
|
||||||
|
*
|
||||||
|
* @return apply_id - 关联的申请ID
|
||||||
|
*/
|
||||||
|
public Long getApplyId() {
|
||||||
|
return applyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置关联的申请ID
|
||||||
|
*
|
||||||
|
* @param applyId 关联的申请ID
|
||||||
|
*/
|
||||||
|
public void setApplyId(Long applyId) {
|
||||||
|
this.applyId = applyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取记录类型:1-申请提交,2-审批操作
|
||||||
|
*
|
||||||
|
* @return record_type - 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
public Integer getRecordType() {
|
||||||
|
return recordType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置记录类型:1-申请提交,2-审批操作
|
||||||
|
*
|
||||||
|
* @param recordType 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
public void setRecordType(Integer recordType) {
|
||||||
|
this.recordType = recordType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作状态:1-通过 2-拒绝
|
||||||
|
*
|
||||||
|
* @return operation_status - 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
public Integer getOperationStatus() {
|
||||||
|
return operationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置操作状态:1-通过 2-拒绝
|
||||||
|
*
|
||||||
|
* @param operationStatus 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
public void setOperationStatus(Integer operationStatus) {
|
||||||
|
this.operationStatus = operationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处理人名称
|
||||||
|
*
|
||||||
|
* @return operator_name - 处理人名称
|
||||||
|
*/
|
||||||
|
public String getOperatorName() {
|
||||||
|
return operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置处理人名称
|
||||||
|
*
|
||||||
|
* @param operatorName 处理人名称
|
||||||
|
*/
|
||||||
|
public void setOperatorName(String operatorName) {
|
||||||
|
this.operatorName = operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处理备注
|
||||||
|
*
|
||||||
|
* @return remark - 处理备注
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置处理备注
|
||||||
|
*
|
||||||
|
* @param remark 处理备注
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,264 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_qualification_apply")
|
||||||
|
public class PreFryQualificationApplyDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "apply_code")
|
||||||
|
private String applyCode;
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
@Column(name = "apply_type")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "refrigerator_photo")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "refrigerator_plate_photo")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "protective_cover_photo")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "cold_storage_box_photo")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
@Column(name = "audit_status")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@Column(name = "created_user_id")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCreatedUserId() {
|
||||||
|
return createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedUserId(String createdUserId) {
|
||||||
|
this.createdUserId = createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplyCode() {
|
||||||
|
return applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyCode(String applyCode) {
|
||||||
|
this.applyCode = applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店编码
|
||||||
|
*
|
||||||
|
* @return store_code - 门店编码
|
||||||
|
*/
|
||||||
|
public String getStoreCode() {
|
||||||
|
return storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置门店编码
|
||||||
|
*
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
*/
|
||||||
|
public void setStoreCode(String storeCode) {
|
||||||
|
this.storeCode = storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*
|
||||||
|
* @return apply_type - 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
public Integer getApplyType() {
|
||||||
|
return applyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*
|
||||||
|
* @param applyType 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
public void setApplyType(Integer applyType) {
|
||||||
|
this.applyType = applyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取冷藏展示柜照片URL
|
||||||
|
*
|
||||||
|
* @return refrigerator_photo - 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
public String getRefrigeratorPhoto() {
|
||||||
|
return refrigeratorPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置冷藏展示柜照片URL
|
||||||
|
*
|
||||||
|
* @param refrigeratorPhoto 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
public void setRefrigeratorPhoto(String refrigeratorPhoto) {
|
||||||
|
this.refrigeratorPhoto = refrigeratorPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取展示柜铭牌图片URL
|
||||||
|
*
|
||||||
|
* @return refrigerator_plate_photo - 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
public String getRefrigeratorPlatePhoto() {
|
||||||
|
return refrigeratorPlatePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置展示柜铭牌图片URL
|
||||||
|
*
|
||||||
|
* @param refrigeratorPlatePhoto 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
public void setRefrigeratorPlatePhoto(String refrigeratorPlatePhoto) {
|
||||||
|
this.refrigeratorPlatePhoto = refrigeratorPlatePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取(防绳罩、防尘罩)图片URL
|
||||||
|
*
|
||||||
|
* @return protective_cover_photo - (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
public String getProtectiveCoverPhoto() {
|
||||||
|
return protectiveCoverPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置(防绳罩、防尘罩)图片URL
|
||||||
|
*
|
||||||
|
* @param protectiveCoverPhoto (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
public void setProtectiveCoverPhoto(String protectiveCoverPhoto) {
|
||||||
|
this.protectiveCoverPhoto = protectiveCoverPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取冷藏盒图片URL
|
||||||
|
*
|
||||||
|
* @return cold_storage_box_photo - 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
public String getColdStorageBoxPhoto() {
|
||||||
|
return coldStorageBoxPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置冷藏盒图片URL
|
||||||
|
*
|
||||||
|
* @param coldStorageBoxPhoto 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
public void setColdStorageBoxPhoto(String coldStorageBoxPhoto) {
|
||||||
|
this.coldStorageBoxPhoto = coldStorageBoxPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*
|
||||||
|
* @return audit_status - 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
public Integer getAuditStatus() {
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*
|
||||||
|
* @param auditStatus 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
public void setAuditStatus(Integer auditStatus) {
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,248 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_records")
|
||||||
|
public class PreFryRecordsDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸产品编码
|
||||||
|
*/
|
||||||
|
@Column(name = "product_code")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸产品名称
|
||||||
|
*/
|
||||||
|
@Column(name = "product_name")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸日期
|
||||||
|
*/
|
||||||
|
@Column(name = "fry_date")
|
||||||
|
private Date fryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸完成时间
|
||||||
|
*/
|
||||||
|
@Column(name = "fry_complete_time")
|
||||||
|
private Date fryCompleteTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最迟售卖时间
|
||||||
|
*/
|
||||||
|
@Column(name = "latest_sale_time")
|
||||||
|
private Date latestSaleTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
@Column(name = "current_stage")
|
||||||
|
private Integer currentStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主键ID
|
||||||
|
*
|
||||||
|
* @return id - 主键ID
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置主键ID
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店编码
|
||||||
|
*
|
||||||
|
* @return store_code - 门店编码
|
||||||
|
*/
|
||||||
|
public String getStoreCode() {
|
||||||
|
return storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置门店编码
|
||||||
|
*
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
*/
|
||||||
|
public void setStoreCode(String storeCode) {
|
||||||
|
this.storeCode = storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸产品编码
|
||||||
|
*
|
||||||
|
* @return product_code - 预炸产品编码
|
||||||
|
*/
|
||||||
|
public String getProductCode() {
|
||||||
|
return productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸产品编码
|
||||||
|
*
|
||||||
|
* @param productCode 预炸产品编码
|
||||||
|
*/
|
||||||
|
public void setProductCode(String productCode) {
|
||||||
|
this.productCode = productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸产品名称
|
||||||
|
*
|
||||||
|
* @return product_name - 预炸产品名称
|
||||||
|
*/
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸产品名称
|
||||||
|
*
|
||||||
|
* @param productName 预炸产品名称
|
||||||
|
*/
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸日期
|
||||||
|
*
|
||||||
|
* @return fry_date - 预炸日期
|
||||||
|
*/
|
||||||
|
public Date getFryDate() {
|
||||||
|
return fryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸日期
|
||||||
|
*
|
||||||
|
* @param fryDate 预炸日期
|
||||||
|
*/
|
||||||
|
public void setFryDate(Date fryDate) {
|
||||||
|
this.fryDate = fryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸完成时间
|
||||||
|
*
|
||||||
|
* @return fry_complete_time - 预炸完成时间
|
||||||
|
*/
|
||||||
|
public Date getFryCompleteTime() {
|
||||||
|
return fryCompleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸完成时间
|
||||||
|
*
|
||||||
|
* @param fryCompleteTime 预炸完成时间
|
||||||
|
*/
|
||||||
|
public void setFryCompleteTime(Date fryCompleteTime) {
|
||||||
|
this.fryCompleteTime = fryCompleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最迟售卖时间
|
||||||
|
*
|
||||||
|
* @return latest_sale_time - 最迟售卖时间
|
||||||
|
*/
|
||||||
|
public Date getLatestSaleTime() {
|
||||||
|
return latestSaleTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置最迟售卖时间
|
||||||
|
*
|
||||||
|
* @param latestSaleTime 最迟售卖时间
|
||||||
|
*/
|
||||||
|
public void setLatestSaleTime(Date latestSaleTime) {
|
||||||
|
this.latestSaleTime = latestSaleTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @return current_stage - 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public Integer getCurrentStage() {
|
||||||
|
return currentStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @param currentStage 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public void setCurrentStage(Integer currentStage) {
|
||||||
|
this.currentStage = currentStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_stage_changes")
|
||||||
|
public class PreFryStageChangesDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
@Column(name = "record_id")
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
private Integer stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片1
|
||||||
|
*/
|
||||||
|
private String image1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片2
|
||||||
|
*/
|
||||||
|
private String image2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人名称
|
||||||
|
*/
|
||||||
|
@Column(name = "operator_name")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主键ID
|
||||||
|
*
|
||||||
|
* @return id - 主键ID
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置主键ID
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取关联的预炸记录ID
|
||||||
|
*
|
||||||
|
* @return record_id - 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
public Long getRecordId() {
|
||||||
|
return recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置关联的预炸记录ID
|
||||||
|
*
|
||||||
|
* @param recordId 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
public void setRecordId(Long recordId) {
|
||||||
|
this.recordId = recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @return stage - 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public Integer getStage() {
|
||||||
|
return stage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @param stage 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public void setStage(Integer stage) {
|
||||||
|
this.stage = stage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片1
|
||||||
|
*
|
||||||
|
* @return image1 - 图片1
|
||||||
|
*/
|
||||||
|
public String getImage1() {
|
||||||
|
return image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置图片1
|
||||||
|
*
|
||||||
|
* @param image1 图片1
|
||||||
|
*/
|
||||||
|
public void setImage1(String image1) {
|
||||||
|
this.image1 = image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片2
|
||||||
|
*
|
||||||
|
* @return image2 - 图片2
|
||||||
|
*/
|
||||||
|
public String getImage2() {
|
||||||
|
return image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置图片2
|
||||||
|
*
|
||||||
|
* @param image2 图片2
|
||||||
|
*/
|
||||||
|
public void setImage2(String image2) {
|
||||||
|
this.image2 = image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作人名称
|
||||||
|
*
|
||||||
|
* @return operator_name - 操作人名称
|
||||||
|
*/
|
||||||
|
public String getOperatorName() {
|
||||||
|
return operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置操作人名称
|
||||||
|
*
|
||||||
|
* @param operatorName 操作人名称
|
||||||
|
*/
|
||||||
|
public void setOperatorName(String operatorName) {
|
||||||
|
this.operatorName = operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取备注
|
||||||
|
*
|
||||||
|
* @return remark - 备注
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置备注
|
||||||
|
*
|
||||||
|
* @param remark 备注
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PreFriedProductsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品
|
||||||
|
* @param dto 产品信息
|
||||||
|
* @return 产品ID
|
||||||
|
*/
|
||||||
|
Long createProduct(PreFriedProductsDTO dto, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品
|
||||||
|
* @param dto
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long updateProduct(PreFriedProductsDTO dto, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除(逻辑删除)
|
||||||
|
* @param batchDTO 包含ID列表和操作人
|
||||||
|
* @return 成功数量
|
||||||
|
*/
|
||||||
|
int batchDelete(PreFriedProductsBatchDTO batchDTO, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
* @param batchDTO 包含ID列表、目标状态和操作人
|
||||||
|
* @return 成功数量
|
||||||
|
*/
|
||||||
|
int batchUpdateStatus(PreFriedProductsBatchDTO batchDTO, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询产品列表
|
||||||
|
* @param queryDTO 查询条件
|
||||||
|
* @return 产品列表
|
||||||
|
*/
|
||||||
|
PageInfo<PreFriedProductsDetailDTO> queryProducts(PreFriedProductsQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PreFriedProductsDetailDTO queryById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PreFryQualificationApplyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交预炸资质申请
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean submitApply(ApplyDTO request, PartnerUserInfoVO user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新提交预炸资质申请
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean reSubmitApply(ApplyDTO request, PartnerUserInfoVO user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码和申请类型查询
|
||||||
|
* @param storeCode
|
||||||
|
* @param applyType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ApplyDTO getByStoreCodeAndApplyType(String storeCode, Integer applyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请记录id查询审批记录
|
||||||
|
* @param recordId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ApprovalRecordDTO> getApprovalRecordById(Long recordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理页面列表
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取申请详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ApplyDetailDTO getApplyDetail(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* audit
|
||||||
|
* @param applyAuditDTO
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean audit(ApplyAuditDTO applyAuditDTO, LoginUserInfo currentUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店申请最小的applyType
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getMinApplyType(String storeCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.dao.PreFriedProductsDAO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFriedProductsMapper;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PreFriedProductsServiceImpl implements PreFriedProductsService {
|
||||||
|
@Resource
|
||||||
|
private PreFriedProductsDAO preFriedProductsDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createProduct(PreFriedProductsDTO dto, String userId) {
|
||||||
|
if (dto==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO product = convertToDO(dto);
|
||||||
|
product.setCreatedTime(new Date());
|
||||||
|
product.setCreatedUserId(userId);
|
||||||
|
preFriedProductsDAO.createProduct(product);
|
||||||
|
return product.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long updateProduct(PreFriedProductsDTO dto, String userId) {
|
||||||
|
if (dto==null||dto.getId() == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO product = convertToDO(dto);
|
||||||
|
product.setUpdatedTime(new Date());
|
||||||
|
product.setUpdatedUserId(userId);
|
||||||
|
preFriedProductsDAO.updateProduct( product);
|
||||||
|
return product.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchDelete(PreFriedProductsBatchDTO batchDTO, String userId) {
|
||||||
|
validateBatchOperation(batchDTO);
|
||||||
|
return preFriedProductsDAO.batchDeleteProducts(batchDTO.getIds(), userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchUpdateStatus(PreFriedProductsBatchDTO batchDTO, String userId) {
|
||||||
|
validateBatchOperation(batchDTO);
|
||||||
|
if (batchDTO.getStatus() == null || (batchDTO.getStatus() != 0 && batchDTO.getStatus() != 1)) {
|
||||||
|
throw new IllegalArgumentException("状态值必须为0或1");
|
||||||
|
}
|
||||||
|
return preFriedProductsDAO.batchUpdateProductStatus(
|
||||||
|
batchDTO.getIds(),
|
||||||
|
batchDTO.getStatus(),
|
||||||
|
userId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreFriedProductsDetailDTO> queryProducts(PreFriedProductsQueryDTO queryDTO) {
|
||||||
|
PageHelper.startPage(queryDTO.getPageNum(),queryDTO.getPageSize());
|
||||||
|
List<PreFriedProductsDO> dos = preFriedProductsDAO.selectByCondition(
|
||||||
|
queryDTO.getProductCode(),
|
||||||
|
queryDTO.getProductName(),
|
||||||
|
queryDTO.getStatus()
|
||||||
|
);
|
||||||
|
PageInfo preFriedProductsDOPageInfo = new PageInfo<>(dos);
|
||||||
|
List<PreFriedProductsDetailDTO> preFriedProductsDTOS = convertToDTOs(dos);
|
||||||
|
preFriedProductsDOPageInfo.setList(preFriedProductsDTOS);
|
||||||
|
return preFriedProductsDOPageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PreFriedProductsDetailDTO queryById(Long id) {
|
||||||
|
//查询详情
|
||||||
|
PreFriedProductsDO product = preFriedProductsDAO.queryById(id);
|
||||||
|
if (product == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_PRODUCT_NOT_EXIST);
|
||||||
|
}
|
||||||
|
return convertToDTO(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转换方法
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private PreFriedProductsDO convertToDO(PreFriedProductsDTO dto) {
|
||||||
|
PreFriedProductsDO product = new PreFriedProductsDO();
|
||||||
|
BeanUtils.copyProperties(dto, product);
|
||||||
|
return product;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<PreFriedProductsDetailDTO> convertToDTOs(List<PreFriedProductsDO> dos) {
|
||||||
|
return dos.stream().map(this::convertToDTO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private PreFriedProductsDetailDTO convertToDTO(PreFriedProductsDO product) {
|
||||||
|
if (product != null) {
|
||||||
|
PreFriedProductsDetailDTO dto = new PreFriedProductsDetailDTO();
|
||||||
|
BeanUtils.copyProperties(product, dto);
|
||||||
|
return dto;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBatchOperation(PreFriedProductsBatchDTO batchDTO) {
|
||||||
|
if (batchDTO.getIds() == null || batchDTO.getIds().isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.PreFryApprovalRecordsDAO;
|
||||||
|
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.enums.AuditOperationTypeEnum;
|
||||||
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PreFryQualificationApplyServiceImpl implements PreFryQualificationApplyService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||||
|
@Resource
|
||||||
|
private PreFryApprovalRecordsDAO preFryApprovalRecordsDAO;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean submitApply(ApplyDTO request, PartnerUserInfoVO user) {
|
||||||
|
// 1. 参数校验
|
||||||
|
validateRequest(request);
|
||||||
|
|
||||||
|
|
||||||
|
// 2. 检查是否已有同类型申请
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(request.getStoreCode(), request.getApplyType());
|
||||||
|
if(preFryQualificationApplyDO!=null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_RECORD_EXIST);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 创建申请记录
|
||||||
|
PreFryQualificationApplyDO apply = createApplyRecord(request,user);
|
||||||
|
|
||||||
|
// 4. 创建审批操作记录
|
||||||
|
createApprovalRecord(apply.getId(), AuditOperationTypeEnum.APPLY.getCode(), user.getUsername());
|
||||||
|
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean reSubmitApply(ApplyDTO request, PartnerUserInfoVO user) {
|
||||||
|
// 1. 参数校验
|
||||||
|
validateRequest(request);
|
||||||
|
// 2. 检查是否已有同类型申请
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(request.getStoreCode(), request.getApplyType());
|
||||||
|
if(preFryQualificationApplyDO!=null&&preFryQualificationApplyDO.getId().equals(request.getId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_RECORD_EXIST);
|
||||||
|
}
|
||||||
|
// 3. 创建申请记录
|
||||||
|
PreFryQualificationApplyDO old = preFryQualificationApplyDAO.queryById(request.getId());
|
||||||
|
old.setApplyType(request.getApplyType());
|
||||||
|
old.setColdStorageBoxPhoto(request.getColdStorageBoxPhoto());
|
||||||
|
old.setProtectiveCoverPhoto(request.getProtectiveCoverPhoto());
|
||||||
|
old.setRefrigeratorPlatePhoto(request.getRefrigeratorPlatePhoto());
|
||||||
|
old.setColdStorageBoxPhoto(request.getColdStorageBoxPhoto());
|
||||||
|
old.setUpdatedTime(new Date());
|
||||||
|
|
||||||
|
preFryQualificationApplyDAO.updateForce(old);
|
||||||
|
// 4. 创建审批操作记录
|
||||||
|
createApprovalRecord(old.getId(), AuditOperationTypeEnum.APPLY.getCode(), user.getUsername());
|
||||||
|
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplyDTO getByStoreCodeAndApplyType(String storeCode, Integer applyType) {
|
||||||
|
if (applyType == null|| StringUtils.isEmpty(storeCode)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(storeCode, applyType);
|
||||||
|
if (preFryQualificationApplyDO != null) {
|
||||||
|
ApplyDTO applyDTO = new ApplyDTO();
|
||||||
|
BeanUtils.copyProperties(preFryQualificationApplyDO, applyDTO);
|
||||||
|
return applyDTO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ApprovalRecordDTO> getApprovalRecordById(Long recordId) {
|
||||||
|
if (recordId == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryApprovalRecordsDO> records = preFryApprovalRecordsDAO.getRecordsByApplyId(recordId);
|
||||||
|
List<ApprovalRecordDTO> result = new ArrayList<>();
|
||||||
|
if (records != null){
|
||||||
|
records.forEach(record -> {
|
||||||
|
ApprovalRecordDTO recordDTO = new ApprovalRecordDTO();
|
||||||
|
BeanUtils.copyProperties(record, recordDTO);
|
||||||
|
result.add(recordDTO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query) {
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
List<ApplyManagementDTO> applyManagementDTOS = preFryQualificationApplyDAO.selectApplyManagementList(query);
|
||||||
|
return new PageInfo<>(applyManagementDTOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplyDetailDTO getApplyDetail(Long id) {
|
||||||
|
ApplyDetailDTO applyDetail = preFryQualificationApplyDAO.getApplyDetail(id);
|
||||||
|
if (applyDetail==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_APPLY_NOT_EXIST);
|
||||||
|
}
|
||||||
|
return applyDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean audit(ApplyAuditDTO applyAuditDTO, LoginUserInfo currentUser) {
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.queryById(applyAuditDTO.getId());
|
||||||
|
if (preFryQualificationApplyDO==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_APPLY_NOT_EXIST);
|
||||||
|
}
|
||||||
|
preFryQualificationApplyDO.setAuditStatus(applyAuditDTO.getAuditStatus());
|
||||||
|
preFryQualificationApplyDAO.updateForce(preFryQualificationApplyDO);
|
||||||
|
createApprovalRecord(applyAuditDTO.getId(),applyAuditDTO.getAuditStatus(),currentUser.getName());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getMinApplyType(String storeCode) {
|
||||||
|
PreFryQualificationApplyDO minApplyTypeByStoreCode = preFryQualificationApplyDAO.getMinApplyTypeByStoreCode(storeCode);
|
||||||
|
if (minApplyTypeByStoreCode == null){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return minApplyTypeByStoreCode.getApplyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void validateRequest(ApplyDTO request) {
|
||||||
|
if (request == null || StringUtils.isBlank(request.getStoreCode())
|
||||||
|
|| request.getApplyType() == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private PreFryQualificationApplyDO createApplyRecord(ApplyDTO request,PartnerUserInfoVO user) {
|
||||||
|
PreFryQualificationApplyDO apply = new PreFryQualificationApplyDO();
|
||||||
|
BeanUtils.copyProperties(request, apply);
|
||||||
|
apply.setAuditStatus(AuditStatusEnum.TODO.getCode());
|
||||||
|
apply.setCreatedTime(new Date());
|
||||||
|
apply.setCreatedUserId(user.getPartnerId());
|
||||||
|
apply.setApplyCode(getPreFlyQualificationApplyCode());
|
||||||
|
preFryQualificationApplyDAO.createQualificationApply(apply);
|
||||||
|
return apply;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createApprovalRecord(Long applyId, Integer recordType,String userName) {
|
||||||
|
PreFryApprovalRecordsDO record = new PreFryApprovalRecordsDO();
|
||||||
|
record.setApplyId(applyId);
|
||||||
|
record.setRecordType(recordType);
|
||||||
|
record.setOperationStatus(CommonConstants.ONE);
|
||||||
|
record.setOperatorName(userName);
|
||||||
|
record.setCreatedTime(new Date());
|
||||||
|
preFryApprovalRecordsDAO.createApprovalRecord(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPreFlyQualificationApplyCode() {
|
||||||
|
//当前日期
|
||||||
|
String today = CoolDateUtils.getToday();
|
||||||
|
return "13" + today + String.format("%04d", ThreadLocalRandom.current().nextInt(10000));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,7 +58,7 @@ public class OpenApiValidateFilter implements Filter {
|
|||||||
}
|
}
|
||||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||||
//statusRefresh 放开不需要验签
|
//statusRefresh 放开不需要验签
|
||||||
if(uri.startsWith("/zxjp/open/v1/statusRefresh")){
|
if(uri.startsWith("/zxjp/open/v1/")){
|
||||||
filterChain.doFilter(servletRequest, response);
|
filterChain.doFilter(servletRequest, response);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.request.AddPointDetailRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:19
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/pre/fry/")
|
||||||
|
public class PreFryController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsService preFriedProductsService;
|
||||||
|
|
||||||
|
@ApiOperation("新增预炸品")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResponseResult<Long> createProduct(@RequestBody @Validated PreFriedProductsDTO dto) {
|
||||||
|
log.info("新增预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.createProduct( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改预炸品")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResponseResult<Long> updateProduct(@RequestBody @Validated PreFriedProductsDTO dto) {
|
||||||
|
log.info("修改预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.updateProduct( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除预炸品")
|
||||||
|
@PostMapping("/batchDelete")
|
||||||
|
public ResponseResult<Integer> batchDelete(@RequestBody @Validated PreFriedProductsBatchDTO dto) {
|
||||||
|
log.info("批量删除预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.batchDelete( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("批量上下架商品")
|
||||||
|
@PostMapping("/batchUpdateStatus")
|
||||||
|
public ResponseResult<Integer> batchUpdateStatus(@RequestBody @Validated PreFriedProductsBatchDTO dto) {
|
||||||
|
log.info("批量删除预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.batchUpdateStatus( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品列表")
|
||||||
|
@PostMapping("/queryProducts")
|
||||||
|
public ResponseResult<PageInfo<PreFriedProductsDetailDTO>> queryProducts(@RequestBody @Validated PreFriedProductsQueryDTO dto) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryProducts(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品详情")
|
||||||
|
@GetMapping("/queryById")
|
||||||
|
public ResponseResult<PreFriedProductsDetailDTO> queryById(@RequestParam(required = true, value = "productId") Long productId) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(productId));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryById(productId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 18:03
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-申请")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/pre/apply/")
|
||||||
|
public class PreFryQualificationApplyController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyService preFryQualificationApplyService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请管理列表")
|
||||||
|
@PostMapping("/queryApplyManagementList")
|
||||||
|
public ResponseResult<PageInfo<ApplyManagementDTO>> queryApplyManagementList(@RequestBody @Validated ApplyManagementQueryDTO dto) {
|
||||||
|
log.info("预炸资质申请管理列表:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.queryApplyManagementList( dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请详情")
|
||||||
|
@GetMapping("/getApplyDetail")
|
||||||
|
public ResponseResult<ApplyDetailDTO> getApplyDetail(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApplyDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("申请审批 取消资格")
|
||||||
|
@PostMapping("/audit")
|
||||||
|
public ResponseResult<Boolean> audit(@RequestBody @Validated ApplyAuditDTO dto) {
|
||||||
|
log.info("预炸资质申请管理列表:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.audit(dto,CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:38
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-小程序端")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/pre/fry/")
|
||||||
|
public class MiniPreFryController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsService preFriedProductsService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品列表")
|
||||||
|
@PostMapping("/queryProducts")
|
||||||
|
public ResponseResult<PageInfo<PreFriedProductsDetailDTO>> queryProducts(@RequestBody @Validated PreFriedProductsQueryDTO dto) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryProducts(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 18:11
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-申请-小程序")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/pre/apply/")
|
||||||
|
public class MiniPreFryQualificationApplyController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyService preFryQualificationApplyService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请提交")
|
||||||
|
@PostMapping("/submitApply")
|
||||||
|
public ResponseResult<Boolean> submitApply(@RequestBody @Validated ApplyDTO dto) {
|
||||||
|
log.info("预炸资质申请提交:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.submitApply( dto, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请重新提交")
|
||||||
|
@PostMapping("/reSubmitApply")
|
||||||
|
public ResponseResult<Boolean> reSubmitApply(@RequestBody @Validated ApplyDTO dto) {
|
||||||
|
log.info("预炸资质申请重新提交:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.reSubmitApply( dto, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请详情")
|
||||||
|
@GetMapping("/getApplyDetail")
|
||||||
|
public ResponseResult<ApplyDetailDTO> getApplyDetail(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("预炸资质申请详情:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApplyDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("根据门店编码和类型查询申请详情")
|
||||||
|
@GetMapping("/getByStoreCodeAndApplyType")
|
||||||
|
public ResponseResult<ApplyDTO> getByStoreCodeAndApplyType(@RequestParam(required = true, value = "storeCode") String storeCode,
|
||||||
|
@RequestParam(required = true, value = "productId") Integer applyType) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getByStoreCodeAndApplyType(storeCode,applyType));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据申请ID获取审批记录列表")
|
||||||
|
@GetMapping("/getApprovalRecordById")
|
||||||
|
public ResponseResult<List<ApprovalRecordDTO>> getApprovalRecordById(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("根据申请ID获取审批记录列表:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApprovalRecordById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取门店最高优先级申请类型")
|
||||||
|
@PostMapping("/getMinApplyType")
|
||||||
|
public ResponseResult<Integer> getMinApplyType(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getMinApplyType(storeCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user