1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- package fms
- import (
- "hongze/fms_api/models/fms"
- )
- type CensusSellerGroupList []*fms.CensusSellerGroupInvoiceItem
- func (c CensusSellerGroupList) Len() int {
- return len(c)
- }
- func (c CensusSellerGroupList) Less(i, j int) bool {
- return c[i].InvoiceAmount > c[j].InvoiceAmount
- }
- func (c CensusSellerGroupList) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
- }
- type CensusSellerListByAmountAsc []*fms.CensusSellerInvoiceItem
- func (c CensusSellerListByAmountAsc) Len() int {
- return len(c)
- }
- func (c CensusSellerListByAmountAsc) Less(i, j int) bool {
- return c[i].InvoiceAmount > c[j].InvoiceAmount
- }
- func (c CensusSellerListByAmountAsc) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
- }
- type CensusSellerListByAmountDesc []*fms.CensusSellerInvoiceItem
- func (c CensusSellerListByAmountDesc) Len() int {
- return len(c)
- }
- func (c CensusSellerListByAmountDesc) Less(i, j int) bool {
- return c[i].InvoiceAmount < c[j].InvoiceAmount
- }
- func (c CensusSellerListByAmountDesc) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
- }
- type CensusSellerListByGroupRateAsc []*fms.CensusSellerInvoiceItem
- func (c CensusSellerListByGroupRateAsc) Len() int {
- return len(c)
- }
- func (c CensusSellerListByGroupRateAsc) Less(i, j int) bool {
- return c[i].GroupRate > c[j].GroupRate
- }
- func (c CensusSellerListByGroupRateAsc) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
- }
- type CensusSellerListByGroupRateDesc []*fms.CensusSellerInvoiceItem
- func (c CensusSellerListByGroupRateDesc) Len() int {
- return len(c)
- }
- func (c CensusSellerListByGroupRateDesc) Less(i, j int) bool {
- return c[i].GroupRate < c[j].GroupRate
- }
- func (c CensusSellerListByGroupRateDesc) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
- }
|