优化--判断方法错误

上级 dfb395a0
流水线 #8984 已通过 于阶段
in 2 分 33 秒
......@@ -161,4 +161,7 @@ public interface CooperationDao {
int getJoinStoreCount();
int getStoreCountByType(int type);
//查到标签绑定之前的用户
UserApplyTagDO selectTageByUserId(Integer fromUserAccountId);
}
......@@ -55,7 +55,6 @@ public interface UserServiceDao {
*/
void update(UserAccountDO userAccountDO);
void updateId(@Param("userAccountDO") UserAccountDO userAccountDO,@Param("newId") Integer newId);
/**
* 查询是否存在这个用户
* @param userId 用户id
......
......@@ -6,6 +6,7 @@ import com.mmc.iuav.response.ResultEnum;
import com.mmc.iuav.user.client.PmsClient;
import com.mmc.iuav.user.dao.BackUserAccountDao;
import com.mmc.iuav.user.dao.CompanyDao;
import com.mmc.iuav.user.dao.CooperationDao;
import com.mmc.iuav.user.dao.UserServiceDao;
import com.mmc.iuav.user.entity.*;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
......@@ -42,6 +43,9 @@ public class CompanyServiceImpl implements CompanyService {
@Autowired
private UserServiceDao userServiceDao;
@Autowired
private CooperationDao cooperationDao;
@Override
public ResultBody addCompanyInfo(CompanyInfoVO companyInfo) {
int count = companyDao.countCompanyNames(companyInfo.getId(), companyInfo.getCompanyName());
......@@ -237,6 +241,12 @@ public class CompanyServiceImpl implements CompanyService {
companyInfoDO.setPhoneNum(accountDO.getPhoneNum());
companyDao.updateCompanyInfo(companyInfoDO);
}
//加盟入住的标签也要换绑定 user_tag , user_apply_tag
UserApplyTagDO userApplyTagDO = cooperationDao.selectTageByUserId(fromUserAccountId);
if(userApplyTagDO != null) {
userApplyTagDO.setUserAccountId(toUserAccountId);
cooperationDao.updateUserApplyTag(userApplyTagDO);
}
return ResultBody.success();
}
......
......@@ -491,6 +491,7 @@
where id = #{companyInfoId}
</update>
<select id="appBrandList" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
SELECT ua.id,
ua.cooperation_tag_id,
......@@ -625,4 +626,11 @@
where ua.is_deleted = 0 and ct.is_deleted = 0
and ua.user_account_id = #{userAccountId}
</select>
<select id="selectTageByUserId" resultType="com.mmc.iuav.user.entity.UserApplyTagDO">
select id,user_account_id
from user_apply_tag
where user_account_id = #{userAccountId}
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论