| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package com.uas.ps.inquiry.controller;
- import com.uas.ps.httplog.annotation.HttpLog;
- import com.uas.ps.inquiry.service.PublicInquiryService;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.ui.ModelMap;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.Date;
- /**
- * 询价服务供其他应用调用的接口
- *
- * @author dongbw
- */
- @RequestMapping(value = "/inquiry/api")
- @RestController
- public class PublicApiController {
- @Autowired
- private PublicInquiryService publicInquiryService;
- private final static Logger log = LoggerFactory.getLogger(PublicApiController.class);
- /**
- * 查询个人不同型号发布询价数量统计
- * @param enuu 企业uu
- * @param useruu 用户uu
- * @param starttime 开始时间
- * @param endtime 结束时间
- * @return 数量结果
- */
- @HttpLog
- @RequestMapping(value = "/sum/publish/personal", method = RequestMethod.GET)
- public ModelMap sumPersonalPublish(Long enuu, Long useruu, Long starttime, Long endtime) {
- long start = System.currentTimeMillis();
- ModelMap map = publicInquiryService.sumPersonalPublish(enuu, useruu, starttime, endtime);
- log.info("/api/sum/publish/personal get 参数:enuu: {}, useruu: {}, starttime: {}, endtime: {}, 耗时: {}",
- enuu, useruu, new Date(starttime), new Date(endtime), (System.currentTimeMillis() - start));
- return map;
- }
- /**
- * 查询企业不同型号发布询价数量统计
- * @param enuu 企业uu
- * @param starttime 开始时间
- * @param endtime 结束时间
- * @return
- */
- @HttpLog
- @RequestMapping(value = "/sum/publish/enterprise", method = RequestMethod.GET)
- public ModelMap sumEnterprisePublish(Long enuu, Long starttime, Long endtime) {
- long start = System.currentTimeMillis();
- ModelMap map = publicInquiryService.sumEnterprisePublish(enuu, starttime, endtime);
- log.info("/api/sum/publish/enterprise get 参数:enuu: {}, starttime: {}, endtime: {}, 耗时: {}",
- enuu, new Date(starttime), new Date(endtime), (System.currentTimeMillis() - start));
- return map;
- }
- /**
- * 查询个人回复询价数量统计
- * @param enuu 企业uu
- * @param useruu 用户uu
- * @param starttime 开始时间
- * @param endtime 结束时间
- * @return
- */
- @HttpLog
- @RequestMapping(value = "/sum/reply/personal", method = RequestMethod.GET)
- public ModelMap sumPersonalReply(Long enuu, Long useruu, Long starttime, Long endtime) {
- long start = System.currentTimeMillis();
- ModelMap map = publicInquiryService.sumPersonalReply(enuu, useruu, starttime, endtime);
- log.info("/api/sum/reply/personal get 参数:enuu: {}, useruu: {}, starttime: {}, endtime: {}, 耗时: {}",
- enuu, useruu, new Date(starttime), new Date(endtime), (System.currentTimeMillis() - start));
- return map;
- }
- /**
- * 查询企业回复询价数量统计
- * @param enuu 企业uu
- * @param starttime 开始时间
- * @param endtime 结束时间
- * @return
- */
- @HttpLog
- @RequestMapping(value = "/sum/reply/enterprise", method = RequestMethod.GET)
- public ModelMap sumEnterpriseReply(Long enuu, Long starttime, Long endtime) {
- long start = System.currentTimeMillis();
- ModelMap map = publicInquiryService.sumEnterpriseReply(enuu, starttime, endtime);
- log.info("/api/sum/reply/enterprise get 参数:enuu: {}, starttime: {}, endtime: {}, 耗时: {}",
- enuu, new Date(starttime), new Date(endtime), (System.currentTimeMillis() - start));
- return map;
- }
- }
|