2 changed files with 37 additions and 2 deletions
			
			
		| @ -0,0 +1,27 @@ | ||||
| package com.hnac.gglm.bigmodel.maintenance.constants; | ||||
| 
 | ||||
| import lombok.Getter; | ||||
| 
 | ||||
| /** | ||||
|  * @Author: ypj | ||||
|  * @Date: 2024/10/10 10:21 | ||||
|  */ | ||||
| @Getter | ||||
| public enum CommentType { | ||||
|     CRITICAL(0, "差评"), | ||||
|     PRAISE(1, "好评"); | ||||
|     private final int code; | ||||
|     private final String msg; | ||||
|     CommentType(int code, String msg) { | ||||
|         this.code = code; | ||||
|         this.msg = msg; | ||||
|     } | ||||
|     public static CommentType getInstance(int code) { | ||||
|         for (CommentType item : CommentType.values()) { | ||||
|             if (item.getCode() == code) { | ||||
|                 return item; | ||||
|             } | ||||
|         } | ||||
|         return null; | ||||
|     } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in new issue