package MsgDef import ( ) //&prd_inst_id, &service_nbr, &prd_inst_stas_id, &acct_id, &cust_id type AcctData struct { AcctType int `redis:"acctType"` PrdInstId int `redis:"prdInstId"` ServiceNbr string `redis:"serviceNbr"` PrdInstStasId int `redis:"prdInstStasId"` AcctId int `redis:"acctId"` CustId int `redis:"custId"` OfrId int `redis:"ofrId"` OfrInstId int `redis:"ofrInstId"` EffTime string `redis:"effTime"` ExpTime string `redis:"expTime"` } //SELECT rr.ID ratableId, rr.PRICING_SUB_SECTION_ID, rr.OFR_INST_ID, rr.BEGIN_TIME, rr.END_TIME, //rr.FREE_VALUE AS ratableValue, rr.`VALUE` usedRatable, g.MEASURE_DOMAIN, c.OFR_ID, //c.OFR_NAME, g.TARIFF_ID, g.START_REF_VALUE, g.END_REF_VALUE, c.CALC_PRIORITY, h.EVENT_PRIORITY type RrData struct { RrId int64 `redis:"rrId"` ServiceNbr string `redis:"serviceNbr"` PrdInstId int `redis:"prdInstId"` PricingSectionId int `redis:"pricingSectionId"` OfrInstId int `redis:"ofrInstId"` OfrId int `redis:"ofrId"` OfrName string `redis:"ofrName"` BeginTime string `redis:"beginTime"` EndTime string `redis:"endTime"` FreeValue int64 `redis:"freeValue"` UsedValue int64 `redis:"usedValue"` MeasureDomain string `redis:"measureDomain"` TariffId int `redis:"tariffId"` StartRefTime int `redis:"startRefTime"` EndRefTime int `redis:"endRefTime"` CalcPriority int `redis:"calcPriority"` EventPriority int `redis:"eventPriority"` StrategyId int `redis:"strategyId"` UnitFee int `redis:"unitFee"` RateUnit int `redis:"rateUnit"` } // g.MEASURE_DOMAIN, time_to_sec(g.START_REF_VALUE) startTime, time_to_sec(g.END_REF_VALUE) endTime, g.SCALED_RATE_VALUE_ID feeUnit, // g.rate_unit rateUnit, c.CALC_PRIORITY,h.EVENT_PRIORITY,h.event_pricing_strategy_id,h.EVENT_PRICING_STRATEGY_NAME,c.ofr_id,c.OFR_NAME type TariffData struct { TariffId int `redis:"tariffId"` TariffSeq int `redis:"tariffSeq"` MeasureDomain string `redis:"measureDomain"` StartTime int `redis:"startTime"` EndTime int `redis:"endTime"` FeeUnit int `redis:"feeUnit"` RateUnit int `redis:"rateUnit"` CalcPriority int `redis:"calcPriority"` EventPriority int `redis:"eventPriority"` OfrId int `redis:"ofrId"` OfrName string `redis:"ofrName"` StrategyId int `redis:"strategyId"` StrategyName string `redis:"strategyName"` } // SELECT DISTINCT ca.area_name, ca.area_code FROM TB_BIL_PRICING_AREA ar INNER JOIN config_area ca ON ca.area_id = ar.area_id WHERE ar.STRATEGY_ID = ?; type PrefixData struct { StrategyId int `redis:"StrategyId"` AreaName string `redis:"areaName"` AreaCode string `redis:"areaCode"` } /* HD table import SELECT hr.ofr_id, hr.tariff_id, hr.tariff_seq, hr.holiday_group, hr.state hr_state, hr.holiday_discount, hd.HOLIDAY_ID, hd.STATE hd_state, hd.HOLIDAY_PRIORITY, hd.HOLIDAY_NAME, hd.HOLIDAY_TYPE, hd.HOLIDAY_BEGIN_DATE, hd.HOLIDAY_END_DATE FROM tb_bil_holiday_rel hr INNER JOIN tb_bil_holiday hd ON hr.holiday_group = hd.HOLIDAY_GROUP WHERE hr.tariff_id=? AND hr.tariff_seq=? AND hr.state = 1 AND hd.STATE = 'L0R'; */ type HolidayDiscountData struct { OfrId int `redis:"ofrId"` TariffId int `redis:"tariffId"` TariffSeq int `redis:"tariffSeq"` HdGroup int `redis:"hdGroup"` HrState int `redis:"hrState"` HrDiscount int `redis:"hrDiscount"` HdId int `redis:"hdId"` HdName string `redis:"hdName"` HdType string `redis:"hdType"` HdState string `redis:"hdState"` HdPriority int `redis:"hdPriority"` HdBeginDate string `redis:"hdBeginDate"` HdEndDate string `redis:"hdEndDate"` }