mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
认证服务、广告管理、应用管理service单测剔除真实db使用mock mapper
This commit is contained in:
+2
-6
@@ -1,7 +1,7 @@
|
||||
package com.cf.imes.module.system.service.dict;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.enums.DeletedCodeEnum;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
@@ -86,11 +86,7 @@ public class DictTypeServiceImpl implements DictTypeService {
|
||||
// 字典类型发生改变,更新关联字典数据
|
||||
String oldDictTypeDOType = oldDictTypeDO.getType();
|
||||
if (ObjectUtil.notEqual(oldDictTypeDOType, updateReqVOType)) {
|
||||
UpdateWrapper<DictDataDO> wrapper = new UpdateWrapper<>();
|
||||
wrapper.set("dict_type", updateReqVOType);
|
||||
wrapper.eq("dict_type", oldDictTypeDOType);
|
||||
wrapper.eq("status", DeletedCodeEnum.NOT_DELETED.getStatus());
|
||||
dictDataMapper.update(wrapper);
|
||||
dictDataMapper.update(new LambdaUpdateWrapper<DictDataDO>().set(DictDataDO::getDictType, updateReqVOType).eq(DictDataDO::getDictType, oldDictTypeDOType).eq(DictDataDO::getStatus, DeletedCodeEnum.NOT_DELETED.getStatus()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class AdvertisementServiceImpl implements AdvertisementService{
|
||||
AdvertisementDO advertisementDO = validateAdvertisementExists(id);
|
||||
|
||||
// 发布中的广告不允许编辑
|
||||
if (advertisementDO.getStatus().equals(AdvertisementStatusEnum.PUBLISHED.getStatus())) {
|
||||
if (AdvertisementStatusEnum.PUBLISHED.getStatus().equals(advertisementDO.getStatus())) {
|
||||
throw new ServiceException(ADVERTISEMENT_UPDATE_STATUS_ERROR);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user