- articles = new ArrayList<>();
+ Item item = new Item();
+ item.setTitle(name);
+ item.setDescription(result.getDescription());
+ item.setPicUrl(result.getPreviewUrl());
+ item.setUrl(result.getH5Url());
+ articles.add(item);
+// return new TextBuilder().build(content, wxMessage, weixinService);
+ return new NewsBuilder().articles(articles).fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()).build();
}
}
diff --git a/src/main/java/com/yhjd/service/impl/MissonServiceImpl.java b/src/main/java/com/yhjd/service/impl/MissonServiceImpl.java
index 3123407..4dc22b3 100644
--- a/src/main/java/com/yhjd/service/impl/MissonServiceImpl.java
+++ b/src/main/java/com/yhjd/service/impl/MissonServiceImpl.java
@@ -15,9 +15,7 @@ import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
/**
*
@@ -52,7 +50,7 @@ public class MissonServiceImpl extends ServiceImpl impleme
public JSONObject queryMisson(Integer pageNum, Integer pageSize,Long beginTime,Long endTime,String param){
- Integer count = missonMapper.selectCount(new EntityWrapper());
+
Wrapper missonWrapper = new EntityWrapper().eq("1", "1");
if(!param.equals("")){
missonWrapper.like("name",param);
@@ -61,8 +59,14 @@ public class MissonServiceImpl extends ServiceImpl impleme
missonWrapper.ge("create_date",new Date(beginTime));
}
if(null!=endTime){
- missonWrapper.le("create_date",new Date(endTime));
+ Date current = new Date(endTime);
+ Calendar calendar = new GregorianCalendar();
+ calendar.setTime(current);
+ calendar.add(calendar.DATE, 1);
+ current = calendar.getTime();
+ missonWrapper.le("create_date",current);
}
+ Integer count = missonMapper.selectCount(missonWrapper);
List result = missonMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), missonWrapper.orderBy("create_date", false));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index ec2cc78..1734e53 100755
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -47,8 +47,8 @@ wx:
configs:
- appid: wx44742933fc151c65
secret: 6f315f3bc8949a428f3a24068476a7e7
- token: #微信小程序消息服务器配置的token
- aesKey: #微信小程序消息服务器配置的EncodingAESKey
+ token: eMayx #微信小程序消息服务器配置的token
+ aesKey: hIsKGeHocUzks9ZVV2OEJZo4OCYpJ0aXGXDvwVyT6pB #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
oss: