This commit is contained in:
邹宗楠
2022-12-16 10:20:28 +08:00
parent 49e926e9cf
commit 65ce12074a
3 changed files with 7 additions and 8 deletions

View File

@@ -202,7 +202,7 @@ func (t *TempServer) DeleteTemp(id int, userId string) error {
}
// QueryTempList 查询用户模板
func (t *TempServer) QueryTempList(userId, printSn string) ([]*tempModel.SystemTemp, error) {
func (t *TempServer) QueryTempList(userId, printSn string) (map[string][]*tempModel.SystemTemp, error) {
userList, err := dao.SelectUserTemp(userId, printSn)
if err != nil {
return nil, err
@@ -213,8 +213,11 @@ func (t *TempServer) QueryTempList(userId, printSn string) ([]*tempModel.SystemT
if err != nil {
return nil, err
}
userList = append(userList, systemTemp...)
return userList, nil
tempMap := make(map[string][]*tempModel.SystemTemp, 0)
tempMap["user_temp"] = userList
tempMap["system_temp"] = systemTemp
return tempMap, nil
}
// QueryPrintTempByPrintNo 根据打印机id查询打印机