Browse Source

feat:创建订单调整

fuwencai 2 years ago
parent
commit
691b13b038

BIN
src/github.com/baiy/.DS_Store


BIN
src/github.com/baiy/Cadmin-server-go/.DS_Store


+ 8 - 1
src/order/orderManageController.go

@@ -249,6 +249,9 @@ func orderList(context *admin.Context) (interface{}, error) {
 		if t == "23" {
 			str += "  e.product_type = '" + "3A信用认证" + "' and"
 		}
+		if t == "24" {
+			str += "  e.product_type = '" + "权益码" + "' and"
+		}
 	}
 	// 订单状态 0:未支付 1:已支付 -1:逻辑删除 -2:已取消 -3 全额退款 3-已付款 4-待付款 -4-部分退款 -5-未退款
 	if param.OrderStatus != "" {
@@ -517,7 +520,7 @@ func OrderDetails(context *admin.Context) (interface{}, error) {
 		} else if param.Type == "结构化数据" || param.Type == "广告" || param.Type == "历史数据导出" ||
 			param.Type == "线下课程培训" || param.Type == "课程分销" ||
 			param.Type == "标书制作" || param.Type == "打赏" ||
-			param.Type == "ISO体系认证" || param.Type == "3A信用认证" {
+			param.Type == "ISO体系认证" || param.Type == "3A信用认证" || param.Type == "权益码" {
 			result = SupplementaryOrder(res)
 		}
 		// 审核轨迹详情
@@ -771,6 +774,10 @@ func ExportOrder(context *admin.Context) (interface{}, error) {
 			product_type = "3A信用认证"
 			str += "  e.product_type = '" + "3A信用认证" + "' and"
 		}
+		if t == "24" {
+			product_type = "权益码"
+			str += "  e.product_type = '" + "权益码" + "' and"
+		}
 	} else {
 		product_type = "全部订单查询"
 	}

+ 2 - 1
src/order/orderManageService.go

@@ -2678,6 +2678,7 @@ func DownloadAll(rdata *[]map[string]interface{}) string {
 		"标书制作":    13,
 		"ISO体系认证": 20,
 		"3A信用认证":  21,
+		"权益码":     22,
 	}
 	if len(*rdata) > 0 && rdata != nil {
 		xf, err := xlsx.OpenFile("web/static/alltype.xlsx")
@@ -3257,7 +3258,7 @@ func DownloadAll(rdata *[]map[string]interface{}) string {
 
 			} else if data["product_type"] == "线下课程培训" || data["product_type"] == "课程分销" || data["product_type"] == "标书制作" ||
 				data["product_type"] == "打赏" || data["product_type"] == "数据文件" ||
-				data["product_type"] == "ISO体系认证" || data["product_type"] == "3A信用认证" {
+				data["product_type"] == "ISO体系认证" || data["product_type"] == "3A信用认证" || data["product_type"] == "权益码" {
 				sheetIndex := sheetMap[qutil.ObjToString(data["product_type"])]
 				sh := xf.Sheets[sheetIndex]
 				row := sh.AddRow()

+ 2 - 0
src/order/otherOrderController.go

@@ -208,6 +208,8 @@ func CreateOtherOrder(context *admin.Context) (interface{}, error) {
 		param.ProductType = "ISO体系认证"
 	} else if param.ProductType == "13" {
 		param.ProductType = "3A信用认证"
+	} else if param.ProductType == "14" {
+		param.ProductType = "权益码"
 	}
 	param.CreatePerson = context.User.Username
 	code := fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))

+ 1 - 1
src/order/otherOrderService.go

@@ -175,7 +175,7 @@ func createOtherOrder(param *CreateOtherOrderParams, code string) bool {
 		}
 		if param.ProductType == "广告" || param.ProductType == "线下课程培训" ||
 			param.ProductType == "课程分销" || param.ProductType == "标书制作" || param.ProductType == "打赏" ||
-			param.ProductType == "ISO体系认证" || param.ProductType == "3A信用认证" {
+			param.ProductType == "ISO体系认证" || param.ProductType == "3A信用认证" || param.ProductType == "权益码" {
 			delete(insertData, "data_count")
 			delete(insertData, "data_spec")
 

BIN
src/web/static/alltype.xlsx