package com.pcloud.book.book.facade.impl;

import com.pcloud.book.book.biz.BookAssistTempletBiz;
import com.pcloud.book.book.facade.BookAssistTempletFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 书刊模板分类
 * @author MICHAEL
 * @date : 2018年5月3日
 */
@RequestMapping("/bookAssistTemplet")
@RestController("bookAssistTempletFacade")
public class BookAssistTempletFacadeImpl implements BookAssistTempletFacade {

	@Autowired
	private BookAssistTempletBiz bookAssistTempletBiz;
	
	/**
	 * 新增
	 */
	/*@Override
	@RequestMapping(value="insert",method=RequestMethod.POST)
	public ResponseDto<BookAssistTemplet> insert(@RequestHeader("token") String token,@RequestBody  BookAssistTemplet bookAssistTemplet)
			throws BizException, PermissionException, JsonParseException {
		Long partyId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
		bookAssistTempletBiz.insert(bookAssistTemplet, partyId);
		return new ResponseDto<>();
	}*/
	
	/**
	 * 删除
	 */
/*	@Override
	@RequestMapping(value = "/deleteById", method = RequestMethod.GET)
	public ResponseDto<?> deleteById(@RequestHeader("token") String token, @RequestParam(value = "assistTempletId", required = false)Long assistTempletId)
			throws BizException, PermissionException, JsonParseException {
		Long partyId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
		if(null == assistTempletId){
			throw new BookBizException(BookBizException.PARAM_IS_NULL,"对象不存在");
		}
		bookAssistTempletBiz.deleteById(assistTempletId, partyId);
		return new ResponseDto<>();
	}*/

	/**
	 * 修改
	 */
	/*@Override
	@RequestMapping(value = "/update", method = RequestMethod.POST)
	public ResponseDto<BookAssistTemplet> update(@RequestHeader("token") String token,@RequestBody  BookAssistTemplet bookAssistTemplet)
			throws BizException, PermissionException, JsonParseException {
		Long partyId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
		bookAssistTempletBiz.update(bookAssistTemplet, partyId);
		return new ResponseDto<>();
	}*/

	/**
	 * 获取单个信息
	 */
	/*@Override
	@RequestMapping(value = "/getById", method = RequestMethod.GET)
	public ResponseDto<BookAssistTemplet> getById(@RequestHeader("token") String token, @RequestParam(value = "assistTempletId", required = false)Long assistTempletId)
			throws BizException, PermissionException, JsonParseException {
		SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
		if(null == assistTempletId){
			throw new BookBizException(BookBizException.PARAM_IS_NULL,"对象不存在");
		}
		BookAssistTemplet bookAssistTemplet = bookAssistTempletBiz.getById(assistTempletId);
		return new ResponseDto<BookAssistTemplet>(bookAssistTemplet == null ? new BookAssistTemplet() : bookAssistTemplet);
	}*/
	/**
	 * 获取列表
	 */
	/*@Override
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	public ResponseDto<List<BookAssistTemplet>> list(@RequestHeader("token")String token)
			throws BizException, PermissionException, JsonParseException {
		SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
		List<BookAssistTemplet> bookAssistTemplets = bookAssistTempletBiz.list(null);
		return new ResponseDto<List<BookAssistTemplet>>(ListUtils.isEmpty(bookAssistTemplets)?new ArrayList<>():bookAssistTemplets);
	}*/

}
