accounting.go 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package apis
  4. // 账单列表
  5. type BillListReq struct {
  6. PageNumber int `json:"page_number"`
  7. MerchantId int64 `json:"merchant_id"`
  8. BillType int `json:"bill_type"`
  9. StartTime string `json:"start_time"`
  10. EndTime string `json:"end_time"`
  11. }
  12. type Bill struct {
  13. Id int64 `json:"bill_id"`
  14. MerchantName string `json:"merchant_name"`
  15. MerchantId int64 `json:"merchant_id"`
  16. BillType int `json:"bill_type"`
  17. BillTime string `json:"bill_time"`
  18. Amount float64 `json:"amount"`
  19. Balance float64 `json:"balance"`
  20. BillCreateTime string `json:"bill_create_time"`
  21. Remark string `json:"remark"`
  22. RemarkList []string `json:"remark_list"`
  23. UserName string `json:"user_name"`
  24. BillStatus int `json:"bill_status"`
  25. CreatedAt int64 `json:"-"`
  26. }
  27. type BillListReply struct {
  28. Total int `json:"total" description:""`
  29. PageSize int `json:"page_size" description:""`
  30. PageNumber int `json:"page_number" description:""`
  31. List []Bill `json:"list"`
  32. }
  33. // 充值列表
  34. type ChargeListReq struct {
  35. PageNumber int `json:"page_number" description:""`
  36. MerchantId int64 `json:"merchant_id"`
  37. StartTime string `json:"start_time"`
  38. EndTime string `json:"end_time"`
  39. }
  40. type ChargeListReply struct {
  41. Total int `json:"total" description:""`
  42. PageSize int `json:"page_size" description:""`
  43. PageNumber int `json:"page_number" description:""`
  44. List []Bill `json:"list"`
  45. }
  46. // 消费列表
  47. type ConsumeListReq struct {
  48. PageNumber int `json:"page_number" description:""`
  49. MerchantId int64 `json:"merchant_id"`
  50. DataApiId int64 `json:"data_api_id"`
  51. StartTime string `json:"start_time"`
  52. EndTime string `json:"end_time"`
  53. ConsumeOrder int `json:"consume_order"`
  54. }
  55. type Consume struct {
  56. Id int64 `json:"consume_id"`
  57. MerchantName string `json:"merchant_name"`
  58. MerchantId int64 `json:"merchant_id"`
  59. Day string `json:"day"`
  60. DataApiName string `json:"data_api_name"`
  61. Alias string `json:"alias"`
  62. TotalCount int `json:"total_count"`
  63. ChargeCount int `json:"charge_count"`
  64. Amount float64 `json:"amount"`
  65. }
  66. type ConsumeListReply struct {
  67. Total int `json:"total" description:""`
  68. PageSize int `json:"page_size" description:""`
  69. PageNumber int `json:"page_number" description:""`
  70. List []Consume `json:"list"`
  71. }
  72. // 消费趋势
  73. type ConsumeTrendListReq struct {
  74. MerchantId int64 `json:"merchant_id"`
  75. DataApiId int64 `json:"data_api_id"`
  76. StartTime string `json:"start_time"`
  77. EndTime string `json:"end_time"`
  78. }
  79. type ConsumeTrend struct {
  80. Day string `json:"day"`
  81. Amount float64 `json:"amount"`
  82. }
  83. type ConsumeTrendListReply struct {
  84. List []ConsumeTrend `json:"list"`
  85. }
  86. // 商户价格列表
  87. type MerchantPriceListReq struct {
  88. PageNumber int `json:"page_number" description:""`
  89. MerchantId int64 `json:"merchant_id"`
  90. MerchantTypeList string `json:"merchant_type_list"` // 商户类型 0 所有 1 普通客户 2 预存款客户 3 后结算客户,4 默认(预存款客户,后结算客户)
  91. ArrearageOrder int `json:"arrearage_order"` // 0 不排序,1 升序 2 降序
  92. }
  93. type MerchantPrice struct {
  94. MerchantName string `json:"merchant_name"`
  95. MerchantId int64 `json:"merchant_id"`
  96. MerchantType int `json:"merchant_type"`
  97. Balance float64 `json:"balance"`
  98. Arrearage float64 `json:"arrearage" description:"可欠费金额"`
  99. IsNotify int `json:"is_notify"`
  100. ApiPriceList []MerchantDataApiPrice `json:"api_price_list"`
  101. }
  102. type MerchantPriceListReply struct {
  103. Total int `json:"total" description:""`
  104. PageSize int `json:"page_size" description:""`
  105. PageNumber int `json:"page_number" description:""`
  106. List []MerchantPrice `json:"list"`
  107. }
  108. // 设置商户类型
  109. type SetMerchantTypeReq struct {
  110. MerchantId int64 `json:"merchant_id"`
  111. MerchantType int `json:"merchant_type"`
  112. Arrearage float64 `json:"arrearage" description:"可欠费金额"`
  113. IsNotify int `json:"is_notify"`
  114. }
  115. type SetMerchantTypeReply struct {
  116. }
  117. // 商户充值
  118. type MerchantChargeReq struct {
  119. MerchantId int64 `json:"merchant_id"`
  120. Amount float64 `json:"amount"`
  121. Remark string `json:"remark"`
  122. UserName string `json:"user_name"`
  123. }
  124. type MerchantChargeReply struct {
  125. }
  126. // 商户数据api 价格列表
  127. type MerchantDataApiPriceListReq struct {
  128. MerchantId int64 `json:"merchant_id"`
  129. }
  130. type MerchantDataApiPrice struct {
  131. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  132. MerchantDataApiName string `json:"merchant_data_api_name"` // 可用别名
  133. UnitPrice float64 `json:"unit_price"`
  134. Alias string `json:"-"`
  135. MerchantId int64 `json:"-"`
  136. }
  137. type MerchantDataApiPriceListReply struct {
  138. List []MerchantDataApiPrice `json:"list"`
  139. }
  140. // 设置商户数据api 价格
  141. type SetMerchantDataApiPriceReq struct {
  142. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  143. UnitPrice float64 `json:"unit_price"`
  144. }
  145. type SetMerchantDataApiPriceReply struct {
  146. }
  147. type GdConsume struct {
  148. Id int64 `json:"consume_id"`
  149. Day string `json:"day"`
  150. Month string `json:"month"`
  151. MerchantDataApiId string `json:"merchant_data_api_id"`
  152. MerchantId int64 `json:"merchant_id"`
  153. Balance int64 `json:"balance"`
  154. TotalCount int64 `json:"total_count"`
  155. ValidCount int64 `json:"valid_count"`
  156. ChargeCount int64 `json:"charge_count"`
  157. Amount float64 `json:"amount"`
  158. }
  159. func (o *GdConsume) TableName() string {
  160. return "t_gd_consume"
  161. }
  162. type GdBill struct {
  163. Id int64 `json:"bill_id"`
  164. MerchantId int64 `json:"merchant_id"`
  165. BillType int `json:"bill_type"`
  166. BillTime string `json:"bill_time"`
  167. Balance float64 `json:"balance"`
  168. Remark string `json:"remark"`
  169. BillCreateTime string `json:"bill_create_time"`
  170. CreatedAt int64 `json:"created_at"`
  171. Amount float64 `json:"amount"`
  172. UserName string `json:"user_name"`
  173. }
  174. func (o *GdBill) TableName() string {
  175. return "t_gd_bill"
  176. }
  177. //
  178. type BillDetailListReq struct {
  179. MerchantId int64 `json:"merchant_id"`
  180. Month string `json:"month"`
  181. BillId int64 `json:"bill_id"`
  182. }
  183. type BillDetailList struct {
  184. BillDetailId int64 `json:"bill_detail_id"`
  185. //MerchantName string `json:"merchant_name"`
  186. //MerchantId int64 `json:"merchant_id"`
  187. Month string `json:"month"`
  188. DataApiName string `json:"data_api_name"`
  189. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  190. Alias string `json:"alias"`
  191. TotalCount int `json:"total_count"`
  192. ValidCount int `json:"valid_count"`
  193. ChargeCount int `json:"charge_count"`
  194. UnitPrice float64 `json:"unit_price"`
  195. Amount float64 `json:"amount"`
  196. Remark string `json:"-"`
  197. }
  198. type BillDetailRemark struct {
  199. Befor int `json:"befor"`
  200. After int `json:"after"`
  201. Time string `json:"time"`
  202. UserName string `json:"user_name"`
  203. }
  204. type BillDetailRemarkInfo struct {
  205. Befor int `json:"befor"`
  206. After int `json:"after"`
  207. Time string `json:"time"`
  208. DataApiName string `json:"data_api_name"`
  209. Alias string `json:"alias"`
  210. UserName string `json:"user_name"`
  211. }
  212. type Contact struct {
  213. Name string `json:"name"`
  214. Phone string `json:"phone"`
  215. }
  216. type BillDetailListReply struct {
  217. List []BillDetailList `json:"list"`
  218. //Balance float64 `json:"balance"`
  219. RemarkList []BillDetailRemarkInfo `json:"remark_list"`
  220. BillRemarkList []string `json:"bill_remark_list"`
  221. Amount float64 `json:"amount"`
  222. Balance float64 `json:"balance"`
  223. BillStatus int `json:"bill_status"`
  224. ConfirmEndTime string `json:"confirm_end_time"`
  225. Contacts []Contact `json:"contacts"`
  226. }
  227. //
  228. type UpdateBillDetailReq struct {
  229. BillDetailId int64 `json:"bill_detail_id"`
  230. ChargeCount int `json:"charge_count"`
  231. //Remark string `json:"remark"`
  232. UserName string `json:"user_name"`
  233. }
  234. type UpdateBillDetailReply struct {
  235. }
  236. type BillRemarkReq struct {
  237. BillId int64 `json:"bill_id"`
  238. Remark string `json:"remark"`
  239. }
  240. type BillRemarkReply struct {
  241. }
  242. type GenerateBillReq struct {
  243. Month string `json:"month"`
  244. }
  245. type GenerateBillReply struct {
  246. }
  247. type GdBillDetail struct {
  248. Id int64 `json:"consume_id"`
  249. Month string `json:"month"`
  250. MerchantDataApiId string `json:"merchant_data_api_id"`
  251. MerchantId int64 `json:"merchant_id"`
  252. TotalCount int64 `json:"total_count"`
  253. ValidCount int64 `json:"valid_count"`
  254. ChargeCount int64 `json:"charge_count"`
  255. Remark string `json:"remark"`
  256. Amount float64 `json:"amount"`
  257. Alias string `json:"alias"`
  258. UnitPrice float64 `json:"unit_price"`
  259. }
  260. func (o *GdBillDetail) TableName() string {
  261. return "t_gd_bill_detail"
  262. }
  263. type BillExportExcelReq struct {
  264. MerchantId int64 `json:"merchant_id"`
  265. Month string `json:"month"`
  266. BillId int64 `json:"bill_id"`
  267. }
  268. type BillExportExcelReply struct {
  269. List []BillDetailList `json:"list"`
  270. //Balance float64 `json:"balance"`
  271. RemarkList []BillDetailRemarkInfo `json:"remark_list"`
  272. BillRemarkList []string `json:"bill_remark_list"`
  273. Amount float64 `json:"amount"`
  274. Balance float64 `json:"balance"`
  275. Url string `json:"url"`
  276. BillCreateTime string `json:"bill_create_time"`
  277. }
  278. type BillConfirmReq struct{
  279. Uid int64 `json:"uid"`
  280. BillId int64 `json:"bill_id"`
  281. }
  282. type BillConfirmReply struct{
  283. }
  284. type BillNotifyReq struct{
  285. Month string `json:"month"`
  286. }
  287. type BillNotifyReply struct{
  288. }