SmsCtrl.java 982 Bytes
package com.ui.ctrl;

import com.ui.contants.HttpUriContants;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import com.ui.model.req.SmsLogReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by yoho on 2016/11/29.
 */
@Controller
@RequestMapping("sms")
public class SmsCtrl {

    @Autowired
    HttpRestClient httpRestClient;

    @RequestMapping("/toSmsLog")
    public ModelAndView getJobs() {
        return new ModelAndView("sms/smsLog");
    }


    @RequestMapping("/getSmsLog")
    @ResponseBody
    public BaseResponse getSmsLog(SmsLogReq req) {
        BaseResponse response = httpRestClient.defaultPost(HttpUriContants.GET_SMSLOG, req, BaseResponse.class);
        return response;
    }
}