|
@@ -733,6 +733,9 @@ func GetActivitySpecialSearcheList(user *models.WxUserItem, condition string, st
|
|
|
var conditionSpecil string
|
|
|
var pars, parsSpecil []interface{}
|
|
|
keyword := keywords
|
|
|
+ if user.UserId == 0 {
|
|
|
+ conditionSpecil += ` AND art.activity_id = 0 ` // 未登录的用户不查看专项调研活动 v12.2.1
|
|
|
+ }
|
|
|
if keywords != "" {
|
|
|
keywords = "%" + keywords + "%"
|
|
|
conditionSpecil += ` AND art.days > 0 AND (art.research_theme LIKE ? OR art.label LIKE ? OR art.industrial_name LIKE ? OR art.industrial_subject_name LIKE ? ) `
|
|
@@ -1390,7 +1393,6 @@ func GetChartPermissionSpecialSurplusByCompany(companyId int) (userType int, tri
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 清零初始化用-去掉了正式用户的判断
|
|
|
func GetChartPermissionSpecialSurplusByCompanyForInit(companyId int) (userType int, tripRemaining int, mapChartName map[string]int, err error) {
|
|
|
companyDetail, e := models.GetCompanyDetailByIdGroup(companyId)
|
|
@@ -1405,7 +1407,7 @@ func GetChartPermissionSpecialSurplusByCompanyForInit(companyId int) (userType i
|
|
|
//}
|
|
|
|
|
|
//chartMap := map[int]string{utils.YI_YAO_ID:utils.YI_YAO_NAME, utils.XIAO_FEI_ID:utils.XIAO_FEI_NAME, utils.KE_JI_ID:utils.KE_JI_NAME, utils.ZHI_ZAO_ID:utils.ZHI_ZAO_NAME}
|
|
|
- chartNumMap := map[int]int{utils.YI_YAO_ID:0, utils.XIAO_FEI_ID:0, utils.KE_JI_ID:0, utils.ZHI_ZAO_ID:0}
|
|
|
+ chartNumMap := map[int]int{utils.YI_YAO_ID: 0, utils.XIAO_FEI_ID: 0, utils.KE_JI_ID: 0, utils.ZHI_ZAO_ID: 0}
|
|
|
//var packageType int
|
|
|
userType, _, _ = GetUserType(companyId)
|
|
|
var condition string
|
|
@@ -1490,7 +1492,7 @@ func GetChartPermissionSpecialSurplusByCompanyForInit(companyId int) (userType i
|
|
|
mapPermissionNameTrip[v.ChartPermissionName] += v.BillDetailed
|
|
|
}
|
|
|
for _, v := range chartList {
|
|
|
- if _, ok := chartNumMap[v.ChartPermissionId]; ok{
|
|
|
+ if _, ok := chartNumMap[v.ChartPermissionId]; ok {
|
|
|
//如果是升级则加点
|
|
|
if _, ok := mapUpgradeId[v.ChartPermissionId]; ok {
|
|
|
mapChartName[v.PermissionName] = 5 + mapPermissionNameTrip[v.PermissionName]
|
|
@@ -1527,7 +1529,7 @@ func GetChartPermissionSpecialSurplusByCompanyForInitTotal(companyId int) (userT
|
|
|
//}
|
|
|
|
|
|
//chartMap := map[int]string{utils.YI_YAO_ID:utils.YI_YAO_NAME, utils.XIAO_FEI_ID:utils.XIAO_FEI_NAME, utils.KE_JI_ID:utils.KE_JI_NAME, utils.ZHI_ZAO_ID:utils.ZHI_ZAO_NAME}
|
|
|
- chartNumMap := map[int]int{utils.YI_YAO_ID:0, utils.XIAO_FEI_ID:0, utils.KE_JI_ID:0, utils.ZHI_ZAO_ID:0}
|
|
|
+ chartNumMap := map[int]int{utils.YI_YAO_ID: 0, utils.XIAO_FEI_ID: 0, utils.KE_JI_ID: 0, utils.ZHI_ZAO_ID: 0}
|
|
|
//var packageType int
|
|
|
userType, _, _ = GetUserType(companyId)
|
|
|
var condition string
|
|
@@ -1612,7 +1614,7 @@ func GetChartPermissionSpecialSurplusByCompanyForInitTotal(companyId int) (userT
|
|
|
mapPermissionNameTrip[v.ChartPermissionName] += v.BillDetailed
|
|
|
}
|
|
|
for _, v := range chartList {
|
|
|
- if _, ok := chartNumMap[v.ChartPermissionId]; ok{
|
|
|
+ if _, ok := chartNumMap[v.ChartPermissionId]; ok {
|
|
|
//如果是升级则加点
|
|
|
if _, ok := mapUpgradeId[v.ChartPermissionId]; ok {
|
|
|
mapChartName[v.PermissionName] = 5 + mapPermissionNameTrip[v.PermissionName]
|
|
@@ -1633,4 +1635,4 @@ func GetChartPermissionSpecialSurplusByCompanyForInitTotal(companyId int) (userT
|
|
|
}
|
|
|
|
|
|
return
|
|
|
-}
|
|
|
+}
|