修复企业认证部分bug

dev2
WeiRan 2024-08-30 22:36:45 +08:00
parent 47c1bc80ad
commit 6b5ed9b2f4
7 changed files with 26 additions and 6 deletions

View File

@ -66,7 +66,7 @@ public class Company {
/** /**
* *
*/ */
private String USCI; private String usci;
/** /**
* *
*/ */
@ -95,7 +95,7 @@ public class Company {
.registrantPhone(companyListReq.getRegistrantPhone()) .registrantPhone(companyListReq.getRegistrantPhone())
.registrantPosition(companyListReq.getRegistrantPhone()) .registrantPosition(companyListReq.getRegistrantPhone())
.registrantDate(companyListReq.getRegistrantDate()) .registrantDate(companyListReq.getRegistrantDate())
.USCI(companyListReq.getUSCI()) .usci(companyListReq.getUsci())
.businessLicense(companyListReq.getBusinessLicense()) .businessLicense(companyListReq.getBusinessLicense())
.companyAddress(companyListReq.getCompanyAddress()) .companyAddress(companyListReq.getCompanyAddress())
.reviewStatus(companyListReq.getReviewStatus()) .reviewStatus(companyListReq.getReviewStatus())

View File

@ -53,7 +53,7 @@ public class CompanyListReq {
/** /**
* *
*/ */
private String USCI; private String usci;
/** /**
* *
*/ */

View File

@ -3,6 +3,7 @@ package com.muyu.cloud.market.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.cloud.market.domin.User; import com.muyu.cloud.market.domin.User;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* @Authorweiran * @Authorweiran
@ -13,4 +14,5 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface UserMapper extends BaseMapper<User> { public interface UserMapper extends BaseMapper<User> {
void updcompanyId(@Param("userid") Long userid, @Param("companyId") Integer companyId);
} }

View File

@ -27,4 +27,6 @@ public interface UserService extends IService<User> {
* @return * @return
*/ */
String sendcode(String email); String sendcode(String email);
void updcompanyId(Long userid, Integer companyId);
} }

View File

@ -54,7 +54,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
} }
Long userid = loginUser.getUserid(); Long userid = loginUser.getUserid();
User user = userService.getById(userid); User user = userService.getById(userid);
if (user.getIsCompanyid()!=null || user.getIsCompanyid()!=0){ if (user.getIsCompanyid()!=null && user.getIsCompanyid()!=0){
throw new RuntimeException("已绑定,若要重新绑定,请先解除绑定"); throw new RuntimeException("已绑定,若要重新绑定,请先解除绑定");
} }
@ -69,8 +69,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
this.save(company); this.save(company);
Integer companyId = company.getCompanyId(); Integer companyId = company.getCompanyId();
user.setIsCompanyid(companyId); userService.updcompanyId(userid,companyId);
userService.updateById(user);
} }

View File

@ -110,4 +110,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements co
return code; return code;
} }
@Override
public void updcompanyId(Long userid, Integer companyId) {
userMapper.updcompanyId(userid,companyId);
}
} }

View File

@ -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>