fix(app): db transactional
This commit is contained in:
@@ -3,6 +3,7 @@ package com.imyeyu.api.modules.app.service;
|
||||
import com.imyeyu.api.modules.app.entity.AppChannel;
|
||||
import com.imyeyu.api.modules.app.entity.AppProduct;
|
||||
import com.imyeyu.api.modules.app.entity.AppRelease;
|
||||
import com.imyeyu.api.config.dbsource.TimiServerDBConfig;
|
||||
import com.imyeyu.api.modules.app.mapper.AppChannelMapper;
|
||||
import com.imyeyu.api.modules.app.mapper.AppProductMapper;
|
||||
import com.imyeyu.api.modules.app.mapper.AppReleaseMapper;
|
||||
@@ -359,7 +360,7 @@ public class AppVersionService {
|
||||
/// @param grayPermille 灰度比例,为空时保持原值
|
||||
/// @param operatorId 操作人用户 ID
|
||||
/// @param note 变更说明
|
||||
@Transactional
|
||||
@Transactional(TimiServerDBConfig.ROLLBACKER)
|
||||
public void publish(String releaseId, String channelCode, Integer grayPermille, String operatorId, String note) {
|
||||
AppRelease release = releaseMapper.select(releaseId);
|
||||
if (release == null) {
|
||||
@@ -392,7 +393,7 @@ public class AppVersionService {
|
||||
/// @param channelCode 通道代码
|
||||
/// @param targetReleaseId 目标发布 ID
|
||||
/// @param operatorId 操作人用户 ID
|
||||
@Transactional
|
||||
@Transactional(TimiServerDBConfig.ROLLBACKER)
|
||||
public void rollback(String productId, String channelCode, String targetReleaseId, String operatorId) {
|
||||
AppChannel channel = channelMapper.selectByProductAndCode(productId, channelCode);
|
||||
if (channel == null) {
|
||||
@@ -415,7 +416,7 @@ public class AppVersionService {
|
||||
///
|
||||
/// @param releaseId 发布 ID
|
||||
/// @param operatorId 操作人用户 ID
|
||||
@Transactional
|
||||
@Transactional(TimiServerDBConfig.ROLLBACKER)
|
||||
public void revoke(String releaseId, String operatorId) {
|
||||
AppRelease release = releaseMapper.select(releaseId);
|
||||
if (release == null) {
|
||||
|
||||
Reference in New Issue
Block a user