mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、禅道问题修复:修改字典类型,同步修改关联字段数据的类型字段;2、system微服务短信配置加密串修改;
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cf.imes.module.manage.enums;
|
||||
package com.cf.imes.framework.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlatePag
|
||||
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlateSaveReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.remainplaten.RemainPlateDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.remainplaten.RemainPlateMapper;
|
||||
import com.cf.imes.module.manage.enums.DeletedCodeEnum;
|
||||
import com.cf.imes.framework.common.enums.DeletedCodeEnum;
|
||||
import com.cf.imes.module.manage.enums.RemainPlateStatusEnum;
|
||||
import com.cf.imes.module.manage.enums.RemainPlateUseTypeEnum;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
+19
-2
@@ -1,17 +1,23 @@
|
||||
package com.cf.imes.module.system.service.dict;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.enums.DeletedCodeEnum;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.date.LocalDateTimeUtils;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.system.controller.admin.dict.vo.type.DictTypePageReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.dict.vo.type.DictTypeSaveReqVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.dict.DictTypeDO;
|
||||
import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.dict.DictTypeMapper;
|
||||
import com.cf.imes.module.system.enums.ErrorCodeConstants;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -33,6 +39,9 @@ public class DictTypeServiceImpl implements DictTypeService {
|
||||
@Resource
|
||||
private DictTypeMapper dictTypeMapper;
|
||||
|
||||
@Resource
|
||||
private DictDataMapper dictDataMapper;
|
||||
|
||||
@Override
|
||||
public PageResult<DictTypeDO> getDictTypePage(DictTypePageReqVO pageReqVO) {
|
||||
return dictTypeMapper.selectPage(pageReqVO);
|
||||
@@ -63,17 +72,25 @@ public class DictTypeServiceImpl implements DictTypeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateDictType(DictTypeSaveReqVO updateReqVO) {
|
||||
String updateReqVOType = updateReqVO.getType();
|
||||
// 校验自己存在
|
||||
validateDictTypeExists(updateReqVO.getId());
|
||||
DictTypeDO oldDictTypeDO = validateDictTypeExists(updateReqVO.getId());
|
||||
// 校验字典类型的名字的唯一性
|
||||
validateDictTypeNameUnique(updateReqVO.getId(), updateReqVO.getName());
|
||||
// 校验字典类型的类型的唯一性
|
||||
validateDictTypeUnique(updateReqVO.getId(), updateReqVO.getType());
|
||||
validateDictTypeUnique(updateReqVO.getId(), updateReqVOType);
|
||||
|
||||
// 更新字典类型
|
||||
DictTypeDO updateObj = BeanUtils.toBean(updateReqVO, DictTypeDO.class);
|
||||
dictTypeMapper.updateById(updateObj);
|
||||
|
||||
// 字典类型发生改变,更新关联字典数据
|
||||
String oldDictTypeDOType = oldDictTypeDO.getType();
|
||||
if (ObjectUtil.isAllNotEmpty(oldDictTypeDOType, updateReqVOType) && ObjectUtil.notEqual(oldDictTypeDOType, updateReqVOType)) {
|
||||
dictDataMapper.update(new LambdaUpdateWrapper<DictDataDO>().set(DictDataDO::getDictType, updateReqVOType).eq(DictDataDO::getDictType, oldDictTypeDOType).eq(DictDataDO::getStatus, DeletedCodeEnum.NOT_DELETED.getStatus()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -206,9 +206,9 @@ chenfeng:
|
||||
end-code: 9999 # 这里配置 9999 的原因是,测试方便。
|
||||
sms:
|
||||
channel: DEBUG_DING_TALK
|
||||
signature:
|
||||
apiKey: 28PlJanD0aJLMyMLuH6JI5oVj1/j5ZNGvZPx/zguEvJl02PdrbWe5yIV4s1RSD3CDX9obUhITNlc6glW7MNJq03N7H/v50MFgN4f8mK1oAA=
|
||||
apiSecret: O6Yk9gT3xQ9fqSKFuZa9I4bWOULCw2syH4/a1OrD2W7BAE2aQ+bSgqLXfBJT+de0GKHKgjuPNv0v+sDKkizLP22gsYIhdn/3OPSvyJF7Tng=
|
||||
signature: sELLIaR5FAhCp8xx6tDJr1goyvsziMfTsD1HHxWnLkZgbVQOoly0GeadK81IkxbMVlvA5AhB7Apapg38Gx+MuE7G5xiVXt4JSzOqW1Qa6gn88joGXe0wh++lAtw=
|
||||
apiKey: sELLIaR5FAhCp8xx6tDJr1goyvsziMfTsD1HHxWnLkZgbVQOoly0GeadK81IkxbMVlvA5AhB7Apapg38Gx+MuE7G5xiVXt4JSzOqW1Qa6gn88joGXe0wh++lAtw=
|
||||
apiSecret: UjISv3wc1DfeFeG4WaPF4q8boPdrdhuUKuIhUDr1MImA0bK1KMqV76HL7fzEW2NR/Uqrq9Fe3vfWOCwblgKgL/J0twmrNCknBQSXhLNDw9zosoQR9Q1Lgql8dcI/d4g=
|
||||
encrypt:
|
||||
enable: false
|
||||
publicKey: cfimes
|
||||
|
||||
Reference in New Issue
Block a user