fix
This commit is contained in:
parent
417ee59b39
commit
7fd80315b2
|
@ -34,7 +34,7 @@ func NewGetSizeByProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
|||
func (l *GetSizeByProductLogic) GetSizeByProduct() (resp *types.Response) {
|
||||
//获取所有网站目录
|
||||
tagsModel := model.NewFsTagsModel(l.svcCtx.MysqlConn)
|
||||
tagsList, err := tagsModel.ListAllByLevelStatus(l.ctx, constants.TYPE_WEBSITE, 1)
|
||||
tagsList, err := tagsModel.GetAllByLevel(l.ctx, constants.TYPE_WEBSITE)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get website tags")
|
||||
|
|
12
utils/placeholder/placeholder.go
Normal file
12
utils/placeholder/placeholder.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package sql_placeholder
|
||||
|
||||
import "strings"
|
||||
|
||||
// 获取对应长度占位符号
|
||||
func GetSqlPlaceholder(l uint) string {
|
||||
s := make([]string, 0, int(l))
|
||||
for i := 0; i < int(l); i++ {
|
||||
s = append(s, "?")
|
||||
}
|
||||
return strings.Join(s, ",")
|
||||
}
|
Loading…
Reference in New Issue
Block a user