Commit 82e2df48 by 东州 翁

新增获取用户头像

parent dcde6df3
...@@ -18,11 +18,10 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,11 +18,10 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.additional.update.impl.LambdaUpdateChainWrapper;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
......
...@@ -21,7 +21,9 @@ import java.util.regex.Pattern; ...@@ -21,7 +21,9 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import javax.websocket.server.PathParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -38,8 +40,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -38,8 +40,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.util.StringUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.BetweenFormater.Level; import cn.hutool.core.date.BetweenFormater.Level;
...@@ -209,17 +210,30 @@ public class YgglController { ...@@ -209,17 +210,30 @@ public class YgglController {
return one; return one;
} }
/** /**
* 获取企业到期时间和版本 * 获取用户头像
* *
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/endtimeVersion") @PostMapping(value = "/headphotos")
@ApiOperation(value = "获取企业到期时间和版本", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取用户头像", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
public Result<YgglMainEmp> endtimeVersion(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> headphotos(@CurrentUser UserBean userBean, @RequestBody List<Integer> empNumList) {
return ResultUtil.error(); if (empNumList.size()==0) {
return ResultUtil.error("请输入empNum数组");
}
List<YgglMainEmp> yglList = YgglMainEmp.builder().build().selectList(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNumList).select(YgglMainEmp::getId,YgglMainEmp::getName,YgglMainEmp::getHeadUrl));
for (YgglMainEmp yg : yglList) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
}
}
return ResultUtil.data(yglList, "获取用户头像组成功");
} }
/** /**
* 获取员工档案 * 获取员工档案
......
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