main
parent
120d761d89
commit
2983d06fb3
|
|
@ -2,6 +2,7 @@ package com.ruoyi.app.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||||
|
|
@ -117,9 +118,9 @@ public class AppDynamicCommentController extends BaseController
|
||||||
// @RequiresPermissions("app:comment:list")
|
// @RequiresPermissions("app:comment:list")
|
||||||
@GetMapping("/treeList")
|
@GetMapping("/treeList")
|
||||||
@ApiOperation(value = "评论树列表", notes = "评论树列表", httpMethod = "GET")
|
@ApiOperation(value = "评论树列表", notes = "评论树列表", httpMethod = "GET")
|
||||||
public TableDataInfo treeList(AppDynamicComment appDynamicComment) {
|
public AjaxResult treeList(AppDynamicComment appDynamicComment) {
|
||||||
startPage();
|
startPage();
|
||||||
List<AppDynamicCommentVo> list = appDynamicCommentService.treeList(appDynamicComment);
|
Map list = appDynamicCommentService.treeList(appDynamicComment);
|
||||||
return getDataTable(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/oss")
|
@RequestMapping("/api/oss")
|
||||||
|
|
@ -26,6 +27,13 @@ public class OssController {
|
||||||
return ossService.uploadFile(file);
|
return ossService.uploadFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("uploadList")
|
||||||
|
@ApiOperation(value = "上传文件" , notes = "上传文件", produces = "file" , response = R.class)
|
||||||
|
public R uploadFile(@RequestBody List<MultipartFile> files, HttpServletRequest request
|
||||||
|
) {
|
||||||
|
return ossService.uploadFile(files);
|
||||||
|
}
|
||||||
|
|
||||||
//2、删除oss中的文件
|
//2、删除oss中的文件
|
||||||
@DeleteMapping("delete")
|
@DeleteMapping("delete")
|
||||||
@ApiOperation("删除文件")
|
@ApiOperation("删除文件")
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ public class UserSkillController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询技能标签列表
|
* 查询技能标签列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("app:skill:list")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(UserSkill userSkill)
|
public TableDataInfo list(UserSkill userSkill)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app用户对象 app_user
|
* app用户对象 app_user
|
||||||
*
|
* jobEndTime jobName jobType jobContent hobby city other
|
||||||
* @author wyh
|
* @author wyh
|
||||||
* @date 2024-04-23
|
* @date 2024-04-23
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ public class AppUserDynamicVo extends AppUserDynamic
|
||||||
@Excel(name = "专业")
|
@Excel(name = "专业")
|
||||||
private String major;
|
private String major;
|
||||||
|
|
||||||
|
@Excel(name = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "学历开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "学历开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
@ -58,6 +61,11 @@ public class AppUserDynamicVo extends AppUserDynamic
|
||||||
|
|
||||||
private String cityName;
|
private String cityName;
|
||||||
|
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
private String townName;
|
||||||
|
|
||||||
|
|
||||||
// 话题
|
// 话题
|
||||||
private List<AppTopic> appTopicList = new ArrayList<>();
|
private List<AppTopic> appTopicList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ public interface AppUserDynamicMapper
|
||||||
* @return App用户动态
|
* @return App用户动态
|
||||||
*/
|
*/
|
||||||
public AppUserDynamic selectAppUserDynamicById(Long id);
|
public AppUserDynamic selectAppUserDynamicById(Long id);
|
||||||
|
public AppUserDynamicVo selectcById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询App用户动态列表
|
* 查询App用户动态列表
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.app.service;
|
package com.ruoyi.app.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.ruoyi.app.domain.AppDynamicComment;
|
import com.ruoyi.app.domain.AppDynamicComment;
|
||||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -61,6 +63,6 @@ public interface IAppDynamicCommentService
|
||||||
*/
|
*/
|
||||||
public int deleteAppDynamicCommentById(Long id);
|
public int deleteAppDynamicCommentById(Long id);
|
||||||
|
|
||||||
public List<AppDynamicCommentVo> treeList(AppDynamicComment appDynamicComment);
|
public Map treeList(AppDynamicComment appDynamicComment);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.ruoyi.app.service.impl;
|
package com.ruoyi.app.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.ruoyi.app.domain.AppUser;
|
import com.ruoyi.app.domain.AppUser;
|
||||||
|
|
@ -119,14 +121,17 @@ public class AppDynamicCommentServiceImpl implements IAppDynamicCommentService
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppDynamicCommentVo> treeList(AppDynamicComment appDynamicComment) {
|
public Map treeList(AppDynamicComment appDynamicComment) {
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
if (appDynamicComment.getDynamicId() == null) {
|
if (appDynamicComment.getDynamicId() == null) {
|
||||||
return new ArrayList<>();
|
return map;
|
||||||
}
|
}
|
||||||
List<AppDynamicCommentVo> appDynamicComments = appDynamicCommentMapper.selectCommentList(appDynamicComment);
|
List<AppDynamicCommentVo> appDynamicComments = appDynamicCommentMapper.selectCommentList(appDynamicComment);
|
||||||
List<AppDynamicCommentVo> parentList = appDynamicComments.stream().filter(entity -> entity.getParentId() == null).collect(Collectors.toList());
|
List<AppDynamicCommentVo> parentList = appDynamicComments.stream().filter(entity -> entity.getParentId() == null).collect(Collectors.toList());
|
||||||
List<AppDynamicCommentVo> srcList = appDynamicComments.stream().filter(entity -> entity.getParentId() != null).collect(Collectors.toList());
|
List<AppDynamicCommentVo> srcList = appDynamicComments.stream().filter(entity -> entity.getParentId() != null).collect(Collectors.toList());
|
||||||
return buildList(parentList,srcList);
|
map.put("countNum",appDynamicComments.size());
|
||||||
|
map.put("list",buildList(parentList,srcList));
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
public List<AppDynamicCommentVo> buildList(List<AppDynamicCommentVo> parentList,List<AppDynamicCommentVo> srcList){
|
public List<AppDynamicCommentVo> buildList(List<AppDynamicCommentVo> parentList,List<AppDynamicCommentVo> srcList){
|
||||||
for (AppDynamicCommentVo appDynamicCommentVo : parentList) {
|
for (AppDynamicCommentVo appDynamicCommentVo : parentList) {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
|
||||||
@Override
|
@Override
|
||||||
public AppUserDynamic selectAppUserDynamicById(Long id)
|
public AppUserDynamic selectAppUserDynamicById(Long id)
|
||||||
{
|
{
|
||||||
return appUserDynamicMapper.selectAppUserDynamicById(id);
|
return appUserDynamicMapper.selectcById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -156,6 +156,9 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
|
||||||
List<AppUserCollect> appUserCollects = appUserCollectMapper.selectAppUserCollectList(appUserCollect);
|
List<AppUserCollect> appUserCollects = appUserCollectMapper.selectAppUserCollectList(appUserCollect);
|
||||||
appUserDynamic.setIds(appUserCollects.stream().map(x->x.getDynamicId()).collect(Collectors.toList()));
|
appUserDynamic.setIds(appUserCollects.stream().map(x->x.getDynamicId()).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (appUserDynamic.getAppId() == null) {
|
||||||
|
appUserDynamic.setPrivacyStatus(0l);
|
||||||
|
}
|
||||||
List<AppUserDynamicVo> list = appUserDynamicMapper.selectDynamicList(appUserDynamic);
|
List<AppUserDynamicVo> list = appUserDynamicMapper.selectDynamicList(appUserDynamic);
|
||||||
for (AppUserDynamicVo appUserDynamicVo : list) {
|
for (AppUserDynamicVo appUserDynamicVo : list) {
|
||||||
Long id = appUserDynamicVo.getId();
|
Long id = appUserDynamicVo.getId();
|
||||||
|
|
|
||||||
|
|
@ -54,14 +54,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.town_id as "townId",
|
a.town_id as "townId",
|
||||||
a.province_id as "provinceId",
|
a.province_id as "provinceId",
|
||||||
a.city_id as "cityId",
|
a.city_id as "cityId",
|
||||||
t.name as "cityName"
|
c.name as "cityName",
|
||||||
|
t.name as "townName",
|
||||||
|
p.name as "provinceName"
|
||||||
from app_user_dynamic a
|
from app_user_dynamic a
|
||||||
left join app_user u on u.id = a.user_id
|
left join app_user u on u.id = a.user_id
|
||||||
left join app_town t on t.id = a.address
|
left join app_city c on c.id = a.city_id
|
||||||
|
left join app_province p on p.id = a.province_id
|
||||||
|
left join app_town t on t.id = a.town_id
|
||||||
<where>
|
<where>
|
||||||
<if test="userId != null "> and a.user_id = #{userId}</if>
|
<if test="userId != null "> and a.user_id = #{userId}</if>
|
||||||
<if test="username != null "> and u.username like concat('%',#{username},'%')</if>
|
<if test="username != null "> and u.username like concat('%',#{username},'%')</if>
|
||||||
<if test="content != null and content != ''"> and a.content = #{content}</if>
|
<if test="content != null and content != ''"> and a.content like concat('%',#{content},'%')</if>
|
||||||
<if test="videoUrl != null and videoUrl != ''"> and a.video_url = #{videoUrl}</if>
|
<if test="videoUrl != null and videoUrl != ''"> and a.video_url = #{videoUrl}</if>
|
||||||
<if test="topicId != null "> and a.topic_id like concat('%',#{topicId},'%')</if>
|
<if test="topicId != null "> and a.topic_id like concat('%',#{topicId},'%')</if>
|
||||||
<if test="address != null and address != ''"> and a.address = #{address}</if>
|
<if test="address != null and address != ''"> and a.address = #{address}</if>
|
||||||
|
|
@ -86,6 +90,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectAppUserDynamicVo"/>
|
<include refid="selectAppUserDynamicVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectcById" parameterType="Long" resultType="com.ruoyi.app.domain.vo.AppUserDynamicVo">
|
||||||
|
select a.id as "id",a.user_id as "userId",a.content as "content",a.video_url as "videoUrl",a.topic_id as "topicId",a.address as "address",
|
||||||
|
a.is_top as "isTop",
|
||||||
|
a.privacy_status as "privacyStatus",
|
||||||
|
u.username as "username",
|
||||||
|
u.avatar_url as "avatarUrl",
|
||||||
|
u.education as "education",
|
||||||
|
u.school as "school",
|
||||||
|
u.nickname as "nickname",
|
||||||
|
u.major as "major",
|
||||||
|
u.start_time as "startTime",
|
||||||
|
u.end_time as "endTime",
|
||||||
|
u.is_member as "isMember",
|
||||||
|
a.create_time as "createTime",
|
||||||
|
a.town_id as "townId",
|
||||||
|
a.province_id as "provinceId",
|
||||||
|
a.city_id as "cityId",
|
||||||
|
c.name as "cityName",
|
||||||
|
t.name as "townName",
|
||||||
|
p.name as "provinceName"
|
||||||
|
from app_user_dynamic a
|
||||||
|
left join app_user u on u.id = a.user_id
|
||||||
|
left join app_city c on c.id = a.city_id
|
||||||
|
left join app_province p on p.id = a.province_id
|
||||||
|
left join app_town t on t.id = a.town_id
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertAppUserDynamic" parameterType="AppUserDynamic" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertAppUserDynamic" parameterType="AppUserDynamic" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into app_user_dynamic
|
insert into app_user_dynamic
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="orderEndTime" column="order_end_time" />
|
<result property="orderEndTime" column="order_end_time" />
|
||||||
<result property="check" column="check" />
|
<result property="check" column="check" />
|
||||||
<result property="backGroundImg" column="back_ground_img" />
|
<result property="backGroundImg" column="back_ground_img" />
|
||||||
|
<result property="jobEndTime" column="job_end_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="appUserColumns">
|
<sql id="appUserColumns">
|
||||||
a.id as "id",
|
a.id as "id",
|
||||||
|
|
@ -318,6 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyName != null">company_name = #{companyName},</if>
|
<if test="companyName != null">company_name = #{companyName},</if>
|
||||||
<if test="industry != null">industry = #{industry},</if>
|
<if test="industry != null">industry = #{industry},</if>
|
||||||
<if test="jobTime != null">job_time = #{jobTime},</if>
|
<if test="jobTime != null">job_time = #{jobTime},</if>
|
||||||
|
<if test="jobEndTime != null">job_end_time = #{jobEndTime},</if>
|
||||||
<if test="jobName != null">job_name = #{jobName},</if>
|
<if test="jobName != null">job_name = #{jobName},</if>
|
||||||
<if test="jobType != null">job_type = #{jobType},</if>
|
<if test="jobType != null">job_type = #{jobType},</if>
|
||||||
<if test="skillId != null">skill_id = #{skillId},</if>
|
<if test="skillId != null">skill_id = #{skillId},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue