用户添加viewer角色时需要用到的品牌跟责任领域

This commit is contained in:
CD
2022-11-15 14:52:56 +08:00
parent f6a917941e
commit 1f29b0bf36
12 changed files with 425 additions and 0 deletions
@@ -0,0 +1,29 @@
package com.jero.modules.project.controller;
import com.jero.modules.project.entity.ProjectUserBrand;
import com.jero.modules.project.service.IProjectUserBrandService;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
/**
* @Description: 用户品牌表
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Api(tags="用户品牌表")
@RestController
@RequestMapping("/project/projectUserBrand")
@Slf4j
public class ProjectUserBrandController extends JeroController<ProjectUserBrand, IProjectUserBrandService> {
@Autowired
private IProjectUserBrandService projectUserBrandService;
}
@@ -0,0 +1,28 @@
package com.jero.modules.project.controller;
import com.jero.modules.project.entity.ProjectUserDutyTerritory;
import com.jero.modules.project.service.IProjectUserDutyTerritoryService;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
/**
* @Description: 用户责任领域
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Api(tags="用户责任领域")
@RestController
@RequestMapping("/project/projectUserDutyTerritory")
@Slf4j
public class ProjectUserDutyTerritoryController extends JeroController<ProjectUserDutyTerritory, IProjectUserDutyTerritoryService> {
@Autowired
private IProjectUserDutyTerritoryService projectUserDutyTerritoryService;
}
@@ -0,0 +1,51 @@
package com.jero.modules.project.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 用户品牌表
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Data
@TableName("project_user_brand")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_user_brand对象", description="用户品牌表")
public class ProjectUserBrand implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**用户id*/
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private String userId;
/**品牌类型*/
@Excel(name = "品牌类型", width = 15)
@ApiModelProperty(value = "品牌类型")
@Dict(dicCode = "brand")
private String brandType;
}
@@ -0,0 +1,51 @@
package com.jero.modules.project.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 用户责任领域
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Data
@TableName("project_user_duty_territory")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_user_duty_territory对象", description="用户责任领域")
public class ProjectUserDutyTerritory implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**用户id*/
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private String userId;
/**责任领域*/
@Excel(name = "责任领域", width = 15)
@ApiModelProperty(value = "责任领域")
@Dict(dicCode = "duty_territory")
private String dutyTerritory;
}
@@ -0,0 +1,17 @@
package com.jero.modules.project.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProjectUserBrand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 用户品牌表
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
public interface ProjectUserBrandMapper extends BaseMapper<ProjectUserBrand> {
}
@@ -0,0 +1,17 @@
package com.jero.modules.project.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProjectUserDutyTerritory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 用户责任领域
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
public interface ProjectUserDutyTerritoryMapper extends BaseMapper<ProjectUserDutyTerritory> {
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jero.modules.project.mapper.ProjectUserBrandMapper">
<resultMap id="ProjectUserBrandResultMap" type="com.jero.modules.project.entity.ProjectUserBrand">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="brand_type" property="brandType" />
</resultMap>
</mapper>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jero.modules.project.mapper.ProjectUserDutyTerritoryMapper">
<resultMap id="ProjectUserDutyTerritoryResultMap" type="com.jero.modules.project.entity.ProjectUserDutyTerritory">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="duty_territory" property="dutyTerritory" />
</resultMap>
</mapper>
@@ -0,0 +1,45 @@
package com.jero.modules.project.service;
import com.jero.modules.project.entity.ProjectUserBrand;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 用户品牌表
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
public interface IProjectUserBrandService extends IService<ProjectUserBrand> {
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectUserBrand queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectUserBrand> queryList();
}
@@ -0,0 +1,45 @@
package com.jero.modules.project.service;
import com.jero.modules.project.entity.ProjectUserDutyTerritory;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 用户责任领域
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
public interface IProjectUserDutyTerritoryService extends IService<ProjectUserDutyTerritory> {
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectUserDutyTerritory queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectUserDutyTerritory> queryList();
}
@@ -0,0 +1,62 @@
package com.jero.modules.project.service.impl;
import com.jero.modules.project.entity.ProjectUserBrand;
import com.jero.modules.project.mapper.ProjectUserBrandMapper;
import com.jero.modules.project.service.IProjectUserBrandService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 用户品牌表
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Service
public class ProjectUserBrandServiceImpl extends ServiceImpl<ProjectUserBrandMapper, ProjectUserBrand> implements IProjectUserBrandService {
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public ProjectUserBrand queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectUserBrand> queryList() {
return list();
}
}
@@ -0,0 +1,62 @@
package com.jero.modules.project.service.impl;
import com.jero.modules.project.entity.ProjectUserDutyTerritory;
import com.jero.modules.project.mapper.ProjectUserDutyTerritoryMapper;
import com.jero.modules.project.service.IProjectUserDutyTerritoryService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 用户责任领域
* @Author: jero-boot
* @Date: 2022-11-15
* @Version: V1.0
*/
@Service
public class ProjectUserDutyTerritoryServiceImpl extends ServiceImpl<ProjectUserDutyTerritoryMapper, ProjectUserDutyTerritory> implements IProjectUserDutyTerritoryService {
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public ProjectUserDutyTerritory queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectUserDutyTerritory> queryList() {
return list();
}
}