瀏覽代碼

gorotine deal

abiao 2 年之前
父節點
當前提交
566dc35778
共有 35 個文件被更改,包括 213 次插入213 次删除
  1. 5 5
      go/gopath/src/fohow.com/apps/controllers/ad_controller/ad_controller.go
  2. 3 3
      go/gopath/src/fohow.com/apps/controllers/address_controller/address_controller.go
  3. 3 3
      go/gopath/src/fohow.com/apps/controllers/article_controller/article_controller.go
  4. 2 2
      go/gopath/src/fohow.com/apps/controllers/cron_controller/comb_user_relation.go
  5. 9 9
      go/gopath/src/fohow.com/apps/controllers/order_controller/cart_controller.go
  6. 13 13
      go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go
  7. 11 11
      go/gopath/src/fohow.com/apps/controllers/pay_controller/after_pay_controller.go
  8. 7 7
      go/gopath/src/fohow.com/apps/controllers/pay_controller/pay_exchange_controller.go
  9. 12 12
      go/gopath/src/fohow.com/apps/controllers/permit_controller/permit_controller.go
  10. 4 4
      go/gopath/src/fohow.com/apps/controllers/pick_address_controller/pick_address_controller.go
  11. 1 1
      go/gopath/src/fohow.com/apps/controllers/poster_controller/poster_controller.go
  12. 3 3
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/balance_order_controller.go
  13. 3 3
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/generate_controller.go
  14. 3 3
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/intro_user_controller.go
  15. 6 6
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/live_award_controller.go
  16. 2 2
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/order_award_controller.go
  17. 4 4
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/order_dispatch_controller.go
  18. 6 6
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/tmpl_controller.go
  19. 4 4
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/update_shop_application.go
  20. 2 2
      go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/user_perfomance_controller.go
  21. 2 2
      go/gopath/src/fohow.com/apps/controllers/sms_controller/sms_controller.go
  22. 5 5
      go/gopath/src/fohow.com/apps/controllers/test_controller/test_controller.go
  23. 3 3
      go/gopath/src/fohow.com/apps/controllers/user_controller/binding_controller.go
  24. 3 3
      go/gopath/src/fohow.com/apps/controllers/user_controller/invite_controller.go
  25. 9 9
      go/gopath/src/fohow.com/apps/controllers/user_controller/user_controller.go
  26. 5 5
      go/gopath/src/fohow.com/apps/controllers/xcx_controller/xcx_controller.go
  27. 2 2
      go/gopath/src/fohow.com/apps/helpers/intro_helper.go
  28. 11 11
      go/gopath/src/fohow.com/apps/helpers/notify_helper.go
  29. 27 27
      go/gopath/src/fohow.com/apps/helpers/promotion_helper.go
  30. 4 4
      go/gopath/src/fohow.com/apps/helpers/recharge_helper.go
  31. 2 2
      go/gopath/src/fohow.com/apps/models/address_model/address.go
  32. 2 2
      go/gopath/src/fohow.com/apps/models/address_model/pick_address.go
  33. 10 10
      go/gopath/src/fohow.com/apps/models/order_model/order_detail.go
  34. 10 10
      go/gopath/src/fohow.com/libs/wx_mp/event.go
  35. 15 15
      go/gopath/src/fohow.com/libs/wx_mp/mp.go

+ 5 - 5
go/gopath/src/fohow.com/apps/controllers/ad_controller/ad_controller.go

@@ -33,7 +33,7 @@ func (self *AdController) Init(ctx *context.Context, controllerName, actionName
 	self.ExceptCheckWxUserLoginAction = exceptCheckWxUserLoginAction
 }
 
-//根据广告图位置,获取广告图
+// 根据广告图位置,获取广告图
 func (self *AdController) GetItems() {
 	cache, _ := self.GetBool("cache", false)
 	adCode := self.Ctx.Input.Param(":ad_code")
@@ -94,7 +94,7 @@ func (self *AdController) GetItems() {
 	self.ServeResultJSON()
 }
 
-//根据广告位id,获取广告图
+// 根据广告位id,获取广告图
 func (self *AdController) GetItemsById() {
 	id, _ := self.GetInt64("ad_pid")
 	useCache, _ := self.GetBool("cache", true)
@@ -105,7 +105,7 @@ func (self *AdController) GetItemsById() {
 	self.ServeJSON()
 }
 
-//点击广告图
+// 点击广告图
 func (self *AdController) Click() {
 	useCache := false //self.GetString("cache") != "false"
 	id, _ := strconv.ParseInt(self.Ctx.Input.Param(":ad_item_id"), 10, 64)
@@ -133,7 +133,7 @@ func (self *AdController) Click() {
 	self.ServeJSON()
 }
 
-//广告图展示统计
+// 广告图展示统计
 func (self *AdController) Show() {
 	id, _ := strconv.ParseInt(self.Ctx.Input.Param(":ad_item_id"), 10, 64)
 	ad := ad_model.GetItemById(id, false)
@@ -147,7 +147,7 @@ func (self *AdController) Show() {
 	//if wxUser != nil {
 	showStat := ad_model.GetShowStatByWxUId(ad.Id, wxUId)
 	if showStat == nil {
-		go new(ad_model.AdItemShowStat).Create(ad.Id, wxUId, self.Ctx.Input.IP())
+		new(ad_model.AdItemShowStat).Create(ad.Id, wxUId, self.Ctx.Input.IP())
 	} else {
 		showStat.ShowTimes = showStat.ShowTimes + 1
 		showStat.ShowLastTime = time.Now()

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/address_controller/address_controller.go

@@ -32,7 +32,7 @@ func (self *AddressController) Init(ctx *context.Context, controllerName, action
 	self.ExceptCheckWxUserLoginAction = exceptCheckWxUserLoginAction
 }
 
-//获取用户地址列表
+// 获取用户地址列表
 func (self *AddressController) List() {
 	sort := self.GetString("sort")
 	if sort == "" {
@@ -45,7 +45,7 @@ func (self *AddressController) List() {
 	self.ServeJSON()
 }
 
-//取默认地址
+// 取默认地址
 func (self *AddressController) DefaultAddress() {
 	//uId := self.GetCurrentUserId()
 	wxUId := self.GetCurrentWxUserIdByToken()
@@ -155,7 +155,7 @@ func (self *AddressController) DeleteAddress() {
 			}
 		}
 	}
-	go item.Delete()
+	item.Delete()
 	self.ServeJSON()
 }
 

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/article_controller/article_controller.go

@@ -26,7 +26,7 @@ import (
 	//"fohow.com/libs/wx_mp"
 )
 
-//文章列表
+// 文章列表
 func (self *ArticleController) GetList() {
 	_catId := self.Ctx.Input.Param(":cat_id")
 	catId, _ := strconv.ParseInt(_catId, 10, 64)
@@ -61,7 +61,7 @@ func (self *ArticleController) GetHotest() {
 	self.ServeJSON()
 }
 
-//文章详情
+// 文章详情
 func (self *ArticleController) GetDetail() {
 	_id := self.Ctx.Input.Param(":article_id")
 	id, _ := strconv.ParseInt(_id, 10, 64)
@@ -100,7 +100,7 @@ func (self *ArticleController) GetDetail() {
 		// 	articleCat := article_model.GetParentCats(article.ArticleCatId)
 		// 	article.ArticleCat = articleCat
 		// }
-		go article.AddClick()
+		article.AddClick()
 	}
 
 	ad := new(ArticleDetail)

+ 2 - 2
go/gopath/src/fohow.com/apps/controllers/cron_controller/comb_user_relation.go

@@ -4,7 +4,7 @@ import (
 	"fohow.com/apps/models/user_model"
 )
 
-//修复会员内部关系
+// 修复会员内部关系
 func combUserRelation() {
 	wxUserId := int64(1)
 	//从公司会员开始修复
@@ -12,7 +12,7 @@ func combUserRelation() {
 
 	//更改下级群主关系
 	inviteList := user_model.GetWxUsersByInviteIdAll(wxUser.Id, false)
-	go UpdateClassInner(inviteList, wxUser.IntroInnerNo, wxUser.Id, wxUser.Id)
+	UpdateClassInner(inviteList, wxUser.IntroInnerNo, wxUser.Id, wxUser.Id)
 }
 
 func UpdateClassInner(list []*user_model.WxUser, innerNo string, inviteId, introUserId int64) {

+ 9 - 9
go/gopath/src/fohow.com/apps/controllers/order_controller/cart_controller.go

@@ -11,7 +11,7 @@ import (
 	"strings"
 )
 
-//加入购物车
+// 加入购物车
 func (self *OrderController) CreateCart() {
 	_pid := self.Ctx.Input.Param(":id")
 	pId, _ := strconv.ParseInt(_pid, 10, 64)
@@ -75,7 +75,7 @@ func (self *OrderController) CreateCart() {
 	self.ServeJSON()
 }
 
-//调整产品数量
+// 调整产品数量
 func (self *OrderController) ChangeItemNums() {
 	_cid := self.Ctx.Input.Param(":id")
 	cId, _ := strconv.ParseInt(_cid, 10, 64)
@@ -107,7 +107,7 @@ func (self *OrderController) ChangeItemNums() {
 	self.ServeJSON()
 }
 
-//调整购物车项目是否购买
+// 调整购物车项目是否购买
 func (self *OrderController) ChangeItemState() {
 	_cid := self.Ctx.Input.Param(":id")
 	cId, _ := strconv.ParseInt(_cid, 10, 64)
@@ -138,7 +138,7 @@ func (self *OrderController) ChangeItemState() {
 	self.ServeJSON()
 }
 
-//批量调整购物车项目是否购买
+// 批量调整购物车项目是否购买
 func (self *OrderController) MultChangeItemState() {
 
 	//uId := self.GetCurrentUserId()
@@ -186,7 +186,7 @@ func (self *OrderController) MultChangeItemState() {
 	self.ServeJSON()
 }
 
-//全选购买接口
+// 全选购买接口
 func (self *OrderController) ChangeAllState() {
 
 	state, _ := self.GetBool("state", false)
@@ -214,7 +214,7 @@ func (self *OrderController) ChangeAllState() {
 	self.ServeJSON()
 }
 
-//获取会员购物车信息
+// 获取会员购物车信息
 func (self *OrderController) GetCartList() {
 	cache, _ := self.GetBool("cache", true)
 	wxUserId := self.GetCurrentWxUserIdByToken()
@@ -223,7 +223,7 @@ func (self *OrderController) GetCartList() {
 	for _, item := range list {
 		product := product_model.GetProductById(item.ProductId, cache)
 		if product == nil {
-			go ClearProductCart(wxUserId, item.ProductId)
+			ClearProductCart(wxUserId, item.ProductId)
 			continue
 		}
 		wxUser := user_model.GetWxUserById(item.WxUserId, cache)
@@ -296,7 +296,7 @@ func ClearProductCart(userId, productId int64) {
 	}
 }
 
-//删除购物车产品项
+// 删除购物车产品项
 func (self *OrderController) DeleteItem() {
 	_cid := self.Ctx.Input.Param(":id")
 	cId, _ := strconv.ParseInt(_cid, 10, 64)
@@ -322,7 +322,7 @@ func (self *OrderController) DeleteItem() {
 	self.ServeJSON()
 }
 
-//批量删除购物车
+// 批量删除购物车
 func (self *OrderController) MultChangeItemDelete() {
 	wxUId := self.GetCurrentWxUserIdByToken()
 	ids := self.GetString("ids")

+ 13 - 13
go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

@@ -33,7 +33,7 @@ var MultreateOrder sync.Mutex
 var MultShopOrder sync.Mutex
 var MultCentOrder sync.Mutex
 
-//单品下单
+// 单品下单
 func (self *OrderController) Create() {
 	createOrder.Lock()
 	defer createOrder.Unlock()
@@ -183,7 +183,7 @@ func (self *OrderController) GetExpressNo() {
 	self.ServeJSON()
 }
 
-//购物车下单
+// 购物车下单
 func (self *OrderController) MultipleCreate() {
 	MultreateOrder.Lock()
 	defer MultreateOrder.Unlock()
@@ -320,7 +320,7 @@ func (self *OrderController) MultipleCreate() {
 	}
 	order.Save()
 	//购物册清理
-	go ClearCart(order.WxUserId, order.OrderId)
+	ClearCart(order.WxUserId, order.OrderId)
 
 	//发放赠品
 	helpers.SetOrderPromotionPro(order.OrderId, wxUser.Id)
@@ -335,7 +335,7 @@ func (self *OrderController) MultipleCreate() {
 	self.ServeJSON()
 }
 
-//店铺专区下单
+// 店铺专区下单
 func (self *OrderController) MultShopCreate() {
 	MultShopOrder.Lock()
 	defer MultShopOrder.Unlock()
@@ -422,7 +422,7 @@ func (self *OrderController) MultShopCreate() {
 	self.ServeJSON()
 }
 
-//积分专区下单
+// 积分专区下单
 func (self *OrderController) MultCentCreate() {
 	MultCentOrder.Lock()
 	defer MultCentOrder.Unlock()
@@ -545,7 +545,7 @@ func ClearCart(wxUserId int64, orderId string) {
 	}
 }
 
-//获取用户订单详情
+// 获取用户订单详情
 func (self *OrderController) Detail() {
 
 	cache, _ := self.GetBool("cache", false)
@@ -600,7 +600,7 @@ func (self *OrderController) Detail() {
 	self.ServeResultJSON()
 }
 
-//获取用户待评价订单列表
+// 获取用户待评价订单列表
 func (self *OrderController) WaitCommendList() {
 
 	status := self.GetString("status")
@@ -654,7 +654,7 @@ func (self *OrderController) WaitCommendList() {
 	self.ServeJSON()
 }
 
-//获取用户订单列表
+// 获取用户订单列表
 func (self *OrderController) List() {
 
 	status := self.GetString("status")
@@ -743,7 +743,7 @@ func (self *OrderController) List() {
 	self.ServeResultJSON()
 }
 
-//获取用户订单列表
+// 获取用户订单列表
 func (self *OrderController) DisrictList() {
 
 	page, _ := self.GetInt64("page")
@@ -774,7 +774,7 @@ func (self *OrderController) DisrictList() {
 	self.ServeResultJSON()
 }
 
-//获取用户订单列表
+// 获取用户订单列表
 func (self *OrderController) DisrictSum() {
 
 	wxUId := self.GetCurrentWxUserIdByToken()
@@ -792,7 +792,7 @@ func (self *OrderController) DisrictSum() {
 	self.ServeResultJSON()
 }
 
-//用户更改订单状态
+// 用户更改订单状态
 func (self *OrderController) Operate() {
 	oId := self.Ctx.Input.Param(":order_id")
 	o := order_model.GetOrderById(oId, false)
@@ -837,7 +837,7 @@ func (self *OrderController) Operate() {
 		}
 	} else if operate == order_model.OPERATE_CANCEL && o.Status == order_model.STATUS_PROCESSING {
 		//发起退款流程
-		go self.httpRequest(o.WxUserId, o.TotalPrice, o.PaiedPrice, o.OrderId, o.TradeNo)
+		self.httpRequest(o.WxUserId, o.TotalPrice, o.PaiedPrice, o.OrderId, o.TradeNo)
 	}
 
 	if operate == order_model.OPERATE_CONFIRM && o.Status == order_model.STATUS_DISPATCH {
@@ -888,7 +888,7 @@ func CreateOrderDetails(product *product_model.Product, order *order_model.Order
 	new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, silver, disAmount, product.Name, sizeName, colorName, cNums, depart)
 }
 
-//用户评论订单明细
+// 用户评论订单明细
 func (self *OrderController) OrderCommend() {
 	_detail_id := self.Ctx.Input.Param(":detail_id")
 	detail_id, _ := strconv.ParseInt(_detail_id, 10, 64)

+ 11 - 11
go/gopath/src/fohow.com/apps/controllers/pay_controller/after_pay_controller.go

@@ -66,7 +66,7 @@ func (self *PayController) PayAsync() {
 	}
 }
 
-//微信购买提货券
+// 微信购买提货券
 func (self *PayController) wxPayBalanceAsync() {
 
 	var notifyResponse = map[string]string{
@@ -110,10 +110,10 @@ func (self *PayController) wxPayBalanceAsync() {
 	}
 
 	// 发放充值佣金
-	go helpers.PatchRechargeBalance(order.Id, totalFee, params.TransactionId)
+	helpers.PatchRechargeBalance(order.Id, totalFee, params.TransactionId)
 
 	//发放赠品
-	go helpers.BalanceOrderPromotion(order.OrderId, order.WxUserId, order.Depart)
+	helpers.BalanceOrderPromotion(order.OrderId, order.WxUserId, order.Depart)
 
 	notifyResponse["return_code"] = wx_mp.PAY_SUCCESS
 	//beego.BeeLogger.Warn("小程序购买提货券微信支付回调通知,订单编号=%s  订单状态=%d", order.OrderId, order.State)
@@ -122,7 +122,7 @@ func (self *PayController) wxPayBalanceAsync() {
 
 }
 
-//微信购买商品
+// 微信购买商品
 func (self *PayController) wxPayExchangeAsync() {
 	var notifyResponse = map[string]string{
 		"return_code": wx_mp.PAY_FAIL,
@@ -179,9 +179,9 @@ func (self *PayController) wxPayExchangeAsync() {
 	//go notice()
 	wxUser := user_model.GetWxUserById(order.WxUserId, true)
 	if order.OrderType == order_model.ORDER_TYPE_NORMAL {
-		go helpers.NewSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
+		helpers.NewSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
 	} else if order.OrderType == order_model.ORDER_TYPE_SHOP {
-		go helpers.ShopSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
+		helpers.ShopSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
 	}
 
 	//发放赠品
@@ -190,9 +190,9 @@ func (self *PayController) wxPayExchangeAsync() {
 	cancelKey := lib_redis.GetOrderCancelList()
 	lib_redis.ThrowOutRedisList(cancelKey, order.OrderId)
 	//更新商品售量
-	go UpdatePdSaleNums(order)
+	UpdatePdSaleNums(order)
 	//赠品写入订单
-	go helpers.PresentTransferToOrder(order.OrderId, order.WxUserId)
+	helpers.PresentTransferToOrder(order.OrderId, order.WxUserId)
 
 	notifyResponse["return_code"] = wx_mp.PAY_SUCCESS
 	//beego.BeeLogger.Warn("商品购买微信支付回调通知,订单编号=%s  订单状态=%s", order.OrderId, order.Status)
@@ -200,7 +200,7 @@ func (self *PayController) wxPayExchangeAsync() {
 	return
 }
 
-//更新已售数量
+// 更新已售数量
 func UpdatePdSaleNums(order *order_model.Order) {
 	if order == nil {
 		return
@@ -215,10 +215,10 @@ func UpdatePdSaleNums(order *order_model.Order) {
 	for _, item := range orderDtList {
 		SaleNumsMap[item.ProductId] = item.Count
 	}
-	go order_model.UpdateSaleNums(SaleNumsMap)
+	order_model.UpdateSaleNums(SaleNumsMap)
 }
 
-//微信余额充值
+// 微信余额充值
 func (self *PayController) wxPayCashczAsync() {
 
 	var notifyResponse = map[string]string{

+ 7 - 7
go/gopath/src/fohow.com/apps/controllers/pay_controller/pay_exchange_controller.go

@@ -29,7 +29,7 @@ import (
 var createDrawCode sync.Mutex
 var payOrder sync.Mutex
 
-//支付订单
+// 支付订单
 func (self *PayController) payExchange(oId, payWay, returnUrl, source, remark string, useCoupon bool) {
 	payOrder.Lock()
 	defer payOrder.Unlock()
@@ -323,12 +323,12 @@ func (self *PayController) payExchange(oId, payWay, returnUrl, source, remark st
 			cancelKey := lib_redis.GetOrderCancelList()
 			lib_redis.ThrowOutRedisList(cancelKey, order.OrderId)
 			//更新已售数量
-			go order_model.UpdateSaleNums(SaleNumsMap)
+			order_model.UpdateSaleNums(SaleNumsMap)
 			//赠品写入订单
-			go helpers.PresentTransferToOrder(order.OrderId, wxUId)
+			helpers.PresentTransferToOrder(order.OrderId, wxUId)
 			//go CreateOrderNotify(order, product)
 			//wxUser := user_model.GetWxUserById(order.WxUserId, true)
-			go helpers.NewSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
+			helpers.NewSendInviterBenefit(wxUser, order.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
 
 			payUrl, payData = fmt.Sprintf("%s?order_id=%s", returnUrl, order.OrderId), nil
 			result := PayUrl{NeedWx: false, PayUrl: payUrl, PayData: payData, OrderId: order.OrderId}
@@ -455,7 +455,7 @@ func (self *PayController) payExchange(oId, payWay, returnUrl, source, remark st
 	self.ServeJSON()
 }
 
-//支付积分订单
+// 支付积分订单
 func (self *PayController) payCentExchange(oId, returnUrl, source, remark string) {
 	payOrder.Lock()
 	defer payOrder.Unlock()
@@ -571,7 +571,7 @@ func (self *PayController) payCentExchange(oId, returnUrl, source, remark string
 	cancelKey := lib_redis.GetOrderCancelList()
 	lib_redis.ThrowOutRedisList(cancelKey, order.OrderId)
 	//更新已售数量
-	go order_model.UpdateSaleNums(SaleNumsMap)
+	order_model.UpdateSaleNums(SaleNumsMap)
 
 	payUrl, payData = fmt.Sprintf("%s?order_id=%s", returnUrl, order.OrderId), nil
 	result := PayUrl{NeedWx: false, PayUrl: payUrl, PayData: payData, OrderId: order.OrderId}
@@ -580,7 +580,7 @@ func (self *PayController) payCentExchange(oId, returnUrl, source, remark string
 	self.ServeJSON()
 }
 
-//获取库存不足商品
+// 获取库存不足商品
 func FindNotEnoughPrd(storeMap map[int64]int64) (bool, string) {
 	//判断商品库存
 	for pId, nums := range storeMap {

+ 12 - 12
go/gopath/src/fohow.com/apps/controllers/permit_controller/permit_controller.go

@@ -50,7 +50,7 @@ func (self *PermitController) Init(ctx *context.Context, controllerName, actionN
 	self.ExceptCheckWxUserLoginAction = exceptCheckWxUserLoginAction
 }
 
-//小程序授权
+// 小程序授权
 func (self *PermitController) XcxAuthorize() {
 	params := self.GetString("userinfo")
 	cache, _ := self.GetBool("cache", false)
@@ -115,7 +115,7 @@ func (self *PermitController) XcxAuthorize() {
 	self.ServeJSON()
 }
 
-//小程序登录
+// 小程序登录
 func (self *PermitController) XcxLogin() {
 	code := self.GetString("code")
 	inviteId, _ := self.GetInt64("invite_id", 0)
@@ -186,7 +186,7 @@ func (self *PermitController) XcxLogin() {
 	self.ServeJSON()
 }
 
-//小程序再次保存用户头像
+// 小程序再次保存用户头像
 func (self *PermitController) SaveWxuserInfo() {
 	params := self.GetString("userinfo")
 	type UserInfo struct {
@@ -235,10 +235,10 @@ func (self *PermitController) SaveWxuserInfo() {
 		user.City = wxUser.City
 		user.Sex = wxUser.Sex
 		user.Save()
-		go user.CopyWxUserHead(wxUser.Head)
+		user.CopyWxUserHead(wxUser.Head)
 	}
 	//消除user,wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 	headImag := tool.GetCdnFullImgUrl(headPath)
 	//beego.BeeLogger.Info("save_wx_user_info err: %v ", wxUser)
 	type Ret struct {
@@ -249,7 +249,7 @@ func (self *PermitController) SaveWxuserInfo() {
 	self.ServeJSON()
 }
 
-//公众号静默授权回调
+// 公众号静默授权回调
 func (self *PermitController) AfterWxMpAuth() {
 	// beego.BeeLogger.Warn("AfterWxMpAuth........")
 	code := self.GetString("code")
@@ -361,7 +361,7 @@ func (self *PermitController) AfterWxMpLogin() {
 
 			beego.BeeLogger.Info("AfterWxAutoLogin, upload WxUserHead with URL: %s", info.HeadImageURL)
 			if wxUser != nil {
-				go wxUser.UploadHead(info.HeadImageURL)
+				wxUser.UploadHead(info.HeadImageURL)
 			}
 			if wxUserGzh == nil {
 				beego.BeeLogger.Info("wxUser: %v, info: %v")
@@ -377,7 +377,7 @@ func (self *PermitController) AfterWxMpLogin() {
 		if wxUser.Head == "" {
 			info := wx_mp.AuthUserInfo(token, mpOpenid, a, s)
 			if info != nil {
-				go wxUser.UploadHead(info.HeadImageURL)
+				wxUser.UploadHead(info.HeadImageURL)
 			}
 		}
 		if wxUserGzh == nil {
@@ -395,7 +395,7 @@ func (self *PermitController) AfterWxMpLogin() {
 
 	if wxUser != nil && wxUserGzh != nil && wxUserGzh.GzhOpenId != mpOpenid {
 		wxUserGzh.GzhOpenId = mpOpenid
-		go wxUserGzh.UpdateField("GzhOpenId")
+		wxUserGzh.UpdateField("GzhOpenId")
 	}
 
 	if cbUrl, ok := cache.Cache.Get(state).(string); ok {
@@ -499,7 +499,7 @@ func (self *PermitController) AfterPcWxLogin() {
 
 			beego.BeeLogger.Info("PcWxMpLogin, upload WxUserHead with URL: %s", info.HeadImageURL)
 			if wxUser != nil {
-				go wxUser.UploadHead(info.HeadImageURL)
+				wxUser.UploadHead(info.HeadImageURL)
 			}
 			wxUserGzh := user_model.GetWxUserGzhByOpenId(mpOpenid, false)
 			if wxUserGzh == nil {
@@ -516,7 +516,7 @@ func (self *PermitController) AfterPcWxLogin() {
 		if wxUser.Head == "" {
 			info := wx_mp.AuthUserInfo(token, mpOpenid, a, s)
 			if info != nil {
-				go wxUser.UploadHead(info.HeadImageURL)
+				wxUser.UploadHead(info.HeadImageURL)
 			}
 		}
 		wxUserGzh := user_model.GetWxUserGzhByOpenId(mpOpenid, false)
@@ -566,7 +566,7 @@ func (self *PermitController) Logout() {
 	self.ReturnError(200, apps.HasLogout, "", nil)
 }
 
-//忘记密码
+// 忘记密码
 func (self *PermitController) ResetPwd() {
 	code := self.GetString("code")
 	tel := self.GetString("tel")

+ 4 - 4
go/gopath/src/fohow.com/apps/controllers/pick_address_controller/pick_address_controller.go

@@ -26,7 +26,7 @@ func (self *PickAddressController) Init(ctx *context.Context, controllerName, ac
 	self.ExceptCheckWxUserLoginAction = exceptCheckWxUserLoginAction
 }
 
-//获取用户地址列表
+// 获取用户地址列表
 func (self *PickAddressController) List() {
 	sort := self.GetString("sort")
 	if sort == "" {
@@ -39,7 +39,7 @@ func (self *PickAddressController) List() {
 	self.ServeJSON()
 }
 
-//取默认地址
+// 取默认地址
 func (self *PickAddressController) DefaultPickAddress() {
 	//uId := self.GetCurrentUserId()
 	wxUId := self.GetCurrentWxUserIdByToken()
@@ -141,7 +141,7 @@ func (self *PickAddressController) DeletePickAddress() {
 			}
 		}
 	}
-	go item.Delete()
+	item.Delete()
 	self.ServeJSON()
 }
 
@@ -163,7 +163,7 @@ func (self *PickAddressController) SetDefault() {
 	self.ServeJSON()
 }
 
-//获取用户地址列表
+// 获取用户地址列表
 func (self *PickAddressController) PickDepartList() {
 	sort := self.GetString("sort")
 	if sort == "" {

+ 1 - 1
go/gopath/src/fohow.com/apps/controllers/poster_controller/poster_controller.go

@@ -227,7 +227,7 @@ func (self *PosterController) ScanPosterXcxQrcode() {
 	wxUId := self.GetCurrentWxUserIdByToken()
 	scanRecord := poster_model.GetPosterQrcodeRecordByWxUId(posterQrcodeRecord.Id, wxUId)
 	if scanRecord == nil {
-		go new(poster_model.PosterQrcodeScanRecord).Create(posterQrcodeRecord.Id, wxUId, self.Ctx.Input.IP())
+		new(poster_model.PosterQrcodeScanRecord).Create(posterQrcodeRecord.Id, wxUId, self.Ctx.Input.IP())
 	} else {
 		scanRecord.ScanTimes = scanRecord.ScanTimes + 1
 		scanRecord.ScanLastTime = time.Now()

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/balance_order_controller.go

@@ -8,7 +8,7 @@ import (
 	"strconv"
 )
 
-//充值订单审核
+// 充值订单审核
 func (self *RailsadminController) ConfirmBalanceOrder() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -20,8 +20,8 @@ func (self *RailsadminController) ConfirmBalanceOrder() {
 		self.ReturnError(404, apps.NoExist, "", nil)
 	}
 	//发放上级佣金
-	go helpers.PatchRechargeBalance(id, order.PaiedPrice, "")
+	helpers.PatchRechargeBalance(id, order.PaiedPrice, "")
 	//发放赠品
-	go helpers.BalanceOrderPromotion(order.OrderId, order.WxUserId, order.Depart)
+	helpers.BalanceOrderPromotion(order.OrderId, order.WxUserId, order.Depart)
 	self.ServeJSON()
 }

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/generate_controller.go

@@ -22,7 +22,7 @@ const (
 	MenuActionRoot = "root"
 )
 
-//创建公众号自定义菜单
+// 创建公众号自定义菜单
 func (self *RailsadminController) CreateWxMenu() {
 	// result := self.CheckIsInvokeFromRailsAdmin(self.Ctx)
 
@@ -128,7 +128,7 @@ func (self *RailsadminController) CreateWxQrcodeWithSceneString() {
 	self.ServeJSON()
 }
 
-//生成小程序二维码
+// 生成小程序二维码
 func (self *RailsadminController) GenerateXcxQrcode() {
 	width, _ := self.GetInt("width", 430)
 	//wxUser := self.GetCurrentWxUser(false)
@@ -174,7 +174,7 @@ func (self *RailsadminController) GenerateXcxQrcode() {
 		qrcodeUrl = self.GetFullImgUrl(uploadPath)
 	}
 	//消除user,wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 	self.Data["json"] = &Ret{QrcodeUrl: qrcodeUrl}
 	self.ServeJSON()
 }

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/intro_user_controller.go

@@ -8,7 +8,7 @@ import (
 	"time"
 )
 
-//升级群主
+// 升级群主
 func (self *RailsadminController) UpdateIntroUser() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -29,8 +29,8 @@ func (self *RailsadminController) UpdateIntroUser() {
 	wxUser.Save()
 	//更改下级会员群主ID
 	inviteList := user_model.GetWxUsersByInviteIdAll(wxUser.Id, false)
-	go user_model.UpdateClass(inviteList, wxUser.Id, wxUser.IntroUserId)
+	user_model.UpdateClass(inviteList, wxUser.Id, wxUser.IntroUserId)
 	//消除user,wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 	self.ServeJSON()
 }

+ 6 - 6
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/live_award_controller.go

@@ -15,7 +15,7 @@ import (
 	"time"
 )
 
-//发放直播赠品
+// 发放直播赠品
 func (self *RailsadminController) LiveAward() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -55,7 +55,7 @@ func (self *RailsadminController) LiveAward() {
 			product := product_model.GetProductById(LiveAward.Prod1, true)
 			if product != nil {
 				totalPrice += LiveAward.Nums1 * product.Price
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
 			}
 
 		}
@@ -65,7 +65,7 @@ func (self *RailsadminController) LiveAward() {
 			product := product_model.GetProductById(LiveAward.Prod2, true)
 			if product != nil {
 				totalPrice += LiveAward.Nums2 * product.Price
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
 			}
 		}
 
@@ -76,7 +76,7 @@ func (self *RailsadminController) LiveAward() {
 			//赠送赠品1
 			if product != nil {
 				totalPrice += LiveAward.Nums3 * product.Price
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
 			}
 		}
 		order.Address = LiveAward.Address
@@ -111,7 +111,7 @@ func (self *RailsadminController) LiveAward() {
 	self.ServeJSON()
 }
 
-//发放充值赠品
+// 发放充值赠品
 func (self *RailsadminController) PatchCashAward() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -121,7 +121,7 @@ func (self *RailsadminController) PatchCashAward() {
 
 	order := order_model.GetOrderByIntId(id)
 	if order != nil {
-		go helpers.PresentTransferToOrder(order.OrderId, order.WxUserId)
+		helpers.PresentTransferToOrder(order.OrderId, order.WxUserId)
 	}
 
 	beego.BeeLogger.Warn("----------------end patch cash recharge awards order_id ---%s ", order.OrderId)

+ 2 - 2
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/order_award_controller.go

@@ -12,7 +12,7 @@ import (
 
 var orderAwardLock sync.Mutex
 
-//订单发货
+// 订单发货
 func (self *RailsadminController) OrderAward() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -36,7 +36,7 @@ func (self *RailsadminController) OrderAward() {
 		beego.BeeLogger.Error("user[%d]", id)
 	}
 	wxUser := user_model.GetWxUserById(o.WxUserId, true)
-	go helpers.NewSendInviterBenefit(wxUser, o.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
+	helpers.NewSendInviterBenefit(wxUser, o.OrderId, user_model.SOURCE_PRODUCT_BENEFIT)
 
 	self.ServeJSON()
 }

+ 4 - 4
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/order_dispatch_controller.go

@@ -14,7 +14,7 @@ import (
 
 var updateExpressLock sync.Mutex
 
-//订单发货
+// 订单发货
 func (self *RailsadminController) OrderDispatch() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -52,12 +52,12 @@ func (self *RailsadminController) OrderDispatch() {
 	if !o.Save() {
 		beego.BeeLogger.Error("user[%d]", id)
 	}
-	go helpers.DispathSendSms([]string{o.Tel}, o.ExpressOrderNo)
-	go updateSoldCount(o.Id)
+	helpers.DispathSendSms([]string{o.Tel}, o.ExpressOrderNo)
+	updateSoldCount(o.Id)
 	self.ServeJSON()
 }
 
-//更新商品出库数量
+// 更新商品出库数量
 func updateSoldCount(Id int64) {
 	var list []*order_model.OrderDtItem
 	sql := `

+ 6 - 6
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/tmpl_controller.go

@@ -22,7 +22,7 @@ func (self *RailsadminController) SendTemplate() {
 	}
 	item.Times = item.Times + 1
 	item.LastUpdatedAt = time.Now()
-	go item.Save()
+	item.Save()
 	s := item.MsgType                         //模板:0 订单待支付提醒 1新项目通知 2提货通知
 	wxGongzhonghaoId := item.WxGongzhonghaoId //微信公众号ID,1:凤凰菁选
 
@@ -32,7 +32,7 @@ func (self *RailsadminController) SendTemplate() {
 	}
 	if wxGongzhonghaoId == DEFAULTGONGZHONGHAO {
 		// (openId, url, title, task, nType, nTime, remark string)
-		go sendTmplmsgForHandle(item, s)
+		sendTmplmsgForHandle(item, s)
 	}
 	self.ServeJSON()
 }
@@ -65,7 +65,7 @@ func sendTmplmsgForHandle(item *push_tmpl_model.PushTmpl, msgType string) {
 			} else if msgType == push_tmpl_model.MsgType_ApplyForSale {
 				wx_mp.Tmplmsg2ApplyForSaleNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, kw3, remark)
 			} else if msgType == push_tmpl_model.MsgType_DollarRefund {
-				go wx_mp.TmplmsgEventDollarRefundNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, remark)
+				wx_mp.TmplmsgEventDollarRefundNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, remark)
 			}
 
 		} else {
@@ -84,7 +84,7 @@ func sendTmplmsgForHandle(item *push_tmpl_model.PushTmpl, msgType string) {
 				} else if msgType == push_tmpl_model.MsgType_ApplyForSale {
 					wx_mp.Tmplmsg2ApplyForSaleNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, kw3, remark)
 				} else if msgType == push_tmpl_model.MsgType_DollarRefund {
-					go wx_mp.TmplmsgEventDollarRefundNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, remark)
+					wx_mp.TmplmsgEventDollarRefundNotifyHandle(u.GzhOpenId, url, first, kw1, kw2, remark)
 				}
 
 				new(push_tmpl_model.PushTmplRecord).Create(u.Id, item.Id, time.Now())
@@ -135,11 +135,11 @@ func (self *RailsadminController) SendXcxTemplate() {
 	}
 	item.Times = item.Times + 1
 	item.LastUpdatedAt = time.Now()
-	go item.Save()
+	item.Save()
 	s := item.MsgType
 	//模板:MessageTemplateId_ItemStatusRemind 物品状态提醒; MessageTemplateId_ProjectNewStateNofity  众筹项目最新状态通知
 
-	go sendXcxTmplmsgForHandle(item, s)
+	sendXcxTmplmsgForHandle(item, s)
 
 	self.ServeJSON()
 }

+ 4 - 4
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/update_shop_application.go

@@ -12,7 +12,7 @@ import (
 	"time"
 )
 
-//升级店长
+// 升级店长
 func (self *RailsadminController) UpdateShopApplication() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -40,15 +40,15 @@ func (self *RailsadminController) UpdateShopApplication() {
 	wxUser.Save()
 	//上线分佣金
 	source := balance_model.SHOP_APPYCATION
-	go ApplySuccessInviterBenefit(wxUser, shopApplication.Id, source)
+	ApplySuccessInviterBenefit(wxUser, shopApplication.Id, source)
 	//更改下级会员群主ID
 	inviteList := user_model.GetWxUsersByInviteIdAll(wxUser.Id, false)
-	go user_model.UpdateClass(inviteList, wxUser.Id, wxUser.IntroUserId)
+	user_model.UpdateClass(inviteList, wxUser.Id, wxUser.IntroUserId)
 	//发放赠品
 	//helpers.ShopOrderPromotion(shopApplication.Id, wxUser.Id, wxUser.Depart)
 	helpers.CreateShopApplyOrder(shopApplication.Id)
 	//消除user,wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 	self.ServeJSON()
 }
 

+ 2 - 2
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/user_perfomance_controller.go

@@ -8,7 +8,7 @@ import (
 	"time"
 )
 
-//订单商品汇总
+// 订单商品汇总
 func (self *RailsadminController) UserPerfomance() {
 
 	_id := self.Ctx.Input.Param(":id")
@@ -16,7 +16,7 @@ func (self *RailsadminController) UserPerfomance() {
 
 	beego.BeeLogger.Warn("UserPerfomance id:(%d)", id)
 
-	go CalcTeamPerfomance(id)
+	CalcTeamPerfomance(id)
 
 	self.ServeJSON()
 }

+ 2 - 2
go/gopath/src/fohow.com/apps/controllers/sms_controller/sms_controller.go

@@ -41,7 +41,7 @@ func (self *SMSController) Init(ctx *context.Context, controllerName, actionName
 	// cpt = captcha.NewWithFilter("/captcha/", cache.Cache)
 }
 
-//获取图片验证码
+// 获取图片验证码
 func (self *SMSController) GetCaptcha() {
 	id, err := cpt.CreateCaptcha()
 	var img string
@@ -143,6 +143,6 @@ func (self *SMSController) Send() {
 
 	sign, template, action := sms_model.GetAliMsgContent(msg_type)
 
-	go sms_model.SendSmsWithAli([]string{tel}, sign, template, action, code)
+	sms_model.SendSmsWithAli([]string{tel}, sign, template, action, code)
 	self.ServeJSON()
 }

+ 5 - 5
go/gopath/src/fohow.com/apps/controllers/test_controller/test_controller.go

@@ -16,7 +16,7 @@ type LabiReturn struct {
 	TradeNo string `json:"trade_no"`
 }
 
-//测试订单
+// 测试订单
 func (self *TestController) TestOrderListen() {
 	orderId := self.GetString("order_id")
 	f := func() {
@@ -32,7 +32,7 @@ func (self *TestController) TestOrderListen() {
 	}
 	for {
 		order := order_model.GetOrderById(orderId, false)
-		go func(v string) {
+		func(v string) {
 			if v == order_model.STATUS_PROCESSING || v == order_model.STATUS_DISPATCH {
 				fmt.Println(v)
 				go f()
@@ -46,7 +46,7 @@ func (self *TestController) TestOrderListen() {
 	self.ServeJSON()
 }
 
-//测试redis 存储userInfo
+// 测试redis 存储userInfo
 func (self *TestController) GetUserInfoFromRedis() {
 
 	////-------测试个人------------//
@@ -87,7 +87,7 @@ func (self *TestController) GetUserInfoFromRedis() {
 	self.ServeJSON()
 }
 
-//测试微信退款功能
+// 测试微信退款功能
 func (self *TestController) TestWxPayRefund() {
 	outRefundNo := createOrderId("refund")
 	outTradeNo := "order12344o040111"
@@ -109,7 +109,7 @@ func (self *TestController) TestWxPayRefund() {
 	self.ServeJSON()
 }
 
-//生成订单ID
+// 生成订单ID
 func createOrderId(prefix string) string {
 	n1 := time.Now().UnixNano()
 	n2 := RandInt64(100, 999)

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/user_controller/binding_controller.go

@@ -27,7 +27,7 @@ import (
 	"strconv"
 )
 
-//绑定手机
+// 绑定手机
 func (self *UserController) BindingTel() {
 	code := self.GetString("code")
 	tel := self.GetString("tel")
@@ -85,7 +85,7 @@ func (self *UserController) BindingTel() {
 	self.ServeJSON()
 }
 
-//绑定手机
+// 绑定手机
 func (self *UserController) BindingTelNew() {
 	code := self.GetString("code")
 	tel := self.GetString("tel")
@@ -121,7 +121,7 @@ func (self *UserController) BindingTelNew() {
 		user.Tel = tel
 		user.Save()
 		//消除user,wxuser缓存
-		go wxUser.CleanCache()
+		wxUser.CleanCache()
 	}
 	self.Data["json"] = user
 	self.ServeJSON()

+ 3 - 3
go/gopath/src/fohow.com/apps/controllers/user_controller/invite_controller.go

@@ -65,7 +65,7 @@ func (self *UserController) GenerateQrcode() {
 	self.ServeJSON()
 }
 
-//查看邀请的一级关系列表 - 总的佣金奖励
+// 查看邀请的一级关系列表 - 总的佣金奖励
 func (self *UserController) GetInviteList() {
 
 	// inviteWxId, _ := self.GetInt64("wx_uid")
@@ -110,7 +110,7 @@ func (self *UserController) GetInviteList() {
 	self.ServeJSON()
 }
 
-//查看邀请的一级关系列表 - 每月的佣金奖励
+// 查看邀请的一级关系列表 - 每月的佣金奖励
 func (self *UserController) GetMonthlyInviteList() {
 
 	page, _ := self.GetInt64("page", 1)
@@ -290,7 +290,7 @@ func (self *UserController) SetWxUserInviter() {
 	ivId, _ := strconv.ParseInt(self.Ctx.Input.Param(":wx_inviter"), 10, 64)
 	currectWxUId := self.GetCurrentWxUserIdByToken()
 	if currectWxUId != 0 && ivId != 0 {
-		go helpers.SetInviter(currectWxUId, ivId)
+		helpers.SetInviter(currectWxUId, ivId)
 	}
 	self.ServeJSON()
 }

+ 9 - 9
go/gopath/src/fohow.com/apps/controllers/user_controller/user_controller.go

@@ -110,7 +110,7 @@ func (self *UserController) CheckCertificate() {
 	self.ServeJSON()
 }
 
-//修改用户信息
+// 修改用户信息
 func (self *UserController) UpdateWxUserInfo() {
 	wxUser := self.GetCurrentWxUser(false)
 	if wxUser == nil {
@@ -245,7 +245,7 @@ func (self *UserController) Get() {
 	self.ServeJSON()
 }
 
-//修改交易密码
+// 修改交易密码
 func (self *UserController) UpdateTradePwd() {
 	code := self.GetString("code")
 	tel := self.GetString("tel")
@@ -287,7 +287,7 @@ func (self *UserController) UpdateTradePwd() {
 	self.ServeJSON()
 }
 
-//绑定身份证
+// 绑定身份证
 func (self *UserController) BindingIdCard() {
 	idCard := self.GetString("identity_card")
 	realName := self.GetString("real_name")
@@ -332,7 +332,7 @@ func (self *UserController) BindingIdCard() {
 	self.ServeJSON()
 }
 
-//绑定银行卡
+// 绑定银行卡
 func (self *UserController) SaveBankCard() {
 	bankName := self.GetString("bank_name")
 	bankAccount := self.GetString("bank_account")
@@ -378,7 +378,7 @@ func (self *UserController) GetBankInfo() {
 	self.ServeJSON()
 }
 
-//根据身份证获取年龄
+// 根据身份证获取年龄
 func getAgeByIdCardNo(idCardNo string) (int64, error) {
 	age, err := user.CaculateAgeByIdCard(idCardNo)
 	if err != nil {
@@ -387,7 +387,7 @@ func getAgeByIdCardNo(idCardNo string) (int64, error) {
 	return age, nil
 }
 
-//申请店长
+// 申请店长
 func (self *UserController) ShopApplication() {
 	code := self.GetString("code")
 	mobile := self.GetString("mobile")
@@ -448,7 +448,7 @@ func (self *UserController) ShopApplication() {
 	self.ServeJSON()
 }
 
-//修改交易密码
+// 修改交易密码
 func (self *UserController) SysUserBind() {
 	_id := self.Ctx.Input.Param(":wx_uid")
 	wxId, _ := strconv.ParseInt(_id, 10, 64)
@@ -545,7 +545,7 @@ func (self *UserController) SysUserBind() {
 	}
 
 	//清掉wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 	type Ret struct {
 		Result bool `json:"result"`
 	}
@@ -554,7 +554,7 @@ func (self *UserController) SysUserBind() {
 	self.ServeJSON()
 }
 
-//修改用户信息
+// 修改用户信息
 func (self *UserController) UpdateUserInfo() {
 
 	nickName := self.GetString("nickname")

+ 5 - 5
go/gopath/src/fohow.com/apps/controllers/xcx_controller/xcx_controller.go

@@ -19,7 +19,7 @@ import (
 	"fohow.com/libs/wx_mp"
 )
 
-//获取小程序版本
+// 获取小程序版本
 func (self *XcxController) GetXcxVersion() {
 	v := self.Ctx.Input.Param(":version")
 	if v == "" {
@@ -30,7 +30,7 @@ func (self *XcxController) GetXcxVersion() {
 	self.ServeJSON()
 }
 
-//生成讯兑二维码
+// 生成讯兑二维码
 func (self *XcxController) GenerateQrcode() {
 	width, _ := self.GetInt("width", 430)
 	url := self.GetString("url", "pages/user/exchange/exchange")
@@ -64,7 +64,7 @@ func (self *XcxController) GenerateQrcode() {
 	self.ServeJSON()
 }
 
-//根据后台配置生成小程序码
+// 根据后台配置生成小程序码
 func (self *XcxController) ChannelQrcode() {
 	id, _ := strconv.ParseInt(self.Ctx.Input.Param(":id"), 10, 64)
 	cq := channel_xcx_qrcode_model.GetById(id)
@@ -120,7 +120,7 @@ func (self *XcxController) GetChannelInfo() {
 	self.ServeJSON()
 }
 
-//渠道数据统计
+// 渠道数据统计
 func (self *XcxController) FigureChannel() {
 	id, _ := strconv.ParseInt(self.Ctx.Input.Param(":id"), 10, 64)
 	beego.BeeLogger.Warn("xcx_controller.FigureChannel_(%d)", id)
@@ -130,7 +130,7 @@ func (self *XcxController) FigureChannel() {
 		wxUId := self.GetCurrentWxUserIdByToken()
 		if wxUId > 0 {
 			beego.BeeLogger.Warn("xcx_controller.FigureChannel_wxUId_(%d)", wxUId)
-			go new(channel_xcx_qrcode_model.SignUpChannelQrcodeResult).Create(cq.Id, wxUId)
+			new(channel_xcx_qrcode_model.SignUpChannelQrcodeResult).Create(cq.Id, wxUId)
 			beego.BeeLogger.Warn("xcx_controller.FigureChannel_(%d)", cq.ScanTimes)
 		}
 	}

+ 2 - 2
go/gopath/src/fohow.com/apps/helpers/intro_helper.go

@@ -5,7 +5,7 @@ import (
 	"time"
 )
 
-//升级群主
+// 升级群主
 func UpdateIntroUser(wxUser *user_model.WxUser) {
 
 	if wxUser == nil || wxUser.ShowInviteMode == int64(1) {
@@ -20,5 +20,5 @@ func UpdateIntroUser(wxUser *user_model.WxUser) {
 	inviteList := user_model.GetWxUsersByInviteIdAll(wxUser.Id, false)
 	go user_model.UpdateClass(inviteList, wxUser.Id, wxUser.IntroUserId)
 	//消除user,wxuser缓存
-	go wxUser.CleanCache()
+	wxUser.CleanCache()
 }

+ 11 - 11
go/gopath/src/fohow.com/apps/helpers/notify_helper.go

@@ -3,14 +3,14 @@ package helpers
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/astaxie/beego"
 	"fohow.com/apps/models/user_model"
 	"fohow.com/apps/models/wx_message_model"
 	"fohow.com/libs/wx_mp"
+	"github.com/astaxie/beego"
 	"time"
 )
 
-//养红包金额到账
+// 养红包金额到账
 func UserBalanceChangedNotify(user user_model.WxUser, amount string, reason string, remark string, page string) {
 	formIdInstance := wx_message_model.GetOne(user.Openid)
 	if formIdInstance == nil {
@@ -32,11 +32,11 @@ func UserBalanceChangedNotify(user user_model.WxUser, amount string, reason stri
 	beego.BeeLogger.Debug("MessageTemplateId_BalanceChanged got: %s", templateId)
 	beego.BeeLogger.Info("TestSendingTemplatemsgController get one: %d", formIdInstance.Id)
 
-	go wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "keyword1.DATA")
+	wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "keyword1.DATA")
 	formIdInstance.Use()
 }
 
-//物流修改
+// 物流修改
 func ProductLogisticsChangedNotify(wxUser user_model.WxUser, dispathTime time.Time, productName, orderId, expressCompany, expressOrderNo, remark string, page string) {
 	formIdInstance := wx_message_model.GetOne(wxUser.Openid)
 	if formIdInstance == nil {
@@ -60,11 +60,11 @@ func ProductLogisticsChangedNotify(wxUser user_model.WxUser, dispathTime time.Ti
 	beego.BeeLogger.Debug("MessageTemplateId_ProductLogisticsChanged got: %s", templateId)
 	beego.BeeLogger.Info("TestSendingTemplatemsgController get one: %d", formIdInstance.Id)
 
-	go wx_mp.SendTemplateMessage(wxUser.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "")
+	wx_mp.SendTemplateMessage(wxUser.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "")
 	formIdInstance.Use()
 }
 
-//下单通知
+// 下单通知
 func OrderCreateNotify(wxUser user_model.WxUser, createdAt time.Time, productName, orderId, remark, statusText string, count int64, page string) {
 	formIdInstance := wx_message_model.GetOne(wxUser.Openid)
 	if formIdInstance == nil {
@@ -88,11 +88,11 @@ func OrderCreateNotify(wxUser user_model.WxUser, createdAt time.Time, productNam
 	beego.BeeLogger.Debug("MessageTemplateId_OrderCreated got: %s", templateId)
 	beego.BeeLogger.Info("TestSendingTemplatemsgController get one: %d", formIdInstance.Id)
 
-	go wx_mp.SendTemplateMessage(wxUser.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "")
+	wx_mp.SendTemplateMessage(wxUser.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, "")
 	formIdInstance.Use()
 }
 
-//提醒自用/挂单
+// 提醒自用/挂单
 func GranaryProductDealNotify(user user_model.WxUser, productName, selfUseCount, warmTip, servicePerson, emphasisKw string, page string) bool {
 	formIdInstance := wx_message_model.GetOne(user.Openid)
 	if formIdInstance == nil {
@@ -114,7 +114,7 @@ func GranaryProductDealNotify(user user_model.WxUser, productName, selfUseCount,
 	beego.BeeLogger.Debug("MessageTemplateId_ItemStatusRemind got: %s", templateId)
 	beego.BeeLogger.Info("TestSendingTemplatemsgController get one: %d", formIdInstance.Id)
 
-	go wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
+	wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
 	formIdInstance.Use()
 	return true
 }
@@ -142,7 +142,7 @@ func ProjectNewStateNotify(user user_model.WxUser, kw1, kw2, kw3, emphasisKw str
 	beego.BeeLogger.Debug("MessageTemplateId_ProjectNewStateNofity got: %s", templateId)
 	beego.BeeLogger.Info("TestSendingTemplatemsgController get one: %d", formIdInstance.Id)
 
-	go wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
+	wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
 	formIdInstance.Use()
 	return true
 }
@@ -173,7 +173,7 @@ func DeliveryNotify(user user_model.WxUser, kw1, kw2, kw3, emphasisKw string, pa
 	templateId := beego.AppConfig.String("MessageTemplateId_DeliveryNotify")
 	beego.BeeLogger.Debug("MessageTemplateId_DeliveryNotify got: %s", templateId)
 
-	go wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
+	wx_mp.SendTemplateMessage(user.Openid, templateId, page, formIdInstance.FormID, jsonTemplateData, emphasisKw)
 	formIdInstance.Use()
 	return true
 }

+ 27 - 27
go/gopath/src/fohow.com/apps/helpers/promotion_helper.go

@@ -141,34 +141,34 @@ func SetOrderPromotion(orderId string, wxUid int64) {
 				sendNums1 := nums * item.SendNums1
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd1, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
 			}
 			if item.SendProd2 > 0 && item.SendNums2 > 0 {
 				sendNums2 := nums * item.SendNums2
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd2, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
 			}
 
 			if item.SendProd3 > 0 && item.SendNums3 > 0 {
 				sendNums3 := nums * item.SendNums3
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd3, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
 			}
 
 			if item.SendProd4 > 0 && item.SendNums4 > 0 {
 				sendNums4 := nums * item.SendNums4
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd4, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums4, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums4, order.Depart)
 			}
 
 			if item.SendProd5 > 0 && item.SendNums5 > 0 {
 				sendNums5 := nums * item.SendNums5
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd5, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums5, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums5, order.Depart)
 			}
 			//赠送积分 or 代办费
 			if item.Cash > 0 {
@@ -346,34 +346,34 @@ func SetOrderPromotionPro(orderId string, wxUid int64) {
 				sendNums1 := nums * item.SendNums1
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd1, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1, order.Depart)
 			}
 			if item.SendProd2 > 0 && item.SendNums2 > 0 {
 				sendNums2 := nums * item.SendNums2
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd2, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2, order.Depart)
 			}
 
 			if item.SendProd3 > 0 && item.SendNums3 > 0 {
 				sendNums3 := nums * item.SendNums3
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd3, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3, order.Depart)
 			}
 
 			if item.SendProd4 > 0 && item.SendNums4 > 0 {
 				sendNums4 := nums * item.SendNums4
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd4, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums4, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums4, order.Depart)
 			}
 
 			if item.SendProd5 > 0 && item.SendNums5 > 0 {
 				sendNums5 := nums * item.SendNums5
 				//赠送赠品1
 				product := product_model.GetProductById(item.SendProd5, true)
-				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums5, order.Depart)
+				order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums5, order.Depart)
 			}
 			//赠送积分 or 代办费
 			if item.Cash > 0 {
@@ -394,7 +394,7 @@ func SetOrderPromotionPro(orderId string, wxUid int64) {
 	if len(promotionsArr) > 0 {
 		promotions := tool.CombineInt64ToString(promotionsArr)
 		noinvoves := tool.CombineInt64ToString(noInovceArr)
-		go order_model.UpdateOrderPromotions(promotions, noinvoves, orderId)
+		order_model.UpdateOrderPromotions(promotions, noinvoves, orderId)
 	}
 }
 
@@ -489,7 +489,7 @@ func BalanceOrderPromotion(orderId string, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd1, true)
 				if product != nil {
 					total := sendNums1 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums1, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums1, source, remark)
 				}
 			}
 			if item.SendProd2 > 0 && item.SendNums2 > 0 {
@@ -498,7 +498,7 @@ func BalanceOrderPromotion(orderId string, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd2, true)
 				if product != nil {
 					total := sendNums2 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums2, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums2, source, remark)
 				}
 			}
 
@@ -508,7 +508,7 @@ func BalanceOrderPromotion(orderId string, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd3, true)
 				if product != nil {
 					total := sendNums3 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums3, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums3, source, remark)
 				}
 			}
 
@@ -530,7 +530,7 @@ func BalanceOrderPromotion(orderId string, wxUid, depart int64) {
 	}
 }
 
-//店长申请促销
+// 店长申请促销
 func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 	beego.BeeLogger.Warn("******* ShopOrderPromotion shopApplyId:%d wxUid:%d", shopApplyId, wxUid)
 
@@ -577,7 +577,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd1, true)
 				if product != nil {
 					total := sendNums1 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums1, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums1, source, remark)
 				}
 			}
 			if item.SendProd2 > 0 && item.SendNums2 > 0 {
@@ -586,7 +586,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd2, true)
 				if product != nil {
 					total := sendNums2 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums2, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums2, source, remark)
 				}
 			}
 
@@ -596,7 +596,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd3, true)
 				if product != nil {
 					total := sendNums3 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums3, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums3, source, remark)
 				}
 			}
 
@@ -606,7 +606,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd4, true)
 				if product != nil {
 					total := sendNums4 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums4, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums4, source, remark)
 				}
 			}
 
@@ -616,7 +616,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 				product := product_model.GetProductById(item.SendProd5, true)
 				if product != nil {
 					total := sendNums5 * product.Price
-					go new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums5, source, remark)
+					new(promotion_model.Present).CreatePresent(wxUid, product.Price, total, product.Id, sendNums5, source, remark)
 				}
 			}
 
@@ -638,7 +638,7 @@ func ShopOrderPromotion(shopApplyId, wxUid, depart int64) {
 	}
 }
 
-//赠品明细写入订单
+// 赠品明细写入订单
 func PresentTransferToOrder(orderId string, wxUid int64) {
 	beego.BeeLogger.Warn("******* PresentTransferToOrder shopApplyId:%s wxUid:%d", orderId, wxUid)
 	//获取订单明细
@@ -662,7 +662,7 @@ func PresentTransferToOrder(orderId string, wxUid int64) {
 
 }
 
-//创建店铺申请订单
+// 创建店铺申请订单
 func CreateShopApplyOrder(shopAppplyId int64) {
 
 	beego.BeeLogger.Warn("begin do shopAppply id:(%d)", shopAppplyId)
@@ -726,7 +726,7 @@ func CreateShopApplyOrder(shopAppplyId int64) {
 				if product != nil {
 					delOrder = false
 					total += sendNums1 * product.Price
-					go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums1, order.Depart)
+					new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums1, order.Depart)
 
 				}
 			}
@@ -737,7 +737,7 @@ func CreateShopApplyOrder(shopAppplyId int64) {
 				if product != nil {
 					delOrder = false
 					total += sendNums2 * product.Price
-					go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums2, order.Depart)
+					new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums2, order.Depart)
 
 				}
 			}
@@ -749,7 +749,7 @@ func CreateShopApplyOrder(shopAppplyId int64) {
 				if product != nil {
 					delOrder = false
 					total += sendNums3 * product.Price
-					go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums3, order.Depart)
+					new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums3, order.Depart)
 
 				}
 			}
@@ -761,7 +761,7 @@ func CreateShopApplyOrder(shopAppplyId int64) {
 				if product != nil {
 					delOrder = false
 					total += sendNums4 * product.Price
-					go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums4, order.Depart)
+					new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums4, order.Depart)
 				}
 			}
 
@@ -772,7 +772,7 @@ func CreateShopApplyOrder(shopAppplyId int64) {
 				if product != nil {
 					delOrder = false
 					total += sendNums5 * product.Price
-					go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums5, order.Depart)
+					new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.RelateProductId, product.Price, int64(0), int64(0), product.Name, "", "", sendNums5, order.Depart)
 				}
 			}
 

+ 4 - 4
go/gopath/src/fohow.com/apps/helpers/recharge_helper.go

@@ -13,7 +13,7 @@ import (
 	// "st.com/libs/wx_mp"
 )
 
-//充值成功发放佣金
+// 充值成功发放佣金
 func PatchRechargeBalance(oId, totalFee int64, transactionId string) {
 
 	beego.BeeLogger.Warn("*******PatchRechargeBalance Begin oId:%d", oId)
@@ -63,7 +63,7 @@ func PatchRechargeBalance(oId, totalFee int64, transactionId string) {
 
 }
 
-//添加提货券记录
+// 添加提货券记录
 func recharge(wxUId, uId, c int64, rId string) {
 	source := balance_model.BALANCE_SOURCE_RECHARGE
 	item := balance_model.GetBalanceBySourceAndRId(source, rId)
@@ -72,11 +72,11 @@ func recharge(wxUId, uId, c int64, rId string) {
 	}
 	b := new(balance_model.Balance).Create(wxUId, uId, c, source, rId, fmt.Sprintf("¥%0.2f", float64(c)/100))
 	if b != nil {
-		go rechargeNotice(uId, b)
+		rechargeNotice(uId, b)
 	}
 }
 
-//提货券充值成功通知
+// 提货券充值成功通知
 func rechargeNotice(uId int64, balance *balance_model.Balance) {
 	//user := user_model.GetUserById(uId, false)
 	//openId := user.GetOpenid()

+ 2 - 2
go/gopath/src/fohow.com/apps/models/address_model/address.go

@@ -41,7 +41,7 @@ func (self *Address) SetDefault() *Address {
 		} else {
 			address.State = 0
 		}
-		go address.Save()
+		address.Save()
 	}
 	return self
 }
@@ -80,7 +80,7 @@ func GetAddressesByWxUId(wxUId int64) (items []*Address) {
 	return items
 }
 
-//根据userid, id找地址
+// 根据userid, id找地址
 func GetAddressByWxUIdAndId(wxUId, id int64) *Address {
 	item := &Address{}
 	if err := orm.NewOrm().QueryTable(item).

+ 2 - 2
go/gopath/src/fohow.com/apps/models/address_model/pick_address.go

@@ -35,7 +35,7 @@ func (self *PickAddress) SetDefault() *PickAddress {
 		} else {
 			pick_address.State = 0
 		}
-		go pick_address.Save()
+		pick_address.Save()
 	}
 	return self
 }
@@ -74,7 +74,7 @@ func GetPickAddressesByWxUId(wxUId int64) (items []*PickAddress) {
 	return items
 }
 
-//根据userid, id找地址
+// 根据userid, id找地址
 func GetPickAddressByWxUIdAndId(wxUId, id int64) *PickAddress {
 	item := &PickAddress{}
 	if err := orm.NewOrm().QueryTable(item).

+ 10 - 10
go/gopath/src/fohow.com/apps/models/order_model/order_detail.go

@@ -52,7 +52,7 @@ func (self *OrderDetail) TableName() string {
 	return order_details_tablename
 }
 
-//创建订单项
+// 创建订单项
 func (self *OrderDetail) Create(oId string, orderId, pId, relatePId, pPrice, silver, disAmount int64, pName, sizeName, colorName string,
 	pCount, depart int64) *OrderDetail {
 	item := &OrderDetail{
@@ -77,13 +77,13 @@ func (self *OrderDetail) Create(oId string, orderId, pId, relatePId, pPrice, sil
 	}
 	item.Id = id
 	if item != nil {
-		go GenerateOrderDtItem(item)
+		GenerateOrderDtItem(item)
 	}
 
 	return item
 }
 
-//创建订单项
+// 创建订单项
 func SendCreate(oId string, orderId, pId, pPrice, unitRoboBalancePrice int64, pName string,
 	pCount, depart int64) *OrderDetail {
 	item := &OrderDetail{
@@ -104,10 +104,10 @@ func SendCreate(oId string, orderId, pId, pPrice, unitRoboBalancePrice int64, pN
 	}
 	item.Id = id
 	if item != nil {
-		go GenerateOrderDtItem(item)
+		GenerateOrderDtItem(item)
 		//更新赠品已售数量
 		//sendMap := map[int64]int64{pId: pCount}
-		//go UpdateSaleNums(sendMap)
+		//UpdateSaleNums(sendMap)
 	}
 
 	return item
@@ -121,7 +121,7 @@ func (self *OrderDetail) Save() bool {
 	return true
 }
 
-//根据订单Id,获取所有订单项
+// 根据订单Id,获取所有订单项
 func GetAllDetailsOrderId(oId string, useCache bool) (items []*OrderDetail) {
 
 	k := fmt.Sprintf("order_model.GetAllDetailsOrderId(%s)", oId)
@@ -140,7 +140,7 @@ func GetAllDetailsOrderId(oId string, useCache bool) (items []*OrderDetail) {
 	return items
 }
 
-//获取商品销售统计
+// 获取商品销售统计
 func GetStaticOrderDetails(bDate, eDate time.Time, state string, isSend bool) (details []*OrderDetail) {
 
 	sql := "select sum(ot.nums) as nums ,price,ot.product_id,ot.product_name  from order_details ot left join orders o on ot.order_id=o.id where "
@@ -173,7 +173,7 @@ func GetStaticOrderDetails(bDate, eDate time.Time, state string, isSend bool) (d
 	return details
 }
 
-//根据订单Id,获取所有订单项
+// 根据订单Id,获取所有订单项
 func GetDetailsByOrderIdAndPid(oId string, pId int64) (orderDetail *OrderDetail) {
 	orderDetail = &OrderDetail{}
 	if err := orm.NewOrm().QueryTable(orderDetail).Filter("order_no", oId).Filter("product_id", pId).Filter("is_zeng", false).Limit(1).
@@ -184,7 +184,7 @@ func GetDetailsByOrderIdAndPid(oId string, pId int64) (orderDetail *OrderDetail)
 	return orderDetail
 }
 
-//根据订单Id,获取所有订单项
+// 根据订单Id,获取所有订单项
 func GetDetailsByOrderIdAndRelatePid(oId string, pId int64) int64 {
 	sql := `
 		SELECT
@@ -210,7 +210,7 @@ func GetDetailsByOrderIdAndRelatePid(oId string, pId int64) int64 {
 	return ret.Count
 }
 
-//根据订单明细ID获取明细
+// 根据订单明细ID获取明细
 func GetOrderDetailById(id int64) *OrderDetail {
 	detail := &OrderDetail{Id: id}
 	if err := orm.NewOrm().Read(detail); err != nil {

+ 10 - 10
go/gopath/src/fohow.com/libs/wx_mp/event.go

@@ -32,7 +32,7 @@ import (
 	"strconv"
 )
 
-//处理事件
+// 处理事件
 func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *mp.MixedMessage,
 	gzh *wx_gongzhonghao_model.WxGongzhonghao, resp http.ResponseWriter) error {
 	event := mixedMessage.Event
@@ -77,7 +77,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 						if cq != nil {
 							if cq.ParentSignUpChannelId > 0 {
 								wxUser.ChannelQrcodeId = cq.ParentSignUpChannelId
-								go wxUser.UpdateField("ChannelQrcodeId")
+								wxUser.UpdateField("ChannelQrcodeId")
 							}
 						} else {
 							sceId, err := strconv.ParseInt(sceStr, 10, 64)
@@ -86,7 +86,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 								if cq != nil {
 									if cq.ParentSignUpChannelId > 0 {
 										wxUser.ChannelQrcodeId = cq.ParentSignUpChannelId
-										go wxUser.UpdateField("ChannelQrcodeId")
+										wxUser.UpdateField("ChannelQrcodeId")
 									}
 								}
 							}
@@ -104,7 +104,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 				wxUser.Sex = int64(getInfo.Sex)
 				wxUser.Save()
 				if wxUser.Head == "" {
-					go wxUser.UploadHead(getInfo.HeadImageURL)
+					wxUser.UploadHead(getInfo.HeadImageURL)
 				}
 				wxUserGzh := user_model.GetWxUserGzhByWxUIdAndAppId(wxUser.Id, beego.AppConfig.String("WxMPAppId"), false)
 				if wxUserGzh == nil {
@@ -144,7 +144,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 			}
 
 			// 扫码统计
-			go afterEventSCAN(cqId, openid)
+			afterEventSCAN(cqId, openid)
 
 			// 通用返回pushAfterSub表中的设定
 			if strings.HasPrefix(eventKey, "qrscene_") {
@@ -198,7 +198,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 			cqPushAfterSubId = cq.PushAfterSubId
 		}
 
-		go afterEventSCAN(cqId, openid)
+		afterEventSCAN(cqId, openid)
 
 		// 通用返回pushAfterSub表中的设定
 		pushWath := channel_gzh_qrcode_model.GetPushAfterSubById(cqPushAfterSubId)
@@ -251,7 +251,7 @@ func HandleWithEvent(ctx *context.Context, server, openid string, mixedMessage *
 		if wxUserGzh != nil && wxUserGzh.Subscribe == 1 {
 			wxUserGzh.UnsubscribeTime = time.Now().Unix()
 			wxUserGzh.Subscribe = 0
-			go wxUserGzh.Save()
+			wxUserGzh.Save()
 		}
 	}
 	if event == "CLICK" {
@@ -338,7 +338,7 @@ func sendText(server, openid, respContent string) (text *response.Text) {
 
 }
 
-//返回图片信息
+// 返回图片信息
 func sendImg(server, openid, imgPath, appId, appSecret string) (image *response.Image) {
 	mediaId := uploadImage(imgPath, appId, appSecret)
 	if mediaId == "" {
@@ -359,8 +359,8 @@ func afterEventSCAN(sceId int64, openid string) {
 		}
 		if cst {
 			cq.ScanTimes = cq.ScanTimes + 1
-			go cq.Save()
+			cq.Save()
 		}
-		go new(channel_gzh_qrcode_model.ChannelQrcodeResult).Create(cq.Id, openid)
+		new(channel_gzh_qrcode_model.ChannelQrcodeResult).Create(cq.Id, openid)
 	}
 }

+ 15 - 15
go/gopath/src/fohow.com/libs/wx_mp/mp.go

@@ -68,8 +68,8 @@ func GetClt(appId, appSecret string) *mp.Client {
 
 }
 
-//{"access_token":"ACCESS_TOKEN","expires_in":7200}
-//该token和网页授权获取token不一样
+// {"access_token":"ACCESS_TOKEN","expires_in":7200}
+// 该token和网页授权获取token不一样
 func GetAccessToken(appId, appSecret string) string {
 	//获取access token
 	srv := getAccessTokenServer(appId, appSecret)
@@ -83,7 +83,7 @@ func GetAccessToken(appId, appSecret string) string {
 
 }
 
-//获取jsapi_ticket
+// 获取jsapi_ticket
 func GetTicket() string {
 	ticket, err := jsSDKConfigTicketSvr.Ticket()
 	if err != nil {
@@ -94,7 +94,7 @@ func GetTicket() string {
 	return ticket
 }
 
-//校验是否关注了某个公众号
+// 校验是否关注了某个公众号
 func IsSub(openId, appId, appSecret string) bool {
 	info := UserInfo(openId, appId, appSecret)
 	if info != nil {
@@ -103,14 +103,14 @@ func IsSub(openId, appId, appSecret string) bool {
 	return false
 }
 
-//是否关注主号,服务号
+// 是否关注主号,服务号
 func IsSubMajor(mpOpenId string) bool {
 	appId := beego.AppConfig.String("WxMPAppId")
 	appSecret := beego.AppConfig.String("WxMPAppSecret")
 	return IsSub(mpOpenId, appId, appSecret)
 }
 
-//是否关注了订阅号
+// 是否关注了订阅号
 func IsSubMinor(mpOpenId string) bool {
 	appId := beego.AppConfig.String("WxMPAppIdMinor")
 	appSecret := beego.AppConfig.String("WxMPAppSecretMinor")
@@ -126,7 +126,7 @@ type ReqeustMsgXmlBody struct {
 	MsgId        int64  `xml:"msg_id"`
 }
 
-//处理微信的被动消息(事件)入口
+// 处理微信的被动消息(事件)入口
 func HandleWithRequest(ctx *context.Context, gzh *wx_gongzhonghao_model.WxGongzhonghao) error {
 	r := ctx.Request
 	resp := ctx.ResponseWriter
@@ -151,11 +151,11 @@ func HandleWithRequest(ctx *context.Context, gzh *wx_gongzhonghao_model.WxGongzh
 	//if wxUser != nil {
 	//wxUser.LastConversationAt不是公众号的,是记录小程序的
 	//wxUser.LastConversationAt = time.Now().Unix()
-	//go wxUser.UpdateField("LastConversationAt")
+	//wxUser.UpdateField("LastConversationAt")
 	wxUserGzh := user_model.GetWxUserGzhByOpenId(openid, false)
 	if wxUserGzh != nil {
 		wxUserGzh.LastConversationAt = time.Now().Unix()
-		go wxUserGzh.UpdateField("LastConversationAt")
+		wxUserGzh.UpdateField("LastConversationAt")
 	}
 	//}
 
@@ -172,14 +172,14 @@ func HandleWithRequest(ctx *context.Context, gzh *wx_gongzhonghao_model.WxGongzh
 	return nil
 }
 
-//默认处理
+// 默认处理
 func HandleWithDefault(server, openid string, mixedMessage *mp.MixedMessage,
 	gzh *wx_gongzhonghao_model.WxGongzhonghao, resp http.ResponseWriter) error {
 	// return errors.New("success")
 	return nil
 }
 
-//处理图片消息
+// 处理图片消息
 func HandleWithImage(server, openid string, mixedMessage *mp.MixedMessage,
 	gzh *wx_gongzhonghao_model.WxGongzhonghao, resp http.ResponseWriter) error {
 	ret := sendText(server, openid, "图片已收到")
@@ -278,8 +278,8 @@ func HandleWithImage(server, openid string, mixedMessage *mp.MixedMessage,
 // 		noticeContent = "感谢您的到来,点击进入夺宝"
 // 	}
 // 	// content := fmt.Sprintf("<a href='%s'>%s</a>", url, noticeContent)
-// 	// go SendCustomMsgText(appId, appSecret, openId, content, "")
-// 	go TmplmsgWaitingTask(openId, url, "", noticeContent, "希客商城", "")
+// 	// SendCustomMsgText(appId, appSecret, openId, content, "")
+// 	TmplmsgWaitingTask(openId, url, "", noticeContent, "希客商城", "")
 // }
 
 // func afterEventSCAN(sId int64, openid string) {
@@ -293,8 +293,8 @@ func HandleWithImage(server, openid string, mixedMessage *mp.MixedMessage,
 // 		}
 // 		if cst {
 // 			cq.ScanTimes = cq.ScanTimes + 1
-// 			go cq.Save()
+// 			cq.Save()
 // 		}
-// 		go new(channel_qrcode_model.ChannelQrcodeResult).Create(cq.Id, openid)
+// 		new(channel_qrcode_model.ChannelQrcodeResult).Create(cq.Id, openid)
 // 	}
 // }