提交 72fdb83a 编写于 作者: Chongwen.jiang's avatar Chongwen.jiang

微信解除绑定修改

上级 9d008dd3
流水线 #22586 已失败 于阶段
in 0 second
......@@ -14,18 +14,15 @@ import com.pica.cloud.account.account.server.service.LoginService;
import com.pica.cloud.account.account.server.service.TokenService;
import com.pica.cloud.account.account.server.util.AccountUtils;
import com.pica.cloud.account.account.server.util.CryptoUtil;
import com.pica.cloud.account.account.server.vo.OneClickLoginResultVo;
import com.pica.cloud.foundation.entity.PicaResponse;
import com.pica.cloud.foundation.redis.CacheClient;
import com.pica.cloud.foundation.redis.ICacheClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.codehaus.groovy.util.HashCodeHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
......
......@@ -10,10 +10,10 @@ public interface AccountUnionMapper {
/**
* 解除绑定关系
*
* @param acctId 账户id
* @param map
* @return
*/
int updateUnbindByAcctId(Integer acctId);
int updateUnbindByAcctId(Map<String, Object> map);
/**
* 是否绑定过手机号
......@@ -23,12 +23,8 @@ public interface AccountUnionMapper {
*/
AccountUnionEntity selectByUnionId(String unionId);
AccountUnionEntity selectByAcctId(Map<String, Object> map);
int deleteByPrimaryKey(Integer id);
int insert(AccountUnionEntity record);
int insertSelective(AccountUnionEntity record);
......
......@@ -385,7 +385,10 @@ public class LoginServiceImpl implements LoginService {
@Transactional
public void unbindWeChat(long doctorId) {
Integer acctId = doctorInfoMapper.getAcctIdByDoctorId(doctorId);
accountUnionMapper.updateUnbindByAcctId(acctId);
Map<String, Object> map = new HashedMap(2);
map.put("acctId", acctId);
map.put("unionType", AccountTypeEnum.UNION_LOGIN_WE_CHAT.getCode());
accountUnionMapper.updateUnbindByAcctId(map);
if (doubleWritingMode) {
doctorService.unbindWeChat(acctId);
}
......
......@@ -45,17 +45,14 @@
</select>
<!--解除绑定关系-->
<update id="updateUnbindByAcctId" parameterType="java.lang.Integer">
<update id="updateUnbindByAcctId" parameterType="java.util.Map">
update account_union
set delete_flag = 2
set delete_flag = 2, modified_time=NOW()
where acct_id = #{acctId,jdbcType=INTEGER}
and union_type = #{unionType}
and delete_flag = 1
</update>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from account_union
where id = #{id,jdbcType=INTEGER}
</delete>
<!--更新以前的unionId状态-->
<update id="updateUnionStatus" parameterType="java.lang.String">
update account_union
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册