chore: commit all changes (2025-11-04)
This commit is contained in:
@@ -55,4 +55,7 @@ public class PlayClerkLevelAddVo {
|
||||
@ApiModelProperty(value = "非首次随机单比例", example = "65", notes = "非首次随机单提成比例,范围0-100%")
|
||||
private Integer notFirstRandomRadio;
|
||||
|
||||
@ApiModelProperty(value = "排序号", example = "1", notes = "越小的等级在列表越靠前")
|
||||
private Long orderNumber;
|
||||
|
||||
}
|
||||
|
||||
@@ -118,6 +118,9 @@ public class PlayClerkLevelInfoServiceImpl extends ServiceImpl<PlayClerkLevelInf
|
||||
}
|
||||
playClerkLevelInfo.setCreatedTime(new Date());
|
||||
playClerkLevelInfo.setStyleType(playClerkLevelInfo.getLevel());
|
||||
if (playClerkLevelInfo.getOrderNumber() == null) {
|
||||
playClerkLevelInfo.setOrderNumber(playClerkLevelInfo.getLevel().longValue());
|
||||
}
|
||||
return save(playClerkLevelInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,7 @@
|
||||
SET @column_exists := (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'play_clerk_level_info'
|
||||
AND COLUMN_NAME = 'order_number'
|
||||
);
|
||||
|
||||
SET @ddl := IF(
|
||||
@column_exists = 0,
|
||||
'ALTER TABLE `play_clerk_level_info` ADD COLUMN `order_number` bigint NULL COMMENT ''等级排序号''',
|
||||
'SELECT 1'
|
||||
);
|
||||
|
||||
PREPARE stmt FROM @ddl;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
ALTER TABLE `play_clerk_level_info`
|
||||
ADD COLUMN `order_number` BIGINT NULL COMMENT '等级排序号'
|
||||
AFTER `style_image_url`;
|
||||
|
||||
UPDATE `play_clerk_level_info`
|
||||
SET `order_number` = COALESCE(`order_number`, `level`);
|
||||
SET `order_number` = `level`
|
||||
WHERE `order_number` IS NULL;
|
||||
Reference in New Issue
Block a user