Commit 0f2351ff authored by zhouxudong's avatar zhouxudong

更新代码

parent cd419441
package com.postcard.service.moudle.startObjectExtensionInfo.enums; package com.postcard.service.enums;
public enum StarObjectTitleOfTypeEnum { public enum StarObjectTitleOfTypeEnum {
INDUSTRY("产业情况"), INDUSTRY("产业情况"),
......
...@@ -8,6 +8,7 @@ import com.postcard.service.moudle.system.dto.InvestClueInfoSave; ...@@ -8,6 +8,7 @@ import com.postcard.service.moudle.system.dto.InvestClueInfoSave;
import com.postcard.service.moudle.system.dto.InvestCluePageDto; import com.postcard.service.moudle.system.dto.InvestCluePageDto;
import com.postcard.service.moudle.system.entity.InvestClueInfoEntity; import com.postcard.service.moudle.system.entity.InvestClueInfoEntity;
import com.postcard.service.moudle.system.vo.InvestClueInfoPage; import com.postcard.service.moudle.system.vo.InvestClueInfoPage;
import com.postcard.service.moudle.system.vo.InvestNumVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -39,4 +40,9 @@ public class InvestClueInfoController { ...@@ -39,4 +40,9 @@ public class InvestClueInfoController {
public Page<InvestClueInfoEntity> page(@RequestBody ParamEntity<InvestCluePageDto> param) { public Page<InvestClueInfoEntity> page(@RequestBody ParamEntity<InvestCluePageDto> param) {
return investClueInfoService.pageList(param); return investClueInfoService.pageList(param);
} }
@GetMapping("/haveAuth")
@ApiOperation(value = "是否有列表查询权限 需要登录")
public InvestNumVo haveAuth(){
return this.investClueInfoService.haveAuth();
}
} }
...@@ -6,6 +6,7 @@ import com.postcard.service.domain.ParamEntity; ...@@ -6,6 +6,7 @@ import com.postcard.service.domain.ParamEntity;
import com.postcard.service.moudle.system.dto.InvestCluePageDto; import com.postcard.service.moudle.system.dto.InvestCluePageDto;
import com.postcard.service.moudle.system.entity.InvestClueInfoEntity; import com.postcard.service.moudle.system.entity.InvestClueInfoEntity;
import com.postcard.service.moudle.system.vo.InvestClueInfoPage; import com.postcard.service.moudle.system.vo.InvestClueInfoPage;
import com.postcard.service.moudle.system.vo.InvestNumVo;
/** /**
* 投资舒城 投资线索表;(invest_clue_info)表服务接口 * 投资舒城 投资线索表;(invest_clue_info)表服务接口
...@@ -20,4 +21,11 @@ public interface InvestClueInfoService extends IService<InvestClueInfoEntity> { ...@@ -20,4 +21,11 @@ public interface InvestClueInfoService extends IService<InvestClueInfoEntity> {
* @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.postcard.service.moudle.system.vo.InvestCluePageVo> * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.postcard.service.moudle.system.vo.InvestCluePageVo>
**/ **/
Page<InvestClueInfoEntity> pageList(ParamEntity<InvestCluePageDto> param); Page<InvestClueInfoEntity> pageList(ParamEntity<InvestCluePageDto> param);
/**
* @description: 是否有列表查询权限
* @date: 2023/12/17 14:01
* @param: []
* @return: com.postcard.service.moudle.system.vo.InvestNumVo
**/
InvestNumVo haveAuth();
} }
...@@ -4,6 +4,9 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.postcard.service.config.auth.BaseContextHandler;
import com.postcard.service.config.auth.CurrentUserInterceptor;
import com.postcard.service.domain.JwtInfo;
import com.postcard.service.domain.ParamEntity; import com.postcard.service.domain.ParamEntity;
import com.postcard.service.enums.DictCodeEnum; import com.postcard.service.enums.DictCodeEnum;
import com.postcard.service.moudle.system.dto.InvestCluePageDto; import com.postcard.service.moudle.system.dto.InvestCluePageDto;
...@@ -11,8 +14,12 @@ import com.postcard.service.moudle.system.entity.InvestClueInfoEntity; ...@@ -11,8 +14,12 @@ import com.postcard.service.moudle.system.entity.InvestClueInfoEntity;
import com.postcard.service.moudle.system.entity.SysDictDataEntity; import com.postcard.service.moudle.system.entity.SysDictDataEntity;
import com.postcard.service.moudle.system.service.SysDictDataService; import com.postcard.service.moudle.system.service.SysDictDataService;
import com.postcard.service.moudle.system.vo.InvestClueInfoPage; import com.postcard.service.moudle.system.vo.InvestClueInfoPage;
import com.postcard.service.moudle.system.vo.InvestNumVo;
import com.postcard.service.moudle.user.entity.UserAppletEntity;
import com.postcard.service.moudle.user.service.UserService;
import com.postcard.service.util.CommonUtil; import com.postcard.service.util.CommonUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.postcard.service.moudle.system.mapper.InvestClueInfoMapper; import com.postcard.service.moudle.system.mapper.InvestClueInfoMapper;
import com.postcard.service.moudle.system.service.InvestClueInfoService; import com.postcard.service.moudle.system.service.InvestClueInfoService;
...@@ -32,6 +39,7 @@ public class InvestClueInfoServiceImpl ...@@ -32,6 +39,7 @@ public class InvestClueInfoServiceImpl
extends ServiceImpl<InvestClueInfoMapper, InvestClueInfoEntity> extends ServiceImpl<InvestClueInfoMapper, InvestClueInfoEntity>
implements InvestClueInfoService { implements InvestClueInfoService {
private final SysDictDataService sysDictDataService; private final SysDictDataService sysDictDataService;
private final UserService userService;
/** /**
* @description: 投资线索分页查询 * @description: 投资线索分页查询
* @date: 2023/12/16 11:56 * @date: 2023/12/16 11:56
...@@ -53,4 +61,22 @@ public class InvestClueInfoServiceImpl ...@@ -53,4 +61,22 @@ public class InvestClueInfoServiceImpl
}); });
return pageInfo; return pageInfo;
} }
/**
* @description: 是否有列表查询权限
* @date: 2023/12/17 14:01
* @param: []
* @return: com.postcard.service.moudle.system.vo.InvestNumVo
**/
@Override
public InvestNumVo haveAuth() {
InvestNumVo investNumVo=new InvestNumVo();
JwtInfo currentUserInfo = BaseContextHandler.getCurrentUserInfo();
Long userId = currentUserInfo.getUserId();
UserAppletEntity userApplet = userService.getById(userId);
Integer haveAuth = userApplet.getHaveAuth();
investNumVo.setHaveInvest(ObjectUtils.isNotEmpty(haveAuth) && haveAuth.equals(1));
long count = this.count();
investNumVo.setNumb(count);
return investNumVo;
}
} }
...@@ -2,6 +2,7 @@ package com.postcard.service.moudle.system.vo; ...@@ -2,6 +2,7 @@ package com.postcard.service.moudle.system.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
...@@ -18,6 +19,7 @@ import java.time.LocalDateTime; ...@@ -18,6 +19,7 @@ import java.time.LocalDateTime;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ToString @ToString
@ApiModel(value = "咨询列表", description = "")
public class InvestClueInfoPage { public class InvestClueInfoPage {
/** 所属企业 */ /** 所属企业 */
@ApiModelProperty(name = "所属企业", notes = "") @ApiModelProperty(name = "所属企业", notes = "")
......
package com.postcard.service.moudle.system.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
/**
* @Author:zhouxudong
* @version: 1.0
* @Date: 2023/12/17 13:57
* @Description: 投资舒城页面查询是否有咨询列表和列表数量
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ApiModel(value = "是否有咨询列表和列表数量", description = "")
public class InvestNumVo {
//是否有咨询列表权限
@ApiModelProperty(name = "是否有咨询列表权限", notes = "")
private Boolean haveInvest;
//咨询列表数目
@ApiModelProperty(name = "咨询列表数目", notes = "")
private long numb;
}
...@@ -23,6 +23,8 @@ public class UserAppletEntity extends BaseEntity { ...@@ -23,6 +23,8 @@ public class UserAppletEntity extends BaseEntity {
private String nickName; private String nickName;
// 性别 0:男 1:女 // 性别 0:男 1:女
private Integer gender; private Integer gender;
//是否有权限 查看列表
private Integer haveAuth;
// 头像 // 头像
private String avatarUrl; private String avatarUrl;
// openId // openId
...@@ -35,4 +37,5 @@ public class UserAppletEntity extends BaseEntity { ...@@ -35,4 +37,5 @@ public class UserAppletEntity extends BaseEntity {
private String city; private String city;
// 手机号 // 手机号
private String phone; private String phone;
} }
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