|
@@ -142,29 +142,39 @@ public class WxNoticeController extends BaseFormController{
|
|
String openId=request.getParameter("openId");
|
|
String openId=request.getParameter("openId");
|
|
String orgId=request.getParameter("orgId");
|
|
String orgId=request.getParameter("orgId");
|
|
WxUser wxUser=scWxuserManager.getScWxuserByOpenId(openId);
|
|
WxUser wxUser=scWxuserManager.getScWxuserByOpenId(openId);
|
|
- if(StringUtils.isEmpty(pageNo)){
|
|
|
|
- pageNo="1";
|
|
|
|
- }
|
|
|
|
- if(StringUtils.isEmpty(pageSize)){
|
|
|
|
- pageSize="10";
|
|
|
|
- }
|
|
|
|
- HashMap<String, Object> map = new HashMap<String,Object>();
|
|
|
|
- if(!StringUtils.isEmpty(state)){
|
|
|
|
- map.put("state", state);
|
|
|
|
- }
|
|
|
|
- //优先传入的orgId参数,如果没有就通过openId拿orgId
|
|
|
|
- if (StringUtils.isNotEmpty(orgId)) {
|
|
|
|
- map.put("orgId", orgId);
|
|
|
|
- }else{
|
|
|
|
- if (wxUser != null && null != wxUser.getOrganizationId()) {
|
|
|
|
- map.put("orgIds", wxUser.getOrganizationId());
|
|
|
|
|
|
+ try{
|
|
|
|
+ int i=0;
|
|
|
|
+ if(StringUtils.isEmpty(pageNo)){
|
|
|
|
+ pageNo="1";
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isEmpty(pageSize)){
|
|
|
|
+ pageSize="10";
|
|
|
|
+ }
|
|
|
|
+ i = Integer.parseInt(pageSize);
|
|
|
|
+ i = Integer.parseInt(pageNo);
|
|
|
|
+
|
|
|
|
+ HashMap<String, Object> map = new HashMap<String,Object>();
|
|
|
|
+ if(!StringUtils.isEmpty(state)){
|
|
|
|
+ map.put("state", state);
|
|
|
|
+
|
|
|
|
+ i = Integer.parseInt(state);
|
|
|
|
+ }
|
|
|
|
+ //优先传入的orgId参数,如果没有就通过openId拿orgId
|
|
|
|
+ if (StringUtils.isNotEmpty(orgId)) {
|
|
|
|
+ map.put("orgId", orgId);
|
|
|
|
+ i = Integer.parseInt(orgId);
|
|
|
|
+ }else{
|
|
|
|
+ if (wxUser != null && null != wxUser.getOrganizationId()) {
|
|
|
|
+ map.put("orgIds", wxUser.getOrganizationId());
|
|
|
|
+ }else{
|
|
|
|
+ throw new Exception("参数不正确!");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
map.put("type", 4);//微信首页列表
|
|
map.put("type", 4);//微信首页列表
|
|
map.put("receiveType", 1);//只看全部的,不看部分的
|
|
map.put("receiveType", 1);//只看全部的,不看部分的
|
|
- try{
|
|
|
|
|
|
+
|
|
Page page=wxtemplateMessageManager.getDataList(map,Integer.parseInt(pageNo),Integer.parseInt(pageSize));
|
|
Page page=wxtemplateMessageManager.getDataList(map,Integer.parseInt(pageNo),Integer.parseInt(pageSize));
|
|
|
|
|
|
ArrayList<TempSaverList> resultList = new ArrayList<TempSaverList>();
|
|
ArrayList<TempSaverList> resultList = new ArrayList<TempSaverList>();
|
|
@@ -216,7 +226,7 @@ public class WxNoticeController extends BaseFormController{
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|
|
json.put("code", "1");
|
|
json.put("code", "1");
|
|
json.put("msg", "fail");
|
|
json.put("msg", "fail");
|
|
- json.put("data", e.getMessage());
|
|
|
|
|
|
+ //json.put("data", e.getMessage());
|
|
StringUtil.charSet(json, request, response);
|
|
StringUtil.charSet(json, request, response);
|
|
log.error(e.getMessage());
|
|
log.error(e.getMessage());
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|