123456789101112131415161718192021222324252627282930 |
- package service
- import (
- "sfis/utils"
- "github.com/gin-gonic/gin"
- )
- func GetConcurrentData(appid string, productId int, c *gin.Context) {
- if productId == 1000 {
- utils.Check(appid, productId, c, func() ([]map[string]interface{}, int, error) {
- return ProjectListData(productId, appid, "河南大学", "", "", false)
- }, `{"bidTime":"","projectName":"河南大学","winner":""}`, "127.0.0.1", true)
- } else if productId == 1001 {
- utils.Check(appid, productId, c, func() ([]map[string]interface{}, int, error) {
- return ProjectDetailData("QQlGKDskaAIECAAXDUBya3A8BVQIC0wK")
- }, `{"id":"QQlGKDskaAIECAAXDUBya3A8BVQIC0wK"}`, "127.0.0.1", true)
- } else if productId == 1002 {
- utils.Check(appid, productId, c, func() ([]map[string]interface{}, int, error) {
- return ProjectListData(productId, appid, "", "中铁十五局集团有限公司", "", true)
- }, `{"winner":"中铁十五局集团有限公司"}`, "127.0.0.1", true)
- } else {
- utils.Check(appid, productId, c, func() ([]map[string]interface{}, int, error) {
- datas := []map[string]interface{}{map[string]interface{}{
- "title": "中铁十五局集团有限公司",
- }}
- return datas, 200, nil
- }, "并发测试", "127.0.0.1", true)
- }
- }
|