2 Ревизии d16cbcc943 ... c120199cda

Автор SHA1 Съобщение Дата
  abiao c120199cda add race and occupation to user info преди 1 месец
  abiao 03226525a0 修改微信支付 преди 2 месеца

+ 36 - 0
.gitignore

@@ -0,0 +1,36 @@
+# IDE and editor files
+.idea/
+.vscode/
+.claude/
+*.iml
+.DS_Store
+
+# Go environment files
+.envrc
+gopls.mod
+go.work
+go.work.sum
+
+# Log files
+*.log
+logs/
+
+# Build output
+/build
+/pkg
+/bin
+/dist
+
+# Configuration files (local)
+conf/app.conf
+
+# Other
+*.dat
+*.out
+*.pyc
+*.pyo
+.cache/
+
+# Project specific
+pullcoding.sh
+clearlog.sh

+ 4 - 1
go/gopath/src/fohow.com/.gitignore

@@ -1,7 +1,10 @@
 .idea
 .cache
 .DS_Store
-
+/.claude
+/.vscode
+/.envrc
+gopls.mod
 *.iml
 *.log
 *.dat

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

@@ -573,6 +573,8 @@ func (self *UserController) UpdateUserInfo() {
 	nickName := self.GetString("nickname")
 	birthday := self.GetString("birthday")
 	sex, sexErr := self.GetInt64("sex")
+	race := self.GetString("race")
+	occupation := self.GetString("occupation")
 	//qq := self.GetString("qq")
 
 	user := self.GetCurrentUser(false)
@@ -592,6 +594,12 @@ func (self *UserController) UpdateUserInfo() {
 		t, _ := time.Parse("2006-01-02", birthday)
 		user.Birthday = t
 	}
+	if race != "" {
+		user.Race = race
+	}
+	if occupation != "" {
+		user.Occupation = occupation
+	}
 	user.Nickname = nickName
 	wxUser.Nickname = nickName
 	user.Save()

+ 2 - 0
go/gopath/src/fohow.com/apps/models/user_model/user.go

@@ -37,6 +37,8 @@ type User struct {
 	Province    string    `orm:"column(province);null"                          json:"-"`        // varchar(20)
 	City        string    `orm:"column(city);null"                              json:"-"`        // varchar(20)
 	Sex         int64     `orm:"column(sex);null"                               json:"sex"`      // int(11)
+	Race        string    `orm:"column(race);null"                              json:"race"`
+	Occupation  string    `orm:"column(occupation);null"                        json:"occupation"`
 	Head        string    `orm:"column(head)"     json:"head"`
 	Birthday    time.Time `orm:"column(birthday);null;type(datetime)"          json:"birthday"`
 	InviteId    int64     `orm:"column(invite_id);null"                         json:"invite_id"` // int(11)

+ 18 - 13
go/gopath/src/fohow.com/libs/wx_mp/pay.go

@@ -4,6 +4,7 @@ import (
 	// "encoding/json"
 	"encoding/xml"
 	"fmt"
+
 	"fohow.com/apps/models/order_model"
 
 	// "io/ioutil"
@@ -14,6 +15,7 @@ import (
 
 	"github.com/astaxie/beego"
 	"github.com/uuid"
+
 	// "github.com/astaxie/beego/context"
 	"github.com/chanxuehong/wechat/mch"
 	// "github.com/chanxuehong/wechat/mch/mmpaymkttransfers"
@@ -113,24 +115,27 @@ type PayResult struct {
 	FeeType            string   `xml:"fee_type"`             //货币种类
 	CashFee            string   `xml:"cash_fee"`             //cash_fee
 	CashFeeType        string   `xml:"cash_fee_type"`        //现金支付货币类型
-	CouponFee          string   `xml:"coupon_fee"`           //提货券或立减优惠金额
-	CouponCount        string   `xml:"coupon_count"`         //提货券或立减优惠使用数量
+	CouponFee          string   `xml:"coupon_fee"`           //代金券或立减优惠金额
+	CouponCount        string   `xml:"coupon_count"`         //代金券或立减优惠使用数量
 
 	TransactionId string `xml:"transaction_id"` //微信支付订单号
 	OutTradeNO    string `xml:"out_trade_no"`   //商户订单号
 	Attach        string `xml:"attach"`         // 商家数据包
 	TimeEnd       string `xml:"time_end"`       // 支付完成时间 yyyyMMddHHmmss
-	//coupon_id_$n
-	//coupon_fee_$na
-	//新增 coupon_fee
-	CouponFee0 string `xml:"coupon_fee_0"` //单个提货券支付金额,$n为下标,从0开始编号
-	CouponId0  string `xml:"coupon_id_0"`  //提货券ID,$n为下标,从0开始编号
-	CouponFee1 string `xml:"coupon_fee_1"` //单个提货券支付金额,$n为下标,从0开始编号
-	CouponId1  string `xml:"coupon_id_1"`  //提货券ID,$n为下标,从0开始编号
-	CouponFee2 string `xml:"coupon_fee_2"` //单个提货券支付金额,$n为下标,从0开始编号
-	CouponId2  string `xml:"coupon_id_2"`  //提货券ID,$n为下标,从0开始编号
-	CouponFee3 string `xml:"coupon_fee_3"` //单个提货券支付金额,$n为下标,从0开始编号
-	CouponId3  string `xml:"coupon_id_3"`  //提货券ID,$n为下标,从0开始编号
+
+	// 代金券相关字段
+	CouponFee0 string `xml:"coupon_fee_0"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId0  string `xml:"coupon_id_0"`  //代金券ID,$n为下标,从0开始编号
+	CouponFee1 string `xml:"coupon_fee_1"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId1  string `xml:"coupon_id_1"`  //代金券ID,$n为下标,从0开始编号
+	CouponFee2 string `xml:"coupon_fee_2"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId2  string `xml:"coupon_id_2"`  //代金券ID,$n为下标,从0开始编号
+	CouponFee3 string `xml:"coupon_fee_3"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId3  string `xml:"coupon_id_3"`  //代金券ID,$n为下标,从0开始编号
+	CouponFee4 string `xml:"coupon_fee_4"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId4  string `xml:"coupon_id_4"`  //代金券ID,$n为下标,从0开始编号
+	CouponFee5 string `xml:"coupon_fee_5"` //单个代金券支付金额,$n为下标,从0开始编号
+	CouponId5  string `xml:"coupon_id_5"`  //代金券ID,$n为下标,从0开始编号
 }
 
 // 获取jsSDK微信支付需要的数据