提交 87c415b7 作者: zhenjie

添加单位管理接口

上级 cd50860a
......@@ -116,4 +116,12 @@ public class CompanyController extends BaseController {
@RequestParam Integer pageSize) {
return companyService.listCompanyMembers(companyInfoId, this.getUserLoginInfoFromRedis(request), pageNo, pageSize);
}
@ApiIgnore
@ApiOperation(value = "批量获取单位信息")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInfoVO.class)})
@PostMapping("listCompanyInfoByIds")
public List<CompanyInfoVO> listCompanyInfoByIds(@RequestBody List<Integer> ids) {
return companyService.listCompanyInfoByIds(ids);
}
}
......@@ -197,4 +197,6 @@ public interface CompanyDao {
void unbindingAllAppUsers(Integer id);
void unbindingAllPcUsers(Integer id);
List<CompanyInfoDO> listCompanyInfoByIds(@Param("ids") List<Integer> ids);
}
......@@ -162,4 +162,6 @@ public interface CompanyService {
* @param id
*/
void unbindingAllUsers(Integer id);
List<CompanyInfoVO> listCompanyInfoByIds(List<Integer> ids);
}
......@@ -230,4 +230,11 @@ public class CompanyServiceImpl implements CompanyService {
// 解绑后台账号
companyDao.unbindingAllPcUsers(id);
}
@Override
public List<CompanyInfoVO> listCompanyInfoByIds(List<Integer> ids) {
List<CompanyInfoDO> companyInfoDOS = companyDao.listCompanyInfoByIds(ids);
List<CompanyInfoVO> companyInfoVOS = companyInfoDOS.stream().map(CompanyInfoDO::buildCompanyInfoVO).collect(Collectors.toList());
return companyInfoVOS;
}
}
......@@ -241,4 +241,16 @@
<select id="countBingingCompanyInfoByUID" resultType="java.lang.Integer">
select count(*) from company_member where user_account_id = #{userAccountId}
</select>
<select id="listCompanyInfoByIds" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
select id, company_type, company_name, full_name, province, city, district, address, company_user_name,
phone_num, remark, create_time, content, score
from company_info
where is_deleted = 0
<if test="ids != null">
<foreach collection="ids" separator="," open="and id in (" close=")" item="id">
#{id}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论