|
|
@@ -1,6 +1,7 @@
|
|
|
package models
|
|
|
|
|
|
import (
|
|
|
+ "encoding/hex"
|
|
|
"mtp2_if/db"
|
|
|
"mtp2_if/utils"
|
|
|
"strings"
|
|
|
@@ -960,7 +961,7 @@ func (r *MyBargainApply) buildSql() string {
|
|
|
(t.APPLYQTY / 100) QTY,
|
|
|
to_char(t.APPLYTIME, 'yyyy-mm-dd hh24:mi:ss') APPLYTIME1,
|
|
|
to_char(t.WRBARGAINID) WRBARGAINID1,
|
|
|
- t.*,
|
|
|
+ t.*
|
|
|
FROM WRTrade_BargainApply t
|
|
|
LEFT JOIN UserAccount ua ON t.MATCHUSERID = ua.userid
|
|
|
WHERE t.marketid=67201
|
|
|
@@ -1020,7 +1021,7 @@ func (r *MyDelistingApply) buildSql() string {
|
|
|
SELECT
|
|
|
ua.accountname BUYUSERNAME,
|
|
|
to_char(t.APPLYTIME, 'yyyy-mm-dd hh24:mi:ss') APPLYTIME1,
|
|
|
- t.*,
|
|
|
+ t.*
|
|
|
FROM GZ_SellDelistingApply t
|
|
|
LEFT JOIN UserAccount ua ON t.BUYUSERID = ua.userid
|
|
|
WHERE t.marketid=67201
|
|
|
@@ -1049,7 +1050,7 @@ func (r *MyDelistingApply) GetDataByPage() (interface{}, error, int, int, int) {
|
|
|
type GZGoods struct {
|
|
|
ZSALLPROPERTIES string `json:"-" xorm:"ZSALLPROPERTIES"` // 商品(查询字段-模糊查询)
|
|
|
SELLUSERNAME string `json:"sellusername" xorm:"SELLUSERNAME"` // 账户名称(机构名称)
|
|
|
- SELLMOBILE string `json:"sellmobile" xorm:"SELLMOBILE"` // 手机号码(加密存储)
|
|
|
+ SELLMOBILE string `json:"-" xorm:"SELLMOBILE"` // 手机号码(加密存储)
|
|
|
ZSCATEGORYDISPLAY string `json:"zscategorydisplay" xorm:"ZSCATEGORYDISPLAY"` //
|
|
|
ZSCURRENCYTYPEDISPLAY string `json:"zscurrencytypedisplay" xorm:"ZSCURRENCYTYPEDISPLAY"` //
|
|
|
ZSCURRENCYTYPEDISPLAYUNIT string `json:"zscurrencytypedisplayunit" xorm:"ZSCURRENCYTYPEDISPLAYUNIT"` //
|
|
|
@@ -1118,17 +1119,29 @@ type GZGoods struct {
|
|
|
ZSCZCOLOR2TYPE int32 `json:"zsczcolor2type" xorm:"ZSCZCOLOR2TYPE"` // 彩钻颜色2 - 枚举”ZSCZColor2Type“ - 类型:5
|
|
|
ZSCZCOLOR3TYPE int32 `json:"zsczcolor3type" xorm:"ZSCZCOLOR3TYPE"` // 彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5
|
|
|
ISVALID int32 `json:"isvalid" xorm:"ISVALID"` // 是否有效 - 0:无效 1:有效
|
|
|
+
|
|
|
+ MOBILE string `json:"mobile"` // 手机号码
|
|
|
}
|
|
|
|
|
|
func (r *GZGoods) calc() {
|
|
|
-
|
|
|
+ key, _ := hex.DecodeString(utils.AESSecretKey)
|
|
|
+ if len(r.SELLMOBILE) > 0 {
|
|
|
+ // 手机号码解密
|
|
|
+ if phonenum, err := hex.DecodeString(r.SELLMOBILE); err == nil { // hex -> []byte
|
|
|
+ if mobile, err := utils.AESDecrypt(phonenum, key); err == nil {
|
|
|
+ r.MOBILE = string(mobile)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func (r *GZGoods) buildSql() string {
|
|
|
var sqlId utils.SQLVal = `
|
|
|
SELECT
|
|
|
- t.*
|
|
|
+ t.*,
|
|
|
+ u.MOBILE
|
|
|
FROM View_GZ_WRStandard_Ex_Query t
|
|
|
+ LEFT JOIN userinfo u ON u.USERID = t.USERID
|
|
|
WHERE GOODSNO = '%v'
|
|
|
`
|
|
|
sqlId.FormatParam(r.GOODSNO)
|