| | |
| | | package com.moral.api.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.moral.api.entity.ManageRoleMenu; |
| | | import com.moral.api.mapper.ManageRoleMenuMapper; |
| | | import com.moral.api.service.ManageRoleMenuService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class ManageRoleMenuServiceImpl extends ServiceImpl<ManageRoleMenuMapper, ManageRoleMenu> implements ManageRoleMenuService { |
| | | |
| | | @Autowired(required = false) |
| | | private ManageRoleMenuMapper manageRoleMenuMapper; |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Map<String, Object> updateRoleMenu(List list, int id) { |
| | | Map<String,Object> resultMap = new HashMap<>(); |
| | | if (list.size()==0){ |
| | | resultMap.put("code",ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | return resultMap; |
| | | } |
| | | QueryWrapper<ManageRoleMenu> wrapper = new QueryWrapper(); |
| | | wrapper.eq("role_id",id); |
| | | System.out.println(manageRoleMenuMapper.selectCount(wrapper)); |
| | | if (manageRoleMenuMapper.selectCount(wrapper)==0){ |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | } |