完善季度

This commit is contained in:
2024-08-29 09:05:26 +08:00
parent 2622876c70
commit a27c5f702f
13 changed files with 292 additions and 58 deletions

View File

@@ -19,11 +19,11 @@ type PeakValley struct {
//选择时间段 设置电价
//(将时间段 转化为十分钟区块 查找到对应十分钟区块 创建该规则的电价)
func (r *PeakValley) CreatePeakValleyRule(tx *gorm.DB, d *peak_valley_model.PeakValleyRule) error {
func (r *PeakValley) CreatePeakValleyRuleTx(tx *gorm.DB, d *peak_valley_model.PeakValleyRule) error {
return tx.Create(d).Error
}
func (r *PeakValley) UpdatePeakValleyRule(tx *gorm.DB, d *peak_valley_model.PeakValleyRule) error {
func (r *PeakValley) UpdatePeakValleyRuleTx(tx *gorm.DB, d *peak_valley_model.PeakValleyRule) error {
return tx.Save(d).Error
}