package com.zhongzheng.controller.distribution; import com.zhongzheng.common.core.controller.BaseController; import com.zhongzheng.common.core.domain.AjaxResult; import com.zhongzheng.modules.distribution.bo.SellerAppAccountLoginBo; import com.zhongzheng.modules.distribution.bo.SellerAppRegisterBo; import com.zhongzheng.modules.distribution.service.IDistributionSellerService; import com.zhongzheng.modules.user.bo.*; import com.zhongzheng.modules.user.service.IUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; 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; import java.util.Map; /** * 客户端用户Controller * * @author hjl * @date 2021-06-08 */ @Api(value = "短信控制器", tags = {"登录控制器"}) @RequiredArgsConstructor(onConstructor_ = @Autowired) @RestController @RequestMapping("/app/common/seller") public class SellerLoginController extends BaseController { private final IDistributionSellerService iDistributionSellerService; /** * 用户注册 */ @ApiOperation("业务员客户端注册") @PostMapping("/register") public AjaxResult register(@RequestBody SellerAppRegisterBo bo) { return toAjax(iDistributionSellerService.registerSeller(bo) ? 1 : 0); } @ApiOperation("业务员忘记密码") @PostMapping("/register_forget") public AjaxResult register_forget(@RequestBody SellerAppRegisterBo bo) { return toAjax(iDistributionSellerService.forgetUser(bo) ? 1 : 0); } @ApiOperation("业务员账号登录") @PostMapping("/account_login") public AjaxResult account_login(@RequestBody SellerAppAccountLoginBo bo) { Map map = iDistributionSellerService.accountLogin(bo); return AjaxResult.success(map); } }