修复企业认证部分bug
parent
47c1bc80ad
commit
6b5ed9b2f4
|
@ -66,7 +66,7 @@ public class Company {
|
|||
/**
|
||||
*社会统一信用代码
|
||||
*/
|
||||
private String USCI;
|
||||
private String usci;
|
||||
/**
|
||||
*企业营业执照
|
||||
*/
|
||||
|
@ -95,7 +95,7 @@ public class Company {
|
|||
.registrantPhone(companyListReq.getRegistrantPhone())
|
||||
.registrantPosition(companyListReq.getRegistrantPhone())
|
||||
.registrantDate(companyListReq.getRegistrantDate())
|
||||
.USCI(companyListReq.getUSCI())
|
||||
.usci(companyListReq.getUsci())
|
||||
.businessLicense(companyListReq.getBusinessLicense())
|
||||
.companyAddress(companyListReq.getCompanyAddress())
|
||||
.reviewStatus(companyListReq.getReviewStatus())
|
||||
|
|
|
@ -53,7 +53,7 @@ public class CompanyListReq {
|
|||
/**
|
||||
*社会统一信用代码
|
||||
*/
|
||||
private String USCI;
|
||||
private String usci;
|
||||
/**
|
||||
*企业营业执照
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.cloud.market.mapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.cloud.market.domin.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Author:weiran
|
||||
|
@ -13,4 +14,5 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
*/
|
||||
@Mapper
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
void updcompanyId(@Param("userid") Long userid, @Param("companyId") Integer companyId);
|
||||
}
|
||||
|
|
|
@ -27,4 +27,6 @@ public interface UserService extends IService<User> {
|
|||
* @return
|
||||
*/
|
||||
String sendcode(String email);
|
||||
|
||||
void updcompanyId(Long userid, Integer companyId);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
}
|
||||
Long userid = loginUser.getUserid();
|
||||
User user = userService.getById(userid);
|
||||
if (user.getIsCompanyid()!=null || user.getIsCompanyid()!=0){
|
||||
if (user.getIsCompanyid()!=null && user.getIsCompanyid()!=0){
|
||||
throw new RuntimeException("已绑定,若要重新绑定,请先解除绑定");
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
this.save(company);
|
||||
Integer companyId = company.getCompanyId();
|
||||
|
||||
user.setIsCompanyid(companyId);
|
||||
userService.updateById(user);
|
||||
userService.updcompanyId(userid,companyId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -110,4 +110,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements co
|
|||
return code;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updcompanyId(Long userid, Integer companyId) {
|
||||
userMapper.updcompanyId(userid,companyId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.muyu.cloud.market.mapper.UserMapper">
|
||||
|
||||
<update id="updcompanyId">
|
||||
update sys_user set is_companyid=#{companyId} where user_id=#{userid}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue