1. fix bugs
This commit is contained in:
2025-10-12 13:15:21 +08:00
parent 0dd34acc4c
commit 5bf1003926
19 changed files with 24 additions and 72 deletions

View File

@@ -51,9 +51,7 @@ CREATE TABLE `kiosk_stickers`
`id` bigint NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`link` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '贴纸地址',
`domain_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '贴纸域名',
`name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '贴纸名称',
`original_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '贴纸原名',
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',

View File

@@ -8,6 +8,7 @@
<result column="tenant_id" property="tenantId"/>
<result column="detail_id" property="detailId"/>
<result column="photo_id" property="photoId"/>
<result column="snapshot" property="snapshot"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>

View File

@@ -6,7 +6,7 @@
<resultMap id="stickersAttachmentRResultMap" type="org.springblade.modules.kiosk.pojo.entity.StickersAttachmentREntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="detail_id" property="detailId"/>
<result column="photo_id" property="photoId"/>
<result column="stickers_id" property="stickersId"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>

View File

@@ -48,6 +48,4 @@ public interface StickersMapper extends BaseMapper<StickersEntity> {
*/
List<StickersVO> selectStickersPage(IPage page, StickersVO stickers);
List<StickersEntity> selectStickersListByOrderDetailId(Long orderDetailId);
}

View File

@@ -7,9 +7,7 @@
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="link" property="link"/>
<result column="domain_url" property="domainUrl"/>
<result column="name" property="name"/>
<result column="original_name" property="originalName"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>
@@ -23,10 +21,4 @@
<select id="selectStickersPage" resultMap="stickersResultMap">
select * from kiosk_stickers where is_deleted = 0
</select>
<select id="selectStickersListByOrderDetailId" resultType="org.springblade.modules.kiosk.pojo.entity.StickersEntity">
select k.*
from kiosk_stickers k inner join kiosk_stickers_attachment_r kr on k.id = kr.stickers_id
where k.is_deleted = 0 and kr.is_deleted = 0 and kr.detail_id = #{orderDetailId}
</select>
</mapper>

View File

@@ -6,7 +6,7 @@
<resultMap id="textAttachmentRResultMap" type="org.springblade.modules.kiosk.pojo.entity.TextAttachmentREntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="detail_id" property="detailId"/>
<result column="photo_id" property="photoId"/>
<result column="font_name" property="fontName"/>
<result column="font_size" property="fontSize"/>
<result column="text_content" property="textContent"/>

View File

@@ -59,20 +59,10 @@ public class StickersEntity extends TenantEntity {
*/
@Schema(description = "贴纸地址")
private String link;
/**
* 贴纸域名
*/
@Schema(description = "贴纸域名")
private String domainUrl;
/**
* 贴纸名称
*/
@Schema(description = "贴纸名称")
private String name;
/**
* 贴纸原名
*/
@Schema(description = "贴纸原名")
private String originalName;
}

View File

@@ -25,10 +25,10 @@
*/
package org.springblade.modules.kiosk.service;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.kiosk.pojo.entity.OrderDetailPhotoAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.OrderDetailPhotoAttachmentRVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 自助终端订单详情照片关联表 服务类
@@ -36,7 +36,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author Ray
* @since 2025-10-08
*/
public interface IOrderDetailPhotoAttachmentRService extends IService<OrderDetailPhotoAttachmentREntity> {
public interface IOrderDetailPhotoAttachmentRService extends BaseService<OrderDetailPhotoAttachmentREntity> {
/**
* 自定义分页
*

View File

@@ -25,11 +25,11 @@
*/
package org.springblade.modules.kiosk.service;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.kiosk.pojo.dto.OrderApiRequest;
import org.springblade.modules.kiosk.pojo.entity.PhotoAttachmentEntity;
import org.springblade.modules.kiosk.pojo.vo.PhotoAttachmentVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
@@ -39,7 +39,7 @@ import java.util.List;
* @author Ray
* @since 2025-10-07
*/
public interface IPhotoAttachmentService extends IService<PhotoAttachmentEntity> {
public interface IPhotoAttachmentService extends BaseService<PhotoAttachmentEntity> {
/**
* 自定义分页
*

View File

@@ -25,10 +25,10 @@
*/
package org.springblade.modules.kiosk.service;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.kiosk.pojo.entity.StickersAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.StickersAttachmentRVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 自助终端贴纸附件关联表 服务类
@@ -36,7 +36,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author Ray
* @since 2025-10-08
*/
public interface IStickersAttachmentRService extends IService<StickersAttachmentREntity> {
public interface IStickersAttachmentRService extends BaseService<StickersAttachmentREntity> {
/**
* 自定义分页
*

View File

@@ -25,12 +25,11 @@
*/
package org.springblade.modules.kiosk.service;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.kiosk.pojo.entity.StickersEntity;
import org.springblade.modules.kiosk.pojo.vo.StickersVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 自助终端贴纸表 服务类
@@ -38,7 +37,7 @@ import java.util.List;
* @author Ray
* @since 2025-10-08
*/
public interface IStickersService extends IService<StickersEntity> {
public interface IStickersService extends BaseService<StickersEntity> {
/**
* 自定义分页
*
@@ -48,5 +47,4 @@ public interface IStickersService extends IService<StickersEntity> {
*/
IPage<StickersVO> selectStickersPage(IPage<StickersVO> page, StickersVO stickers);
List<StickersEntity> selectStickersListByOrderDetailId(Long orderDetailId);
}

View File

@@ -25,10 +25,10 @@
*/
package org.springblade.modules.kiosk.service;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.kiosk.pojo.entity.TextAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.TextAttachmentRVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 自助终端文字附件关联表 服务类
@@ -36,7 +36,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author Ray
* @since 2025-10-08
*/
public interface ITextAttachmentRService extends IService<TextAttachmentREntity> {
public interface ITextAttachmentRService extends BaseService<TextAttachmentREntity> {
/**
* 自定义分页
*

View File

@@ -45,17 +45,14 @@ public class KioskServiceImpl implements IKioskApiService {
private final IPhotoAttachmentService photoAttachmentService;
private final IOrderDetailPhotoAttachmentRService orderDetailPhotoAttachmentRService;
private final IOrderService orderService;
private final IOrderDetailService orderDetailService;
private final ITextAttachmentRService textAttachmentRService;
private final IStickersService stickersService;
private final IStickersAttachmentRService stickersAttachmentRService;
private static final String codePrefix = "kiosk:upload:code:";
@@ -140,7 +137,7 @@ public class KioskServiceImpl implements IKioskApiService {
vo.setLink(stickers.getLink());
vo.setId(stickers.getId());
return vo;
}).collect(Collectors.toList());
}).toList();
}
@Override

View File

@@ -25,13 +25,13 @@
*/
package org.springblade.modules.kiosk.service.impl;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.kiosk.pojo.entity.OrderDetailPhotoAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.OrderDetailPhotoAttachmentRVO;
import org.springblade.modules.kiosk.mapper.OrderDetailPhotoAttachmentRMapper;
import org.springblade.modules.kiosk.service.IOrderDetailPhotoAttachmentRService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 自助终端订单详情照片关联表 服务实现类
@@ -40,7 +40,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @since 2025-10-08
*/
@Service
public class OrderDetailPhotoAttachmentRServiceImpl extends ServiceImpl<OrderDetailPhotoAttachmentRMapper, OrderDetailPhotoAttachmentREntity> implements IOrderDetailPhotoAttachmentRService {
public class OrderDetailPhotoAttachmentRServiceImpl extends BaseServiceImpl<OrderDetailPhotoAttachmentRMapper, OrderDetailPhotoAttachmentREntity> implements IOrderDetailPhotoAttachmentRService {
@Override
public IPage<OrderDetailPhotoAttachmentRVO> selectOrderDetailPhotoAttachmentRPage(IPage<OrderDetailPhotoAttachmentRVO> page, OrderDetailPhotoAttachmentRVO orderDetailPhotoAttachmentR) {

View File

@@ -49,10 +49,6 @@ public class OrderDetailServiceImpl extends BaseServiceImpl<OrderDetailMapper, O
private final IPhotoAttachmentService photoAttachmentService;
private final IStickersService stickersService;
private final ITextAttachmentRService textAttachmentRService;
@Override
public IPage<OrderDetailVO> selectOrderDetailPage(IPage<OrderDetailVO> page, OrderDetailVO orderDetail) {
List<OrderDetailVO> vos = baseMapper.selectOrderDetailPage(page, orderDetail);
@@ -61,17 +57,6 @@ public class OrderDetailServiceImpl extends BaseServiceImpl<OrderDetailMapper, O
List<PhotoAttachmentEntity> photoList = photoAttachmentService.selectPhotoAttachmentListByOrderDetailId(vo.getId());
vo.setPhotos(photoList.stream().map(PhotoAttachmentEntity::getLink).toList());
List<StickersEntity> stickersList = stickersService.selectStickersListByOrderDetailId(vo.getId());
vo.setStickers(stickersList.stream().map(StickersEntity::getLink).toList());
List<TextAttachmentREntity> tList = textAttachmentRService.list(Wrappers.<TextAttachmentREntity>lambdaQuery().eq(TextAttachmentREntity::getPhotoId, vo.getId()));
vo.setTexts(tList.stream().map(t -> {
OrderDetailVO.Text tt = new OrderDetailVO.Text();
tt.setContent(t.getTextContent());
tt.setSize(t.getFontSize());
tt.setFont(t.getFontName());
return tt;
}).toList());
});
return page.setRecords(vos);

View File

@@ -27,6 +27,7 @@ package org.springblade.modules.kiosk.service.impl;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.modules.kiosk.pojo.dto.OrderApiRequest;
import org.springblade.modules.kiosk.pojo.entity.OrderDetailPhotoAttachmentREntity;
@@ -41,11 +42,9 @@ import org.springblade.modules.kiosk.service.IStickersAttachmentRService;
import org.springblade.modules.kiosk.service.ITextAttachmentRService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
/**
@@ -57,7 +56,7 @@ import java.util.stream.Collectors;
@Slf4j
@Service
@AllArgsConstructor
public class PhotoAttachmentServiceImpl extends ServiceImpl<PhotoAttachmentMapper, PhotoAttachmentEntity> implements IPhotoAttachmentService {
public class PhotoAttachmentServiceImpl extends BaseServiceImpl<PhotoAttachmentMapper, PhotoAttachmentEntity> implements IPhotoAttachmentService {
private final IOrderDetailPhotoAttachmentRService orderDetailPhotoAttachmentRService;

View File

@@ -25,13 +25,13 @@
*/
package org.springblade.modules.kiosk.service.impl;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.kiosk.pojo.entity.StickersAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.StickersAttachmentRVO;
import org.springblade.modules.kiosk.mapper.StickersAttachmentRMapper;
import org.springblade.modules.kiosk.service.IStickersAttachmentRService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 自助终端贴纸附件关联表 服务实现类
@@ -40,7 +40,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @since 2025-10-08
*/
@Service
public class StickersAttachmentRServiceImpl extends ServiceImpl<StickersAttachmentRMapper, StickersAttachmentREntity> implements IStickersAttachmentRService {
public class StickersAttachmentRServiceImpl extends BaseServiceImpl<StickersAttachmentRMapper, StickersAttachmentREntity> implements IStickersAttachmentRService {
@Override
public IPage<StickersAttachmentRVO> selectStickersAttachmentRPage(IPage<StickersAttachmentRVO> page, StickersAttachmentRVO stickersAttachmentR) {

View File

@@ -26,15 +26,14 @@
package org.springblade.modules.kiosk.service.impl;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.kiosk.pojo.entity.StickersEntity;
import org.springblade.modules.kiosk.pojo.vo.StickersVO;
import org.springblade.modules.kiosk.mapper.StickersMapper;
import org.springblade.modules.kiosk.service.IStickersService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* 自助终端贴纸表 服务实现类
@@ -44,16 +43,11 @@ import java.util.List;
*/
@Service
@AllArgsConstructor
public class StickersServiceImpl extends ServiceImpl<StickersMapper, StickersEntity> implements IStickersService {
public class StickersServiceImpl extends BaseServiceImpl<StickersMapper, StickersEntity> implements IStickersService {
@Override
public IPage<StickersVO> selectStickersPage(IPage<StickersVO> page, StickersVO stickers) {
return page.setRecords(baseMapper.selectStickersPage(page, stickers));
}
@Override
public List<StickersEntity> selectStickersListByOrderDetailId(Long orderDetailId) {
return baseMapper.selectStickersListByOrderDetailId(orderDetailId);
}
}

View File

@@ -25,13 +25,13 @@
*/
package org.springblade.modules.kiosk.service.impl;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.kiosk.pojo.entity.TextAttachmentREntity;
import org.springblade.modules.kiosk.pojo.vo.TextAttachmentRVO;
import org.springblade.modules.kiosk.mapper.TextAttachmentRMapper;
import org.springblade.modules.kiosk.service.ITextAttachmentRService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 自助终端文字附件关联表 服务实现类
@@ -40,7 +40,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @since 2025-10-08
*/
@Service
public class TextAttachmentRServiceImpl extends ServiceImpl<TextAttachmentRMapper, TextAttachmentREntity> implements ITextAttachmentRService {
public class TextAttachmentRServiceImpl extends BaseServiceImpl<TextAttachmentRMapper, TextAttachmentREntity> implements ITextAttachmentRService {
@Override
public IPage<TextAttachmentRVO> selectTextAttachmentRPage(IPage<TextAttachmentRVO> page, TextAttachmentRVO textAttachmentR) {