package com.boman.web.core.controller;

import com.alibaba.fastjson.JSONObject;
import com.boman.web.core.service.fieldTranslator.IFieldTranslatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**字段翻译器出来
 * @author tjf
 * @Date: 2021/06/07/15:08
 */
@RestController
@RequestMapping("/fieldTranslator")
public class FieldTranslatorController {
    @Autowired
    private IFieldTranslatorService fieldTranslatorService;

    /**
     * 身份证号解析出出生日期和性别
     * @param commitData
     * @return
     */
    @PostMapping("/idCardTranslator")
    public JSONObject idCardTranslator(@RequestBody JSONObject commitData){
       return fieldTranslatorService.idCardTranslator(commitData);
    }
}
