Merge branch 'master' into sim

# Conflicts:
#	src/main/resources/application.yml
This commit is contained in:
付庆吉
2021-05-27 09:05:35 +08:00
30 changed files with 554 additions and 304 deletions

View File

@ -3,8 +3,5 @@ ENV LC_ALL=zh_CN.utf8
ENV LANG=zh_CN.utf8 ENV LANG=zh_CN.utf8
ENV LANGUAGE=zh_CN.utf8 ENV LANGUAGE=zh_CN.utf8
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
RUN mkdir -p /model
COPY /target/classes/model/. /model/
ADD /target/biz_service_ebtp_extend-0.0.1.jar /biz_service_ebtp_extend-0.0.1.jar 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", "-javaagent:/skywalking/agent/skywalking-agent.jar", "-Dspring.profiles.active=test", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"] ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-javaagent:/skywalking/agent/skywalking-agent.jar", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"]

View File

@ -1,2 +1,2 @@
FROM harbor.dcos.xixian.unicom.local/eshop/jdk8_springboot_agent:v1.6 FROM harbor.dcos.xixian.unicom.local/eshop/jdk8_springboot_agent:v1.6
ADD target/biz_service_ebtp_extend-0.0.1.jar /app.jar ADD /target/biz_service_ebtp_extend-0.0.1.jar /app.jar

2
Dockerfile-sim Normal file
View File

@ -0,0 +1,2 @@
FROM harbor.dcos.guangzhou.unicom.local/eshop/jdk8_springboot_agent:v1.6
ADD /target/biz_service_ebtp_extend-0.0.1.jar /app.jar

View File

@ -3,8 +3,5 @@ ENV LC_ALL=zh_CN.utf8
ENV LANG=zh_CN.utf8 ENV LANG=zh_CN.utf8
ENV LANGUAGE=zh_CN.utf8 ENV LANGUAGE=zh_CN.utf8
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
RUN mkdir -p /model
COPY /target/classes/model/. /model/
ADD /target/biz_service_ebtp_extend-0.0.1.jar /biz_service_ebtp_extend-0.0.1.jar 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", "-Dspring.profiles.active=uat", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"] ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-javaagent:/skywalking/agent/skywalking-agent.jar","-jar", "/biz_service_ebtp_extend-0.0.1.jar"]

17
config-sim Normal file
View File

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

View File

@ -37,20 +37,26 @@ spec:
spec: spec:
# 必选Pod中容器列表 # 必选Pod中容器列表
containers: containers:
- name: biz-service-ebtp-extend - name: biz-service-ebtp-extend
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest
# 需要暴露的端口库号列表 # 需要暴露的端口库号列表
ports: ports:
- containerPort: 18018 - containerPort: 18018
# 容器运行前需设置的环境变量列表 # 容器运行前需设置的环境变量列表
env: env:
# Apollo 配置中心变量设置 # Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE - name: APOLLO_CONFIGSERVICE
value: http://10.242.37.1488:6001 value: http://10.242.37.1488:6001
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
value: skywalking-oap-cluster.skywalking:11800 value: skywalking-oap-cluster.skywalking:11800
- name: SW_AGENT_NAME - name: SW_AGENT_NAME
value: biz-service-ebtp-extend value: biz-service-ebtp-extend
- name: APP_NAME
value: biz_service_ebtp_extend_dev
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
--- ---
kind: Service kind: Service
apiVersion: v1 apiVersion: v1

View File

@ -1,86 +0,0 @@
# 接口版本
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
annotations:
prometheus.io/port: '18018'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
# 挂载日志存储
volumes:
- name: log
persistentVolumeClaim:
claimName: log-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
# 需要暴露的端口库号列表
ports:
- containerPort: 18018
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP #自动获取pod ip作为agent id
valueFrom:
fieldRef:
fieldPath: status.podIP
---
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
prometheus.io/port: '18018'
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18018
targetPort: 18018
selector:
app: biz-service-ebtp-extend
status:
loadBalancer: {}
---

118
deployment-master.yaml Normal file
View File

@ -0,0 +1,118 @@
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: biz-service-ebtp-extend
namespace: default
labels:
app: biz-service-ebtp-extend
# 必选,详细定义
spec:
# pod 副本数量
replicas: 3
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# 选择器匹配pod模板
selector:
matchLabels:
app: biz-service-ebtp-extend
template:
metadata:
labels:
# 模板名称
app: biz-service-ebtp-extend
annotations:
prometheus.io/port: '18018'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
volumes:
- name: log
persistentVolumeClaim:
claimName: log-pvc
readOnly: false
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- biz-service-ebtp-extend
topologyKey: "kubernetes.io/hostname"
# 必选Pod中容器列表
containers:
- name: biz-service-ebtp-extend
image: harbor.dcos.xixian.unicom.local/eshop/biz-service-ebtp-extend:latest
args: ["java", "-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)","-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-jar", "/app.jar"]
volumeMounts:
- name: log
mountPath: /log
ports:
- containerPort: 18018
#livenessProbe:
# failureThreshold: 3
# httpGet:
# port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
# path: /actuator/prometheus
# scheme: HTTP
# initialDelaySeconds: 300
# periodSeconds: 60
# successThreshold: 1
# timeoutSeconds: 2
#readinessProbe:
# failureThreshold: 1
# httpGet:
# port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
# path: /actuator/prometheus
# scheme: HTTP
# periodSeconds: 5
# successThreshold: 2
# timeoutSeconds: 2
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 3000m
memory: 6Gi
env:
- name: AGENT_LICENCE
value: 527BFA7B28577578
- name: APP_NAME
value: biz_service_ebtp_extend
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
---
kind: Service
apiVersion: v1
metadata:
name: biz-service-ebtp-extend-svc # [11] service的名字格式为“服务名-svc”
namespace: default
labels:
service: biz-service-ebtp-extend-svc # [12] service的标签可与参数[11]相同
annotations:
prometheus.io/port: '18018' #[13] prometheus自动发现service的端口也是该微服务所使用的端口与参数[4]相同
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18018 #[15] 与参数4相同
targetPort: 18018 #[16] 与参数4相同
selector:
app: biz-service-ebtp-extend #[17] 该service对应Deployment的名字与参数[1]相同
---

99
deployment-sim.yaml Normal file
View File

@ -0,0 +1,99 @@
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: biz-service-ebtp-extend
namespace: default
labels:
app: biz-service-ebtp-extend
# 必选,详细定义
spec:
# pod 副本数量
replicas: 3
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# 选择器匹配pod模板
selector:
matchLabels:
app: biz-service-ebtp-extend
template:
metadata:
labels:
# 模板名称
app: biz-service-ebtp-extend
annotations:
prometheus.io/port: '18018'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
volumes:
- name: log
persistentVolumeClaim:
claimName: log-pvc
readOnly: false
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- biz-service-ebtp-extend
topologyKey: "kubernetes.io/hostname"
# 必选Pod中容器列表
containers:
- name: biz-service-ebtp-extend
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest
args: ["java", "-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)","-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-jar", "/app.jar"]
volumeMounts:
- name: log
mountPath: /log
ports:
- containerPort: 18018
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 3000m
memory: 6Gi
env:
- name: AGENT_LICENCE
value: 527BFA7B28577578
- name: APP_NAME
value: biz_service_ebtp_extend_sim
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
---
kind: Service
apiVersion: v1
metadata:
name: biz-service-ebtp-extend-svc # [11] service的名字格式为“服务名-svc”
namespace: default
labels:
service: biz-service-ebtp-extend-svc # [12] service的标签可与参数[11]相同
annotations:
prometheus.io/port: '18018' #[13] prometheus自动发现service的端口也是该微服务所使用的端口与参数[4]相同
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18018 #[15] 与参数4相同
targetPort: 18018 #[16] 与参数4相同
selector:
app: biz-service-ebtp-extend #[17] 该service对应Deployment的名字与参数[1]相同
---

106
deployment-uat.yaml Normal file
View File

@ -0,0 +1,106 @@
# 接口版本
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
annotations:
prometheus.io/port: '18018'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
# 挂载日志存储
volumes:
- name: log
persistentVolumeClaim:
claimName: log-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
# 需要暴露的端口库号列表
ports:
- containerPort: 18018
resources:
requests:
cpu: 2000m
memory: 4Gi
limits:
cpu: 4000m
memory: 8Gi
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP #自动获取pod ip作为agent id
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: JAVA_TOOL_OPTIONS
value: -XX:+UnlockExperimentalVMOptions
-XX:+UseContainerSupport
-XX:+UseCGroupMemoryLimitForHeap
-XX:InitialRAMPercentage=40.0
-XX:MinRAMPercentage=20.0
-XX:MaxRAMPercentage=80.0
- name: APP_NAME
value: biz_service_ebtp_extend_uat
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
---
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
prometheus.io/port: '18018'
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18018
targetPort: 18018
selector:
app: biz-service-ebtp-extend
status:
loadBalancer: {}
---

View File

@ -41,7 +41,7 @@ spec:
containers: containers:
- name: biz-service-ebtp-extend #[6] 必选,容器名称,可填写微服务名称 - name: biz-service-ebtp-extend #[6] 必选,容器名称,可填写微服务名称
image: harbor.dcos.xixian.unicom.local/eshop/biz-service-ebtp-extend:latest #[7] 镜像名称请把biz-service-ebtp-extend替换为服务名称 image: harbor.dcos.xixian.unicom.local/eshop/biz-service-ebtp-extend:latest #[7] 镜像名称请把biz-service-ebtp-extend替换为服务名称
args: ["java","-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)", "-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-Dspring.profiles.active=pro", "-jar", "/app.jar"] args: ["java","-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)", "-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-jar", "/app.jar"]
volumeMounts: volumeMounts:
- name: log - name: log
mountPath: /log mountPath: /log

View File

@ -1,5 +1,6 @@
package com.chinaunicom.mall.ebtp.extend; package com.chinaunicom.mall.ebtp.extend;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
@ -23,6 +24,7 @@ import io.micrometer.core.instrument.MeterRegistry;
@EnableEurekaClient @EnableEurekaClient
@MapperScan({ "com.chinaunicom.mall.ebtp.extend.**.dao" }) @MapperScan({ "com.chinaunicom.mall.ebtp.extend.**.dao" })
@ComponentScan("com.chinaunicom.mall.ebtp.*") @ComponentScan("com.chinaunicom.mall.ebtp.*")
@EnableApolloConfig
public class BizServiceEbtpExtendApplication { public class BizServiceEbtpExtendApplication {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -1,12 +1,8 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.dao; 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.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice; import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
import org.apache.ibatis.annotations.Param;
public interface BizBidNoticeMapper extends IBaseMapper<BizBidNotice> { public interface BizBidNoticeMapper extends IBaseMapper<BizBidNotice> {
@ -20,11 +16,11 @@ public interface BizBidNoticeMapper extends IBaseMapper<BizBidNotice> {
// public List<BizBidNotice> getAllListByTitle(@Param("noticeTitle")String noticeTitle,@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")String id); public Boolean fabu(@Param("id") String id);
public Boolean qxfabu(@Param("id")String id); public Boolean qxfabu(@Param("id") String id);
public Boolean top(@Param("id")String id); public Boolean top(@Param("id") String id);
public Boolean qxtop(@Param("id")String id); public Boolean qxtop(@Param("id") String id);
} }

View File

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

View File

@ -1,10 +1,5 @@
package com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity; 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.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest; import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -26,49 +21,49 @@ import java.time.LocalDateTime;
@ApiModel @ApiModel
public class BizBidNoticeVO extends BasePageRequest implements Serializable { public class BizBidNoticeVO extends BasePageRequest implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* *
*/ */
@ApiModelProperty(value = "ID") @ApiModelProperty(value = "ID")
private String id; private String id;
/** /**
* *
*/ */
@ApiModelProperty(value = "noticeName") @ApiModelProperty(value = "noticeName")
private String noticeName; private String noticeName;
/** /**
* 标题 * 标题
*/ */
@ApiModelProperty(value = "标题") @ApiModelProperty(value = "标题")
private String noticeTitle; private String noticeTitle;
/** /**
* 内容 * 内容
*/ */
@ApiModelProperty(value = "内容") @ApiModelProperty(value = "内容")
private String noticeContent; private String noticeContent;
/** /**
* 文件ID * 文件ID
*/ */
@ApiModelProperty(value = "文件ID") @ApiModelProperty(value = "文件ID")
private String noticeFile; private String noticeFile;
/** /**
* 是否发布 * 是否发布
*/ */
@ApiModelProperty(value = "是否发布") @ApiModelProperty(value = "是否发布")
private String noticeRelease; private String noticeRelease;
/** /**
* 是否置顶 * 是否置顶
*/ */
@ApiModelProperty(value = "是否置顶") @ApiModelProperty(value = "是否置顶")
private String noticeTop; private String noticeTop;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createDate; private LocalDateTime createDate;
} }

View File

@ -40,7 +40,8 @@ public class BizBidNoticeServiceImpl extends BaseServiceImpl<BizBidNoticeMapper,
wrapper.eq(BizBidNotice::getNoticeRelease, "open") wrapper.eq(BizBidNotice::getNoticeRelease, "open")
.like(StrUtil.isNotEmpty(bizBidNotice.getNoticeTitle()), BizBidNotice::getNoticeTitle, bizBidNotice.getNoticeTitle()) .like(StrUtil.isNotEmpty(bizBidNotice.getNoticeTitle()), BizBidNotice::getNoticeTitle, bizBidNotice.getNoticeTitle())
.like(StrUtil.isNotEmpty(bizBidNotice.getNoticeName()), BizBidNotice::getNoticeName, bizBidNotice.getNoticeName()) .like(StrUtil.isNotEmpty(bizBidNotice.getNoticeName()), BizBidNotice::getNoticeName, bizBidNotice.getNoticeName())
.orderByAsc(BizBidNotice::getNoticeTop); .orderByDesc(BizBidNotice::getCreateDate);
if (bizBidNotice.getCreateDate() != null) { if (bizBidNotice.getCreateDate() != null) {
wrapper.between(BizBidNotice::getCreateDate, bizBidNotice.getCreateDate(), bizBidNotice.getCreateDate().plusDays(1L)); wrapper.between(BizBidNotice::getCreateDate, bizBidNotice.getCreateDate(), bizBidNotice.getCreateDate().plusDays(1L));
@ -57,7 +58,9 @@ public class BizBidNoticeServiceImpl extends BaseServiceImpl<BizBidNoticeMapper,
wrapper.eq(StrUtil.isNotEmpty(bizBidNotice.getNoticeRelease()), BizBidNotice::getNoticeRelease, bizBidNotice.getNoticeRelease()) wrapper.eq(StrUtil.isNotEmpty(bizBidNotice.getNoticeRelease()), BizBidNotice::getNoticeRelease, bizBidNotice.getNoticeRelease())
.like(StrUtil.isNotEmpty(bizBidNotice.getNoticeTitle()), BizBidNotice::getNoticeTitle, bizBidNotice.getNoticeTitle()) .like(StrUtil.isNotEmpty(bizBidNotice.getNoticeTitle()), BizBidNotice::getNoticeTitle, bizBidNotice.getNoticeTitle())
.like(StrUtil.isNotEmpty(bizBidNotice.getNoticeName()), BizBidNotice::getNoticeName, bizBidNotice.getNoticeName()) .like(StrUtil.isNotEmpty(bizBidNotice.getNoticeName()), BizBidNotice::getNoticeName, bizBidNotice.getNoticeName())
.orderByAsc(BizBidNotice::getNoticeTop); .orderByAsc(BizBidNotice::getNoticeTop)
.orderByDesc(BizBidNotice::getUpdateDate)
.orderByDesc(BizBidNotice::getCreateDate);
IPage<BizBidNotice> page = this.page(new Page<>(bizBidNotice.getPageNo(), bizBidNotice.getPageSize()), wrapper); IPage<BizBidNotice> page = this.page(new Page<>(bizBidNotice.getPageNo(), bizBidNotice.getPageSize()), wrapper);
listRelease(page.getRecords()); listRelease(page.getRecords());

View File

@ -4,6 +4,7 @@ package com.chinaunicom.mall.ebtp.extend.bizbidshared.controller;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageResponse; import com.chinaunicom.mall.ebtp.common.base.entity.BasePageResponse;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.constant.EbtpRoleEnum;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils; import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO;
@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.stream.Collectors;
@RestController @RestController
@Api(tags = "") @Api(tags = "")
@ -51,7 +53,8 @@ public class BizBidSharedController {
if (StringUtils.isEmpty(bizBidShared.getId())) { if (StringUtils.isEmpty(bizBidShared.getId())) {
bizBidShared.setId(PropertyUtils.getSnowflakeId()); bizBidShared.setId(PropertyUtils.getSnowflakeId());
} }
bizBidShared.setSharedRole(StrUtil.join(",", bizBidShared.getSharedRoles())); bizBidShared.setSharedRole(StrUtil.join(",", bizBidShared.getRoles().stream().map(m -> EbtpRoleEnum.matchRole(m).getDesc()).collect(Collectors.toList())));
bizBidShared.setSharedRoles(StrUtil.join(",", bizBidShared.getRoles()));
boolean save = ibizBidSharedService.saveOrUpdate(bizBidShared); boolean save = ibizBidSharedService.saveOrUpdate(bizBidShared);
return BaseResponse.success(save); return BaseResponse.success(save);

View File

@ -44,6 +44,12 @@ public class BizBidShared extends BaseEntity implements Serializable {
@ApiModelProperty(value = "共享文档文件名") @ApiModelProperty(value = "共享文档文件名")
private String sharedName; private String sharedName;
/**
* 共享文档使用角色
*/
@ApiModelProperty(value = "共享文档使用角色")
private String sharedRoles;
/** /**
* 共享文档使用角色 * 共享文档使用角色
*/ */
@ -52,10 +58,9 @@ public class BizBidShared extends BaseEntity implements Serializable {
/** /**
* 共享文档使用角色list * 共享文档使用角色list
*/ */
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private List<String> sharedRoles; private List<String> roles;
/** /**
* 共享文档ID * 共享文档ID
*/ */
@ -78,4 +83,7 @@ public class BizBidShared extends BaseEntity implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String fileSuffix; private String fileSuffix;
@TableField(exist = false)
private boolean isAllowDownload;
} }

View File

@ -1,17 +1,14 @@
package com.chinaunicom.mall.ebtp.extend.bizbidshared.service.impl; package com.chinaunicom.mall.ebtp.extend.bizbidshared.service.impl;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.ebtp.mall.cloud.attachment.sdk.api.AttachmentClient; import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser;
import com.chinaunicom.ebtp.mall.cloud.attachment.sdk.model.AttachmentDetail; import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
import com.chinaunicom.ebtp.mall.cloud.attachment.sdk.model.AttachmentEntity;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.dao.BizBidSharedMapper; 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.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO;
@ -19,10 +16,6 @@ import com.chinaunicom.mall.ebtp.extend.bizbidshared.service.IBizBidSharedServic
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.List;
import java.util.Optional;
import java.util.stream.Collectors;
/** /**
* 对数据表 biz_bid_shared 操作的 serviceImpl * 对数据表 biz_bid_shared 操作的 serviceImpl
* *
@ -32,10 +25,11 @@ import java.util.stream.Collectors;
public class BizBidSharedServiceImpl extends BaseServiceImpl<BizBidSharedMapper, BizBidShared> implements IBizBidSharedService { public class BizBidSharedServiceImpl extends BaseServiceImpl<BizBidSharedMapper, BizBidShared> implements IBizBidSharedService {
@Autowired @Autowired
private AttachmentClient attachmentClient; private IBaseCacheUserService cacheUserService;
@Override @Override
public IPage<BizBidShared> getList(BizBidSharedVO bizBidNotice) { public IPage<BizBidShared> getList(BizBidSharedVO bizBidNotice) {
BaseCacheUser user = cacheUserService.getCacheUser();
LambdaQueryWrapper<BizBidShared> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<BizBidShared> wrapper = Wrappers.lambdaQuery();
wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName()) wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName())
.like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole()) .like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole())
@ -47,14 +41,9 @@ public class BizBidSharedServiceImpl extends BaseServiceImpl<BizBidSharedMapper,
Page<BizBidShared> page = this.page(new Page<>(bizBidNotice.getPageNo(), bizBidNotice.getPageSize()), wrapper); Page<BizBidShared> page = this.page(new Page<>(bizBidNotice.getPageNo(), bizBidNotice.getPageSize()), wrapper);
List<String> collect = page.getRecords().stream().map(BizBidShared::getSharedFile).distinct().collect(Collectors.toList()); //是否可下载
Optional<AttachmentDetail> optional = attachmentClient.findByBusinessId(collect); page.getRecords().forEach(p -> p.setAllowDownload(p.getSharedRoles().contains(user.getCurrentRoleCode())));
optional.ifPresent(o -> {
page.getRecords().forEach(r -> {
Optional<AttachmentEntity> first = o.get(r.getSharedFile()).stream().findFirst();
first.ifPresent(f -> r.setFileName(f.getFilename()).setFileSuffix(FileUtil.getSuffix(f.getFilename())));
});
});
return page; return page;
} }

View File

@ -6,7 +6,6 @@ import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService; import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils; import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
import com.chinaunicom.mall.ebtp.extend.bizbidshared.service.IBizBidSharedService;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord; import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecord;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecordVO; import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecordVO;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService; import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService;
@ -60,7 +59,7 @@ public class BizBidSharedRecordController {
bizBidSharedRecord.setRecordId(bizBidShared.getId()); bizBidSharedRecord.setRecordId(bizBidShared.getId());
bizBidSharedRecord.setRecordAccount(cacheUser.getLoginName()); bizBidSharedRecord.setRecordAccount(cacheUser.getLoginName());
bizBidSharedRecord.setRecordName(cacheUser.getFullName()); bizBidSharedRecord.setRecordName(cacheUser.getFullName());
bizBidSharedRecord.setRecordRole(cacheUser.getRoleIds()); bizBidSharedRecord.setRecordRole(cacheUser.getCurrentRoleCode());
bizBidSharedRecord.setRecordStaff(cacheUser.getUserId()); bizBidSharedRecord.setRecordStaff(cacheUser.getUserId());
boolean save = ibizBidSharedRecordService.save(bizBidSharedRecord); boolean save = ibizBidSharedRecordService.save(bizBidSharedRecord);

View File

@ -71,5 +71,4 @@ public class BizBidSharedRecord extends BaseEntity implements Serializable {
private String recordAccount; private String recordAccount;
} }

View File

@ -1,8 +1,6 @@
package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity; package com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest; import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

View File

@ -7,11 +7,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.common.constant.EbtpRoleEnum;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.dao.BizBidSharedRecordMapper; 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.entity.BizBidSharedRecord;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecordVO; import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.entity.BizBidSharedRecordVO;
import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService; import com.chinaunicom.mall.ebtp.extend.bizbidsharedrecord.service.IBizBidSharedRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -22,8 +22,6 @@ import org.springframework.stereotype.Service;
@Service @Service
public class BizBidSharedRecordServiceImpl extends BaseServiceImpl<BizBidSharedRecordMapper, BizBidSharedRecord> implements IBizBidSharedRecordService { public class BizBidSharedRecordServiceImpl extends BaseServiceImpl<BizBidSharedRecordMapper, BizBidSharedRecord> implements IBizBidSharedRecordService {
@Autowired
BizBidSharedRecordMapper bizBidSharedRecordMapper;
@Override @Override
public IPage<BizBidSharedRecord> getList(BizBidSharedRecordVO recordVO) { public IPage<BizBidSharedRecord> getList(BizBidSharedRecordVO recordVO) {
@ -38,13 +36,11 @@ public class BizBidSharedRecordServiceImpl extends BaseServiceImpl<BizBidSharedR
if (recordVO.getCreateDate() != null) { if (recordVO.getCreateDate() != null) {
wrapper.between(BizBidSharedRecord::getCreateDate, recordVO.getCreateDate(), recordVO.getCreateDate().plusDays(1L)); wrapper.between(BizBidSharedRecord::getCreateDate, recordVO.getCreateDate(), recordVO.getCreateDate().plusDays(1L));
} }
return this.page(new Page<>(recordVO.getPageNo(), recordVO.getPageSize()), wrapper); Page<BizBidSharedRecord> page = this.page(new Page<>(recordVO.getPageNo(), recordVO.getPageSize()), wrapper);
}
// @Override page.getRecords().forEach(p -> p.setRecordRole(EbtpRoleEnum.matchRole(p.getRecordRole()).getDesc()));
// public BizBidSharedRecord getByIdInfo(BizBidSharedRecord bizBidSharedRecord) { return page;
// return bizBidSharedRecordMapper.getByIdInfo(bizBidSharedRecord.getRecordId(), bizBidSharedRecord.getCurrent(), bizBidSharedRecord.getPageSize()); }
// }
} }

View File

@ -1,3 +1,9 @@
spring: # 对应 apollo 配置中心的应用名
profiles: app:
active: sim id: biz-service-ebtp-extend
# Apollo 配置信息
apollo:
bootstrap:
enabled: true
namespace: application

View File

@ -2,7 +2,7 @@
<configuration scan="true" scanPeriod="60 seconds" debug="true"> <configuration scan="true" scanPeriod="60 seconds" debug="true">
<property name="logback.logdir" value="/log" /> <property name="logback.logdir" value="/log" />
<property name="logback.appname" value="biz_service_ebtp_extend" /> <property name="logback.appname" value="${APP_NAME}" />
<contextName>${logback.appname}</contextName> <contextName>${logback.appname}</contextName>