package com.ruoyi.web.controller.api;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.report.vo.TrademarkLastSumDTO;
import com.ruoyi.trade.service.ICTrademarkService;


@RestController
@RequestMapping("/private/trademark")
public class TrademarkController extends PrivateApiController{


	@Autowired
	private ICTrademarkService cTrademarkService;
	@GetMapping("/lastSum")
	public AjaxResult list(HttpServletRequest req) {
		
		try {
			checkAuth(req);
		} catch (Exception e) {
			return AjaxResult.error(HttpStatus.UNAUTHORIZED,"权限验证不通过");
		}
		
		TrademarkLastSumDTO dto = cTrademarkService.listForLast();
		return AjaxResult.success(dto);
	}


}
