lyhzzz 1 maand geleden
bovenliggende
commit
648a137334

+ 2 - 2
src/main/java/com/fdkankan/ucenter/entity/Case.java

@@ -122,8 +122,8 @@ public class Case implements Serializable {
 
 
     @TableField(exist = false)
-    private String iconId;
+    private Integer iconId;
 
     @TableField(exist = false)
-    private String feedbackOptionId;
+    private Integer feedbackOptionId;
 }

+ 4 - 4
src/main/java/com/fdkankan/ucenter/service/impl/CaseServiceImpl.java

@@ -27,11 +27,11 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, Case> implements I
         if(StringUtils.isNotBlank(caseEntity.getTypeId())){
             wrapper.eq(Case::getTypeId,caseEntity.getTypeId());
         }
-        if(StringUtils.isNotBlank(caseEntity.getIconId())){
-            wrapper.apply("JSON_CONTAINS(icon_ids, "+caseEntity.getIconId()+")");
+        if(caseEntity.getIconId() !=null){
+            wrapper.apply("JSON_CONTAINS(icon_ids, '"+caseEntity.getIconId()+"')");
         }
-        if(StringUtils.isNotBlank(caseEntity.getFeedbackOptionId())){
-            wrapper.apply("JSON_CONTAINS(feedback_option_ids, "+caseEntity.getFeedbackOptionId()+")");
+        if(caseEntity.getFeedbackOptionId()!=null){
+            wrapper.apply("JSON_CONTAINS(feedback_option_ids, '"+caseEntity.getFeedbackOptionId()+"')");
         }
         wrapper.eq(Case::getLanguage,caseEntity.getLanguage());
         wrapper.eq(Case::getIsPublic,1);