yonge 5 years ago
parent
commit
2ce0db35bf

+ 1 - 1
mec-biz/src/main/resources/config/contracts/courses.ftl

@@ -93,7 +93,7 @@
                 <div class="iInfo">
                     <span>学生姓名:${studentInfo.name!}</span>
                 </div>
-                <#if studentInfo.grade??>
+                <#if studentInfo.grade?default("")?trim?length gt 1>
                 <div class="iInfo">
                     <span>所在班级:${studentInfo.grade!} ${studentInfo.clazz!}</span>
                 </div>

+ 2 - 0
mec-biz/src/main/resources/config/contracts/goods.ftl

@@ -92,9 +92,11 @@
                 <div class="iInfo">
                     <span>学生姓名:${studentInfo.name!}</span>
                 </div>
+                <#if studentInfo.grade?default("")?trim?length gt 1>
                 <div class="iInfo">
                     <span>所在班级:${studentInfo.grade!} ${studentInfo.clazz!}</span>
                 </div>
+                </#if>
                 <div class="iInfo">
                     <span>所在声部:${studentInfo.subject.name!}</span>
                 </div>

+ 10 - 5
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java

@@ -22,19 +22,19 @@ import com.ym.mec.util.http.HttpUtil;
 public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean {
 
 	@Value("${push.jiguang.appKey:0e7422e1d6e73637e678716a}")
-	private String appKey;
+	private String appKey = "0e7422e1d6e73637e678716a";
 
 	@Value("${push.jiguang.masterSecret:c2361016604eab56ab2db2ac}")
-	private String masterSecret;
+	private String masterSecret = "c2361016604eab56ab2db2ac";
 
 	@Value("${push.jiguang.apns_production:false}")
-	private boolean apns_production; // 推送环境 True 表示推送生产环境,False 表示要推送开发环境
+	private boolean apns_production = false; // 推送环境 True 表示推送生产环境,False 表示要推送开发环境
 
 	@Value("${push.jiguang.time_to_live:86400}")
-	private int time_to_live; // 离线保留时长 秒为单位 默认1天 最大10天
+	private int time_to_live = 86400; // 离线保留时长 秒为单位 默认1天 最大10天
 
 	@Value("${push.jiguang.reqURL:https://api.jpush.cn/v3/push}")
-	private String reqURL;// 请求极光地址
+	private String reqURL = "https://api.jpush.cn/v3/push";// 请求极光地址
 
 	public static String getName() {
 		return "Jiguang";
@@ -196,4 +196,9 @@ public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean
 		this.reqURL = reqURL;
 	}
 
+	public static void main(String[] args) throws IOException {
+		JiguangPushPlugin plugin = new JiguangPushPlugin();
+		plugin.send("测试标题", "测试内容", "1093192", "");
+	}
+
 }