|
|
@@ -33,7 +33,7 @@ type ErmcpDeliveryGoods struct {
|
|
|
REMARK string `json:"remark" xorm:"'REMARK'"` // 备注
|
|
|
|
|
|
EnumdicName string `json:"enumdicname"` // 现货品种单位名称
|
|
|
- ExcludeCfg int32 `json:"-"` // 排除已配置项 1-排除
|
|
|
+ ExcludeCfg int32 `json:"-"` // 排除已配置的业务类型商品 1-套保 2-套利
|
|
|
}
|
|
|
|
|
|
func (r *ErmcpDeliveryGoods) calc() {
|
|
|
@@ -61,8 +61,8 @@ func (r *ErmcpDeliveryGoods) buildSql() string {
|
|
|
" WHERE 1 = 1"
|
|
|
sqlId.AndEx("t.AREAUSERID", r.AREAUSERID, r.AREAUSERID > 0)
|
|
|
sqlId.AndEx("t.DELIVERYGOODSID", r.DELIVERYGOODSID, r.DELIVERYGOODSID > 0)
|
|
|
- if r.ExcludeCfg == 1 {
|
|
|
- sqlId.Join(" and t.deliverygoodsid not in(select distinct deliverygoodsid from ermcp_bizgroupspotgoods)")
|
|
|
+ if r.ExcludeCfg > 0 {
|
|
|
+ sqlId.Join(fmt.Sprintf(" and t.deliverygoodsid not in(select distinct deliverygoodsid from ermcp_bizgroupspotgoods where biztype = %v)", r.ExcludeCfg))
|
|
|
}
|
|
|
return sqlId.String()
|
|
|
}
|