1、增加接口:增加单个技师风险记录查询

2、接口调整:解决推广管理-城市合伙人通过后 地址变成了“通过”两个字
This commit is contained in:
1378012178@qq.com 2025-02-11 14:04:41 +08:00
parent 91b8ed32f1
commit 6dd59f27cd
6 changed files with 32 additions and 3 deletions

View File

@ -83,7 +83,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyDao, Apply> implements Ap
if(status==1){
user.setIsAgency(1);
apply.setStatus(2);
apply.setApplyContent("通过");
apply.setAuditContent("通过");
userService.updateById(user);
}else{
apply.setStatus(3);

View File

@ -31,6 +31,12 @@ public class RiskController {
return riskService.selectRiskList(page, limit, userName, phone, riskType);
}
@GetMapping("/selectRiskListByUserId")
@ApiOperation("查询单人风险列表")
public Result selectRiskListByUserId(Integer userId){
return riskService.selectRiskListByUserId(userId);
}
@GetMapping("/selectRiskGroupList")
@ApiOperation("查询风险列表分组")
public Result selectRiskGroupList(Integer page,Integer limit, String userName, String phone, Integer riskSort){

View File

@ -14,6 +14,8 @@ public interface RiskDao extends BaseMapper<Risk> {
IPage<Risk> selectRiskList(Page<Risk> page,String userName,String phone,Integer riskType);
IPage<Risk> selectRiskListByUserId(Page<Risk> page,Integer userId);
IPage<Map<String,Object>> selectRiskGroupList(Page<Map<String,Object>> page, String userName, String phone,Integer riskSort);
}

View File

@ -10,6 +10,8 @@ public interface RiskService extends IService<Risk> {
Result selectRiskList(Integer page,Integer limit, String userName, String phone, Integer riskType);
Result selectRiskListByUserId(Integer userId);
Result selectRiskGroupList(Integer page,Integer limit, String userName, String phone, Integer riskSort);
}

View File

@ -33,6 +33,15 @@ public class RiskServiceImpl extends ServiceImpl<RiskDao, Risk> implements RiskS
return Result.success().put("data",new PageUtils(riskIPage));
}
@Override
public Result selectRiskListByUserId(Integer userId){
IPage<Risk> riskIPage = baseMapper.selectRiskListByUserId(new Page<>(1, -1),userId);
List<Risk> records = riskIPage.getRecords();
for(Risk risk:records){
risk.setUser(userService.getById(risk.getUserId()));
}
return Result.success().put("data",new PageUtils(riskIPage));
}
@Override
public Result selectRiskGroupList(Integer page,Integer limit, String userName, String phone, Integer riskSort){
@ -49,4 +58,4 @@ public class RiskServiceImpl extends ServiceImpl<RiskDao, Risk> implements RiskS
}
}

View File

@ -19,6 +19,16 @@
order by r.create_time desc
</select>
<select id="selectRiskListByUserId" resultType="com.sqx.modules.risk.entity.Risk">
select r.* from risk r
left join tb_user u on u.user_id=r.user_id
where 1=1
<if test="userId!=null and userId!=''">
and u.user_id = #{userId}
</if>
order by r.create_time desc
</select>
<select id="selectRiskGroupList" resultType="Map">
select user_id as userId,counts,
(select count(*) from risk s where s.user_id=a.user_id and risk_type=1) as ipCount,
@ -64,4 +74,4 @@
</select>
</mapper>
</mapper>