Quellcode durchsuchen

提示信息-增加纯文本字段

Zhaops vor 6 Jahren
Ursprung
Commit
332e1412f5

+ 36 - 12
icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -65,6 +65,11 @@ public class IntroduceDetail implements Serializable {
      */
     private String content;
 
+    /**
+     * 提示明细内容-纯文本
+     */
+    private String text;
+
     /**
      * 提示明细序号
      */
@@ -82,6 +87,7 @@ public class IntroduceDetail implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -89,6 +95,7 @@ public class IntroduceDetail implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -96,6 +103,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -103,6 +111,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -110,6 +119,7 @@ public class IntroduceDetail implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -117,6 +127,7 @@ public class IntroduceDetail implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public Long getIntroduceId() {
         return introduceId;
     }
@@ -124,6 +135,7 @@ public class IntroduceDetail implements Serializable {
     public void setIntroduceId(Long introduceId) {
         this.introduceId = introduceId;
     }
+
     public String getTitle() {
         return title;
     }
@@ -131,6 +143,7 @@ public class IntroduceDetail implements Serializable {
     public void setTitle(String title) {
         this.title = title;
     }
+
     public String getContent() {
         return content;
     }
@@ -138,6 +151,15 @@ public class IntroduceDetail implements Serializable {
     public void setContent(String content) {
         this.content = content;
     }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
     public Integer getOrderNo() {
         return orderNo;
     }
@@ -145,6 +167,7 @@ public class IntroduceDetail implements Serializable {
     public void setOrderNo(Integer orderNo) {
         this.orderNo = orderNo;
     }
+
     public Integer getPosition() {
         return position;
     }
@@ -156,17 +179,18 @@ public class IntroduceDetail implements Serializable {
     @Override
     public String toString() {
         return "IntroduceDetail{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", introduceId=" + introduceId +
-        ", title=" + title +
-        ", content=" + content +
-        ", orderNo=" + orderNo +
-        ", position=" + position +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", introduceId=" + introduceId +
+                ", title=" + title +
+                ", content=" + content +
+                ", text=" + text +
+                ", orderNo=" + orderNo +
+                ", position=" + position +
+                "}";
     }
 }

+ 49 - 0
icss-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息展示位置
+ * @Author:zhaops
+ * @time: 2018/11/23 10:12
+ */
+public enum IntroducePositionEnum implements KeyedNamed {
+    Right(1, "右侧"),
+    All(0, "右侧+全文");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IntroducePositionEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IntroducePositionEnum getEnum(Integer key) {
+        for (IntroducePositionEnum item : IntroducePositionEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IntroducePositionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 1 - 0
icss-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -13,6 +13,7 @@
         <result column="introduce_id" property="introduceId" />
         <result column="title" property="title" />
         <result column="content" property="content" />
+        <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
     </resultMap>

+ 1 - 0
icssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -27,6 +27,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .authorizeRequests()
                 .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
                 .antMatchers("/file/upload").permitAll()
+                .antMatchers("/introduceInfo/saveIntroduce").permitAll()
                 .antMatchers("/**").authenticated();
         //        .antMatchers("/**").permitAll();
     }

+ 1 - 0
icssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -90,6 +90,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/actuator/**", request)
                 || matchers("/hystrix/**", request)
                 || matchers("/file/upload", request)
+                || matchers("introduceInfo/saveIntroduce", request)
                 || matchers("/", request)) {
             return true;
         }

+ 36 - 12
icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -65,6 +65,11 @@ public class IntroduceDetail implements Serializable {
      */
     private String content;
 
+    /**
+     * 提示明细内容-纯文本
+     */
+    private String text;
+
     /**
      * 提示明细序号
      */
@@ -82,6 +87,7 @@ public class IntroduceDetail implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -89,6 +95,7 @@ public class IntroduceDetail implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -96,6 +103,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -103,6 +111,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -110,6 +119,7 @@ public class IntroduceDetail implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -117,6 +127,7 @@ public class IntroduceDetail implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public Long getIntroduceId() {
         return introduceId;
     }
@@ -124,6 +135,7 @@ public class IntroduceDetail implements Serializable {
     public void setIntroduceId(Long introduceId) {
         this.introduceId = introduceId;
     }
+
     public String getTitle() {
         return title;
     }
@@ -131,6 +143,7 @@ public class IntroduceDetail implements Serializable {
     public void setTitle(String title) {
         this.title = title;
     }
+
     public String getContent() {
         return content;
     }
@@ -138,13 +151,23 @@ public class IntroduceDetail implements Serializable {
     public void setContent(String content) {
         this.content = content;
     }
+
     public Integer getOrderNo() {
         return orderNo;
     }
 
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
     public void setOrderNo(Integer orderNo) {
         this.orderNo = orderNo;
     }
+
     public Integer getPosition() {
         return position;
     }
@@ -156,17 +179,18 @@ public class IntroduceDetail implements Serializable {
     @Override
     public String toString() {
         return "IntroduceDetail{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", introduceId=" + introduceId +
-        ", title=" + title +
-        ", content=" + content +
-        ", orderNo=" + orderNo +
-        ", position=" + position +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", introduceId=" + introduceId +
+                ", title=" + title +
+                ", content=" + content +
+                ", text=" + text +
+                ", orderNo=" + orderNo +
+                ", position=" + position +
+                "}";
     }
 }

+ 49 - 0
icssman-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息展示位置
+ * @Author:zhaops
+ * @time: 2018/11/23 10:12
+ */
+public enum IntroducePositionEnum implements KeyedNamed {
+    Right(1, "右侧"),
+    All(0, "右侧+全文");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IntroducePositionEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IntroducePositionEnum getEnum(Integer key) {
+        for (IntroducePositionEnum item : IntroducePositionEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IntroducePositionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 1 - 0
icssman-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -13,6 +13,7 @@
         <result column="introduce_id" property="introduceId" />
         <result column="title" property="title" />
         <result column="content" property="content" />
+        <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
     </resultMap>