From f7b760a680397fd0a3de2d8de36a2601de98530d Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 02 七月 2025 10:36:06 +0800
Subject: [PATCH] ss
---
admin/.env | 4
server/src/main/java/com/doumee/dao/vo/FootDataVO.java | 8
server/src/main/java/com/doumee/dao/business/model/Information.java | 3
server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java | 17 +
server/src/main/java/com/doumee/config/quartz/SnippetScanner.java | 4
admin/.env.production | 2
admin/src/views/business/bottom.vue | 63 ++++++
/dev/null | 253 -------------------------
server/src/main/java/com/doumee/config/quartz/JobHandlerWithDisallowConcurrent.java | 4
server/src/main/java/com/doumee/config/quartz/JobHandler.java | 2
server/pom.xml | 11
server/src/main/java/com/doumee/dao/system/model/SystemDictData.java | 1
server/src/main/java/com/doumee/config/quartz/JobInitializer.java | 21 +
server/src/main/java/com/doumee/core/constants/Constants.java | 2
admin/src/views/business/information.vue | 5
admin/src/views/business/informationCase.vue | 172 +++++++++++++++++
server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java | 5
server/src/main/resources/application.yml | 2
server/src/main/resources/application-pro.yml | 3
server/src/main/java/com/doumee/OfficialWebsiteApplication.java | 2
server/src/main/java/com/doumee/config/quartz/SnippetScannerConfig.java | 2
admin/src/components/business/OperaInformationWindow.vue | 4
server/src/main/java/com/doumee/dao/dto/FootDataDTO.java | 2
admin/.env.development | 2
24 files changed, 307 insertions(+), 287 deletions(-)
diff --git a/admin/.env b/admin/.env
index 109d1b1..004b7e9 100644
--- a/admin/.env
+++ b/admin/.env
@@ -7,7 +7,7 @@
VUE_APP_ROUTER_MODE = 'hash'
# 椤圭洰涓婁笅鏂囪矾寰�
-VUE_APP_CONTEXT_PATH = '/lianhelihua_admin'
+VUE_APP_CONTEXT_PATH = '/dmttwebsite_admin'
# 鎺ュ彛鍓嶇紑
-VUE_APP_API_PREFIX = ''
+VUE_APP_API_PREFIX = '/dmttwebsite'
diff --git a/admin/.env.development b/admin/.env.development
index 315734b..0d5ccaa 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,3 +1,3 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-VUE_APP_API_URL = 'http://192.168.0.129:10040'
+VUE_APP_API_URL = 'http://localhost:10010'
diff --git a/admin/.env.production b/admin/.env.production
index e378653..8125821 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -4,4 +4,4 @@
# 鍏抽棴DEBUG
VUE_APP_DEBUG = 'off'
-VUE_APP_API_URL = 'https://dmtest.ahapp.net/lianhelihua_interface'
+VUE_APP_API_URL = 'http://121.41.112.139:8099/dmttwebsite'
diff --git a/admin/src/components/business/OperaInformationWindow.vue b/admin/src/components/business/OperaInformationWindow.vue
index fbb573b..938b999 100644
--- a/admin/src/components/business/OperaInformationWindow.vue
+++ b/admin/src/components/business/OperaInformationWindow.vue
@@ -57,6 +57,7 @@
id: null,
remark: '',
title: '',
+ type:null,
detail: '',
imgurl: '',
fullImgurl: '',
@@ -81,7 +82,7 @@
})
},
methods: {
- open (title, target) {
+ open (title, target,type) {
this.title = title
this.visible = true
// 鏂板缓
@@ -92,6 +93,7 @@
id: null,
remark: '',
title: '',
+ type:type,
detail: '',
releaseDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
imgurl: '',
diff --git a/admin/src/views/business/bottom.vue b/admin/src/views/business/bottom.vue
index f2bee33..3713a5e 100644
--- a/admin/src/views/business/bottom.vue
+++ b/admin/src/views/business/bottom.vue
@@ -56,6 +56,13 @@
@uploadSuccess="uploadAvatarSuccess" />
</div>
</el-form-item>
+ <el-form-item label="浼佷笟寰俊" prop="faceImgFull">
+ <div class="upload_wrap">
+
+ <UploadAvatarImage :file="{ 'imgurlfull': form.footFullImgUrl2, 'imgurl': form.footImgUrl2 }" :uploadData="uploadData"
+ @uploadSuccess="uploadAvatarSuccess2" />
+ </div>
+ </el-form-item>
<div style="margin:20px 0 50px 0">
<span style="font-size: 15px; font-weight: bold">銆�2銆戣В鍐虫柟妗堬細</span>
</div>
@@ -121,7 +128,42 @@
</div>
</div>
<el-form-item style="display: block">
- <el-button type="primary" icon="el-icon-plus" @click="add2">娣诲姞鎸囨尌绯荤粺</el-button>
+ <el-button type="primary" icon="el-icon-plus" @click="add2">娣诲姞鏅烘収绯荤粺</el-button>
+ </el-form-item>
+ <div style="margin: 100px 0 50px 0">
+ <span style="font-size: 15px; font-weight: bold;">銆�4銆戣崳瑾夎祫璐細</span>
+ </div>
+ <div v-for="(item1,index) in form.honors" :key="'鑽h獕璧勮川'+index" style="display: flex">
+ <div style="flex: 1;">
+ <el-form-item label="鏍囬:" :required="true" >
+ <el-input
+ style="width: 100%"
+ type="text"
+ v-model="item1.name"
+ placeholder="璇疯緭鍏ユ爣棰�"
+ v-trim
+ />
+ </el-form-item>
+ </div>
+ <div style="display: block;flex: 3">
+ <el-form-item label="璺宠浆鍦板潃:" style="display:inline-block; width: 80%">
+ <el-input
+ style="width: 100%"
+ type="text"
+ v-model="item1.address"
+ placeholder="璇疯緭鍏ヨ烦杞湴鍧�"
+ v-trim
+ />
+ </el-form-item>
+ <el-form-item label-width="30px" style="display:inline-block;">
+ <el-button type="danger" v-if="form.honors && form.honors.length >1" icon="el-icon-delete" @click="del3(index)">鍒犻櫎</el-button>
+ </el-form-item>
+ </div>
+ <div>
+ </div>
+ </div>
+ <el-form-item style="display: block">
+ <el-button type="primary" icon="el-icon-plus" @click="add3">娣诲姞鑽h獕璧勮川</el-button>
</el-form-item>
<el-form-item style="margin-top: 100px;width: 100%;text-align: center">
<el-button type="primary" style="width: 300px" :loading="working" @click="submit">淇濆瓨閰嶇疆椤�</el-button>
@@ -147,11 +189,14 @@
address: null,
footImgUrl: 0,
footFullImgUrl: 0,
+ footImgUrl2: 0,
+ footFullImgUrl2: 0,
footWords: 0,
linkMobile: 0,
linkPhone: 0,
serverTime: '',
solveScheme: [{ name: '', address: '' }],
+ honors: [{ name: '', address: '' }],
wisdomSystem: [{ name: '', address: '' }]
}
}
@@ -171,6 +216,15 @@
add1 () {
this.form.solveScheme.push({ name: '', address: '' })
},
+ del3 (index) {
+ if (this.form.honors.length == 1) {
+ return
+ }
+ this.form.honors.splice(index)
+ },
+ add3 () {
+ this.form.honors.push({ name: '', address: '' })
+ },
del2 (index) {
if (this.form.wisdomSystem.length == 1) {
return
@@ -187,12 +241,15 @@
this.form.address = res.address
this.form.footImgUrl = res.footImgUrl
this.form.footFullImgUrl = res.footFullImgUrl
+ this.form.footImgUrl2 = res.footImgUrl2
+ this.form.footFullImgUrl2 = res.footFullImgUrl2
this.form.footWords = res.footWords
this.form.linkMobile = res.linkMobile
this.form.linkPhone = res.linkPhone
this.form.serverTime = res.serverTime
this.form.solveScheme = res.solveScheme || [{ name: '', address: '' }]
this.form.wisdomSystem = res.wisdomSystem || [{ name: '', address: '' }]
+ this.form.honors = res.honors || [{ name: '', address: '' }]
}
})
},
@@ -202,6 +259,10 @@
this.form.footImgUrl = file.imgurl
this.form.footFullImgUrl = file.imgurlfull
},
+ uploadAvatarSuccess2(file) {
+ this.form.footImgUrl2 = file.imgurl
+ this.form.footFullImgUrl2 = file.imgurlfull
+ },
submit () {
console.log(this.form)
this.$refs.form.validate((valid) => {
diff --git a/admin/src/views/business/information.vue b/admin/src/views/business/information.vue
index a3c12d3..2263d20 100644
--- a/admin/src/views/business/information.vue
+++ b/admin/src/views/business/information.vue
@@ -19,7 +19,7 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:information:create', 'business:information:delete']">
- <li><el-button type="primary" @click="$refs.operaInformationWindow.open('鏂板缓鍔ㄦ�佽祫璁�')" icon="el-icon-plus" v-permissions="['business:information:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="$refs.operaInformationWindow.open('鏂板缓鍔ㄦ�佽祫璁�',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:information:create']">鏂板缓</el-button></li>
<li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
@@ -64,7 +64,7 @@
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaInformationWindow.open('缂栬緫鍔ㄦ�佽祫璁�', row)" icon="el-icon-edit" v-permissions="['business:information:update']">缂栬緫</el-button>
+ <el-button type="text" @click="$refs.operaInformationWindow.open('缂栬緫鍔ㄦ�佽祫璁�', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:information:update']">缂栬緫</el-button>
<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -113,6 +113,7 @@
showContent: '',
showTitle: '',
searchForm: {
+ type:0,
title: '',
status: null
}
diff --git a/admin/src/views/business/informationCase.vue b/admin/src/views/business/informationCase.vue
new file mode 100644
index 0000000..28d16a1
--- /dev/null
+++ b/admin/src/views/business/informationCase.vue
@@ -0,0 +1,172 @@
+<template>
+ <TableLayout :permissions="['business:information:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="鏍囬" prop="title">
+ <el-input v-model="searchForm.title" clearable placeholder="璇疯緭鍏ユ爣棰�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select v-model="searchForm.status" clearable @change="search" placeholder="鐘舵��">
+ <el-option label="姝e父" value="0"></el-option>
+ <el-option label="绂佺敤" value="1"></el-option>
+ </el-select>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:information:create', 'business:information:delete']">
+ <li><el-button type="primary" @click="$refs.operaInformationWindow.open('鏂板缓瀹㈡埛妗堜緥',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:information:create']">鏂板缓</el-button></li>
+ <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button></li>
+ </ul>
+ <el-table
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column prop="title" label="鏍囬" min-width="150px"></el-table-column>
+ <el-table-column prop="releaseDate" label="鍙戝竷鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="imgurl" label="鍒楄〃鍥�" min-width="100px">
+ <template slot-scope="{row}">
+ <el-image v-if="row.fullImgurl" style="width: 60px; height: 60px" :src="row.fullImgurl"
+ :preview-src-list="[row.fullImgurl]">
+ </el-image>
+ </template>
+ </el-table-column>
+ <el-table-column prop="detail" label="绠�浠�" min-width="200px"></el-table-column>
+ <el-table-column prop="jumpType" label="鍐呭" align="center" min-width="150px">
+ <template slot-scope="{row}">
+ <span v-if= "row.content!=null && row.content!=''"><el-button @click="showContentDo(row)" >鏌ョ湅鍐呭</el-button></span>
+ <span v-else>-</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="100px">
+ <template slot-scope="{row}">
+ <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+ inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+ <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="80px"></el-table-column>
+ <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:information:update', 'business:information:delete'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaInformationWindow.open('缂栬緫瀹㈡埛妗堜緥', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:information:update']">缂栬緫</el-button>
+ <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaInformationWindow ref="operaInformationWindow" @success="handlePageChange"/>
+
+ <el-dialog
+ class="center-title"
+ :title="showTitle||'鏄剧ず鍐呭'"
+ width="70%"
+ height="70%"
+ text="鍐呭"
+ :visible.sync="visible1"
+ append-to-body
+ >
+ <div class="agree-list" v-html="showContent">
+ </div>
+ <template v-slot:footer>
+ <el-button @click="visible1=false">杩斿洖</el-button>
+ </template>
+ </el-dialog>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaInformationWindow from '@/components/business/OperaInformationWindow'
+export default {
+ name: 'Information',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaInformationWindow },
+ data () {
+ return {
+ // 鎼滅储
+ visible1: false,
+ showContent: '',
+ showTitle: '',
+ searchForm: {
+ type: 1,
+ title: '',
+ status: null
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '瀹㈡埛妗堜緥',
+ api: '/business/information',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ },
+ methods: {
+ showContentDo (row) {
+ this.showTitle = row.showTitle
+ this.showContent = row.content
+ this.visible1 = true
+ },
+ changeStatus (e, row) {
+ this.canvisiting = true
+ this.api.updateStatus({ id: row.id, status: e })
+ .then(res => {
+ this.$tip.apiSuccess(res || '鎿嶄綔鎴愬姛')
+ this.search()
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.canvisiting = false
+ })
+ .catch(() => { })
+ }
+ }
+}
+</script>
+
+<style scoped lang="scss">
+.agree-list{
+ height: 550px;
+ //max-height: 50%;
+ overflow: auto;
+}
+
+/deep/ .window__body {
+ .table-content {
+ padding: 0;
+ .table-wrap {
+ padding-top: 0;
+ }
+ }
+
+}
+</style>
diff --git a/server/pom.xml b/server/pom.xml
index f81ea66..c053a5b 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -47,18 +47,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
- <!-- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
- </exclusion>
- </exclusions> -->
</dependency>
- <dependency>
+ <!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>-->
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -261,6 +255,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
<configuration>
<delimiters>
<delimiter>@</delimiter>
diff --git a/server/src/main/java/com/doumee/ContextFinalizer.java b/server/src/main/java/com/doumee/ContextFinalizer.java
deleted file mode 100644
index be7ee32..0000000
--- a/server/src/main/java/com/doumee/ContextFinalizer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.doumee;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.annotation.WebListener;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.Enumeration;
-import com.mysql.cj.jdbc.AbandonedConnectionCleanupThread;
-
-//@WebListener
-public class ContextFinalizer implements ServletContextListener{
-
- public void contextInitialized(ServletContextEvent sce) {}
-
- public void contextDestroyed(ServletContextEvent sce) {
- Enumeration<Driver> drivers = DriverManager.getDrivers();
- Driver d = null;
- while (drivers.hasMoreElements()) {
- try {
- d = drivers.nextElement();
- DriverManager.deregisterDriver(d);
- } catch (SQLException ex) {
- }
- }
- try {
- // 娉ㄦ剰锛歮ysql8鐗堟湰鐨刯ar濂藉儚shutdown鏂规硶绉佹湁浜嗭紝鍙兘璋冪敤checkedShutdown鎴杣ncheckedShutdown
- AbandonedConnectionCleanupThread.checkedShutdown();
- } catch ( Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/server/src/main/java/com/doumee/OfficialWebsiteApplication.java b/server/src/main/java/com/doumee/OfficialWebsiteApplication.java
index 66c122e..49d4788 100644
--- a/server/src/main/java/com/doumee/OfficialWebsiteApplication.java
+++ b/server/src/main/java/com/doumee/OfficialWebsiteApplication.java
@@ -3,6 +3,7 @@
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@@ -18,6 +19,7 @@
@SpringBootApplication
@MapperScan("com.doumee.dao")
@EnableAsync
+@EnableAutoConfiguration
public class OfficialWebsiteApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
ApplicationContext context = SpringApplication.run(OfficialWebsiteApplication.class);
diff --git a/server/src/main/java/com/doumee/config/quartz/JobHandler.java b/server/src/main/java/com/doumee/config/quartz/JobHandler.java
index e150977..5a9ea61 100644
--- a/server/src/main/java/com/doumee/config/quartz/JobHandler.java
+++ b/server/src/main/java/com/doumee/config/quartz/JobHandler.java
@@ -15,7 +15,7 @@
* @since 2025/03/31 16:44
*/
@Slf4j
-@Component
+//@Component
public class JobHandler extends QuartzJobBean {
@Autowired
diff --git a/server/src/main/java/com/doumee/config/quartz/JobHandlerWithDisallowConcurrent.java b/server/src/main/java/com/doumee/config/quartz/JobHandlerWithDisallowConcurrent.java
index f85ad47..831dbc9 100644
--- a/server/src/main/java/com/doumee/config/quartz/JobHandlerWithDisallowConcurrent.java
+++ b/server/src/main/java/com/doumee/config/quartz/JobHandlerWithDisallowConcurrent.java
@@ -16,8 +16,8 @@
* @since 2025/03/31 16:44
*/
@Slf4j
-@Component
-@DisallowConcurrentExecution
+//@Component
+//@DisallowConcurrentExecution
public class JobHandlerWithDisallowConcurrent extends QuartzJobBean {
@Autowired
diff --git a/server/src/main/java/com/doumee/config/quartz/JobInitializer.java b/server/src/main/java/com/doumee/config/quartz/JobInitializer.java
index bbf214f..4fc44f7 100644
--- a/server/src/main/java/com/doumee/config/quartz/JobInitializer.java
+++ b/server/src/main/java/com/doumee/config/quartz/JobInitializer.java
@@ -21,8 +21,25 @@
* @since 2025/03/31 16:44
*/
@Slf4j
-@Component
-public class JobInitializer {
+//@Component
+public class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+JobInitializer {
@Autowired
private SystemJobService systemJobService;
diff --git a/server/src/main/java/com/doumee/config/quartz/SnippetScanner.java b/server/src/main/java/com/doumee/config/quartz/SnippetScanner.java
index c1a61ed..3794754 100644
--- a/server/src/main/java/com/doumee/config/quartz/SnippetScanner.java
+++ b/server/src/main/java/com/doumee/config/quartz/SnippetScanner.java
@@ -24,8 +24,8 @@
* @since 2025/03/31 16:44
*/
@Slf4j
-@Component
-@DisallowConcurrentExecution
+//@Component
+//@DisallowConcurrentExecution
public class SnippetScanner extends QuartzJobBean {
@Autowired
diff --git a/server/src/main/java/com/doumee/config/quartz/SnippetScannerConfig.java b/server/src/main/java/com/doumee/config/quartz/SnippetScannerConfig.java
index 27fd766..da45065 100644
--- a/server/src/main/java/com/doumee/config/quartz/SnippetScannerConfig.java
+++ b/server/src/main/java/com/doumee/config/quartz/SnippetScannerConfig.java
@@ -9,7 +9,7 @@
* @author dm
* @since 2025/03/31 16:44
*/
-@Configuration
+//@Configuration
public class SnippetScannerConfig {
@Bean
diff --git a/server/src/main/java/com/doumee/core/constants/Constants.java b/server/src/main/java/com/doumee/core/constants/Constants.java
index 46e31ec..6e116d7 100644
--- a/server/src/main/java/com/doumee/core/constants/Constants.java
+++ b/server/src/main/java/com/doumee/core/constants/Constants.java
@@ -34,12 +34,14 @@
public static final String IMG_DIR = "IMG_DIR";
public static final String FILE_DIR ="FILE_DIR" ;
public static final String FOOT_IMGURL ="FOOT_IMGURL" ;
+ public static final String FOOT_IMGURL2 ="FOOT_IMGURL2" ;
public static final String LINK_PHONE ="LINK_PHONE" ;
public static final String LINK_MOBILE ="LINK_MOBILE" ;
public static final String SERVER_TIME ="SERVER_TIME" ;
public static final String ADDRESS ="ADDRESS" ;
public static final String SOLVE_SCHEME ="SOLVE_SCHEME" ;
public static final String WISDOM_SYSTEM ="WISDOM_SYSTEM" ;
+ public static final String HONORS ="HONORS" ;
public static final String FOOT_WORDS ="FOOT_WORDS" ;
diff --git a/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java b/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
deleted file mode 100644
index a501b01..0000000
--- a/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.doumee.core.utils.qiyeweixin;
-
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.TypeReference;
-import com.doumee.biz.system.SystemDictDataBiz;
-import com.doumee.core.utils.HttpsUtil;
-import com.doumee.core.utils.qiyeweixin.model.request.QywxSendMsgRequest;
-import com.doumee.core.utils.qiyeweixin.model.response.*;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-@Component
-@Slf4j
-public class QywxUtil {
- private static JSONObject json = new JSONObject();
-
-
-
- private static QywxUtil qyUtil;
-
- @Value("${qiwei.serviceurl}")
- private String qiweiUrl;
-
- @PostConstruct
- private void init() {
- qyUtil = this;
-// QywxUtil.qiweiUrl = serviceurl;
- }
-
-
- public static String create(Map<String, Object> map, String url, String token) throws IOException {
- // String token = getToken(QY_Constant.CORPID, QY_Constant.SCHEDULESECRET);
- String postData = createPostData(map);
- String response = HttpsUtil.post(url + token, postData, "application/json", false);
- System.out.println("鑾峰彇鍒扮殑token======>" + token);
- System.out.println("璇锋眰鏁版嵁======>" + postData);
- System.out.println("鍙戦�佸井淇$殑鍝嶅簲鏁版嵁======>" + response);
- return response;
- }
-
- private static String createPostData(Map<String, Object> map) {
- System.out.println("杩涘叆createPostData鏂规硶-------------------------");
- return JSONObject.toJSONString(map);
- }
-
-
- public static String getAccessToken(String corpId, String corpSecret) {
- String[] interfaceUrl = QywxConstant.GET_ACCESS_TOKEN;
- String url = interfaceUrl[0].replace("${corpid}",corpId).replace("${secret}",corpSecret);
- QywxBaseResponse response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getAccess_token();
- }
- return null;
- }
- public static List<QywxDepartInfoResponse> getDepartmentAll(String token) {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_LIST;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}","");
- QywxBaseResponse<List<QywxDepartInfoResponse>> response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<List<QywxDepartInfoResponse>>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- return null;
- }
- public static QywxDepartInfoResponse getDepartmentInfo(String token,String departid) {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_INFO;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}",departid);
- QywxBaseResponse<QywxDepartInfoResponse> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference< QywxBaseResponse<QywxDepartInfoResponse>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- return null;
- }
- public static QywxSendMsgResponse sendMsg(String token, QywxSendMsgRequest param) {
- try{
- String[] interfaceUrl = QywxConstant.SEND_MSG;
- String url = interfaceUrl[0].replace("${accesstoken}",token);
- QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param)
- ,new TypeReference<QywxSendMsgResponse>(){});
- log.error("鎺ㄩ�佹秷鎭粨鏋渰}",JSONObject.toJSONString(response));
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- }catch (Exception e){
-
- }
-
- return null;
- }
- public static List<QywxUserListResponse> getUserList(String token,String depatId) {
- try {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_USER_LIST;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${departmentId}",depatId);
- QywxBaseResponse<List<QywxUserListResponse>> response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<List<QywxUserListResponse>>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- }catch (Exception e){
- e.printStackTrace();
- }
-
- return null;
- }
- public static InputStream getMediaInputstream(String token, String media) {
- try {
- String[] interfaceUrl = QywxConstant.GET_MEDIA;
- String url = qyUtil.qiweiUrl+interfaceUrl[0].replace("${accesstoken}",token).replace("${media_id}",media);
- log.info("浼佷笟寰俊涓存椂绱犳潗鑾峰彇url=========="+url);
- return HttpsUtil.connectionInputsteam(url,"GET",null,null);
- }catch (Exception e){
- e.printStackTrace();
- log.error("浼佷笟寰俊涓存椂绱犳潗鑾峰彇error=========="+e.getMessage());
- }
-
- return null;
- }
- public static QywxUserInfoResponse getUserInfo(String token,String id) {
- String[] interfaceUrl = QywxConstant.GET_USER_DETAIL;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}",id);
- QywxUserInfoResponse response = sendHttpRequestSingle(url,interfaceUrl[1],""
- ,new TypeReference<QywxUserInfoResponse>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
-
- /**
- *
- * @param token
- * @param type 濯掍綋鏂囦欢绫诲瀷锛屽垎鍒湁鍥剧墖锛坕mage锛夈�佽闊筹紙voice锛夈�佽棰戯紙video锛夛紝鏅�氭枃浠讹紙file锛�
- * @return
- */
- public static QywxUploadMediaResponse uploadMedia(String token,String type,String imgurl) {
- String[] interfaceUrl = QywxConstant.UPLOAD_TEMP_MEDIA;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${type}",type);
- QywxUploadMediaResponse response = sendHttpRequestMultifile(url,interfaceUrl[1],imgurl
- ,new TypeReference<QywxUploadMediaResponse>(){});
- if(response !=null && response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
- public static QywxBaseResponse<String> getUserInfoByCode(String token,String code) {
- String[] interfaceUrl = QywxConstant.GET_USER_BY_AUTH_CODE;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${code}",code);
- QywxBaseResponse<String> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
-
-
- public static String getJsApiTicket(String token) {
- String[] interfaceUrl = QywxConstant.GET_JSAPI_TICKET;
- String url = interfaceUrl[0].replace("${accesstoken}",token);
- QywxBaseResponse<String> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getTicket();
- }
- return null;
- }
-
-
- /**
- * 鍙戣捣wms鎺ュ彛璇锋眰
- * @param url
- * @param name
- * @param param
- * @param typeReference
- * @return
- * @param <T>
- */
- public static <T> QywxBaseResponse<T> sendHttpRequest(String url, String name, String param, TypeReference<QywxBaseResponse<T>> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+url+"\nparam==========================:"+ JSONObject.toJSONString(param));
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- Map<String,String> headers = new HashMap<>();
- res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
- QywxBaseResponse result = JSONObject.parseObject(res, typeReference.getType());
- logResult(result,name);
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ JSONObject.toJSONString(param));
- }
- }
- return null;
- }
- public static <T extends QywxBaseSingleResponse> T sendHttpRequestMultifile(String url, String name, String imgUrl , TypeReference<T> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+ imgUrl);
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- res = HttpsUtil.uploadTempMedia (qyUtil.qiweiUrl+url,imgUrl);
- log.info("浠庝紒寰帴鍙�:{}----涓婁紶涓存椂绱犳潗缁撴灉:{}",url,res);
- JSONObject jsonObject = JSONObject.parseObject(res);
- T result = JSONObject.parseObject(res, typeReference.getType());
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ imgUrl);
- }
- }
- return null;
- }
- public static <T extends QywxBaseSingleResponse> T sendHttpRequestSingle(String url, String name, String param, TypeReference<T> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+ JSONObject.toJSONString(param));
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- Map<String,String> headers = new HashMap<>();
- res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
- T result = JSONObject.parseObject(res, typeReference.getType());
-// logResult(result,name);
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ JSONObject.toJSONString(param));
- }
- }
- return null;
- }
- private static void logResult(QywxBaseResponse res,String name) {
- if( res.getErrcode() !=null && res.getErrcode().equals(0)){
- log.info("銆愪紒涓氬井淇℃帴鍙o細"+name+"銆�================鎴愬姛====\n"+ JSONObject.toJSONString(res));
- }else{
- log.error("銆愪紒涓氬井淇℃帴鍙o細"+name+"銆�================澶辫触====锛歕n"+ JSONObject.toJSONString(res));
- }
- }
-}
-
-
-
-
-
diff --git a/server/src/main/java/com/doumee/dao/business/model/Information.java b/server/src/main/java/com/doumee/dao/business/model/Information.java
index eb4a68b..8567208 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Information.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Information.java
@@ -73,6 +73,9 @@
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
@ExcelColumn(name="鎺掑簭鐮�")
private Integer sortnum;
+ @ApiModelProperty(value = "绫诲瀷锛�0鍜ㄨ 1妗堜緥锛�", example = "1")
+ @ExcelColumn(name="绫诲瀷锛�0鍜ㄨ 1妗堜緥")
+ private Integer type;
@ApiModelProperty(value = "鐘舵�� 0姝e父 1绂佺敤", example = "1")
diff --git a/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java b/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
index d878523..23ad669 100644
--- a/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
+++ b/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
@@ -36,6 +36,8 @@
@ApiModelProperty(value = "鏅烘収绯荤粺锛圼{\"name\":\"鏅烘収绯荤粺涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鏅烘収绯荤粺浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
private JSONArray wisdomSystem;
+ @ApiModelProperty(value = "鑽h獕璧勮川锛圼{\"name\":\"鑽h獕璧勮川涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鑽h獕璧勮川浜孿",\"address\":\"鑽h獕璧勮川涓塡"}]锛�")
+ private JSONArray honors;
}
diff --git a/server/src/main/java/com/doumee/dao/system/model/SystemDictData.java b/server/src/main/java/com/doumee/dao/system/model/SystemDictData.java
index 80a7813..ccd9773 100644
--- a/server/src/main/java/com/doumee/dao/system/model/SystemDictData.java
+++ b/server/src/main/java/com/doumee/dao/system/model/SystemDictData.java
@@ -27,7 +27,6 @@
private Integer id;
@ApiModelProperty(value = "鎵�灞炲瓧鍏�", example = "1")
- @NotNull(message = "鎵�灞炲瓧鍏镐笉鑳戒负绌�", groups = {Constants.OperaType.Create.class, Constants.OperaType.Update.class})
private Integer dictId;
@ApiModelProperty(value = "鏁版嵁鍊�")
diff --git a/server/src/main/java/com/doumee/dao/vo/FootDataVO.java b/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
index 1f74746..4f404f3 100644
--- a/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
+++ b/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
@@ -20,6 +20,11 @@
@ApiModelProperty(value = "foot浜岀淮鐮佸叏璺緞")
private String footFullImgUrl;
+ @ApiModelProperty(value = "foot浜岀淮鐮�2")
+ private String footImgUrl2;
+
+ @ApiModelProperty(value = "foot浜岀淮鐮佸叏璺緞2")
+ private String footFullImgUrl2;
@ApiModelProperty(value = "foot鏂囨")
private String footWords;
@@ -41,6 +46,7 @@
@ApiModelProperty(value = "鏅烘収绯荤粺锛圼{\"name\":\"鏅烘収绯荤粺涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鏅烘収绯荤粺浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
private JSONArray wisdomSystem;
-
+ @ApiModelProperty(value = "鑽h獕璧勮川锛圼{\"name\":\"鑽h獕璧勮川涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鑽h獕璧勮川浜孿",\"address\":\"鑽h獕璧勮川涓塡"}]锛�")
+ private JSONArray honors;
}
diff --git a/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java b/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
index f47194c..d47455c 100644
--- a/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
+++ b/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
@@ -231,10 +231,14 @@
@Override
public FootDataVO getFoodDataVO(){
FootDataVO footDataVO = new FootDataVO();
+ String path =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode();
footDataVO.setFootWords(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_WORDS).getCode());
footDataVO.setFootImgUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL).getCode());
- footDataVO.setFootFullImgUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode() +
- systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL).getCode());
+ footDataVO.setFootFullImgUrl(path+
+ footDataVO.getFootImgUrl());
+ footDataVO.setFootImgUrl2(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL2).getCode());
+ footDataVO.setFootFullImgUrl2(path +
+ footDataVO.getFootImgUrl2());
footDataVO.setAddress(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ADDRESS).getCode());
footDataVO.setLinkPhone(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LINK_PHONE).getCode());
footDataVO.setLinkMobile(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LINK_MOBILE).getCode());
@@ -245,6 +249,10 @@
SystemDictData wisdomSystem = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.WISDOM_SYSTEM);
if(Objects.nonNull(wisdomSystem) & org.apache.commons.lang3.StringUtils.isNotBlank(wisdomSystem.getCode())){
footDataVO.setWisdomSystem(JSONArray.parseArray(wisdomSystem.getCode()));
+ }
+ SystemDictData honors = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HONORS);
+ if(Objects.nonNull(wisdomSystem) & org.apache.commons.lang3.StringUtils.isNotBlank(honors.getCode())){
+ footDataVO.setHonors(JSONArray.parseArray(honors.getCode()));
}
footDataVO.setServerTime(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SERVER_TIME).getCode());
return footDataVO;
@@ -303,6 +311,11 @@
wisdomSystem.setCode(footDataDTO.getWisdomSystem().toString());
systemDictDataBiz.updateById(wisdomSystem);
}
+ SystemDictData honors = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.HONORS);
+ if (Objects.nonNull(wisdomSystem)&&Objects.nonNull(footDataDTO.getHonors())) {
+ wisdomSystem.setCode(footDataDTO.getHonors().toString());
+ systemDictDataBiz.updateById(wisdomSystem);
+ }
}
diff --git a/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java b/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
index a2cf2e2..b4ff068 100644
--- a/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
+++ b/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
@@ -53,6 +53,7 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ information.setType(Constants.formatIntegerNum(information.getType()));
information.setIsdeleted(Constants.ZERO);
information.setCreateDate(new Date());
information.setCreator(user.getId());
@@ -139,6 +140,7 @@
queryWrapper.lambda()
.eq(Information::getIsdeleted,Constants.ZERO)
.eq(pageWrap.getModel().getId() != null, Information::getId, pageWrap.getModel().getId())
+ .eq(pageWrap.getModel().getType() != null, Information::getType, pageWrap.getModel().getType())
.eq(pageWrap.getModel().getStatus() != null, Information::getStatus, pageWrap.getModel().getStatus())
.eq(pageWrap.getModel().getRemark() != null, Information::getRemark, pageWrap.getModel().getRemark())
.like(pageWrap.getModel().getTitle() != null, Information::getTitle, pageWrap.getModel().getTitle())
@@ -179,8 +181,7 @@
|| Objects.isNull(information.getStatus())
|| Objects.isNull(information.getId())
|| !(Constants.equalsInteger(information.getStatus(),Constants.ZERO)
- || Constants.equalsInteger(information.getStatus(),Constants.ONE))
- ){
+ || Constants.equalsInteger(information.getStatus(),Constants.ONE))){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
informationMapper.update(new UpdateWrapper<Information>().lambda().set(Information::getStatus,information.getStatus()).eq(Information::getId,information.getId()));
diff --git a/server/src/main/resources/application-pro.yml b/server/src/main/resources/application-pro.yml
index 580a06a..7a9f0a5 100644
--- a/server/src/main/resources/application-pro.yml
+++ b/server/src/main/resources/application-pro.yml
@@ -56,6 +56,3 @@
upload:
type: blob
-
-qiwei:
- serviceurl: https://wecom-qyapi.unilever-china.com/
\ No newline at end of file
diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml
index 5dacd2a..3ee415e 100644
--- a/server/src/main/resources/application.yml
+++ b/server/src/main/resources/application.yml
@@ -9,7 +9,7 @@
spring:
profiles:
- active: dev
+ active: pro
# JSON杩斿洖閰嶇疆
jackson:
# 榛樿鏃跺尯
--
Gitblit v1.9.3