| @@ -85,4 +85,13 @@ public class InvestRemindController extends InvestBaseController { | |||||
| return execute(ids, p -> investRemindService.removeByIds(Arrays.asList(p))); | return execute(ids, p -> investRemindService.removeByIds(Arrays.asList(p))); | ||||
| } | } | ||||
| /** | |||||
| * 删除登录用户全部提醒 | |||||
| */ | |||||
| @SystemServiceLog | |||||
| @PostMapping("/deleteAll") | |||||
| public InvestResultData deleteAll() { | |||||
| return execute(null, p -> investRemindService.removeAll()); | |||||
| } | |||||
| } | } | ||||
| @@ -9,6 +9,7 @@ import com.iformall.service.invest.InvestTaskService; | |||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| import org.apache.shiro.authz.annotation.RequiresPermissions; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| @@ -35,9 +36,10 @@ public class InvestTaskController extends InvestBaseController { | |||||
| /** | /** | ||||
| * 分页列表 | * 分页列表 | ||||
| */ | */ | ||||
| //@RequiresPermissions("InvestTaskQuery") | |||||
| @SystemServiceLog | @SystemServiceLog | ||||
| @ApiOperation("分页列表接口") | @ApiOperation("分页列表接口") | ||||
| @GetMapping("/list") | |||||
| @PostMapping("/list") | |||||
| public InvestResultData<InvestPageResult<InvestTaskVo>> list(InvestTaskQuery params) { | public InvestResultData<InvestPageResult<InvestTaskVo>> list(InvestTaskQuery params) { | ||||
| return execute(params, p -> bizService.queryPageTask(p)); | return execute(params, p -> bizService.queryPageTask(p)); | ||||
| } | } | ||||
| @@ -69,4 +69,8 @@ public class MallPermission extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="子菜单",name="children") | @io.swagger.annotations.ApiModelProperty(value="子菜单",name="children") | ||||
| private List<?> children; | private List<?> children; | ||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="页面按钮",name="btnChildren") | |||||
| private List<?> btnChildren; | |||||
| } | } | ||||
| @@ -12,6 +12,8 @@ public interface MallPermissionMapper extends CommonMapper<MallPermission, Strin | |||||
| List<MallPermission> queryListParentId(Long parentId); | List<MallPermission> queryListParentId(Long parentId); | ||||
| List<MallPermission> queryBtnListByParentId(Long parentId); | |||||
| List<MallPermission> queryNotButtonList(); | List<MallPermission> queryNotButtonList(); | ||||
| @@ -16,13 +16,13 @@ import com.iformall.mapper.MallPermissionMapper; | |||||
| import com.iformall.mapper.MallUserInfoMapper; | import com.iformall.mapper.MallUserInfoMapper; | ||||
| import com.iformall.mapper.WxMallMapper; | import com.iformall.mapper.WxMallMapper; | ||||
| import com.iformall.service.MallPermissionService; | import com.iformall.service.MallPermissionService; | ||||
| import org.apache.commons.collections.CollectionUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.ArrayList; | |||||
| import java.util.List; | |||||
| import java.util.*; | |||||
| @Service | @Service | ||||
| public class MallPermissionServiceImpl implements MallPermissionService { | public class MallPermissionServiceImpl implements MallPermissionService { | ||||
| @@ -137,13 +137,16 @@ public class MallPermissionServiceImpl implements MallPermissionService { | |||||
| if(entity.getResourceType().equals(EnumPermissionType.CATALOG.getCode())){ | if(entity.getResourceType().equals(EnumPermissionType.CATALOG.getCode())){ | ||||
| entity.setChildren(getMenuTreeList(queryListParentId(entity.getId(), menuIdList, boolNav), menuIdList, boolNav)); | entity.setChildren(getMenuTreeList(queryListParentId(entity.getId(), menuIdList, boolNav), menuIdList, boolNav)); | ||||
| } | } | ||||
| List<MallPermission> btnList = mallPermissionMapper.queryBtnListByParentId(entity.getId()); | |||||
| if (CollectionUtils.isNotEmpty(btnList)) { | |||||
| entity.setBtnChildren(btnList); | |||||
| } | |||||
| subMenuList.add(entity); | subMenuList.add(entity); | ||||
| } | } | ||||
| return subMenuList; | return subMenuList; | ||||
| } | } | ||||
| @Override | @Override | ||||
| public PageInfo<MallPermission> listAsPage(MallPermission record, Integer pageIndex, Integer pageSize) { | public PageInfo<MallPermission> listAsPage(MallPermission record, Integer pageIndex, Integer pageSize) { | ||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> mallPermissionMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> mallPermissionMapper.findList(record)); | ||||
| @@ -15,5 +15,7 @@ import com.iformall.domain.vo.invest.InvestPageResult; | |||||
| public interface InvestRemindService extends IService<InvestRemindEntity>,InvestBaseService<InvestRemindEntity> { | public interface InvestRemindService extends IService<InvestRemindEntity>,InvestBaseService<InvestRemindEntity> { | ||||
| InvestPageResult<InvestRemindEntity> queryPage(InvestPageQuery<InvestRemindEntity> params); | InvestPageResult<InvestRemindEntity> queryPage(InvestPageQuery<InvestRemindEntity> params); | ||||
| boolean removeAll() ; | |||||
| } | } | ||||
| @@ -29,7 +29,7 @@ public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl<InvestF | |||||
| public InvestPageResult<InvestFollowRecordEntity> queryPage(InvestPageQuery<InvestFollowRecordEntity> params) { | public InvestPageResult<InvestFollowRecordEntity> queryPage(InvestPageQuery<InvestFollowRecordEntity> params) { | ||||
| InvestFollowRecordEntity queryData = params.getQueryData(); | InvestFollowRecordEntity queryData = params.getQueryData(); | ||||
| InvestHelper.notNull(queryData); | InvestHelper.notNull(queryData); | ||||
| InvestHelper.notNull(queryData.getFollowId(), "followId"); | |||||
| //InvestHelper.notNull(queryData.getFollowId(), "followId"); | |||||
| InvestHelper.notNull(queryData.getType(), "type"); | InvestHelper.notNull(queryData.getType(), "type"); | ||||
| return super.queryPage(params); | return super.queryPage(params); | ||||
| } | } | ||||
| @@ -1,6 +1,8 @@ | |||||
| package com.iformall.service.invest.impl; | package com.iformall.service.invest.impl; | ||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | import com.baomidou.mybatisplus.core.conditions.Wrapper; | ||||
| import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |||||
| import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper; | |||||
| import com.iformall.domain.po.invest.InvestRemindEntity; | import com.iformall.domain.po.invest.InvestRemindEntity; | ||||
| import com.iformall.domain.vo.invest.InvestUserContext; | import com.iformall.domain.vo.invest.InvestUserContext; | ||||
| import com.iformall.mapper.InvestRemindDao; | import com.iformall.mapper.InvestRemindDao; | ||||
| @@ -33,6 +35,14 @@ public class InvestRemindServiceImpl extends InvestBaseServiceImpl<InvestRemindD | |||||
| return super.updateByIdAction(entity, this::checkBeforeSaveOrUpdate); | return super.updateByIdAction(entity, this::checkBeforeSaveOrUpdate); | ||||
| } | } | ||||
| @Override | |||||
| public boolean removeAll() { | |||||
| LambdaUpdateWrapper<InvestRemindEntity> wrapper = new LambdaUpdateWrapper<>(); | |||||
| wrapper.eq(InvestRemindEntity::getTenantId, InvestUserContext.getUser().getTenantId()); | |||||
| wrapper.eq(InvestRemindEntity::getOwner, InvestUserContext.getUserId()); | |||||
| return super.remove(wrapper); | |||||
| } | |||||
| private void checkBeforeSaveOrUpdate(InvestRemindEntity input) { | private void checkBeforeSaveOrUpdate(InvestRemindEntity input) { | ||||
| input.setOwner(InvestUserContext.getUserId()); | input.setOwner(InvestUserContext.getUserId()); | ||||
| if (Objects.nonNull(input.getContent())) { | if (Objects.nonNull(input.getContent())) { | ||||
| @@ -96,6 +96,13 @@ | |||||
| where 1=1 and `parent_id` = #{value} and available = 'Y' order by sort asc | where 1=1 and `parent_id` = #{value} and available = 'Y' order by sort asc | ||||
| </select> | </select> | ||||
| <select id="queryBtnListByParentId" parameterType="long" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from mall_permission | |||||
| where `parent_id` = #{value} and available = 'Y' and `resource_type` = 2 order by sort asc | |||||
| </select> | |||||
| <select id="queryNotButtonList" resultMap="BaseResultMap"> | <select id="queryNotButtonList" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||