Commit 035c4ada authored by zhangc's avatar zhangc

commit 实体

parent e0c98ce6
package com.jz.dm.mall.moduls.controller.company;
import com.aliyuncs.http.HttpRequest;
import com.jz.common.entity.Department;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.service.CompanyAuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;
import javax.servlet.http.HttpServletRequest;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.controller.company
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAuthController
* @USER: key
* @DATE: 2020-12-2/16:33
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@RestController
@RequestMapping("/companyAuth")
@Api(tags = "企业认证controller")
public class CompanyAuthController {
@Autowired
private CompanyAuthService companyAuthService;
/**
* @Description: 添加企业认证信息
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping("/add")
@ApiOperation(value = "企业信息提交")
public Mono<Result> addCompanyAuth(@RequestBody @Validated CompanyAddReq req) {
return Mono.fromSupplier(() -> companyAuthService.addCompanyData(req));
}
/**
* @Description: 企业认证信息查询
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@GetMapping("/findCompany")
@ApiOperation(value = "企业认证信息查询")
public Mono<Result> selectCompany(HttpServletRequest httpRequest) {
return Mono.fromSupplier(() ->{
//TODO 获取当前登录用户
//httpRequest.getSession().getServletContext().getAttribute("customer_id");
return Result.ok(companyAuthService.selectCompany());
});
}
}
package com.jz.dm.mall.moduls.controller.company.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.controller.company.bean
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAddReq
* @USER: key
* @DATE: 2020-12-2/16:42
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@Data
@ApiModel("添加企业认证请求体")
public class CompanyAddReq implements Serializable {
@ApiModelProperty(name = "企业名称",required = true)
@NotNull(message = "企业名称不能为空")
private String departmentName;
@ApiModelProperty(name = "省",required = true)
@NotNull(message = "省信息不能为空")
private String province;
@ApiModelProperty(name = "市",required = true)
@NotNull(message = "市信息不能为空")
private String city;
@ApiModelProperty(name = "公司详细地址",required = true)
@NotNull(message = "公司详细地址不能为空")
private String registeredAddress;
@ApiModelProperty(name = "统一社会编码",required = true)
@NotNull(message = "统一社会编码不能忍为空")
private String unifiedCreditCode;
@ApiModelProperty(name = "营业执照照片",required = true)
@NotNull(message = "营业执照照片不能忍为空")
private String businessLicense;
@ApiModelProperty(name = "开户银行",required = true)
@NotNull(message = "开户银行不能为空")
private String bankName;
@ApiModelProperty(name = "银行账户",required = true)
@NotNull(message = "银行账户不能忍为空")
private String bankCardNumber;
@ApiModelProperty(name = "联系人名称",required = true)
@NotNull(message = "联系人名称不能为空")
private String linkman;
@ApiModelProperty(name = "联系人电话",required = true)
@NotNull(message = "联系人电话不能为空")
private String telephone;
@ApiModelProperty(name = "登录用户id",hidden = true)
private Long customerId;
@ApiModelProperty(name = "登录用户名称",hidden = true)
private String LoginName;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment