123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- package data
- import "eta/eta_task/models/data_manage"
- type TradePositionInterface interface {
- MultiInsertTradeBaseDataToTop(exchange, startDate, endDate string) (err error)
- GetTradePositionTopOriginDataTimes(exchange string) (dates []string, err error)
- GetTradePositionOriginClassifyCountByExchangeDataTime(exchange string, startDate, endDate string) (count int64, err error)
- GetFirstBaseFromTradeIndexByDate(exchange string) (item *data_manage.GetFirstBaseFromTradeIndeDate, err error)
- GetTradePositionOriginClassifyByExchangeDataTime(exchange, startDate, endDate string) (list []data_manage.TradePositionClassifyInfo, err error)
- MultiInsertTradeBaseDataToTopByClassify(exchange string, startDate, endDate string, classifyNames, classifyTypes []string) (err error)
- }
- type BaseTradePosition struct{}
- func (b *BaseTradePosition) MultiInsertTradeBaseDataToTop(exchange, startDate, endDate string) (err error) {
- err = data_manage.MultiInsertTradeBaseDataToTop(exchange, startDate, endDate)
- return
- }
- func (b *BaseTradePosition) GetTradePositionTopOriginDataTimes(exchange string) (dates []string, err error) {
- dates, err = data_manage.GetTradePositionTopOriginDataTimes(exchange)
- return
- }
- func (b *BaseTradePosition) GetTradePositionOriginClassifyCountByExchangeDataTime(exchange string, startDate, endDate string) (count int64, err error) {
- count, err = data_manage.GetTradePositionOriginClassifyCountByExchangeDataTime(exchange, startDate, endDate)
- return
- }
- func (b *BaseTradePosition) GetFirstBaseFromTradeIndexByDate(exchange string) (item *data_manage.GetFirstBaseFromTradeIndeDate, err error) {
- item, err = data_manage.GetFirstBaseFromTradeIndexByDate(exchange)
- return
- }
- func (b *BaseTradePosition) GetTradePositionOriginClassifyByExchangeDataTime(exchange, startDate, endDate string) (list []data_manage.TradePositionClassifyInfo, err error) {
- list, err = data_manage.GetTradePositionOriginClassifyByExchangeDataTime(exchange, startDate, endDate)
- return
- }
- func (b *BaseTradePosition) MultiInsertTradeBaseDataToTopByClassify(exchange string, startDate, endDate string, classifyNames, classifyTypes []string) (err error) {
- err = data_manage.MultiInsertTradeBaseDataToTopByClassify(exchange, startDate, endDate, classifyNames, classifyTypes)
- return
- }
- type GuangzhouTradePosition struct{}
- func (g *GuangzhouTradePosition) MultiInsertTradeBaseDataToTop(exchange, startDate, endDate string) (err error) {
- err = data_manage.MultiInsertTradeGuangzhouDataToTop(exchange, startDate, endDate)
- //查询出今日的value值
- return
- }
- func (g *GuangzhouTradePosition) GetTradePositionTopOriginDataTimes(exchange string) (dates []string, err error) {
- dates, err = data_manage.GetTradePositionTopOriginGuangzhouDataTimes(exchange)
- return
- }
- func (g *GuangzhouTradePosition) GetTradePositionOriginClassifyCountByExchangeDataTime(exchange string, startDate, endDate string) (count int64, err error) {
- count, err = data_manage.GetTradePositionOriginGuangzhouClassifyCountByExchangeDataTime(exchange, startDate, endDate)
- return
- }
- func (g *GuangzhouTradePosition) GetFirstBaseFromTradeIndexByDate(exchange string) (item *data_manage.GetFirstBaseFromTradeIndeDate, err error) {
- item, err = data_manage.GetFirstBaseFromTradeGuangzhouIndexByDate(exchange)
- return
- }
- func (g *GuangzhouTradePosition) GetTradePositionOriginClassifyByExchangeDataTime(exchange, startDate, endDate string) (list []data_manage.TradePositionClassifyInfo, err error) {
- list, err = data_manage.GetTradePositionOriginClassifyGuangzhouByExchangeDataTime(exchange, startDate, endDate)
- return
- }
- func (g *GuangzhouTradePosition) MultiInsertTradeBaseDataToTopByClassify(exchange string, startDate, endDate string, classifyNames, classifyTypes []string) (err error) {
- err = data_manage.MultiInsertTradeBaseDataToTopGuangzhouByClassify(exchange, startDate, endDate, classifyNames, classifyTypes)
- return
- }
|