状态机重构完毕
This commit is contained in:
parent
3572600845
commit
47167a7489
@ -98,6 +98,9 @@ public class AdvisorInfoService {
|
||||
@Value("${advisor.roleId}")
|
||||
private Integer advisorRoleId;
|
||||
|
||||
@Value("${user.admin.roles}")
|
||||
private Integer adminRoleId;
|
||||
|
||||
public static final Set<Integer> TG_SHOW_STATUS = ImmutableSet.of(
|
||||
AdvisorInfoStatus.PASS.value,
|
||||
AdvisorInfoStatus.EVENT_SUBMIT.value,
|
||||
@ -150,7 +153,7 @@ public class AdvisorInfoService {
|
||||
if (dept != null && DeptType.HEAD.value.equals(dept.getType())) {
|
||||
deptId = null;
|
||||
}
|
||||
if (backendUserVO.getRoles().contains(StateMachine.ROLE.ADMIN)) {
|
||||
if (backendUserVO.getRoles().contains(adminRoleId)) {
|
||||
deptId = null;
|
||||
}
|
||||
Map<Integer, UserLogin> userLoginMap = userService.getUserLoginMap();
|
||||
|
||||
@ -18,14 +18,14 @@ public class AdvisorInfoStateMachine {
|
||||
advisorInfoSM.add(AdvisorInfoStatus.INIT, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.ADVISOR, AdvisorInfoStatus.INIT);
|
||||
|
||||
// 待审核 -> 管理员[驳回] -> 已驳回
|
||||
advisorInfoSM.add(AdvisorInfoStatus.TO_AUDIT, AdvisorInfoStatus.EVENT_REJECT, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.REJECTED);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.TO_AUDIT, AdvisorInfoStatus.EVENT_REJECT, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.REJECTED);
|
||||
// 待审核 -> 管理员[通过] -> 一级审核通过
|
||||
advisorInfoSM.add(AdvisorInfoStatus.TO_AUDIT, AdvisorInfoStatus.EVENT_PASS, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.PASS);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.TO_AUDIT, AdvisorInfoStatus.EVENT_PASS, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.PASS);
|
||||
|
||||
// 已上架 -> 管理员[下架] -> 已下架
|
||||
advisorInfoSM.add(AdvisorInfoStatus.PASS, AdvisorInfoStatus.EVENT_SOLD_OUT, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.SOLD_OUT);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.PASS, AdvisorInfoStatus.EVENT_SOLD_OUT, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.SOLD_OUT);
|
||||
// 已上架 -> 管理员[编辑] -> 已上架
|
||||
advisorInfoSM.add(AdvisorInfoStatus.PASS, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.PASS);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.PASS, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.PASS);
|
||||
|
||||
// 已驳回 -> 投顾[编辑] -> 已驳回
|
||||
advisorInfoSM.add(AdvisorInfoStatus.REJECTED, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.ADVISOR, AdvisorInfoStatus.REJECTED);
|
||||
@ -37,9 +37,9 @@ public class AdvisorInfoStateMachine {
|
||||
// 已下架 —> 投顾[发布] -> 待审核
|
||||
advisorInfoSM.add(AdvisorInfoStatus.SOLD_OUT, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.ADVISOR, AdvisorInfoStatus.TO_AUDIT);
|
||||
// 已下架 -> 管理员[上架] -> 已上架
|
||||
advisorInfoSM.add(AdvisorInfoStatus.SOLD_OUT, AdvisorInfoStatus.EVENT_PUT_ON, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.PASS);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.SOLD_OUT, AdvisorInfoStatus.EVENT_PUT_ON, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.PASS);
|
||||
// 已下架 -> 管理员[编辑] -> 已下架
|
||||
advisorInfoSM.add(AdvisorInfoStatus.SOLD_OUT, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.ADMIN, AdvisorInfoStatus.SOLD_OUT);
|
||||
advisorInfoSM.add(AdvisorInfoStatus.SOLD_OUT, AdvisorInfoStatus.EVENT_UPDATE, StateMachine.ROLE.NOT_ADVISOR, AdvisorInfoStatus.SOLD_OUT);
|
||||
|
||||
return advisorInfoSM;
|
||||
}
|
||||
|
||||
@ -6,9 +6,7 @@ import com.google.common.collect.Table;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -20,20 +18,14 @@ import java.util.Map;
|
||||
public class StateMachine<T> {
|
||||
|
||||
public static class ROLE {
|
||||
public static final int ADMIN = 1;
|
||||
public static final int ADVISOR = 2;
|
||||
public static final int COMPLIANCE = 3; // 一级审核
|
||||
public static final int BUSINESS = 4; // 二级审核
|
||||
public static final int OPERATION = 5; // 三级审核
|
||||
public static final int ADVISOR = 1;
|
||||
public static final int NOT_ADVISOR = 2;
|
||||
|
||||
private static final Map<Integer, String> MAP = MapUtil.newHashMap();
|
||||
|
||||
static {
|
||||
MAP.put(ADMIN, "管理员");
|
||||
MAP.put(ADVISOR, "投顾");
|
||||
MAP.put(COMPLIANCE, "合规");
|
||||
MAP.put(BUSINESS, "业务负责人");
|
||||
MAP.put(OPERATION, "运营");
|
||||
MAP.put(NOT_ADVISOR, "非投顾");
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,13 +45,6 @@ public class StateMachine<T> {
|
||||
table.put(source, event + "|" + role, target);
|
||||
}
|
||||
|
||||
// 添加状态事件(不同角色特殊处理。比如下架产品,投顾编辑后为待提交状态;运营人员编辑后仍未下架状态)
|
||||
public void add(T source, T event, List<Integer> roles, T target) {
|
||||
for (int role : roles) {
|
||||
table.put(source, event + "|" + role, target);
|
||||
}
|
||||
}
|
||||
|
||||
// 添加状态事件(事件和目标相同,省略参数)
|
||||
public void add(T source, T target) {
|
||||
table.put(source, target, target);
|
||||
@ -87,34 +72,13 @@ public class StateMachine<T> {
|
||||
return target;
|
||||
}
|
||||
String statusMsg = "原状态:[" + source + "]";
|
||||
String roleMsg = role == null ? "" : ",角色:[" + (ROLE.ADMIN == role ? "管理员" : "投顾") + "]";
|
||||
String roleMsg = role == null ? "" : ",角色:[" + (ROLE.MAP.getOrDefault(role, role.toString())) + "]";
|
||||
String eventMsg = ",不能执行:[" + event + "]动作";
|
||||
throw new BizException(ResponseStatus.STATUS_ERROR, statusMsg + roleMsg + eventMsg);
|
||||
}
|
||||
|
||||
public T send(T source, T event, List<Integer> roles) {
|
||||
T target = null;
|
||||
for (Integer role : roles) {
|
||||
target = this.send(source, event, role);
|
||||
}
|
||||
if (target == null) {
|
||||
String statusMsg = "原状态:[" + source + "]";
|
||||
String roleMsg = "";
|
||||
if (!CollectionUtils.isEmpty(roles)) {
|
||||
roleMsg = " 角色:[";
|
||||
for (Integer role : roles) {
|
||||
roleMsg += "," + ROLE.MAP.get(role);
|
||||
}
|
||||
roleMsg += "]";
|
||||
}
|
||||
String eventMsg = ",不能执行:[" + event + "]动作";
|
||||
throw new BizException(ResponseStatus.STATUS_ERROR, statusMsg + roleMsg + eventMsg);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
public T send(T source, T event, BackendUserVO userVO) {
|
||||
int role = userVO.getAdvisorId() == null ? StateMachine.ROLE.ADMIN : StateMachine.ROLE.ADVISOR;
|
||||
int role = userVO.getAdvisorId() == null ? ROLE.NOT_ADVISOR : StateMachine.ROLE.ADVISOR;
|
||||
return this.send(source, event, role);
|
||||
}
|
||||
|
||||
|
||||
@ -16,15 +16,15 @@ public class VideoActivityStateMachine {
|
||||
public StateMachine<VideoActivityStatus> videoActivityStatusSm() {
|
||||
StateMachine<VideoActivityStatus> activityStatusSm = new StateMachine<>();
|
||||
// 待审核 [运营人员]审核 通过 上架
|
||||
activityStatusSm.add(VideoActivityStatus.TO_AUDIT, VideoActivityStatus.EVENT_PASS, StateMachine.ROLE.ADMIN, VideoActivityStatus.PASS);
|
||||
activityStatusSm.add(VideoActivityStatus.TO_AUDIT, VideoActivityStatus.EVENT_PASS, StateMachine.ROLE.NOT_ADVISOR, VideoActivityStatus.PASS);
|
||||
// 待审核 [运营人员]审核 驳回 已驳回
|
||||
activityStatusSm.add(VideoActivityStatus.TO_AUDIT, VideoActivityStatus.EVENT_REJECT, StateMachine.ROLE.ADMIN, VideoActivityStatus.REJECTED);
|
||||
activityStatusSm.add(VideoActivityStatus.TO_AUDIT, VideoActivityStatus.EVENT_REJECT, StateMachine.ROLE.NOT_ADVISOR, VideoActivityStatus.REJECTED);
|
||||
// 已驳回 [投顾]编辑 待审核
|
||||
activityStatusSm.add(VideoActivityStatus.REJECTED, VideoActivityStatus.EVENT_UPDATE, StateMachine.ROLE.ADMIN, VideoActivityStatus.TO_AUDIT);
|
||||
activityStatusSm.add(VideoActivityStatus.REJECTED, VideoActivityStatus.EVENT_UPDATE, StateMachine.ROLE.ADVISOR, VideoActivityStatus.TO_AUDIT);
|
||||
// 已上架 [运营人员] 下架
|
||||
activityStatusSm.add(VideoActivityStatus.PASS, VideoActivityStatus.EVENT_SOLD_OUT, StateMachine.ROLE.ADMIN, VideoActivityStatus.SOLD_OUT);
|
||||
activityStatusSm.add(VideoActivityStatus.PASS, VideoActivityStatus.EVENT_SOLD_OUT, StateMachine.ROLE.NOT_ADVISOR, VideoActivityStatus.SOLD_OUT);
|
||||
// 已下架 [运营人员] 上架
|
||||
activityStatusSm.add(VideoActivityStatus.SOLD_OUT, VideoActivityStatus.EVENT_PUT_ON, StateMachine.ROLE.ADMIN, VideoActivityStatus.PASS);
|
||||
activityStatusSm.add(VideoActivityStatus.SOLD_OUT, VideoActivityStatus.EVENT_PUT_ON, StateMachine.ROLE.NOT_ADVISOR, VideoActivityStatus.PASS);
|
||||
return activityStatusSm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -13,38 +13,34 @@ public class VideoLiveColumnStateMachine {
|
||||
public StateMachine<VideoLiveColumnStatus> videoLiveColumnSM() {
|
||||
StateMachine<VideoLiveColumnStatus> videoLiveColumnSM = new StateMachine<>();
|
||||
|
||||
// 待提交>待提交 (券商投顾操作)(投顾编辑)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_EDIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UN_SUBMIT);
|
||||
// 待提交>上架待审核 (券商投顾操作)(投顾申请上架)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_SUBMIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
// 待提交>待提交
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_EDIT, VideoLiveColumnStatus.UN_SUBMIT);
|
||||
// 待提交>上架待审核
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_SUBMIT, VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
// 待提交>上架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_PUT_ON, VideoLiveColumnStatus.UP);
|
||||
|
||||
// 上架待审核>待提交 (券商投顾操作)(投顾撤回)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_WITHDRAW, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UN_SUBMIT);
|
||||
// 上架待审核>通过上架 (一级投顾管理岗操作)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_PASS, new ArrayList<>(Arrays.asList(StateMachine.ROLE.COMPLIANCE, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP);
|
||||
// 上架待审核>驳回 (一级投顾管理岗操作)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_REJECT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.REJECT);
|
||||
// 上架待审核>待提交
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_WITHDRAW, VideoLiveColumnStatus.UN_SUBMIT);
|
||||
// 上架待审核>通过上架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_PASS, VideoLiveColumnStatus.UP);
|
||||
// 上架待审核>驳回
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_REJECT, VideoLiveColumnStatus.REJECT);
|
||||
|
||||
// 驳回>上架待审核 (券商投顾操作)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.REJECT, VideoLiveColumnStatus.EVENT_EDIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
// 一审驳回>上架待审核/三审驳回>上架待审核/三审驳回>上架待审核 (申请上架)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.REJECT, VideoLiveColumnStatus.EVENT_SUBMIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
// 驳回>上架待审核
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.REJECT, VideoLiveColumnStatus.EVENT_EDIT, VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
// 驳回>申请上架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.REJECT, VideoLiveColumnStatus.EVENT_SUBMIT, VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
|
||||
// 上架>下架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP, VideoLiveColumnStatus.EVENT_PUT_OFF, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.DOWN);
|
||||
|
||||
// 待审核>上架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP_UN_AUDIT, VideoLiveColumnStatus.EVENT_PASS, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP);
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UP, VideoLiveColumnStatus.EVENT_PUT_OFF, VideoLiveColumnStatus.DOWN);
|
||||
|
||||
// 下架>上架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_PUT_ON, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP);
|
||||
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.UN_SUBMIT, VideoLiveColumnStatus.EVENT_PUT_ON, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP);
|
||||
|
||||
// 下架>下架 (投顾编辑/管理员编辑)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_EDIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.DOWN);
|
||||
// 下架>上架待审核 (申请上架)
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_SUBMIT, new ArrayList<>(Arrays.asList(StateMachine.ROLE.ADVISOR, StateMachine.ROLE.ADMIN)), VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_PUT_ON, VideoLiveColumnStatus.UP);
|
||||
// 下架>下架
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_EDIT, VideoLiveColumnStatus.DOWN);
|
||||
// 下架>上架待审核
|
||||
videoLiveColumnSM.add(VideoLiveColumnStatus.DOWN, VideoLiveColumnStatus.EVENT_SUBMIT, VideoLiveColumnStatus.UP_UN_AUDIT);
|
||||
|
||||
return videoLiveColumnSM;
|
||||
}
|
||||
|
||||
@ -75,6 +75,9 @@ public class AuthService {
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Value("${user.admin.roles}")
|
||||
private Integer adminRoleId;
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public AuthVO login(LoginQuery query) {
|
||||
String uuid = query.getUuid();
|
||||
@ -220,9 +223,8 @@ public class AuthService {
|
||||
}
|
||||
|
||||
public Integer getAuthId(BackendUserVO backendUserVO) {
|
||||
int admin = StateMachine.ROLE.ADMIN;
|
||||
List<Integer> roles = backendUserVO.getRoles();
|
||||
if (roles.contains(admin)) {
|
||||
if (roles.contains(adminRoleId)) {
|
||||
return null;
|
||||
} else {
|
||||
return backendUserVO.getUserId();
|
||||
@ -244,7 +246,7 @@ public class AuthService {
|
||||
String deptId = backendUserVO.getDeptId();
|
||||
Map<String, Dept> deptMap = deptService.getDeptMap();
|
||||
Dept dept = deptMap.get(deptId);
|
||||
boolean contains = backendUserVO.getRoles().contains(StateMachine.ROLE.ADMIN);
|
||||
boolean contains = backendUserVO.getRoles().contains(adminRoleId);
|
||||
if (contains) {
|
||||
//超管
|
||||
return null;
|
||||
@ -292,7 +294,7 @@ public class AuthService {
|
||||
//分部:只查看所属部门的数据
|
||||
//总部:查看所有数据
|
||||
List<Integer> roles = backendUserVO.getRoles();
|
||||
if (roles.contains(StateMachine.ROLE.ADMIN)) {
|
||||
if (roles.contains(adminRoleId)) {
|
||||
return null;
|
||||
}
|
||||
if (DeptType.HEAD.value.equals(type)) {
|
||||
|
||||
@ -110,7 +110,7 @@ public class AdminVideoActivityService {
|
||||
}
|
||||
VideoActivityStatus dbStatus = VideoActivityStatus.fromValue(dbActivity.getStatus());
|
||||
VideoActivityStatus event = VideoActivityStatus.fromValue(query.getStatus());
|
||||
VideoActivityStatus targetStatus = activityStatusSm.send(dbStatus, event, StateMachine.ROLE.ADMIN);
|
||||
VideoActivityStatus targetStatus = activityStatusSm.send(dbStatus, event, backendUserVO);
|
||||
VideoLiveActivity activity = query.toPO(targetStatus, VideoActivityStatus.PASS.equals(targetStatus) ? backendUserVO.getUserId() : null);
|
||||
if (VideoActivityStatus.PASS.equals(targetStatus)) {
|
||||
check(dbActivity.getActivityRang(), dbActivity.getAdvisorId());
|
||||
|
||||
@ -80,7 +80,7 @@ public class AdminVideoCartService {
|
||||
VideoCart dbCart = getVideoCart(videoId, productId, productType);
|
||||
VideoCartStatus dbStatus = VideoCartStatus.fromValue(dbCart.getStatus());
|
||||
VideoCartStatus submitStatus = VideoCartStatus.fromValue(query.getStatus());
|
||||
VideoCartStatus status = videoCartStatusSm.send(dbStatus, submitStatus, StateMachine.ROLE.ADVISOR);
|
||||
VideoCartStatus status = videoCartStatusSm.send(dbStatus, submitStatus, backendUserVO);
|
||||
dbCart.setStatus(status.value);
|
||||
if (query.getNum() != null) {
|
||||
dbCart.setSaleLimit(query.getNum());
|
||||
|
||||
@ -336,7 +336,7 @@ public class AdminVideoInfoService {
|
||||
}
|
||||
}
|
||||
VideoStatus dbStatus = VideoStatus.fromValue(videoInDb.getStatus());
|
||||
VideoStatus targetStatus = videoStatusSm.send(dbStatus, VideoStatus.EVENT_UPDATE, StateMachine.ROLE.ADVISOR);
|
||||
VideoStatus targetStatus = videoStatusSm.send(dbStatus, VideoStatus.EVENT_UPDATE, backendUser);
|
||||
// 管理员修改/待提交/驳回/下架直接修改
|
||||
if (VideoStatus.INIT.equals(dbStatus) || VideoStatus.REJECTED.equals(dbStatus) || VideoStatus.SOLD_OUT.equals(dbStatus) || VideoStatus.PASS.equals(dbStatus)) {
|
||||
// 上架修改需要添加修改待审核
|
||||
|
||||
@ -29,7 +29,7 @@ cron:
|
||||
syncModuleUser: "40 1/5 * * * ?"
|
||||
user:
|
||||
admin:
|
||||
roles: 1,3,4,5 #管理员角色id,用逗号隔开
|
||||
roles: 1 #管理员角色id,用逗号隔开
|
||||
defaultPwd: syzb.hello.dev
|
||||
dept:
|
||||
head:
|
||||
|
||||
@ -28,7 +28,7 @@ cron:
|
||||
syncModuleUser: "40 1/5 * * * ?"
|
||||
user:
|
||||
admin:
|
||||
roles: 1,3,4,5 #管理员角色id,用逗号隔开
|
||||
roles: 1 #管理员角色id,用逗号隔开
|
||||
defaultPwd: syzb.hello.dev
|
||||
dept:
|
||||
head:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user