This commit is contained in:
laodaming 2023-06-09 20:06:24 +08:00
parent 417ee59b39
commit 7fd80315b2
2 changed files with 13 additions and 1 deletions

View File

@ -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")

View 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, ",")
}