postman 输出 没内容
博彩导航网站排行榜
博彩导航网站排行榜
当前位置 : 博彩导航网站排行榜 > 博彩导航网站排行榜

postman 输出 没内容

输入:
{
"head": {

"deviceId":"deviceId",
"os":1,
"token":"",

},

"body":{

  "rows": "10",
  "page":"10",
  "type":"1",
}

}
输出
{

"obj": {
    "code": 200,
    "msg": "success"
},
"attributes": {
    "coupons": []
},
"msg": "操作成功",
"success": true

}
后台接口程序
public Map<String, Object> getMyRollsJSONObject head,JSONObject body throws Exception {

         
     // 业务信息
     Map<String, Object> attributes=new HashMap<String, Object>;
     
     //cityCode 
 //    String cityCode=head.optString"cityCode";
 //    cityCode=GetCItyCode.getCityCodecityCode;
     
     String page=body.optString"page";
     String rows=body.optString"rows";
     int type=body.optInt"type";
     
     String token=head.optString"token";
    Object object=UserCacheManage.getAppUsertoken;
        
    iftrue{        
        UserCache user=UserCacheobject;
        String userId="4028668150c2acb40150c2c69a03000d";
        HhUserEntity hhUserEntity=super.getEntityHhUserEntity.class, userId;
        ifhhUserEntity!=null{
            
            String nowTime=DateUtils.formatTime;

//%h:%i:%s

            String queryString=" SELECT c.couponname,c.couponfee,"
    • "c.pic1_path,c.pic2_path,date_formatc.endtime,%Y-%c-%d as endTime "

    • "FROM couponpool s,couponpublish c "

    • " WHERE s.pubid = c.pubid AND s.owner="+userId+"";

                
                String whereString="";
                //优惠卷类别  1.可用;2.历史
                iftype==1{
                    whereString=whereString+" and  "+nowTime+" between c.starttime and c.endtime  and  s.status=3 ";
                }else{
                    whereString=whereString+" and  "+nowTime+" > c.endtime  or s.status=7  ";
                }
      
               String orderString=" order by c.updatetime ";
            
    1. offset=PagerUtil.getOffsetInteger.valueOfpage,Integer.valueOfrows;

                List<Map> list=super.findListbySqlReturnMapByPagequeryString+whereString+orderString, offset, Integer.valueOfrows;
                        
               attributes.put"coupons", list;
               
           }else{
    2. new InterfaceExceptionnew ErrorBeanErrorCode.USER_NO_LOGIN;

           }
           
       }else{
    1. new InterfaceExceptionnew ErrorBeanErrorCode.USER_NO_LOGIN;

        }
        
    1. attributes;

      }

      输出怎么没有list查的数据??

    debug后台打印输出list,首先确保list有值

    最新文章

    广告位

    博彩导航网站排行榜