迁移 叫号
This commit is contained in:
@@ -18,8 +18,8 @@ public class CodeGen {
|
||||
private final static String DATABASE = "czg_cashier";
|
||||
private final static String OLD_DATABASE = "fycashier_test";
|
||||
|
||||
private final static boolean isOldVersion = false;
|
||||
// private final static boolean isOldVersion = true;
|
||||
// private final static boolean isOldVersion = false;
|
||||
private final static boolean isOldVersion = true;
|
||||
|
||||
public static void main(String[] args) {
|
||||
//配置数据源
|
||||
@@ -81,7 +81,7 @@ public class CodeGen {
|
||||
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
||||
globalConfig.getStrategyConfig()
|
||||
.setTablePrefix("tb_")
|
||||
.setGenerateTable("tb_pad_layout");
|
||||
.setGenerateTable("tb_call_config", "tb_call_queue", "tb_call_table");
|
||||
|
||||
EntityConfig entityConfig = globalConfig.getEntityConfig();
|
||||
if (isOldVersion) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.czg.mergedata.controller;
|
||||
|
||||
import com.czg.mergedata.common.resp.CzgResult;
|
||||
import com.czg.mergedata.cur.service.CurCallConfigService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author GYJoker
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/call")
|
||||
public class CallController {
|
||||
|
||||
@Resource
|
||||
private CurCallConfigService curCallConfigService;
|
||||
|
||||
@GetMapping("/mergeData")
|
||||
public CzgResult<String> mergeData() {
|
||||
return curCallConfigService.mergeData();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.czg.mergedata.cur.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号配置表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_config")
|
||||
public class CurCallConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 小程序页面地址
|
||||
*/
|
||||
private String pageAddress;
|
||||
|
||||
/**
|
||||
* 线上取号 1是 0否
|
||||
*/
|
||||
private Integer isOnline;
|
||||
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
private String bgCover;
|
||||
|
||||
/**
|
||||
* 成功提示
|
||||
*/
|
||||
private String successMsg;
|
||||
|
||||
/**
|
||||
* 临近提示
|
||||
*/
|
||||
private String nearMsg;
|
||||
|
||||
/**
|
||||
* 过号提示
|
||||
*/
|
||||
private String callingMsg;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 临近几桌提醒
|
||||
*/
|
||||
private Integer nearNum;
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
126
src/main/java/com/czg/mergedata/cur/entity/CurCallQueue.java
Normal file
126
src/main/java/com/czg/mergedata/cur/entity/CurCallQueue.java
Normal file
@@ -0,0 +1,126 @@
|
||||
package com.czg.mergedata.cur.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号排号队列表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_queue")
|
||||
public class CurCallQueue implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 叫号台桌类型id
|
||||
*/
|
||||
private Long callTableId;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* -1已取消 0排队中 1叫号中 2已入座 3 已过号
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 订阅提醒 0未订阅 1已订阅
|
||||
*/
|
||||
private Integer subState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 叫号号码
|
||||
*/
|
||||
private String callNum;
|
||||
|
||||
/**
|
||||
* 创建年月日
|
||||
*/
|
||||
private String createDay;
|
||||
|
||||
/**
|
||||
* 是否已经顺延 0 未顺延 1已顺延一次 2顺延一次仍然过号
|
||||
*/
|
||||
private Integer isPostpone;
|
||||
|
||||
/**
|
||||
* 排号时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 叫号时间
|
||||
*/
|
||||
private LocalDateTime callTime;
|
||||
|
||||
/**
|
||||
* 叫号次数
|
||||
*/
|
||||
private Integer callCount;
|
||||
|
||||
/**
|
||||
* 过号时间
|
||||
*/
|
||||
private LocalDateTime passTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private LocalDateTime cancelTime;
|
||||
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
}
|
||||
97
src/main/java/com/czg/mergedata/cur/entity/CurCallTable.java
Normal file
97
src/main/java/com/czg/mergedata/cur/entity/CurCallTable.java
Normal file
@@ -0,0 +1,97 @@
|
||||
package com.czg.mergedata.cur.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_table")
|
||||
public class CurCallTable implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 等待时间分钟
|
||||
*/
|
||||
private Integer waitTime;
|
||||
|
||||
/**
|
||||
* 前缀
|
||||
*/
|
||||
private String prefix;
|
||||
|
||||
/**
|
||||
* 起始号码
|
||||
*/
|
||||
private Integer start;
|
||||
|
||||
/**
|
||||
* 临近几桌提醒
|
||||
*/
|
||||
private Integer nearNum;
|
||||
|
||||
/**
|
||||
* 0禁用 1使用
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 二维码地址
|
||||
*/
|
||||
private String qrcode;
|
||||
|
||||
/**
|
||||
* 顺延号码数量
|
||||
*/
|
||||
private Integer postponeNum;
|
||||
|
||||
/**
|
||||
* 顺延号码数量
|
||||
*/
|
||||
private Integer isPostpone;
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.cur.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.cur.entity.CurCallConfig;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 叫号配置表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds1")
|
||||
public interface CurCallConfigMapper extends BaseMapper<CurCallConfig> {
|
||||
@Select("truncate tb_call_config")
|
||||
void truncateTable();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.cur.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.cur.entity.CurCallQueue;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 叫号排号队列表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds1")
|
||||
public interface CurCallQueueMapper extends BaseMapper<CurCallQueue> {
|
||||
@Select("truncate tb_call_queue")
|
||||
void truncateTable();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.cur.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.cur.entity.CurCallTable;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds1")
|
||||
public interface CurCallTableMapper extends BaseMapper<CurCallTable> {
|
||||
@Select("truncate tb_call_table")
|
||||
void truncateTable();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.czg.mergedata.cur.service;
|
||||
|
||||
import com.czg.mergedata.common.resp.CzgResult;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.cur.entity.CurCallConfig;
|
||||
|
||||
/**
|
||||
* 叫号配置表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface CurCallConfigService extends IService<CurCallConfig> {
|
||||
|
||||
CzgResult<String> mergeData();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.mergedata.cur.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.cur.entity.CurCallQueue;
|
||||
|
||||
/**
|
||||
* 叫号排号队列表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface CurCallQueueService extends IService<CurCallQueue> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.mergedata.cur.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.cur.entity.CurCallTable;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface CurCallTableService extends IService<CurCallTable> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.czg.mergedata.cur.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.mergedata.common.resp.CzgResult;
|
||||
import com.czg.mergedata.common.utils.PageUtils;
|
||||
import com.czg.mergedata.cur.entity.CurCallQueue;
|
||||
import com.czg.mergedata.cur.entity.CurCallTable;
|
||||
import com.czg.mergedata.cur.mapper.CurCallQueueMapper;
|
||||
import com.czg.mergedata.cur.mapper.CurCallTableMapper;
|
||||
import com.czg.mergedata.cur.service.CurShopIdRelationService;
|
||||
import com.czg.mergedata.old.entity.OldCallConfig;
|
||||
import com.czg.mergedata.old.entity.OldCallQueue;
|
||||
import com.czg.mergedata.old.entity.OldCallTable;
|
||||
import com.czg.mergedata.old.service.OldCallConfigService;
|
||||
import com.czg.mergedata.old.service.OldCallQueueService;
|
||||
import com.czg.mergedata.old.service.OldCallTableService;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.cur.entity.CurCallConfig;
|
||||
import com.czg.mergedata.cur.mapper.CurCallConfigMapper;
|
||||
import com.czg.mergedata.cur.service.CurCallConfigService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 叫号配置表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class CurCallConfigServiceImpl extends ServiceImpl<CurCallConfigMapper, CurCallConfig> implements CurCallConfigService {
|
||||
|
||||
@Resource
|
||||
private CurShopIdRelationService curShopIdRelationService;
|
||||
|
||||
@Resource
|
||||
private CurCallQueueMapper curCallQueueMapper;
|
||||
|
||||
@Resource
|
||||
private CurCallTableMapper curCallTableMapper;
|
||||
|
||||
@Resource
|
||||
private OldCallConfigService oldCallConfigService;
|
||||
|
||||
@Resource
|
||||
private OldCallQueueService oldCallQueueService;
|
||||
|
||||
@Resource
|
||||
private OldCallTableService oldCallTableService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CzgResult<String> mergeData() {
|
||||
getMapper().truncateTable();
|
||||
curCallQueueMapper.truncateTable();
|
||||
curCallTableMapper.truncateTable();
|
||||
|
||||
Map<Long, Long> oldAndCurShopIdMap = curShopIdRelationService.getOldShopIdRelation();
|
||||
|
||||
execCallConfig(oldAndCurShopIdMap);
|
||||
execCallQueue(oldAndCurShopIdMap);
|
||||
execCallTable(oldAndCurShopIdMap);
|
||||
|
||||
return CzgResult.success("迁移成功");
|
||||
}
|
||||
|
||||
private void execCallConfig(Map<Long, Long> oldAndCurShopIdMap) {
|
||||
Page<OldCallConfig> page = oldCallConfigService.page(PageUtils.buildPage());
|
||||
|
||||
while (!page.getRecords().isEmpty()) {
|
||||
saveCallConfig(page.getRecords(), oldAndCurShopIdMap);
|
||||
page = oldCallConfigService.page(PageUtils.buildPage(page.getPageNumber() + 1));
|
||||
}
|
||||
}
|
||||
|
||||
private void execCallQueue(Map<Long, Long> oldAndCurShopIdMap) {
|
||||
Page<OldCallQueue> page = oldCallQueueService.page(PageUtils.buildPage());
|
||||
|
||||
while (!page.getRecords().isEmpty()) {
|
||||
saveCallQueue(page.getRecords(), oldAndCurShopIdMap);
|
||||
page = oldCallQueueService.page(PageUtils.buildPage(page.getPageNumber() + 1));
|
||||
}
|
||||
}
|
||||
|
||||
private void execCallTable(Map<Long, Long> oldAndCurShopIdMap) {
|
||||
Page<OldCallTable> page = oldCallTableService.page(PageUtils.buildPage());
|
||||
|
||||
while (!page.getRecords().isEmpty()) {
|
||||
saveCallTable(page.getRecords(), oldAndCurShopIdMap);
|
||||
page = oldCallTableService.page(PageUtils.buildPage(page.getPageNumber() + 1));
|
||||
}
|
||||
}
|
||||
|
||||
private void saveCallConfig(List<OldCallConfig> oldCallConfigList, Map<Long, Long> oldAndCurShopIdMap) {
|
||||
List<CurCallConfig> curCallConfigList = new ArrayList<>();
|
||||
|
||||
for (OldCallConfig oldCallConfig : oldCallConfigList) {
|
||||
CurCallConfig curCallConfig = BeanUtil.toBean(oldCallConfig, CurCallConfig.class);
|
||||
curCallConfig.setShopId(oldAndCurShopIdMap.get(Long.valueOf(oldCallConfig.getShopId())));
|
||||
curCallConfigList.add(curCallConfig);
|
||||
}
|
||||
|
||||
saveBatch(curCallConfigList);
|
||||
}
|
||||
|
||||
private void saveCallQueue(List<OldCallQueue> oldCallQueueList, Map<Long, Long> oldAndCurShopIdMap) {
|
||||
List<CurCallQueue> curCallQueueList = new ArrayList<>();
|
||||
|
||||
for (OldCallQueue oldCallQueue : oldCallQueueList) {
|
||||
CurCallQueue curCallQueue = BeanUtil.toBean(oldCallQueue, CurCallQueue.class);
|
||||
curCallQueue.setShopId(oldAndCurShopIdMap.get(Long.valueOf(oldCallQueue.getShopId())));
|
||||
curCallQueueList.add(curCallQueue);
|
||||
}
|
||||
|
||||
curCallQueueMapper.insertBatch(curCallQueueList);
|
||||
}
|
||||
|
||||
private void saveCallTable(List<OldCallTable> oldCallTableList, Map<Long, Long> oldAndCurShopIdMap) {
|
||||
List<CurCallTable> curCallTableList = new ArrayList<>();
|
||||
|
||||
for (OldCallTable oldCallTable : oldCallTableList) {
|
||||
CurCallTable curCallTable = BeanUtil.toBean(oldCallTable, CurCallTable.class);
|
||||
curCallTable.setShopId(oldAndCurShopIdMap.get(Long.valueOf(oldCallTable.getShopId())));
|
||||
curCallTableList.add(curCallTable);
|
||||
}
|
||||
|
||||
curCallTableMapper.insertBatch(curCallTableList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.cur.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.cur.entity.CurCallQueue;
|
||||
import com.czg.mergedata.cur.mapper.CurCallQueueMapper;
|
||||
import com.czg.mergedata.cur.service.CurCallQueueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 叫号排号队列表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class CurCallQueueServiceImpl extends ServiceImpl<CurCallQueueMapper, CurCallQueue> implements CurCallQueueService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.cur.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.cur.entity.CurCallTable;
|
||||
import com.czg.mergedata.cur.mapper.CurCallTableMapper;
|
||||
import com.czg.mergedata.cur.service.CurCallTableService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class CurCallTableServiceImpl extends ServiceImpl<CurCallTableMapper, CurCallTable> implements CurCallTableService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.czg.mergedata.old.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号配置表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_config")
|
||||
public class OldCallConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 小程序页面地址
|
||||
*/
|
||||
private String pageAddress;
|
||||
|
||||
/**
|
||||
* 线上取号 1是 0否
|
||||
*/
|
||||
private Integer isOnline;
|
||||
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
private String bgCover;
|
||||
|
||||
/**
|
||||
* 成功提示
|
||||
*/
|
||||
private String successMsg;
|
||||
|
||||
/**
|
||||
* 临近提示
|
||||
*/
|
||||
private String nearMsg;
|
||||
|
||||
/**
|
||||
* 过号提示
|
||||
*/
|
||||
private String callingMsg;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 临近几桌提醒
|
||||
*/
|
||||
private Integer nearNum;
|
||||
|
||||
}
|
||||
126
src/main/java/com/czg/mergedata/old/entity/OldCallQueue.java
Normal file
126
src/main/java/com/czg/mergedata/old/entity/OldCallQueue.java
Normal file
@@ -0,0 +1,126 @@
|
||||
package com.czg.mergedata.old.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号排号表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_queue")
|
||||
public class OldCallQueue implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 叫号台桌类型id
|
||||
*/
|
||||
private Integer callTableId;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* -1已取消 0排队中 1叫号中 2已入座 3 已过号
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 排号时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 叫号时间
|
||||
*/
|
||||
private LocalDateTime callTime;
|
||||
|
||||
/**
|
||||
* 叫号次数
|
||||
*/
|
||||
private Integer callCount;
|
||||
|
||||
/**
|
||||
* 过号时间
|
||||
*/
|
||||
private LocalDateTime passTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private LocalDateTime cancelTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String note;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 订阅提醒 0未订阅 1已订阅
|
||||
*/
|
||||
private Integer subState;
|
||||
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
/**
|
||||
* 叫号号码
|
||||
*/
|
||||
private String callNum;
|
||||
|
||||
/**
|
||||
* 创建年月日
|
||||
*/
|
||||
private String createDay;
|
||||
|
||||
/**
|
||||
* 是否已经顺延 0 未顺延 1已顺延一次 2顺延一次仍然过号
|
||||
*/
|
||||
private Integer isPostpone;
|
||||
|
||||
}
|
||||
97
src/main/java/com/czg/mergedata/old/entity/OldCallTable.java
Normal file
97
src/main/java/com/czg/mergedata/old/entity/OldCallTable.java
Normal file
@@ -0,0 +1,97 @@
|
||||
package com.czg.mergedata.old.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 实体类。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_call_table")
|
||||
public class OldCallTable implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 等待时间分钟
|
||||
*/
|
||||
private Integer waitTime;
|
||||
|
||||
/**
|
||||
* 前缀
|
||||
*/
|
||||
private String prefix;
|
||||
|
||||
/**
|
||||
* 起始号码
|
||||
*/
|
||||
private Integer start;
|
||||
|
||||
/**
|
||||
* 临近几桌提醒
|
||||
*/
|
||||
private Integer nearNum;
|
||||
|
||||
/**
|
||||
* 0禁用 1使用
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* 二维码地址
|
||||
*/
|
||||
private String qrcode;
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 顺延号码数量
|
||||
*/
|
||||
private Integer isPostpone;
|
||||
|
||||
/**
|
||||
* 顺延号码数量
|
||||
*/
|
||||
private Integer postponeNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.czg.mergedata.old.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.old.entity.OldCallConfig;
|
||||
|
||||
/**
|
||||
* 叫号配置表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds2")
|
||||
public interface OldCallConfigMapper extends BaseMapper<OldCallConfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.czg.mergedata.old.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.old.entity.OldCallQueue;
|
||||
|
||||
/**
|
||||
* 叫号排号表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds2")
|
||||
public interface OldCallQueueMapper extends BaseMapper<OldCallQueue> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.czg.mergedata.old.mapper;
|
||||
|
||||
import com.mybatisflex.annotation.UseDataSource;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.mergedata.old.entity.OldCallTable;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 映射层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@UseDataSource("ds2")
|
||||
public interface OldCallTableMapper extends BaseMapper<OldCallTable> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.mergedata.old.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.old.entity.OldCallConfig;
|
||||
|
||||
/**
|
||||
* 叫号配置表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface OldCallConfigService extends IService<OldCallConfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.mergedata.old.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.old.entity.OldCallQueue;
|
||||
|
||||
/**
|
||||
* 叫号排号表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface OldCallQueueService extends IService<OldCallQueue> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.mergedata.old.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.mergedata.old.entity.OldCallTable;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 服务层。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
public interface OldCallTableService extends IService<OldCallTable> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.old.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.old.entity.OldCallConfig;
|
||||
import com.czg.mergedata.old.mapper.OldCallConfigMapper;
|
||||
import com.czg.mergedata.old.service.OldCallConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 叫号配置表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class OldCallConfigServiceImpl extends ServiceImpl<OldCallConfigMapper, OldCallConfig> implements OldCallConfigService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.old.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.old.entity.OldCallQueue;
|
||||
import com.czg.mergedata.old.mapper.OldCallQueueMapper;
|
||||
import com.czg.mergedata.old.service.OldCallQueueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 叫号排号表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class OldCallQueueServiceImpl extends ServiceImpl<OldCallQueueMapper, OldCallQueue> implements OldCallQueueService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.mergedata.old.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.mergedata.old.entity.OldCallTable;
|
||||
import com.czg.mergedata.old.mapper.OldCallTableMapper;
|
||||
import com.czg.mergedata.old.service.OldCallTableService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 叫号桌型表 服务层实现。
|
||||
*
|
||||
* @author mac
|
||||
* @since 2025-02-19
|
||||
*/
|
||||
@Service
|
||||
public class OldCallTableServiceImpl extends ServiceImpl<OldCallTableMapper, OldCallTable> implements OldCallTableService{
|
||||
|
||||
}
|
||||
7
src/main/resources/mapper/cur/CallConfigMapper.xml
Normal file
7
src/main/resources/mapper/cur/CallConfigMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.cur.mapper.CurCallConfigMapper">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/cur/CallQueueMapper.xml
Normal file
7
src/main/resources/mapper/cur/CallQueueMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.cur.mapper.CurCallQueueMapper">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/cur/CallTableMapper.xml
Normal file
7
src/main/resources/mapper/cur/CallTableMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.cur.mapper.CurCallTableMapper">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/old/CallConfigMapper.xml
Normal file
7
src/main/resources/mapper/old/CallConfigMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.old.mapper.OldCallConfigMapper">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/old/CallQueueMapper.xml
Normal file
7
src/main/resources/mapper/old/CallQueueMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.old.mapper.OldCallQueueMapper">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/old/CallTableMapper.xml
Normal file
7
src/main/resources/mapper/old/CallTableMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.czg.mergedata.old.mapper.OldCallTableMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user