1.修改移动端技能接口
2.修改查询足迹列表
This commit is contained in:
@@ -6,6 +6,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.AppSkill;
|
import com.ruoyi.common.core.domain.entity.AppSkill;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
@@ -57,6 +59,15 @@ public class AppSkillController extends BaseController {
|
|||||||
@ApiOperation("新增技能信息")
|
@ApiOperation("新增技能信息")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public AjaxResult save(@RequestBody AppSkill appSkill){
|
public AjaxResult save(@RequestBody AppSkill appSkill){
|
||||||
|
if(StringUtils.isEmpty(appSkill.getName())){
|
||||||
|
return AjaxResult.error("技能名称为空!");
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(appSkill.getLevels())){
|
||||||
|
return AjaxResult.error("技能等级为空!");
|
||||||
|
}
|
||||||
|
if(appSkill.getUserId()==null){
|
||||||
|
appSkill.setUserId(SiteSecurityUtils.getUserId());
|
||||||
|
}
|
||||||
return toAjax(appSkillService.insertAppskill(appSkill));
|
return toAjax(appSkillService.insertAppskill(appSkill));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,6 +77,18 @@ public class AppSkillController extends BaseController {
|
|||||||
@ApiOperation("修改技能详细信息")
|
@ApiOperation("修改技能详细信息")
|
||||||
@PutMapping("/edit")
|
@PutMapping("/edit")
|
||||||
public AjaxResult update(@RequestBody AppSkill appSkill){
|
public AjaxResult update(@RequestBody AppSkill appSkill){
|
||||||
|
if(appSkill.getId()==null){
|
||||||
|
return AjaxResult.error("技能id为空!");
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(appSkill.getName())){
|
||||||
|
return AjaxResult.error("技能名称为空!");
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(appSkill.getLevels())){
|
||||||
|
return AjaxResult.error("技能等级为空!");
|
||||||
|
}
|
||||||
|
if(appSkill.getUserId()==null){
|
||||||
|
appSkill.setUserId(SiteSecurityUtils.getUserId());
|
||||||
|
}
|
||||||
return toAjax(appSkillService.updateAppskillById(appSkill));
|
return toAjax(appSkillService.updateAppskillById(appSkill));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +98,9 @@ public class AppSkillController extends BaseController {
|
|||||||
@ApiOperation("删除技能详细信息")
|
@ApiOperation("删除技能详细信息")
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
public AjaxResult delete(@ApiParam("主键id") @PathVariable Long id){
|
public AjaxResult delete(@ApiParam("主键id") @PathVariable Long id){
|
||||||
|
if(id==null){
|
||||||
|
return AjaxResult.error("参数id未传递!");
|
||||||
|
}
|
||||||
return toAjax(appSkillService.removeAppskillIds(new Long[]{id}));
|
return toAjax(appSkillService.removeAppskillIds(new Long[]{id}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,21 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAppReviewJobListJob" parameterType="AppReviewJob" resultType="com.ruoyi.cms.domain.Job">
|
<select id="selectAppReviewJobListJob" parameterType="AppReviewJob" resultType="com.ruoyi.cms.domain.Job">
|
||||||
select b.*,a.review_date as shareTime from app_review_job a inner join job b on a.job_id=b.job_id and b.del_flag='0'
|
select distinct b.*,a.review_date as shareTime from app_review_job a inner join job b on a.job_id=b.job_id and b.del_flag='0'
|
||||||
|
inner join (select user_id, job_id, max(review_date) as max_review_date from app_review_job
|
||||||
|
where del_flag = '0'
|
||||||
|
<if test="jobId != null ">and job_id = #{jobId}</if>
|
||||||
|
<if test="userId != null ">and user_id = #{userId}</if>
|
||||||
|
group by user_id, job_id
|
||||||
|
) as max_date
|
||||||
|
on a.user_id = max_date.user_id
|
||||||
|
and a.job_id = max_date.job_id
|
||||||
|
and a.review_date = max_date.max_review_date
|
||||||
<where> a.del_flag = '0'
|
<where> a.del_flag = '0'
|
||||||
<if test="jobId != null "> and a.job_id = #{jobId}</if>
|
<if test="jobId != null "> and a.job_id = #{jobId}</if>
|
||||||
<if test="userId != null "> and a.user_id = #{userId}</if>
|
<if test="userId != null "> and a.user_id = #{userId}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by a.review_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user