package com.mortals.xhx.base.system.valid.web;


import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.system.valid.model.ValidCodeEntity;
import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.common.code.ValidCodeType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>Title: 验证码信息</p>
 * <p>Description: ValidCodeController  </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */
@RestController
@RequestMapping("validcode")
public class ValidCodeController extends BaseCRUDJsonMappingController<ValidCodeService,ValidCodeForm,ValidCodeEntity,Long> {

	public ValidCodeController(){
		super.setModuleDesc("验证码信息");
	}

	@Override
	protected void init(HttpServletRequest request, HttpServletResponse response, ValidCodeForm form,
						Map<String, Object> model, Context context) {
		Map<String,Object> status = new HashMap<String,Object>();
		status.put("type", ValidCodeType.getEnumMap());
		model.put(KEY_RESULT_DICT,status);
		super.init(request, response, form, model, context);
	}

}