info
This commit is contained in:
		
							parent
							
								
									f9ae25ace5
								
							
						
					
					
						commit
						a6cdd880c8
					
				@ -53,7 +53,7 @@ func (m *FsUserInfoModel) MergeMetadata(userId int64, meta any) error {
 | 
				
			|||||||
func (m *FsUserInfoModel) GetDefaultProfile(ctx context.Context, tname string) (map[string]any, error) {
 | 
					func (m *FsUserInfoModel) GetDefaultProfile(ctx context.Context, tname string) (map[string]any, error) {
 | 
				
			||||||
	var baseinfo map[string]any
 | 
						var baseinfo map[string]any
 | 
				
			||||||
	condUser := "user_id = 0 and guest_id = 0"
 | 
						condUser := "user_id = 0 and guest_id = 0"
 | 
				
			||||||
	rawsql := fmt.Sprintf("select JSON_EXTRACT(metadata,'$.*') as query  from %s where %s and module = 'profile' order by ctime DESC limit 1", tname, condUser)
 | 
						rawsql := fmt.Sprintf("select JSON_EXTRACT(metadata,'$') as query  from %s where %s and module = 'profile' order by ctime DESC limit 1", tname, condUser)
 | 
				
			||||||
	err := m.db.WithContext(ctx).Raw(rawsql).Take(&baseinfo).Error
 | 
						err := m.db.WithContext(ctx).Raw(rawsql).Take(&baseinfo).Error
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user