Commit ed11d781 authored by ZWT's avatar ZWT

feat(能源管理系统): 间开制度管理

1.开发中短期间开优化模块-中短期优化详情接口,完成接口冒烟测试并生成接口文档;
2.开发间开优化历史模块-优化历史分页列表接口,完成接口冒烟测试并生成接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 15c52d69
......@@ -148,6 +148,7 @@ public class BasePowerLineService {
if (Objects.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
//删除线路配置
mapper.update(null, new LambdaUpdateWrapper<BasePowerLineEnt>()
.eq(BaseModel::getId, lineId)
.set(BaseModel::getIsDeleted, BusinessConstant.ZERO)
......
......@@ -3,6 +3,7 @@ package pps.core.base.service;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.page.PageMethod;
import org.apache.commons.lang3.StringUtils;
......@@ -148,17 +149,23 @@ public class BasePriceStrategyService {
if (Objects.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
//删除策略
mapper.update(null, new LambdaUpdateWrapper<BasePriceStrategyEnt>()
.eq(BaseModel::getId, strategyId)
.set(BaseModel::getIsDeleted, BusinessConstant.ZERO)
);
//删除月数据
BasePriceStrategyMonthMapper monthMapper = context.getBean(BasePriceStrategyMonthMapper.class);
monthMapper.delete(new QueryWrapper<BasePriceStrategyMonthEnt>()
.lambda()
.eq(BasePriceStrategyMonthEnt::getStrategyId, strategyId));
monthMapper.update(null, new LambdaUpdateWrapper<BasePriceStrategyMonthEnt>()
.eq(BasePriceStrategyMonthEnt::getStrategyId, strategyId)
.set(BaseModel::getIsDeleted, BusinessConstant.ZERO)
);
//删除明细数据
BasePriceStrategyDetailMapper detailMapper = context.getBean(BasePriceStrategyDetailMapper.class);
detailMapper.delete(new QueryWrapper<BasePriceStrategyDetailEnt>()
.lambda()
.eq(BasePriceStrategyDetailEnt::getStrategyId, strategyId));
mapper.deleteById(entity);
detailMapper.update(null, new LambdaUpdateWrapper<BasePriceStrategyDetailEnt>()
.eq(BasePriceStrategyDetailEnt::getStrategyId, strategyId)
.set(BaseModel::getIsDeleted, BusinessConstant.ZERO)
);
return XServiceResult.OK;
});
}
......
......@@ -58,11 +58,11 @@
ELSE '否'
END is_fixed_price_value
FROM base_price_strategy
<where>
<if test=" param.policyName != null and param.policyName != '' ">
policy_name LIKE CONCAT( '%', #{param.policyName}, '%' )
</if>
</where>
WHERE
is_deleted = 1
<if test=" param.policyName != null and param.policyName != '' ">
AND policy_name LIKE CONCAT( '%', #{param.policyName}, '%' )
</if>
ORDER BY modify_time DESC
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment