fix(deprecates):继续清理已经删除的表计摊薄字段。
This commit is contained in:
parent
0169419707
commit
df9bf83bb8
|
@ -2,7 +2,6 @@ package controller
|
|||
|
||||
import (
|
||||
"electricity_bill_calc/excel"
|
||||
"electricity_bill_calc/logger"
|
||||
"electricity_bill_calc/model"
|
||||
"electricity_bill_calc/response"
|
||||
"electricity_bill_calc/security"
|
||||
|
@ -15,7 +14,6 @@ import (
|
|||
"github.com/jinzhu/copier"
|
||||
"github.com/samber/lo"
|
||||
"github.com/shopspring/decimal"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func InitializeMeter04kVController(router *gin.Engine) {
|
||||
|
@ -96,7 +94,6 @@ type _MeterModificationFormData struct {
|
|||
Ratio decimal.Decimal `json:"ratio" form:"ratio"`
|
||||
Seq int `json:"seq" form:"seq"`
|
||||
IsPublicMeter bool `json:"isPublicMeter" form:"isPublicMeter"`
|
||||
WillDilute bool `json:"willDilute" form:"willDilute"`
|
||||
Enabled bool `json:"enabled" form:"enabled"`
|
||||
}
|
||||
|
||||
|
@ -109,7 +106,6 @@ type _MeterCreationFormData struct {
|
|||
Ratio decimal.Decimal `json:"ratio" form:"ratio"`
|
||||
Seq int `json:"seq" form:"seq"`
|
||||
IsPublicMeter bool `json:"isPublicMeter" form:"isPublicMeter"`
|
||||
WillDilute bool `json:"willDilute" form:"willDilute"`
|
||||
Enabled bool `json:"enabled" form:"enabled"`
|
||||
}
|
||||
|
||||
|
@ -151,7 +147,6 @@ func modifySingle04kVMeter(c *gin.Context) {
|
|||
formData := new(_MeterModificationFormData)
|
||||
c.BindJSON(formData)
|
||||
copier.Copy(meterDetail, formData)
|
||||
logger.Named("Controller", "Meter").Debug("Check #1", zap.Any("meter", meterDetail))
|
||||
err = service.Meter04kVService.UpdateSingleMeter(meterDetail)
|
||||
if err != nil {
|
||||
result.Error(http.StatusInternalServerError, err.Error())
|
||||
|
|
|
@ -255,7 +255,6 @@ func (g _GodModeService) resynchronizeEndUserArchives(tx *bun.Tx, ctx *context.C
|
|||
"contact_phone",
|
||||
"seq",
|
||||
"public_meter",
|
||||
"dilute",
|
||||
)
|
||||
if err != nil {
|
||||
return success, err
|
||||
|
|
|
@ -101,7 +101,7 @@ func (_Meter04kVService) updateMeter(tx *bun.Tx, ctx *context.Context, meter mod
|
|||
_, err := tx.NewUpdate().Model(&meter).
|
||||
Where("code = ?", meter.Code).
|
||||
Where("park_id = ?", meter.ParkId).
|
||||
Column("address", "customer_name", "contact_name", "contact_phone", "ratio", "seq", "public_meter", "dilute", "enabled").
|
||||
Column("address", "customer_name", "contact_name", "contact_phone", "ratio", "seq", "public_meter", "enabled").
|
||||
Exec(*ctx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
|
@ -206,7 +206,7 @@ func (m _Meter04kVService) BatchCreateMeter(meters []model.Meter04KV) error {
|
|||
}
|
||||
if len(updates) > 0 {
|
||||
_, err = tx.NewUpdate().Model(&updates).
|
||||
Column("address", "customer_name", "contact_name", "contact_phone", "ratio", "seq", "public_meter", "dilute", "enabled").
|
||||
Column("address", "customer_name", "contact_name", "contact_phone", "ratio", "seq", "public_meter", "enabled").
|
||||
Bulk().
|
||||
Exec(ctx)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user