zou.yingbin 4 năm trước cách đây
mục cha
commit
1847b307be
5 tập tin đã thay đổi với 48 bổ sung0 xóa
  1. 1 0
      controllers/qhjPCWeb/qryQhjPCWeb.go
  2. 14 0
      docs/docs.go
  3. 14 0
      docs/swagger.json
  4. 10 0
      docs/swagger.yaml
  5. 9 0
      models/qhj.go

+ 1 - 0
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -56,6 +56,7 @@ func QueryCustomerInfo(c *gin.Context) {
 		INCLUDESUB   int32  `form:"includesub"`                               // 是否包含子级
 	}{}
 	a.DoBindReq(&req)
+	// Tips: 手机号码是加密存储的, 做不了模糊匹配, 加了又去掉了
 	m := models.QhjMgrCustomer{USERID: req.USERID, USERINFOTYPE: req.USERINFOTYPE, QUERYTYPE: req.QUERYTYPE,
 		CUSTOMERNAME: req.CUSTOMERNAME, NICKNAME: req.NICKNAME, IncludeSub: req.INCLUDESUB}
 	a.DoGetDataI(&m)

+ 14 - 0
docs/docs.go

@@ -8038,6 +8038,12 @@ var doc = `{
                         "in": "query"
                     },
                     {
+                        "type": "string",
+                        "description": "手机号码(模糊匹配)",
+                        "name": "mobile",
+                        "in": "query"
+                    },
+                    {
                         "type": "integer",
                         "description": "是否包含子级 1-包含",
                         "name": "includesub",
@@ -23724,6 +23730,10 @@ var doc = `{
                     "description": "LogID(SEQ_QHJ_RSTRIGGERLOG)",
                     "type": "string"
                 },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
                 "regularlycycle": {
                     "description": "定投频率 - 1:每周 2:每月",
                     "type": "integer"
@@ -23849,6 +23859,10 @@ var doc = `{
                     "description": "下次触发数量 [按小数位放大值]",
                     "type": "number"
                 },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
                 "regularlycycle": {
                     "description": "定投频率 - 1:每周 2:每月",
                     "type": "integer"

+ 14 - 0
docs/swagger.json

@@ -8022,6 +8022,12 @@
                         "in": "query"
                     },
                     {
+                        "type": "string",
+                        "description": "手机号码(模糊匹配)",
+                        "name": "mobile",
+                        "in": "query"
+                    },
+                    {
                         "type": "integer",
                         "description": "是否包含子级 1-包含",
                         "name": "includesub",
@@ -23708,6 +23714,10 @@
                     "description": "LogID(SEQ_QHJ_RSTRIGGERLOG)",
                     "type": "string"
                 },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
                 "regularlycycle": {
                     "description": "定投频率 - 1:每周 2:每月",
                     "type": "integer"
@@ -23833,6 +23843,10 @@
                     "description": "下次触发数量 [按小数位放大值]",
                     "type": "number"
                 },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
                 "regularlycycle": {
                     "description": "定投频率 - 1:每周 2:每月",
                     "type": "integer"

+ 10 - 0
docs/swagger.yaml

@@ -10410,6 +10410,9 @@ definitions:
       logid:
         description: LogID(SEQ_QHJ_RSTRIGGERLOG)
         type: string
+      qtydecimalplace:
+        description: 成交量小数位
+        type: integer
       regularlycycle:
         description: 定投频率 - 1:每周 2:每月
         type: integer
@@ -10503,6 +10506,9 @@ definitions:
       nexttriggerqty:
         description: 下次触发数量 [按小数位放大值]
         type: number
+      qtydecimalplace:
+        description: 成交量小数位
+        type: integer
       regularlycycle:
         description: 定投频率 - 1:每周 2:每月
         type: integer
@@ -18941,6 +18947,10 @@ paths:
         in: query
         name: nickname
         type: string
+      - description: 手机号码(模糊匹配)
+        in: query
+        name: mobile
+        type: string
       - description: 是否包含子级 1-包含
         in: query
         name: includesub

+ 9 - 0
models/qhj.go

@@ -210,6 +210,7 @@ type QhjRStrategy struct {
 	GOODUNITID              int32   `json:"goodunitid"  xorm:"'GOODUNITID'"`                         // 定投商品单位id
 	CURRENCYID              int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                         // 币种id
 	DECIMALPLACE            int32   `json:"decimalplace"  xorm:"'DECIMALPLACE'"`                     // 商品报价小数位
+	QTYDECIMALPLACE         int     `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`               // 成交量小数位
 
 	USERNAME     string `json:"username"`     // 用户名称(userid对应的名称)
 	ACCOUNTNAME  string `json:"accountname"`  // 账号名称(ACCOUNTID对应的名称)
@@ -223,6 +224,7 @@ func (r *QhjRStrategy) calc() {
 	r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
+	ZoomByDecimal(r.QTYDECIMALPLACE, &r.TRIGGERTOTALQTY, &r.NEXTTRIGGERQTY)
 }
 
 func (r *QhjRStrategy) buildSql() string {
@@ -252,6 +254,7 @@ func (r *QhjRStrategy) buildSql() string {
 		"       g.goodscode," +
 		"       g.goodsname," +
 		"       g.decimalplace," +
+		"       g.qtydecimalplace," +
 		"       g.goodunitid," +
 		"       ta.accountname" +
 		"  FROM QHJ_REGULARLYSTRATEGY t" +
@@ -296,6 +299,7 @@ type QhjRSTriggerLog struct {
 	GOODUNITID          int32   `json:"goodunitid"  xorm:"'GOODUNITID'"`                 // 定投商品单位id
 	CURRENCYID          int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                 // 币种id
 	DECIMALPLACE        int32   `json:"decimalplace"  xorm:"'DECIMALPLACE'"`             // 商品报价小数位
+	QTYDECIMALPLACE     int     `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`       // 成交量小数位
 
 	USERNAME     string `json:"username"`     // 用户名称(userid对应的名称)
 	ACCOUNTNAME  string `json:"accountname"`  // 账号名称(ACCOUNTID对应的名称)
@@ -307,6 +311,10 @@ func (r *QhjRSTriggerLog) calc() {
 	r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
+	ZoomByDecimal(r.QTYDECIMALPLACE, &r.TRIGGERQTY)
+	if r.REGULARLYMODE == 1 {
+		ZoomByDecimal(r.QTYDECIMALPLACE, &r.REGULARLYMODEVALUE)
+	}
 }
 
 func (r *QhjRSTriggerLog) buildSql() string {
@@ -329,6 +337,7 @@ func (r *QhjRSTriggerLog) buildSql() string {
 		"        g.goodscode," +
 		"        g.goodsname," +
 		"        g.decimalplace," +
+		"        g.qtydecimalplace," +
 		"        g.goodunitid," +
 		"        ta.accountname," +
 		"        ta.currencyid" +