Commit bc3ceeb0 authored by liwei's avatar liwei

修改了bug

parent 4941682c
......@@ -64,13 +64,12 @@ public class AppOpmBlackListController extends CyPaginationController<OpmBlackLi
@CyOpeLogAnno(title = "system-黑名单表管理-删除黑名单表", businessType = CyLogTypeEnum.DELETE)
@Operation(summary="删除黑名单表", description="删除黑名单表")
@Parameters({@Parameter(name = "businessId", description = "businessId", required = true, schema = @Schema(type = "string"))})
@DeleteMapping("/opmBlackList/delete/{businessId:\\w+}")
public CyResult delete(@PathVariable int businessId,OpmBlackList opmBlackList) {
opmBlackList.setBusinessId(businessId);
@DeleteMapping("/opmBlackList/delete")
public CyResult delete(@RequestBody OpmBlackList opmBlackList) {
CyPersistModel data = opmBlackListServiceImpl.remove(opmBlackList);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
businessId);
opmBlackList);
}
}
......@@ -1032,10 +1032,11 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
@Override
public MemInfo getUserInfo() {
//获取当前登录人id
String loginUserId = CyUserUtil.getAuthenBusinessId();
Integer userId = Integer.valueOf(CyUserUtil.getAuthenBusinessId());
MemInfo memInfo = baseMapper.getUserInfo(String.valueOf(userId));
//查询我喜欢的 喜欢我的 互相喜欢的数量
MemInfo memInfo1 = baseMapper.selectUserFollowCount(memInfo.getUserId());
MemInfo memInfo1 = baseMapper.selectUserFollowCount(userId);
memInfo.setFollowMeCount(memInfo1.getFollowMeCount());
memInfo.setMeFollowCount(memInfo1.getMeFollowCount());
memInfo.setEachFollowCount(memInfo1.getEachFollowCount());
......
......@@ -23,8 +23,6 @@ import java.util.List;
@Data
@TableName("opm_black_list")
public class OpmBlackList extends CyIdIncreNotDataEntity<OpmBlackList> {
/**
* @desc 创建时间
* @column create_date
......
......@@ -92,18 +92,13 @@ public class OpmBlackListServiceImpl extends ServiceImpl<OpmBlackListRepository,
int line = baseMapper.realDelete(opmBlackList);
//修改对话表 拉黑状态
MemLeaveMessage userTalk = memLeaveMessageRepository.queryUserTalk(opmBlackList.getUserId().intValue(), opmBlackList.getTargetId().intValue());
if (userTalk != null){
//互相拉黑了 不做修改
return new CyPersistModel(line);
} else if(userTalk.getBlackUser().equals(opmBlackList.getUserId())){
//当前登录人拉黑了对方 修改为互相都没拉黑的情况
if (userTalk != null) {
//当前登录人拉黑了对方 修改对话状态为互相都没拉黑的情况
userTalk.setBlackUser(0);
memLeaveMessageRepository.updateTalkBlack(userTalk);
return new CyPersistModel(line);
} else {
//对方拉黑了当前登录人 不做修改
return new CyPersistModel(line);
}
return new CyPersistModel(1);
}
/**
......
......@@ -415,6 +415,11 @@
from opm_black_list obl
where obl.user_id = #{entity.loginUserId}
)
and m.user_id not in (
select obl.user_id
from opm_black_list obl
where obl.target_id = #{entity.loginUserId}
)
</if>
ORDER BY m.mem_level desc,m.mem_real_authen desc,m.is_recommended desc,m.sort,m.mem_code desc,m.business_id DESC
</select>
......
......@@ -241,6 +241,11 @@
from opm_black_list obl
where obl.user_id = #{entity.loginUserId}
)
and opa.create_by not in (
select obl.user_id
from opm_black_list obl
where obl.target_id = #{entity.loginUserId}
)
<if test="entity.topicId !=null and entity.topicId != 0 ">
and opa.topic_id = #{entity.topicId}
</if>
......
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