package com.hzs.member.base.controller.manager;

import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.enums.EOperationModule;
import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.member.base.service.ICuMemberRegisterService;
import com.hzs.member.param.MemberParam;
import lombok.extern.slf4j.Slf4j;
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;

/**
 * @Description:
 * @Author: sui q
 * @Time: 2022/10/13 9:35
 * @Classname: CuMemberRegisterController
 * @PackageName: com.hzs.member.base.controller.manager
 */
@RequestMapping("/manager/register")
@RestController
@Slf4j
public class CuMemberRegisterController {

    private ICuMemberRegisterService cuMemberRegisterService;

    @Autowired
    public void setCuMemberRegisterService(ICuMemberRegisterService cuMemberRegisterService) {
        this.cuMemberRegisterService = cuMemberRegisterService;
    }

    /**
     * @param memberParam 会员参数
     * @Description: 会员
     * @return: AjaxResult
     * @Author: sui q
     * @Date: 2022/8/27 16:56
     */
    @Log(module = EOperationModule.REGISTRATION_INFORMATION)
    @PostMapping("/query-register")
    public AjaxResult queryMemberRegister(@RequestBody MemberParam memberParam) {
        memberParam.setPkCountry(SecurityUtils.getPkCountry());
        return AjaxResult.success(cuMemberRegisterService.queryCuMemberRegisterExeByCondition(memberParam));
    }
}
