|
|
@@ -17,6 +17,7 @@ import (
|
|
|
var (
|
|
|
vDicCurrency = enumdicitem{data: map[int32]string{}, nType: 2}
|
|
|
vDic = enumdicitem{data: map[int32]string{}, nType: 1}
|
|
|
+ vDicCardName = enumdicitem{data: map[int32]string{}, nType: 3}
|
|
|
)
|
|
|
|
|
|
// IGetEnumdicName 获取字典名称接口
|
|
|
@@ -44,14 +45,16 @@ func (r *enumdicitem) buildSql() string {
|
|
|
" where t.enumitemstatus = 1"
|
|
|
sqlId.AndEx("t.enumdiccode", "goodsunit", r.nType == 1)
|
|
|
sqlId.AndEx("t.enumdiccode", "currency", r.nType == 2)
|
|
|
+ sqlId.AndEx("t.enumdiccode", "certificatetype", r.nType == 3)
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
func init() {
|
|
|
go func() {
|
|
|
- time.Sleep(time.Second * 1)
|
|
|
+ time.Sleep(time.Second * 6)
|
|
|
vDicCurrency.load()
|
|
|
vDic.load()
|
|
|
+ vDicCardName.load()
|
|
|
}()
|
|
|
}
|
|
|
|
|
|
@@ -120,3 +123,8 @@ func GetEnumDicitemName(id int32) string {
|
|
|
func GetCurrencyName(id int32) string {
|
|
|
return getDicEnumName(&vDicCurrency, id)
|
|
|
}
|
|
|
+
|
|
|
+// GetCardName 获取卡类型名称
|
|
|
+func GetCardName(cardId int32) string {
|
|
|
+ return getDicEnumName(&vDicCardName, cardId)
|
|
|
+}
|