|
|
@ -3,6 +3,8 @@ package com.epmet.service.impl; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.dao.ThirdAppManageDao; |
|
|
@ -66,6 +68,12 @@ public class ThirdAppManageServiceImpl extends BaseServiceImpl<ThirdAppManageDao |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void audit(ThirdAppManageDTO dto) { |
|
|
|
ThirdAppManageEntity info = baseDao.selectById(dto.getId()); |
|
|
|
if (!NumConstant.ZERO_STR.equals(info.getStatus())) { |
|
|
|
String errorMsg = "应用已审核"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); |
|
|
|
} |
|
|
|
|
|
|
|
ThirdAppManageEntity entity = new ThirdAppManageEntity(); |
|
|
|
entity.setId(dto.getId()); |
|
|
|
entity.setStatus(dto.getStatus()); |
|
|
@ -83,6 +91,18 @@ public class ThirdAppManageServiceImpl extends BaseServiceImpl<ThirdAppManageDao |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void release(ThirdAppManageDTO dto) { |
|
|
|
ThirdAppManageEntity info = baseDao.selectById(dto.getId()); |
|
|
|
if (NumConstant.ZERO_STR.equals(info.getStatus())) { |
|
|
|
String errorMsg = "应用未审核,请先审核"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); |
|
|
|
} else if (NumConstant.ONE_STR.equals(info.getStatus())) { |
|
|
|
String errorMsg = "应用审核不通过,不能发布"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); |
|
|
|
} else if (NumConstant.THREE_STR.equals(info.getStatus())) { |
|
|
|
String errorMsg = "应用已发布"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); |
|
|
|
} |
|
|
|
|
|
|
|
ThirdAppManageEntity entity = new ThirdAppManageEntity(); |
|
|
|
entity.setId(dto.getId()); |
|
|
|
entity.setStatus(NumConstant.THREE_STR); |
|
|
|