/**
* 文件：ValidCodeController.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/
package com.mortals.xhx.base.system.valid.web;


import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.model.Context;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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 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.setFormClass(ValidCodeForm.class);
		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);
	}

}