|
@@ -144,8 +144,10 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
|
|
|
UpdateWrapper<VersionInfo> versionInfoUp = new UpdateWrapper<>();
|
|
|
versionInfoUp.eq("product_type", versionInfoVO.getProductType())
|
|
|
.eq("status", StatusEnum.Enable.getKey())
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey()).set("status", StatusEnum.Disable.getKey())
|
|
|
- .set("modifier", UserUtils.getCurrentPrincipleID()).set("gmt_modified", DateUtil.now());
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .set("status", StatusEnum.Disable.getKey())
|
|
|
+ .set("modifier", UserUtils.getCurrentPrincipleID())
|
|
|
+ .set("gmt_modified", DateUtil.now());
|
|
|
update(new VersionInfo(), versionInfoUp);
|
|
|
|
|
|
//3.增加版本数据
|
|
@@ -247,8 +249,10 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
|
|
|
// 1.先判断数据是否存在有效
|
|
|
checkExist(versionInfoVO.getId());
|
|
|
UpdateWrapper<VersionInfo> versionInfoNew = new UpdateWrapper<>();
|
|
|
- versionInfoNew.in("id", versionInfoVO.getId()).eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .set("is_deleted", IsDeleteEnum.Y.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
|
|
|
+ versionInfoNew.in("id", versionInfoVO.getId())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
+ .set("modifier", UserUtils.getCurrentPrincipleID())
|
|
|
.set("gmt_modified", DateUtil.now());
|
|
|
return update(new VersionInfo(), versionInfoNew);
|
|
|
}
|
|
@@ -261,7 +265,8 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
|
|
|
private void checkExist(Long id) {
|
|
|
// 1.先判断数据是否存在有效
|
|
|
QueryWrapper<VersionInfo> VersionInfoFand = new QueryWrapper<>();
|
|
|
- VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
|
|
|
+ VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", id);
|
|
|
int sum = count(VersionInfoFand);
|
|
|
if (sum == 0) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
|