公告通知功能、共享文档

This commit is contained in:
ajaxfan
2021-01-15 17:43:51 +08:00
parent 91dd325507
commit 72cc8fc948
36 changed files with 2333 additions and 1 deletions

33
.gitignore vendored Normal file
View File

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

7
Dockerfile-gz Normal file
View File

@ -0,0 +1,7 @@
FROM harbor.dcos.guangzhou.unicom.local/eshop/skywalking_agent_springboot_8.1.0:v1.0
ENV LC_ALL=zh_CN.utf8
ENV LANG=zh_CN.utf8
ENV LANGUAGE=zh_CN.utf8
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ADD /target/biz_service_ebtp_extend-0.0.1.jar /biz_service_ebtp_extend-0.0.1.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"]

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# 扩展功能微服务组件
公告通知功能、共享文档...
## 组件模块
1. 包名:功能
2. 包名:功能
3. 包名:功能

View File

@ -1 +0,0 @@
Hello World!

17
config-gz Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://10.125.164.35:48662
name: demok8s
contexts:
- context:
cluster: demok8s
user: cluster-admin
name: default
current-context: default
kind: Config
users:
- name: cluster-admin
user:
token: df5e4896a4f6d1b1447b2584ca7405f7

83
deployment-gz.yaml Normal file
View File

@ -0,0 +1,83 @@
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: biz-service-ebtp-extend
namespace: default
labels:
app: biz-service-ebtp-extend
# 必选,详细定义
spec:
# pod 副本数量
replicas: 1
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# 选择器匹配pod模板
selector:
matchLabels:
app: biz-service-ebtp-extend
template:
metadata:
labels:
# 模板名称
app: biz-service-ebtp-extend
# 定义容器模板,该模板可以包含多个容器
spec:
# 挂载日志存储
volumes:
- name: log
persistentVolumeClaim:
claimName: log-pvc
readOnly: false
- name: storage
persistentVolumeClaim:
claimName: file-pvc
readOnly: false
# 必选Pod中容器列表
containers:
- name: biz-service-ebtp-extend
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest
# 在容器中挂载日志存储区
volumeMounts:
- name: log
mountPath: /log
- name: storage
mountPath: /storage
# 需要暴露的端口库号列表
ports:
- containerPort: 18018
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
value: http://10.242.31.158:6001
---
kind: Service
apiVersion: v1
metadata:
name: biz-service-ebtp-extend
namespace: default
labels:
app: biz-service-ebtp-extend
annotations:
lb.cke.tg.unicom/target-vports: 18018-18018
spec:
ports:
- port: 18018
targetPort: 18018
selector:
app: biz-service-ebtp-extend
status:
loadBalancer: {}
---

117
pom.xml Normal file
View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.chinaunicom.mall.ebtp</groupId>
<artifactId>biz_service_ebtp_extend</artifactId>
<version>0.0.1</version>
<name>biz_service_ebtp_extend</name>
<dependencies>
<dependency>
<groupId>com.chinaunicom.mall.ebtp</groupId>
<artifactId>uboot-core</artifactId>
<version>0.0.2-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-security-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-attachment-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-eureka-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-feign-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-apollo-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-jpa-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-seata-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-swagger-starter</artifactId>
</dependency>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-redis-starter</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-snapshot-local</id>
<name>maven-snapshot-local</name>
<url>http://ccp.tianti.tg.unicom.local/artifactory/tianti-maven-snapshot-local/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/mapper/*Mapper.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,26 @@
package com.chinaunicom.mall.ebtp.extend;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication(exclude = {
DataSourceAutoConfiguration.class,
DruidDataSourceAutoConfigure.class
})
@EnableFeignClients
@EnableEurekaClient
@MapperScan({"com.chinaunicom.mall.ebtp.extend.**.dao"})
@ComponentScan("com.chinaunicom.mall.ebtp.*")
public class BizServiceEbtpExtendApplication {
public static void main(String[] args) {
SpringApplication.run(BizServiceEbtpExtendApplication.class, args);
}
}

View File

@ -0,0 +1,42 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.column;
/**
* 字段常量 BizBidNotice
*
* @auto.generated
*/
public class BizBidNoticeField {
/**
*
*/
public static final String NOTICE_ID = "notice_id";
/**
* 标题
*/
public static final String NOTICE_TITLE = "notice_title";
/**
* 内容
*/
public static final String NOTICE_CONTENT = "notice_content";
/**
* 文件名
*/
public static final String NOTICE_FILE_NAME = "notice_file_name";
/**
* 文件URL
*/
public static final String NOTICE_FILE_URL = "notice_file_url";
}

View File

@ -0,0 +1,202 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.controller;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.service.IBizBidNoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@Api(tags = "通知公告管理")
@RequestMapping("/api/biz-service-ebtp-extend/v1/bizbidnotice")
public class BizBidNoticeController {
@Resource
private IBizBidNoticeService ibizBidNoticeService;
@Autowired
private IBaseCacheUserService iBaseCacheUserService;
/**
* 查询发布数据
*
* @param id
*
* @return
*/
@ApiOperation("查询发布列表")
@PostMapping("/list")
public BaseResponse<List<BizBidNotice>> get(@RequestBody BizBidNotice bizBidNotice) {
if (bizBidNotice.getCurrent() == null || bizBidNotice.getPageSize() == null) {
return BaseResponse.fail("请传入分页功能所需参数current,pageSize", null);
}
// 前端第一页默认传1而不是0
if (bizBidNotice.getCurrent() == 1) {
bizBidNotice.setCurrent(0);
}
if("已发布".equals(bizBidNotice.getNoticeRelease())){
bizBidNotice.setNoticeRelease("open");
}else if("未发布".equals(bizBidNotice.getNoticeRelease())){
bizBidNotice.setNoticeRelease("close");
}
return BaseResponse.success(ibizBidNoticeService.getlist(bizBidNotice));
}
/**
* 查询所有数据
*
* @param id
*
* @return
*/
@ApiOperation("查询所有列表")
@PostMapping("/allList")
public BaseResponse<List<BizBidNotice>> getAll(@RequestBody BizBidNotice bizBidNotice) {
if (bizBidNotice.getCurrent() == null || bizBidNotice.getPageSize() == null) {
return BaseResponse.fail("请传入分页功能所需参数current,pageSize", null);
}
// 前端第一页默认传1而不是0
if (bizBidNotice.getCurrent() == 1) {
bizBidNotice.setCurrent(0);
}
if("已发布".equals(bizBidNotice.getNoticeRelease())){
bizBidNotice.setNoticeRelease("open");
}else if("未发布".equals(bizBidNotice.getNoticeRelease())){
bizBidNotice.setNoticeRelease("close");
}else{
bizBidNotice.setNoticeRelease(null);
}
return BaseResponse.success(ibizBidNoticeService.getAllList(bizBidNotice));
}
/**
* 插入新数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("插入新数据")
@PostMapping("/add")
public BaseResponse<Boolean> insert(
@ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidNotice bizBidNotice) {
bizBidNotice.setNoticeName(iBaseCacheUserService.getCacheUser().getFullName());
return BaseResponse.success(ibizBidNoticeService.saveOrUpdate(bizBidNotice));
}
/**
* 修改数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("修改数据")
@PostMapping("/update")
public BaseResponse<Boolean> update(
@ApiParam(value = "对象数据", required = true) @RequestBody BizBidNotice bizBidNotice) {
return BaseResponse.success(ibizBidNoticeService.saveOrUpdate(bizBidNotice));
}
/**
* 发布数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("发布数据")
@PostMapping("/fabu/{id}")
public BaseResponse<Boolean> fabu(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.fabu(id));
}
/**
* 取消发布数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("发布数据")
@PostMapping("/qxfabu/{id}")
public BaseResponse<Boolean> qxfabu(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.qxfabu(id));
}
/**
* 置顶数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("置顶数据")
@PostMapping("/top/{id}")
public BaseResponse<Boolean> top(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.top(id));
}
/**
* 取消置顶数据
*
* @param bizBidNotice
*
* @return
*/
@ApiOperation("取消置顶数据")
@PostMapping("/qxtop/{id}")
public BaseResponse<Boolean> qxtop(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.qxtop(id));
}
/**
* 查询数据
*
* @param id
*
* @return
*/
@ApiOperation("查询数据")
@GetMapping("/select/{id}")
public BaseResponse<BizBidNotice> get(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.getById(id));
}
/**
* 删除数据
*
* @param id
*
* @return
*/
@ApiOperation("删除数据")
@PostMapping("/delete/{id}")
public BaseResponse<Integer> delete(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidNoticeService.deleteOff(id));
}
}

View File

@ -0,0 +1,30 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.dao;
import java.time.LocalDateTime;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
public interface BizBidNoticeMapper extends IBaseMapper<BizBidNotice> {
public int deleteOff(Long id);
public List<BizBidNotice> getList(@Param("noticeTitle")String noticeTitle,@Param("noticeName") String noticeName, @Param("createDate")LocalDateTime createDate,@Param("noticeRelease") String noticeRelease, @Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
public List<BizBidNotice> getListByTitle(@Param("noticeTitle")String noticeTitle,@Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
public List<BizBidNotice> getAllList(@Param("noticeTitle")String noticeTitle,@Param("noticeName") String noticeName, @Param("createDate")LocalDateTime createDate,@Param("noticeRelease") String noticeRelease,@Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
public List<BizBidNotice> getAllListByTitle(@Param("noticeTitle")String noticeTitle,@Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
public Boolean fabu(@Param("id")Long id);
public Boolean qxfabu(@Param("id")Long id);
public Boolean top(@Param("id")Long id);
public Boolean qxtop(@Param("id")Long id);
}

View File

@ -0,0 +1,134 @@
<?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.chinaunicom.mall.ebtp.extend.bizbidnotice.dao.BizBidNoticeMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="notice_name" jdbcType="VARCHAR" property="noticeName"/>
<result column="notice_title" jdbcType="VARCHAR" property="noticeTitle"/>
<result column="notice_content" jdbcType="VARCHAR" property="noticeContent"/>
<result column="notice_file" jdbcType="VARCHAR" property="noticeFile"/>
<result column="notice_release" jdbcType="VARCHAR" property="noticeRelease"/>
<result column="notice_top" jdbcType="VARCHAR" property="noticeTop"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="tenant_name" jdbcType="VARCHAR" property="tenantName"/>
<result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
</resultMap>
<sql id="selectSzReplenishVo">
select id,notice_name, notice_title, notice_content, notice_file,notice_release,notice_top, create_by,
create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_notice
</sql>
<select id="getList" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal"
<if test="null != noticeTitle and '' != noticeTitle">
and notice_title like '%${noticeTitle}%'
</if>
<if test="null != noticeName and '' != noticeName">
and notice_name like '%${noticeName}%'
</if>
and notice_release="open"
ORDER BY notice_top limit #{pageIndex},#{pageSize}
</select>
<select id="getListByTitle" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal"
and notice_release="open" and notice_title like '%${noticeTitle}%' ORDER BY notice_top limit #{pageIndex},#{pageSize}
</select>
<select id="getAllList" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal"
<if test="null != noticeTitle and '' != noticeTitle">
and notice_title like '%${noticeTitle}%'
</if>
<if test="null != noticeName and '' != noticeName">
and notice_name like '%${noticeName}%'
</if>
<if test="null != noticeRelease and '' != noticeRelease">
and notice_release = #{noticeRelease}
</if>
ORDER BY notice_top limit #{pageIndex},#{pageSize}
</select>
<select id="getAllListByTitle" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal" and notice_title like '%${noticeTitle}%' ORDER BY notice_top limit #{pageIndex},#{pageSize}
</select>
<update id="delete" parameterType="com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice">
update biz_bid_notice
set
delete_flag="deleted"
where notice_id=#{notice_id} limit #{pageIndex},#{pageSize}
</update>
<update id="fabu" parameterType="java.lang.Long">
update biz_bid_notice
set
notice_release="open"
where id=#{id}
</update>
<update id="qxfabu" parameterType="java.lang.Long">
update biz_bid_notice
set
notice_release="close"
where id=#{id}
</update>
<update id="top" parameterType="java.lang.Long">
update biz_bid_notice
set
notice_top="0"
where id=#{id}
</update>
<update id="qxtop" parameterType="java.lang.Long">
update biz_bid_notice
set
notice_top="1"
where id=#{id}
</update>
<update id="update" parameterType="com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice">
update biz_bid_notice
<trim prefix="SET" suffixOverrides=",">
<if test="notice_name != null">notice_name = #{noticeName},</if>
<if test="notice_title != null">notice_title = #{noticeTitle},</if>
<if test="notice_content != null">notice_content = #{noticeContent},</if>
<if test="notice_file != null">notice_file = #{noticeFile},</if>
<if test="notice_release != null">notice_release=#{noticeRelease}</if>
<if test="notice_top != null">notice_top=#{noticeTop}</if>
<if test="update_by != null">update_by = #{updatBy},</if>
<if test="update_date != null">update_date = #{updateDate},</if>
<if test="tenant_id != null">tenant_id = #{tenantId},</if>
<if test="tenant_name != null">tenant_name = #{tenantName},</if>
<if test="last_update_time != null">last_update_time = #{lastTpdateTime},</if>
</trim>
where ID=#{id}
</update>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.Long">
update biz_bid_notice
set
delete_flag="deleted"
where ID=#{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,148 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 实体类 BizBidNotice
*
* @auto.generated
*/
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "biz_bid_notice", autoResultMap = true)
public class BizBidNotice extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty(value = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@ApiModelProperty(value = "noticeName")
private String noticeName;
/**
* 标题
*/
@ApiModelProperty(value = "标题")
private String noticeTitle;
/**
* 内容
*/
@ApiModelProperty(value = "内容")
private String noticeContent;
/**
* 文件ID
*/
@ApiModelProperty(value = "文件ID")
private String noticeFile;
/**
* 是否发布
*/
@ApiModelProperty(value = "是否发布")
private String noticeRelease;
/**
* 是否置顶
*/
@ApiModelProperty(value = "是否置顶")
private String noticeTop;
private Integer current;
private Integer pageSize;
public String getNoticeName() {
return noticeName;
}
public void setNoticeName(String noticeName) {
this.noticeName = noticeName;
}
public Integer getCurrent() {
return current;
}
public void setCurrent(Integer current) {
this.current = current;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNoticeFile() {
return noticeFile;
}
public void setNoticeFile(String noticeFile) {
this.noticeFile = noticeFile;
}
public String getNoticeRelease() {
return noticeRelease;
}
public void setNoticeRelease(String noticeRelease) {
this.noticeRelease = noticeRelease;
}
public String getNoticeTop() {
return noticeTop;
}
public void setNoticeTop(String noticeTop) {
this.noticeTop = noticeTop;
}
public String getNoticeTitle() {
return noticeTitle;
}
public void setNoticeTitle(String noticeTitle) {
this.noticeTitle = noticeTitle;
}
public String getNoticeContent() {
return noticeContent;
}
public void setNoticeContent(String noticeContent) {
this.noticeContent = noticeContent;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}

View File

@ -0,0 +1,33 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.service;
import java.util.List;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
/**
* 对数据表 biz_bid_notice 操作的 service
* @author Auto create
*
*/
public interface IBizBidNoticeService extends IBaseService<BizBidNotice>{
public int deleteOff(Long id);
public List<BizBidNotice> getlist(BizBidNotice bizBidNotice);
public List<BizBidNotice> getListByTitle(BizBidNotice bizBidNotice);
public List<BizBidNotice> getAllList(BizBidNotice bizBidNotice);
public List<BizBidNotice> getAllListByTitle(BizBidNotice bizBidNotice);
public Boolean fabu(Long id);
public Boolean qxfabu(Long id);
public Boolean top(Long id);
public Boolean qxtop(Long id);
}

View File

@ -0,0 +1,88 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.dao.BizBidNoticeMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.service.IBizBidNoticeService;
/**
* 对数据表 biz_bid_notice 操作的 serviceImpl
*
* @author Auto create
*
*/
@Service
public class BizBidNoticeServiceImpl extends BaseServiceImpl<BizBidNoticeMapper, BizBidNotice>
implements IBizBidNoticeService {
@Autowired
BizBidNoticeMapper bizBidNoticeMapper;
@Override
public int deleteOff(Long id) {
return bizBidNoticeMapper.deleteOff(id);
}
public List<BizBidNotice> listRelease(List<BizBidNotice> list) {
for (BizBidNotice bizBidNotice2 : list) {
if ("open".equals(bizBidNotice2.getNoticeRelease())) {
bizBidNotice2.setNoticeRelease("已发布");
}
if ("close".equals(bizBidNotice2.getNoticeRelease())) {
bizBidNotice2.setNoticeRelease("未发布");
}
}
return list;
}
@Override
public List<BizBidNotice> getlist(BizBidNotice bizBidNotice) {
List<BizBidNotice> list = bizBidNoticeMapper.getList(bizBidNotice.getNoticeTitle(),bizBidNotice.getNoticeName(),bizBidNotice.getCreateDate(),bizBidNotice.getNoticeRelease(),bizBidNotice.getCurrent(), bizBidNotice.getPageSize());
return listRelease(list);
}
@Override
public List<BizBidNotice> getListByTitle(BizBidNotice bizBidNotice) {
List<BizBidNotice> list = bizBidNoticeMapper.getListByTitle(bizBidNotice.getNoticeTitle(),
bizBidNotice.getCurrent(), bizBidNotice.getPageSize());
return listRelease(list);
}
@Override
public List<BizBidNotice> getAllList(BizBidNotice bizBidNotice) {
List<BizBidNotice> list = bizBidNoticeMapper.getAllList(bizBidNotice.getNoticeTitle(),bizBidNotice.getNoticeName(),bizBidNotice.getCreateDate(),bizBidNotice.getNoticeRelease(),bizBidNotice.getCurrent(), bizBidNotice.getPageSize());
return listRelease(list);
}
@Override
public List<BizBidNotice> getAllListByTitle(BizBidNotice bizBidNotice) {
List<BizBidNotice> list = bizBidNoticeMapper.getAllListByTitle(bizBidNotice.getNoticeTitle(),
bizBidNotice.getCurrent(), bizBidNotice.getPageSize());
return listRelease(list);
}
@Override
public Boolean fabu(Long id) {
return bizBidNoticeMapper.fabu(id);
}
@Override
public Boolean qxfabu(Long id) {
return bizBidNoticeMapper.qxfabu(id);
}
@Override
public Boolean top(Long id) {
return bizBidNoticeMapper.top(id);
}
@Override
public Boolean qxtop(Long id) {
return bizBidNoticeMapper.qxtop(id);
}
}

View File

@ -0,0 +1,50 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.column;
/**
* 字段常量 BizBidShared
*
* @auto.generated
*/
public class BizBidSharedField {
/**
*
*/
public static final String ID = "id";
/**
*
*/
public static final String SHARED_ID = "shared_id";
/**
* 鏍囬
*/
public static final String SHARED_NAME = "shared_name";
/**
* 鍐呭
*/
public static final String SHARED_ROLE = "shared_role";
/**
* 閺傚洣娆RL
*/
public static final String SHARED_FILE = "shared_file";
/**
* 闁哄嫷鍨伴幆渚€宕i幋婵堫伌
*/
public static final String SHARED_REMARKS = "shared_remarks";
}

View File

@ -0,0 +1,120 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.controller;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.service.IBizBidSharedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@Api(tags = "")
@RequestMapping("/api/biz-service-ebtp-extend/v1/bizbidshared")
public class BizBidSharedController{
@Resource
private IBizBidSharedService ibizBidSharedService;
/**
* 查询数据列表
*
* @param id
*
* @return
*/
@ApiOperation("查询数据列表")
@PostMapping("/list")
public BaseResponse<List<BizBidShared>> getList(@RequestBody BizBidShared bizBidShared){
if (bizBidShared.getCurrent() == null || bizBidShared.getPageSize() == null) {
return BaseResponse.fail("请传入分页功能所需参数current,pageSize", null);
}
// 前端第一页默认传1而不是0
if (bizBidShared.getCurrent() == 1) {
bizBidShared.setCurrent(0);
}
return BaseResponse.success(ibizBidSharedService.getlist(bizBidShared));
}
/**
* 插入新数据
*
* @param bizBidShared
*
* @return
*/
@ApiOperation("插入新数据")
@PostMapping("/add")
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidShared bizBidShared){
List<String> recordRole = bizBidShared.getSharedRoles();
StringBuffer sb = new StringBuffer();
for (String string : recordRole) {
sb.append(string).append(",");
}
String keywordStr = sb.deleteCharAt(sb.length() - 1).toString();
bizBidShared.setSharedRole(keywordStr);
boolean save = ibizBidSharedService.saveOrUpdate(bizBidShared);
return BaseResponse.success(save);
}
/**
* 修改数据
*
* @param bizBidShared
*
* @return
*/
@ApiOperation("修改数据")
@PostMapping("")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody BizBidShared bizBidShared){
return BaseResponse.success(ibizBidSharedService.saveOrUpdate(bizBidShared));
}
/**
* 查询数据
*
* @param id
*
* @return
*/
@ApiOperation("查询数据")
@GetMapping("/{id}")
public BaseResponse<BizBidShared> get(@ApiParam(value = "主键id", required = true) @PathVariable Long id){
BizBidShared bizBidShared = ibizBidSharedService.getById(id);
return BaseResponse.success(bizBidShared);
}
/**
* 删除数据
*
* @param id
*
* @return
*/
@ApiOperation("删除数据")
@PostMapping("/delete/{id}")
public BaseResponse<Integer> delete(@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
return BaseResponse.success(ibizBidSharedService.deleteOff(id));
}
}

View File

@ -0,0 +1,19 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.dao;
import java.time.LocalDateTime;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
public interface BizBidSharedMapper extends IBaseMapper<BizBidShared> {
List<BizBidShared> getListByTitle( @Param("sharedName")String sharedName, @Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
List<BizBidShared> getList(@Param("sharedName")String sharedName, @Param("sharedRole")String sharedRole,@Param("LocalDateTime") LocalDateTime localDateTime,@Param("pageIndex") Integer current,@Param("pageSize") Integer pageSize);
}

View File

@ -0,0 +1,54 @@
<?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.chinaunicom.mall.ebtp.extend.bizbidshared.dao.BizBidSharedMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="shared_id" jdbcType="VARCHAR" property="sharedId"/>
<result column="shared_name" jdbcType="VARCHAR" property="sharedName"/>
<result column="shared_role" jdbcType="VARCHAR" property="sharedRole"/>
<result column="shared_file" jdbcType="VARCHAR" property="sharedFile"/>
<result column="shared_remarks" jdbcType="VARCHAR" property="sharedRemarks"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="tenant_name" jdbcType="VARCHAR" property="tenantName"/>
<result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag"/>
</resultMap>
<sql id="selectSzReplenishVo">
select id,shared_id, shared_name, shared_role, shared_file,shared_remarks, create_by,
create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_shared
</sql>
<select id="getList" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal"
<if test="null != sharedName and '' != sharedName">
and shared_name like '%${sharedName}%'
</if>
<if test="null != sharedRole and '' != sharedRole">
and shared_role like '%${sharedRole}%'
</if>
limit #{pageIndex},#{pageSize}
</select>
<select id="getListByTitle" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal" and shared_name like '%${sharedName}%'
</select>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.Long">
update biz_bid_shared
set
delete_flag="deleted"
where ID=#{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,160 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.entity;
import java.io.Serializable;
import java.util.List;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 实体类 BizBidShared
*
* @auto.generated
*/
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "biz_bid_shared", autoResultMap = true)
public class BizBidShared extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty(value = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@ApiModelProperty(value = "sharedId")
private String sharedId;
/**
* 共享文档文件名
*/
@ApiModelProperty(value = "共享文档文件名")
private String sharedName;
/**
* 共享文档使用角色
*/
@ApiModelProperty(value = "共享文档使用角色")
private String sharedRole;
/**
* 共享文档使用角色list
*/
@Transient
@TableField(exist= false)
private List<String> sharedRoles;
/**
* 共享文档ID
*/
@ApiModelProperty(value = "共享文档ID")
private String sharedFile;
/**
* 共享文档备注
*/
@ApiModelProperty(value = "共享文档备注")
private String sharedRemarks;
private Integer current;
private Integer pageSize;
public Integer getCurrent() {
return current;
}
public void setCurrent(Integer current) {
this.current = current;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSharedId() {
return sharedId;
}
public void setSharedId(String sharedId) {
this.sharedId = sharedId;
}
public String getSharedName() {
return sharedName;
}
public void setSharedName(String sharedName) {
this.sharedName = sharedName;
}
public String getSharedRole() {
return sharedRole;
}
public void setSharedRole(String sharedRole) {
this.sharedRole = sharedRole;
}
public String getSharedFile() {
return sharedFile;
}
public void setSharedFile(String sharedFile) {
this.sharedFile = sharedFile;
}
public String getSharedRemarks() {
return sharedRemarks;
}
public void setSharedRemarks(String sharedRemarks) {
this.sharedRemarks = sharedRemarks;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
public List<String> getSharedRoles() {
return sharedRoles;
}
public void setSharedRoles(List<String> sharedRoles) {
this.sharedRoles = sharedRoles;
}
}

View File

@ -0,0 +1,21 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.service;
import java.util.List;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
/**
* 对数据表 biz_bid_shared 操作的 service
* @author Auto create
*
*/
public interface IBizBidSharedService extends IBaseService<BizBidShared>{
public int deleteOff(Long id);
public List<BizBidShared> getlist(BizBidShared bizBidNotice);
public List<BizBidShared> getListByTitle(BizBidShared bizBidNotice);
}

View File

@ -0,0 +1,39 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chinaunicom.ebtp.mall.cloud.attachment.sdk.api.AttachmentClient;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.dao.BizBidSharedMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.service.IBizBidSharedService;
/**
* 对数据表 biz_bid_shared 操作的 serviceImpl
* @author Auto create
*
*/
@Service
public class BizBidSharedServiceImpl extends BaseServiceImpl<BizBidSharedMapper,BizBidShared> implements IBizBidSharedService {
@Autowired
BizBidSharedMapper bizBidSharedMapper;
@Autowired
AttachmentClient attachmentClient;
@Override
public int deleteOff(Long id) {
return bizBidSharedMapper.deleteOff(id);
}
@Override
public List<BizBidShared> getlist(BizBidShared bizBidNotice) {
return bizBidSharedMapper.getList(bizBidNotice.getSharedName(),bizBidNotice.getSharedRole(),bizBidNotice.getCreateDate(),bizBidNotice.getCurrent(),bizBidNotice.getPageSize());
}
@Override
public List<BizBidShared> getListByTitle(BizBidShared bizBidNotice) {
return bizBidSharedMapper.getListByTitle(bizBidNotice.getSharedName(),bizBidNotice.getCurrent(),bizBidNotice.getPageSize());
}
}

View File

@ -0,0 +1,50 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.column;
/**
* 字段常量 BizBidSharedRecord
*
* @auto.generated
*/
public class BizBidSharedRecordField {
/**
*
*/
public static final String ID = "id";
/**
*
*/
public static final String RECORD_ID = "record_id";
/**
*
*/
public static final String RECORD_ROLE = "record_role";
/**
*
*/
public static final String RECORD_NAME = "record_name";
/**
*
*/
public static final String RECORD_STAFF = "record_staff";
/**
*
*/
public static final String RECORD_ACCOUNT = "record_account";
}

View File

@ -0,0 +1,86 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.controller;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@Api(tags = "")
@RequestMapping("/api/biz-service-ebtp-extend/v1/bizbidsharedrecord")
public class BizBidSharedRecordController{
@Resource
private IBizBidSharedRecordService ibizBidSharedRecordService;
@Autowired
private IBaseCacheUserService iBaseCacheUserService;
/**
* 查询数据列表
*
* @param id
*
* @return
*/
@ApiOperation("查询数据列表")
@PostMapping("/list/{id}")
public BaseResponse<List<BizBidSharedRecord>> getList(@PathVariable("id") String id,@ApiParam(value = "对象数据", required = true)@RequestBody @Valid BizBidSharedRecord bizBidShared){
bizBidShared.setRecordId(id);
return BaseResponse.success(ibizBidSharedRecordService.getlist(bizBidShared));
}
/**
* 插入新数据
*
* @param bizBidSharedRecord
*
* @return
*/
@ApiOperation("插入新数据")
@PostMapping("/add")
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidShared bizBidShared){
Long userId = iBaseCacheUserService.getCacheUser().getUserId();
BizBidSharedRecord bizBidSharedRecord=new BizBidSharedRecord();
bizBidSharedRecord.setId(null);
bizBidSharedRecord.setCreateBy(userId);
bizBidSharedRecord.setRecordId(bizBidShared.getId().toString());
boolean save = ibizBidSharedRecordService.save(bizBidSharedRecord);
return BaseResponse.success(save);
}
/**
* 修改数据
*
* @param bizBidSharedRecord
*
* @return
*/
@ApiOperation("修改数据")
@PutMapping("")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody BizBidSharedRecord bizBidSharedRecord){
return BaseResponse.success(ibizBidSharedRecordService.saveOrUpdate(bizBidSharedRecord));
}
}

View File

@ -0,0 +1,16 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord;
public interface BizBidSharedRecordMapper extends IBaseMapper<BizBidSharedRecord> {
List<BizBidSharedRecord> getlist(BizBidSharedRecord bizBidSharedRecord);
BizBidSharedRecord getByIdInfo(@Param("recordId")String id,@Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize);
}

View File

@ -0,0 +1,66 @@
<?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.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.dao.BizBidSharedRecordMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="record_id" jdbcType="VARCHAR" property="recordId"/>
<result column="record_role" jdbcType="VARCHAR" property="recordRole"/>
<result column="record_name" jdbcType="VARCHAR" property="recordName"/>
<result column="record_staff" jdbcType="VARCHAR" property="recordStaff"/>
<result column="record_account" jdbcType="VARCHAR" property="recordAccount"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="tenant_name" jdbcType="VARCHAR" property="tenantName"/>
<result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag"/>
</resultMap>
<sql id="selectSzReplenishVo">
select id,record_id, record_role, record_name, record_staff,record_account, create_by,
create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_shared_record
</sql>
<select id="getlist" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal"
<if test="null != recordId and '' != recordId">
and record_id=#{recordId}
</if>
<if test="null != recordRole and '' != recordRole">
and record_role like '%${recordRole}%'
</if>
<if test="null != recordName and '' != recordName">
and record_name=#{recordName}
</if>
<if test="null != recordStaff and '' != recordStaff">
and record_staff=#{recordStaff}
</if>
<if test="null != recordAccount and '' != recordAccount">
and record_account=#{recordAccount}
</if>
<!-- limit #{pageIndex},#{pageSize}-->
</select>
<select id="getByIdInfo" resultMap="BaseResultMap">
<include refid="selectSzReplenishVo"/>
where
delete_flag = "normal" and record_id=#{recordId} limit #{pageIndex},#{pageSize}
</select>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.Long">
update biz_bid_shared_record
set
delete_flag="deleted"
where ID=#{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,168 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity;
import java.io.Serializable;
import java.util.List;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 实体类 BizBidSharedRecord
*
* @auto.generated
*/
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "biz_bid_shared_record", autoResultMap = true)
public class BizBidSharedRecord extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty(value = "ID")
private Long id;
/**
*
*/
@ApiModelProperty(value = "recordId")
private String recordId;
/**
*
*/
@Transient
@TableField(exist= false)
private List<String> recordRoles;
/**
*
*/
@ApiModelProperty(value = "使用角色")
private String recordRole;
/**
*
*/
@ApiModelProperty(value = "机构名称")
private String recordName;
/**
*
*/
@ApiModelProperty(value = "下载人")
private String recordStaff;
/**
*
*/
@ApiModelProperty(value = "下载账号")
private String recordAccount;
private Integer current;
private Integer pageSize;
public Integer getCurrent() {
return current;
}
public void setCurrent(Integer current) {
this.current = current;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public void setRecordRole(String recordRole) {
this.recordRole = recordRole;
}
public List<String> getRecordRoles() {
return recordRoles;
}
public void setRecordRoles(List<String> recordRoles) {
this.recordRoles = recordRoles;
}
public String getRecordRole() {
return recordRole;
}
public String getRecordName() {
return recordName;
}
public void setRecordName(String recordName) {
this.recordName = recordName;
}
public String getRecordStaff() {
return recordStaff;
}
public void setRecordStaff(String recordStaff) {
this.recordStaff = recordStaff;
}
public String getRecordAccount() {
return recordAccount;
}
public void setRecordAccount(String recordAccount) {
this.recordAccount = recordAccount;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}

View File

@ -0,0 +1,22 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service;
import java.util.List;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord;
/**
* 对数据表 biz_bid_shared_record 操作的 service
* @author Auto create
*
*/
public interface IBizBidSharedRecordService extends IBaseService<BizBidSharedRecord>{
public List<BizBidSharedRecord> getlist(BizBidSharedRecord bizBidSharedRecord);
public BizBidSharedRecord getByIdInfo(BizBidSharedRecord bizBidSharedRecord);
}

View File

@ -0,0 +1,33 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.dao.BizBidSharedRecordMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService;
/**
* 对数据表 biz_bid_shared_record 操作的 serviceImpl
* @author Auto create
*
*/
@Service
public class BizBidSharedRecordServiceImpl extends BaseServiceImpl<BizBidSharedRecordMapper,BizBidSharedRecord> implements IBizBidSharedRecordService {
@Autowired
BizBidSharedRecordMapper bizBidSharedRecordMapper;
@Override
public List<BizBidSharedRecord> getlist(BizBidSharedRecord bizBidSharedRecord) {
return bizBidSharedRecordMapper.getlist(bizBidSharedRecord);
}
@Override
public BizBidSharedRecord getByIdInfo(BizBidSharedRecord bizBidSharedRecord) {
return bizBidSharedRecordMapper.getByIdInfo(bizBidSharedRecord.getRecordId(),bizBidSharedRecord.getCurrent(),bizBidSharedRecord.getPageSize());
}
}

View File

@ -0,0 +1,194 @@
server:
port: 18018
servlet:
context-path: /
# 对应 apollo 配置中心的应用名
app:
id: biz-service-ebtp-extend
# Apollo 配置信息
apollo:
meta: http://10.242.31.158:6001/
bootstrap:
namespace: application
enabled: true
eagerLoad:
enabled: true
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: biz-service-ebtp-extend
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
jdbc-url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005
template:
default-topic: jl_test
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 天宫 redis 需要使用哨兵进行访问
redis:
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
lettuce:
# jedis:
pool:
maxTotal: 50
minIdle: 1
maxWaitMillis: 5000
maxIdle: 5
testOnBorrow: true
testOnReturn: true
testWhileIdle: true
token:
database: 0
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
uuid:
database: 1
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
cache:
database: 2
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
# 天宫Eureka配置
eureka:
client:
service-url:
defaultZone: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka
instance:
prefer-ip-address: true
hostname: ${spring.cloud.client.ip-address}
instance-ip: ${spring.cloud.client.ip-address}:${server.port}
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
# logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic
logic-delete-value: deleted # 逻辑已删除值
logic-not-delete-value: normal # 逻辑未删除值
# --------------feign ------------
feign:
httpclient:
enabled: false
okhttp:
enabled: true
client:
config:
default:
connect-timeout: 20000
read-timeout: 20000
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 20000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
workerId: 1
datacenterId: 1
remote:
approval: true #是否需要提交公告审批
media: true #是否需要发送到媒体
#中国联通电子商城外网接入平台 相关参数
token:
userName: zbgg
password: eip_13579
file-wjpt-storage-path: http://111.198.162.67:8081/enr/api/base/file/cgDownload/ #测试地址
#获取file地址
file:
address: http://125.32.114.204:8760/api/core-service-ebtp-updownload/v1/download/oid/
#提交审批相关字段
approve:
wfSectionNo: 002
wfSectionName: 采购审批

View File

@ -0,0 +1,3 @@
spring:
profiles:
active: dev

View File

@ -0,0 +1,66 @@
transport {
# tcp udt unix-domain-socket
type = "TCP"
#NIO NATIVE
server = "NIO"
#enable heartbeat
heartbeat = true
# the client batch send request enable
enableClientBatchSendRequest = true
#thread factory for netty
threadFactory {
bossThreadPrefix = "NettyBoss"
workerThreadPrefix = "NettyServerNIOWorker"
serverExecutorThread-prefix = "NettyServerBizHandler"
shareBossWorker = false
clientSelectorThreadPrefix = "NettyClientSelector"
clientSelectorThreadSize = 1
clientWorkerThreadPrefix = "NettyClientWorkerThread"
# netty boss thread size,will not be used for UDT
bossThreadSize = 1
#auto default pin or 8
workerThreadSize = "default"
}
shutdown {
# when destroy server, wait seconds
wait = 3
}
serialization = "seata"
compressor = "none"
}
service {
#transaction service group mapping
vgroupMapping.biz-service-ebtp-expenses-fescar-service-group = "default"
#only support when registry.type=file, please don't set multiple addresses
default.grouplist = "127.0.0.1:8091"
#degrade, current not support
enableDegrade = false
#disable seata
disableGlobalTransaction = false
}
client {
rm {
asyncCommitBufferLimit = 10000
lock {
retryInterval = 10
retryTimes = 30
retryPolicyBranchRollbackOnConflict = true
}
reportRetryCount = 5
tableMetaCheckEnable = false
reportSuccessEnable = false
}
tm {
commitRetryCount = 5
rollbackRetryCount = 5
}
undo {
dataValidation = true
logSerialization = "jackson"
logTable = "undo_log"
}
log {
exceptionRate = 100
}
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="true">
<property name="logback.logdir" value="/log" />
<property name="logback.appname" value="biz-service-ebtp-extend" />
<contextName>${logback.appname}</contextName>
<!--输出到控制台 ConsoleAppender-->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
<!--展示格式 layout-->
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{50} - %msg%n</pattern>
</pattern>
</layout>
</appender>
<appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--如果只是想要 Info 级别的日志,只是过滤 info 还是会输出 Error 日志,因为 Error 的级别高,
所以我们使用下面的策略,可以避免输出 Error 的日志-->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!--过滤 Error-->
<level>ERROR</level>
<!--匹配到就禁止-->
<onMatch>DENY</onMatch>
<!--没有匹配到就允许-->
<onMismatch>ACCEPT</onMismatch>
</filter>
<!--日志名称如果没有File 属性那么只会使用FileNamePattern的文件路径规则
如果同时有<File>和<FileNamePattern>,那么当天日志是<File>,明天会自动把今天
的日志改名为今天的日期。即,<File> 的日志都是当天的。
-->
<File>${logback.logdir}/info.${logback.appname}.log</File>
<!--滚动策略,按照时间滚动 TimeBasedRollingPolicy-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间-->
<FileNamePattern>${logback.logdir}/info.${logback.appname}.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--只保留最近3天的日志-->
<maxHistory>3</maxHistory>
<!--应用启动时删除超过时间范围的日志文件-->
<cleanHistoryOnStart>true</cleanHistoryOnStart>
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志-->
<!--<totalSizeCap>1GB</totalSizeCap>-->
</rollingPolicy>
<!--日志输出编码格式化-->
<encoder>
<charset>UTF-8</charset>
<pattern>%d [%thread] %-5level %logger{64} %line - %msg%n</pattern>
</encoder>
</appender>
<appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--如果只是想要 Error 级别的日志,那么需要过滤一下,默认是 info 级别的ThresholdFilter-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>Error</level>
</filter>
<!--日志名称如果没有File 属性那么只会使用FileNamePattern的文件路径规则
如果同时有<File>和<FileNamePattern>,那么当天日志是<File>,明天会自动把今天
的日志改名为今天的日期。即,<File> 的日志都是当天的。
-->
<File>${logback.logdir}/error.${logback.appname}.log</File>
<!--滚动策略,按照时间滚动 TimeBasedRollingPolicy-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间-->
<FileNamePattern>${logback.logdir}/error.${logback.appname}.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--只保留最近3天的日志-->
<maxHistory>3</maxHistory>
<!--应用启动时删除超过时间范围的日志文件-->
<cleanHistoryOnStart>true</cleanHistoryOnStart>
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志-->
<!--<totalSizeCap>1GB</totalSizeCap>-->
</rollingPolicy>
<!--日志输出编码格式化-->
<encoder>
<charset>UTF-8</charset>
<pattern>%d [%thread] %-5level %logger{128} %line - %msg%n</pattern>
</encoder>
</appender>
<!--指定最基础的日志输出级别-->
<root level="INFO">
<appender-ref ref="consoleLog"/>
<!--appender将会添加到这个logger-->
<appender-ref ref="fileInfoLog"/>
<appender-ref ref="fileErrorLog"/>
</root>
</configuration>

View File

@ -0,0 +1,79 @@
registry {
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
type = "eureka"
nacos {
application = "seata-server"
serverAddr = "localhost"
namespace = ""
username = ""
password = ""
}
eureka {
serviceUrl = "http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka"
weight = "1"
}
redis {
serverAddr = "localhost:6379"
db = "0"
password = ""
timeout = "0"
}
zk {
serverAddr = "127.0.0.1:2181"
sessionTimeout = 6000
connectTimeout = 2000
username = ""
password = ""
}
consul {
serverAddr = "127.0.0.1:8500"
}
etcd3 {
serverAddr = "http://localhost:2379"
}
sofa {
serverAddr = "127.0.0.1:9603"
region = "DEFAULT_ZONE"
datacenter = "DefaultDataCenter"
group = "SEATA_GROUP"
addressWaitTime = "3000"
}
file {
name = "file.conf"
}
}
config {
# file、nacos 、apollo、zk、consul、etcd3、springCloudConfig
type = "file"
nacos {
serverAddr = "localhost"
namespace = ""
group = "SEATA_GROUP"
username = ""
password = ""
}
consul {
serverAddr = "127.0.0.1:8500"
}
apollo {
appId = "seata-server"
apolloMeta = "http://192.168.1.204:8801"
namespace = "application"
}
zk {
serverAddr = "127.0.0.1:2181"
sessionTimeout = 6000
connectTimeout = 2000
username = ""
password = ""
}
etcd3 {
serverAddr = "http://localhost:2379"
}
file {
name = "file.conf"
}
}

View File

@ -0,0 +1,21 @@
## ---------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
client {
application.id = biz-service-ebtp-extend
transaction.service.group = biz-service-ebtp-extend-fescar-service-group
}

View File

@ -0,0 +1,7 @@
unifast.swagger.basePackage=com.chinaunicom.mall.ebtp.extend
unifast.swagger.title=\u6d4b\u8bd5\u63a5\u53e3\u6587\u6863
unifast.swagger.contactName=\u5409\u6797\u9879\u76ee\u7ec4
unifast.swagger.contactUrl=http://chinaunicom.com
unifast.swagger.contactEmail=chinaunicom@chinaunicom.com
unifast.swagger.version=0.0.1
unifast.swagger.description=\u7840\u540e\u53f0\u529f\u80fd\u6846\u67b6