feat:消费机增加消费场景
This commit is contained in:
1 parent
b1660c1441
commit
a0cf2d5bb6
3 files changed
+22
No files matched your search
@@ -0,0 +1,13 @@
|
||||
-- 云版消费机增加接入场景,使用 xfj_scene 字典,1 表示食堂。
|
||||
-- 先执行本迁移,再发布读取该字段的后端代码;历史设备通过字段默认值兼容为食堂。
|
||||
-- 字段已存在时直接跳过,支持重复执行。
|
||||
USE `pjcloudx_hardware`;
|
||||
|
||||
SET @ddl = (SELECT IF(COUNT(*) = 0,
|
||||
'ALTER TABLE `hard_manager` ADD COLUMN `xfj_scene` varchar(32) NOT NULL DEFAULT ''1'' COMMENT ''云版消费机接入场景,字典xfj_scene,1食堂'' AFTER `type`',
|
||||
'SELECT 1')
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'hard_manager' AND COLUMN_NAME = 'xfj_scene');
|
||||
PREPARE stmt FROM @ddl;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
+8
@@ -58,6 +58,14 @@ public class HardManagerEntity extends Model<HardManagerEntity> {
|
||||
@Schema(description="设备类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 云版消费机接入场景,保存 xfj_scene 字典编码,1 表示食堂,仅 type=9 时使用。
|
||||
* 未传或空串时,新增使用数据库默认值,更新保留已保存场景。
|
||||
*/
|
||||
@TableField(insertStrategy = FieldStrategy.NOT_EMPTY, updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
@Schema(description="云版消费机接入场景,字典xfj_scene,默认1食堂")
|
||||
private String xfjScene;
|
||||
|
||||
/**
|
||||
* mq连接id
|
||||
*/
|
||||
|
||||
+1
@@ -8,6 +8,7 @@
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="xfjScene" column="xfj_scene"/>
|
||||
<result property="mqClientId" column="mq_client_id"/>
|
||||
<result property="uniqueCode" column="unique_code"/>
|
||||
<result property="mainTopic" column="main_topic"/>
|
||||
|
||||
Reference in new issue
Block a user