Commit 4daed039 authored by hezhen's avatar hezhen

123

parent 37666c11
......@@ -72,6 +72,8 @@ public class AppUserDTO {
private Integer lockDays;
private Integer discount;
private Integer memberLevel;
//图标
private String icon;
private Integer memberNo;
private Long cardLeave;
private Integer isBind;
......
......@@ -30,6 +30,16 @@ public class UserMemberLevelBiz extends BaseBiz<BaseUserMemberLevelMapper,BaseUs
return mapper.selectByExample(example);
}
public BaseUserMemberLevel getLevel(Integer level) {
Example example=new Example(BaseUserMemberLevel.class);
example.createCriteria().andEqualTo("isdel",0).andEqualTo("level",level);
List<BaseUserMemberLevel> list=mapper.selectByExample(example);
if (list.size()>0){
return list.get(0);
}
return null;
}
@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
public Map<Integer,Integer> getUserMemberLevelAndDisCountMapByLevels(List<Integer> levels){
List<BaseUserMemberLevel> baseUserMemberLevels = mapper.selectUserMembersLevelByLevels(levels);
......
......@@ -50,6 +50,9 @@ public class AppUserController extends CommonBaseController {
@Autowired
AppUserPositionBiz positionBiz;
@Autowired
private UserMemberLevelBiz userMemberLevelBiz;
@GetMapping("page")
public TableResultResponse list(@RequestParam Map<String, Object> params) {
Query query = new Query(params);
......@@ -126,6 +129,12 @@ public class AppUserController extends CommonBaseController {
UserMemberVo memberVo=userMemberBiz.getMemberInfoByUserId(userid);
if(memberVo!=null){
BeanUtils.copyProperties(userDTO,memberVo);
Integer level=memberVo.getMemberLevel();
BaseUserMemberLevel memberLevel=userMemberLevelBiz.getLevel(level);
if (memberLevel!=null){
String icon=memberLevel.getIcon();
userDTO.setIcon(icon);
}
}
}
AppUserPosition userPosition=positionBiz.selectById(positionId);
......
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