From 0358677c06e86f05c992f406c9714a32b30a235d Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 18 七月 2024 18:42:21 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
server/service/src/main/java/com/doumee/service/system/SystemDictService.java | 1
server/service/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java | 6
server/service/src/main/java/com/doumee/service/business/NewsService.java | 29
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTContentInfoResponse.java | 11
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTAreaTreeResponse.java | 43
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTBasePageResponse.java | 9
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTRealcaseInfoResponse.java | 34
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTActionDoRequest.java | 10
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java | 332 ++--
admin/src/views/timer/timer.vue | 2
admin/src/views/business/customerLog.vue | 71
server/service/service.iml | 4
server/service/src/main/java/com/doumee/dao/web/reqeust/ContentShareImgDto.java | 27
server/service/src/main/java/com/doumee/biz/zbom/model/IamUserJobModel.java | 4
server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java | 40
server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java | 164 ++
server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java | 4
server/service/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java | 1
server/service/src/main/java/com/doumee/biz/zbom/model/IamFcodeModel.java | 22
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTUserGetTokenResponse.java | 4
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTDataDetailRequest.java | 15
server/web/src/main/java/com/doumee/api/web/PersonnelApi.java | 71
server/service/src/main/java/com/doumee/biz/zbom/model/IamUserTypeModel.java | 2
server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMCustomerListResponse.java | 1
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java | 156 +
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTZbDecoInfoResponse.java | 50
server/service/src/main/java/com/doumee/service/business/impl/CategorySegServiceImpl.java | 3
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java | 5
server/service/src/main/java/com/doumee/service/business/CustomerLogService.java | 4
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTBaseRequst.java | 7
server/web/web.iml | 4
server/web/src/main/java/com/doumee/api/web/CommonApi.java | 18
server/pom.xml | 2
server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerPostRequest.java | 4
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCatalogInfoResponse.java | 10
server/admin/admin.iml | 4
server/service/src/main/java/com/doumee/service/business/GetCrmDataService.java | 26
server/web/src/main/java/com/doumee/api/web/CatalogApi.java | 1
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTVideoInfoResponse.java | 62
server/service/src/main/java/com/doumee/service/business/impl/NewsServiceImpl.java | 108 +
server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java | 10
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSysuserGetTokenResponse.java | 58
server/web/src/main/java/com/doumee/api/web/CustomerApi.java | 323 ++++
server/admin/src/main/java/com/doumee/api/business/CustomerLogController.java | 14
server/web/src/main/java/com/doumee/api/web/ApiController.java | 2
server/service/src/main/java/com/doumee/service/business/impl/CustomerLogServiceImpl.java | 133 +
server/service/src/main/java/com/doumee/service/business/impl/GetCrmDataServiceImpl.java | 73 +
admin/src/components/business/OperaNewsDzWindow.vue | 6
server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateShopModel.java | 24
server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java | 24
server/service/src/main/java/com/doumee/biz/zbom/ZbomZhongTaiService.java | 17
server/service/src/main/java/com/doumee/core/utils/Constants.java | 68
server/service/src/main/java/com/doumee/service/business/InitService.java | 1
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTAreaListRequest.java | 2
admin/src/components/business/OperaShopWindow.vue | 343 +++-
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTContentListRequest.java | 4
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCusCarouselImageResponse.java | 45
server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java | 31
server/service/src/main/java/com/doumee/service/business/GetZhongTaiDataService.java | 129 +
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTCatalogListRequest.java | 3
server/service/src/main/java/com/doumee/service/timer/QuartzJobService.java | 3
server/service/src/main/java/com/doumee/service/business/impl/CustomerServiceImpl.java | 12
server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMBaseResponse.java | 1
server/web/src/main/java/com/doumee/api/ScheduleTool.java | 25
server/service/src/main/java/com/doumee/dao/web/response/DailyUpdatesResponse.java | 28
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java | 177 +-
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductNewsInfoResponse.java | 54
server/service/src/main/java/com/doumee/biz/zbom/model/IamCategoryModel.java | 21
server/service/src/main/java/com/doumee/service/business/impl/ActionsServiceImpl.java | 2
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java | 20
server/service/src/main/java/com/doumee/biz/zbom/model/IamUserOrgModel.java | 20
admin/public/index.html | 6
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java | 49
admin/src/api/business/shop.js | 5
server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerListRequest.java | 2
server/service/src/main/java/com/doumee/config/Jwt/WebMvcConfig.java | 5
server/zbomyoujia.iml | 4
admin/src/api/business/customerLog.js | 6
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomZhongTaiServiceImpl.java | 290 ++++
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagInfoResponse.java | 6
server/service/src/main/java/com/doumee/service/business/UsersService.java | 10
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductParamInfoResponse.java | 22
server/service/src/main/java/com/doumee/dao/business/model/Shop.java | 4
server/service/src/main/java/com/doumee/service/business/MemberService.java | 10
server/admin/src/main/java/com/doumee/api/business/ZhongTaiController.java | 48
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java | 45
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSpaceInfoResponse.java | 25
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomIAMServiceImpl.java | 4
admin/src/views/business/departments.vue | 134 ++
server/admin/src/main/java/com/doumee/api/business/PushController.java | 4
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTConstants.java | 58
server/service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java | 20
/dev/null | 69 -
server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateUserModel.java | 26
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductInfoResponse.java | 55
server/service/src/main/java/com/doumee/service/business/impl/CrmInterfaceLogServiceImpl.java | 9
server/admin/src/main/java/com/doumee/timer/WeixinTokenJobBiz.java | 36
server/service/src/main/java/com/doumee/dao/business/model/CustomerLog.java | 10
server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java | 6
99 files changed, 3,249 insertions(+), 763 deletions(-)
diff --git a/.idea/libraries/Maven__com_alibaba_fastjson_1_2_70.xml b/.idea/libraries/Maven__com_alibaba_fastjson_1_2_70.xml
deleted file mode 100644
index 11a9ec6..0000000
--- a/.idea/libraries/Maven__com_alibaba_fastjson_1_2_70.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
- <library name="Maven: com.alibaba:fastjson:1.2.70">
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../../maven/repository/com/alibaba/fastjson/1.2.70/fastjson-1.2.70.jar!/" />
- </CLASSES>
- <JAVADOC>
- <root url="jar://$PROJECT_DIR$/../../../maven/repository/com/alibaba/fastjson/1.2.70/fastjson-1.2.70-javadoc.jar!/" />
- </JAVADOC>
- <SOURCES>
- <root url="jar://$PROJECT_DIR$/../../../maven/repository/com/alibaba/fastjson/1.2.70/fastjson-1.2.70-sources.jar!/" />
- </SOURCES>
- </library>
-</component>
\ No newline at end of file
diff --git a/admin/public/index.html b/admin/public/index.html
index c5c6673..9cba38a 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -5,7 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>faviconzb.ico">
- <title>蹇楅偊浼樺淇℃伅绠$悊绯荤粺</title>
+ <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>
+<!-- <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>
+ <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>
+ <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>-->
+ <title>蹇楅偊浼樺淇℃伅绠$悊绯荤粺</title>
</head>
<body>
<noscript>
diff --git a/admin/src/api/business/customerLog.js b/admin/src/api/business/customerLog.js
index 72b9ea1..148bd1b 100644
--- a/admin/src/api/business/customerLog.js
+++ b/admin/src/api/business/customerLog.js
@@ -24,6 +24,12 @@
export function updateById (data) {
return request.post('/business/customerLog/updateById', data)
}
+export function reSubmit (data) {
+ return request.post('/business/customerLog/reSubmit', data)
+}
+export function reSubmitAll (data) {
+ return request.post('/business/customerLog/reSubmitAll', data)
+}
// 鍒犻櫎
export function deleteById (id) {
diff --git a/admin/src/api/business/shop.js b/admin/src/api/business/shop.js
index 4110833..5f25f0c 100644
--- a/admin/src/api/business/shop.js
+++ b/admin/src/api/business/shop.js
@@ -12,6 +12,11 @@
trim: true
})
}
+export function areaList (data) {
+ return request.post('/business/zhongtai/areaList',data, {
+ trim: true
+ })
+}
// 鏌ヨ
export function fetchList3 (data) {
return request.get(`/business/shop/tree`, {
diff --git a/admin/src/components/business/OperaNewsDzWindow.vue b/admin/src/components/business/OperaNewsDzWindow.vue
index 2382ff8..5bccdbe 100644
--- a/admin/src/components/business/OperaNewsDzWindow.vue
+++ b/admin/src/components/business/OperaNewsDzWindow.vue
@@ -55,6 +55,7 @@
data () {
return {
// 琛ㄥ崟鏁版嵁
+ loading:false,
form: {
id: null,
remark: '',
@@ -104,9 +105,14 @@
}
this.form.fileType = target.fileType || 0
const files = target.fileList || []
+ this.form.fileList = []
+ console.log(files)
if (files.length > 0) {
this.form.fileList.push(files[0])
+ }else{
+
}
+ console.log(this.form.fileList)
})
},
delFile (index) {
diff --git a/admin/src/components/business/OperaShopWindow.vue b/admin/src/components/business/OperaShopWindow.vue
index 33fe966..547c708 100644
--- a/admin/src/components/business/OperaShopWindow.vue
+++ b/admin/src/components/business/OperaShopWindow.vue
@@ -1,114 +1,65 @@
<template>
<GlobalWindow
:title="title"
+ width="70%"
:visible.sync="visible"
:confirm-working="isWorking"
@confirm="confirm"
>
<el-form :model="form" ref="form" :rules="rules">
- <el-form-item label="鍒涘缓浜虹紪鐮�" prop="creator">
- <el-input v-model="form.creator" placeholder="璇疯緭鍏ュ垱寤轰汉缂栫爜" v-trim/>
+ <div>
+ <el-form-item label="鎵�灞炲尯鍩�" prop="provinceCode" label-width="100px">
+ <div class="address-plus">
+ <el-select v-model="form.provinceCode" placeholder="璇烽�夋嫨鐪佷唤" @change="selectProvince" style="width:150px; margin-right: 25px" >
+ <el-option
+ v-for="item in provinces"
+ :key="item.id"
+ :value="item.id"
+ :label="item.name"
+ ></el-option>
+ </el-select>
+ <el-select v-model="form.cityCode" placeholder="璇烽�夋嫨鍩庡競" @change="selectCity" style="width:150px; margin-right: 25px">
+ <el-option
+ v-for="item in cities"
+ :key="item.id"
+ :value="item.id"
+ :label="item.name"
+ ></el-option>
+ </el-select>
+ <el-select v-model="form.areaCode" placeholder="璇烽�夋嫨鍘垮尯" @change="selectArea" style="width:150px; margin-right: 22px">
+ <el-option
+ v-for="item in areas"
+ :key="item.id"
+ :value="item.id"
+ :label="item.name"
+ ></el-option>
+ </el-select>
+ </div>
+ </el-form-item>
+ </div>
+ <el-form-item label="鑱旂郴浜�" prop="linkerName" label-width="100px">
+ <el-input v-model="form.linkerName" placeholder="璇疯緭鍏ヨ仈绯讳汉" v-trim style="width:500px; "/>
</el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿" prop="createDate">
- <el-date-picker v-model="form.createDate" value-format="yyyy-MM-dd" placeholder="璇疯緭鍏ュ垱寤烘椂闂�"></el-date-picker>
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="linkPhone" label-width="100px">
+ <el-input v-model="form.linkPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" v-trim style="width:500px; "/>
</el-form-item>
- <el-form-item label="鏇存柊浜虹紪鐮�" prop="editor">
- <el-input v-model="form.editor" placeholder="璇疯緭鍏ユ洿鏂颁汉缂栫爜" v-trim/>
+ <el-form-item label="璇︾粏鍦板潃" prop="address" label-width="100px">
+ <el-input v-model="form.address" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" v-trim style="width:500px; " @blur="changeMapCenter"/>
</el-form-item>
- <el-form-item label="鏇存柊鏃堕棿" prop="editDate">
- <el-date-picker v-model="form.editDate" value-format="yyyy-MM-dd" placeholder="璇疯緭鍏ユ洿鏂版椂闂�"></el-date-picker>
- </el-form-item>
- <el-form-item label="鏄惁鍒犻櫎0鍚� 1鏄�" prop="isdeleted">
- <el-input v-model="form.isdeleted" placeholder="璇疯緭鍏ユ槸鍚﹀垹闄�0鍚� 1鏄�" v-trim/>
- </el-form-item>
- <el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" v-trim/>
- </el-form-item>
- <el-form-item label="閮ㄩ棬id" prop="orgId">
- <el-input v-model="form.orgId" placeholder="璇疯緭鍏ラ儴闂╥d" v-trim/>
- </el-form-item>
- <el-form-item label="閮ㄩ棬鍚嶇О" prop="name">
- <el-input v-model="form.name" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" v-trim/>
- </el-form-item>
- <el-form-item label="閮ㄩ棬U瀹㈢粍缁噄d" prop="orgOldId">
- <el-input v-model="form.orgOldId" placeholder="璇疯緭鍏ラ儴闂║瀹㈢粍缁噄d" v-trim/>
- </el-form-item>
- <el-form-item label="涓婄骇缁勭粐Id" prop="parentId">
- <el-input v-model="form.parentId" placeholder="璇疯緭鍏ヤ笂绾х粍缁嘔d" v-trim/>
- </el-form-item>
- <el-form-item label="鐘舵��" prop="status">
- <el-input v-model="form.status" placeholder="璇疯緭鍏ョ姸鎬�" v-trim/>
- </el-form-item>
- <el-form-item label="鎺掑簭鐮�" prop="orderNum">
- <el-input v-model="form.orderNum" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim/>
- </el-form-item>
- <el-form-item label="缁勭粐SF瀛樻斁鐮�" prop="sourceCode">
- <el-input v-model="form.sourceCode" placeholder="璇疯緭鍏ョ粍缁嘢F瀛樻斁鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="缁勭粐缂栫爜" prop="code">
- <el-input v-model="form.code" placeholder="璇疯緭鍏ョ粍缁囩紪鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="缁勭粐绫诲瀷1:涓�浣撳晢 ,2:鍔犵洘鍟�,3:搴楅潰锛�4:閮ㄩ棬(HR/鍔�)锛�5:铏氭嫙搴楅潰(鍔�/铏�)" prop="type">
- <el-input v-model="form.type" placeholder="璇疯緭鍏ョ粍缁囩被鍨�1:涓�浣撳晢 ,2:鍔犵洘鍟�,3:搴楅潰锛�4:閮ㄩ棬(HR/鍔�)锛�5:铏氭嫙搴楅潰(鍔�/铏�)" v-trim/>
- </el-form-item>
- <el-form-item label="閮ㄩ棬灞炴�э紙1:瀹炰綋搴楅潰銆�2:铏氭嫙搴楅潰銆�3:鐢靛晢閮ㄣ��4:娓犻亾閮ㄣ��5:璐㈠姟閮級" prop="attribute">
- <el-input v-model="form.attribute" placeholder="璇疯緭鍏ラ儴闂ㄥ睘鎬э紙1:瀹炰綋搴楅潰銆�2:铏氭嫙搴楅潰銆�3:鐢靛晢閮ㄣ��4:娓犻亾閮ㄣ��5:璐㈠姟閮級" v-trim/>
- </el-form-item>
- <el-form-item label="浼佷笟寰俊缁勭粐ID" prop="weixinId">
- <el-input v-model="form.weixinId" placeholder="璇疯緭鍏ヤ紒涓氬井淇$粍缁嘔D" v-trim/>
- </el-form-item>
- <el-form-item label="閽夐拤閮ㄩ棬ID" prop="dingdingId">
- <el-input v-model="form.dingdingId" placeholder="璇疯緭鍏ラ拤閽夐儴闂↖D" v-trim/>
- </el-form-item>
- <el-form-item label="鏈�杩戝悓姝ユ椂闂�" prop="syncDate">
- <el-date-picker v-model="form.syncDate" value-format="yyyy-MM-dd" placeholder="璇疯緭鍏ユ渶杩戝悓姝ユ椂闂�"></el-date-picker>
- </el-form-item>
- <el-form-item label="鏈�杩戝悓姝ュ娉�" prop="syncInfo">
- <el-input v-model="form.syncInfo" placeholder="璇疯緭鍏ユ渶杩戝悓姝ュ娉�" v-trim/>
- </el-form-item>
- <el-form-item label="鎵�灞炲叧鑱擣鐮�" prop="fcode">
- <el-input v-model="form.fcode" placeholder="璇疯緭鍏ユ墍灞炲叧鑱擣鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="鎵�灞炲叧鑱擲鐮�" prop="scode">
- <el-input v-model="form.scode" placeholder="璇疯緭鍏ユ墍灞炲叧鑱擲鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="ZCODE" prop="zcode">
- <el-input v-model="form.zcode" placeholder="璇疯緭鍏CODE" v-trim/>
- </el-form-item>
- <el-form-item label="鍏宠仈S鐮�" prop="glCode">
- <el-input v-model="form.glCode" placeholder="璇疯緭鍏ュ叧鑱擲鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="鍏宠仈S鐮佸悕绉�" prop="glName">
- <el-input v-model="form.glName" placeholder="璇疯緭鍏ュ叧鑱擲鐮佸悕绉�" v-trim/>
- </el-form-item>
- <el-form-item label="鍥藉" prop="country">
- <el-input v-model="form.country" placeholder="璇疯緭鍏ュ浗瀹�" v-trim/>
- </el-form-item>
- <el-form-item label="鐪佷唤缂栫爜" prop="provinceCode">
- <el-input v-model="form.provinceCode" placeholder="璇疯緭鍏ョ渷浠界紪鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="鐪佷唤鍚嶇О" prop="provinceName">
- <el-input v-model="form.provinceName" placeholder="璇疯緭鍏ョ渷浠藉悕绉�" v-trim/>
- </el-form-item>
- <el-form-item label="鍩庡競鐮�" prop="cityCode">
- <el-input v-model="form.cityCode" placeholder="璇疯緭鍏ュ煄甯傜爜" v-trim/>
- </el-form-item>
- <el-form-item label="鍩庡競鍚嶇О" prop="cityName">
- <el-input v-model="form.cityName" placeholder="璇疯緭鍏ュ煄甯傚悕绉�" v-trim/>
- </el-form-item>
- <el-form-item label="鍖哄幙缂栫爜" prop="areaCode">
- <el-input v-model="form.areaCode" placeholder="璇疯緭鍏ュ尯鍘跨紪鐮�" v-trim/>
- </el-form-item>
- <el-form-item label="鍖哄幙鍚嶇О" prop="areaName">
- <el-input v-model="form.areaName" placeholder="璇疯緭鍏ュ尯鍘垮悕绉�" v-trim/>
- </el-form-item>
- <el-form-item label="鍝佺被缂栫爜" prop="unitCode">
- <el-input v-model="form.unitCode" placeholder="璇疯緭鍏ュ搧绫荤紪鐮�" v-trim/>
+ <el-form-item label="缁忕含搴�" prop="posInfo" label-width="100px">
+ <el-input v-model="form.longitude" clearable placeholder="鐐瑰嚮鍦板浘鑾峰彇缁忓害" v-trim style="width:245px; "/>-
+ <el-input v-model="form.latitude" clearable placeholder="鐐瑰嚮鍦板浘鑾峰彇缁村害" v-trim style="width:245px; "/>
</el-form-item>
</el-form>
+ <div class="map-box">
+ <div id="mapContainer" ref="mapContainer" style="width:80%;margin-left:10%;height:400px;overflow: hidden;" ></div>
+ <div class="map-search">
+ <el-input v-model="searchValue" placeholder="璇疯緭鍏ヨ妫�绱㈢殑浣嶇疆淇℃伅" />
+ <el-button @click="searchAddress(searchValue)" type="primary">鎼滅储</el-button>
+ </div>
+ </div>
</GlobalWindow>
</template>
-
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
@@ -118,43 +69,33 @@
components: { GlobalWindow },
data () {
return {
+ geocoder: null,
+ map: [],
+ searchValue:'',
+ marker:null,
// 琛ㄥ崟鏁版嵁
+ provinces: [],
+ cities: [],
+ areas: [],
form: {
id: null,
- creator: '',
- createDate: '',
- editor: '',
- editDate: '',
- isdeleted: '',
- remark: '',
- orgId: '',
- name: '',
- orgOldId: '',
- parentId: '',
- status: '',
- orderNum: '',
- sourceCode: '',
- code: '',
- type: '',
- attribute: '',
- weixinId: '',
- dingdingId: '',
- syncDate: '',
- syncInfo: '',
- fcode: '',
- scode: '',
- zcode: '',
- glCode: '',
- glName: '',
- country: '',
+ provinceId: '',
provinceCode: '',
provinceName: '',
cityCode: '',
+ cityId: '',
cityName: '',
+ areaId: '',
areaCode: '',
areaName: '',
- unitCode: ''
+ longitude: '',
+ latitude: '',
+ address: '',
+ linkPhone: '',
+ posInfo: '',
+ linkerName: ''
},
+ geolocation: null,
// 楠岃瘉瑙勫垯
rules: {
}
@@ -165,6 +106,162 @@
api: '/business/shop',
'field.id': 'id'
})
+ },
+ methods: {
+ searchAddress( ){
+ if(this.geocoder && this.searchValue){
+ this.geocoder.getLocation(this.searchValue)
+ }
+ },
+ initMap (lat, long) {
+ const that = this
+ var center = new qq.maps.LatLng(lat || 39.916527, long || 116.397128)// 榛樿鍖椾含澶╁畨闂�
+ this.map = new qq.maps.Map(document.getElementById('mapContainer'), {
+ center: center,
+ zoom: 17
+ })
+ this.changePostion(long,lat)
+ qq.maps.event.addListener(this.map, 'click',
+ function (event) {
+ that.changePostion(event.latLng.lng, event.latLng.lat)
+ }
+ )
+ this.geocoder = new qq.maps.Geocoder()
+ this.geocoder.setComplete(function (result) {
+ that.changePostion(result.detail.location.lng,result.detail.location.lat)
+ })
+ // 鑻ユ湇鍔¤姹傚け璐ワ紝鍒欒繍琛屼互涓嬪嚱鏁�
+ this.geocoder.setError(function () {
+ console.log('閫嗚В鏋愬け璐�')
+ })
+ },
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ this.form.provinceId = ''
+ this.form.cityId = ''
+ this.searchValue = ''
+ if (target == null) {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ this.loadProvince(this.form.provinceId, true)
+ })
+ return
+ }
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ this.loadProvince(this.form.provinceId, true)
+ const mapContainer = this.$refs.mapContainer // 鑾峰彇鍦板浘瀹瑰櫒
+ if (mapContainer) {
+ // 鍒濆鍖栧湴鍥句箣鍓嶆鏌ュ鍣ㄦ槸鍚﹀瓨鍦�
+ this.initMap(this.form.latitude,this.form.longitude)
+ // 鍒濆鍖栬吘璁湴鍥�
+ }
+ })
+ },
+ loadProvince () {
+ this.api.areaList({ pid: '1' })
+ .then(res => {
+ this.provinces = res
+ })
+ if(this.form.provinceCode){
+ this.selectProvince(this.form.provinceCode,true)
+ }
+ },
+ // 閫夋嫨鐪佷唤
+ selectProvince (val,isInit) {
+ this.provinces.forEach(item => {
+ if (item.id == val) {
+ this.form.provinceName = item.name
+ }
+ })
+ this.cities = []
+ this.areas = []
+ if(!isInit){
+ this.form.cityName = ''
+ this.form.areaCode = ''
+ this.form.cityCode = ''
+ this.form.areaName = ''
+ }
+ if(!val || val ==''){
+ return
+ }
+ this.api.areaList({ pid: val })
+ .then(res => {
+ this.cities = res
+ if(isInit){
+ this.selectCity(this.form.cityCode,isInit)
+ }
+ })
+ },
+ // 閫夋嫨鍩庡競
+ selectCity (val,isInit) {
+ this.cities.forEach(item => {
+ if (item.id == val) {
+ this.form.cityName = item.name
+ }
+ })
+ this.areas = []
+ if(!isInit){
+ this.form.areaCode = ''
+ this.form.areaName = ''
+ }
+ if(!val || val ==''){
+ return
+ }
+ this.api.areaList({ pid: val })
+ .then(res => {
+ this.areas = res
+ })
+ },
+ selectArea (val) {
+ this.areas.forEach(item => {
+ if (item.id == val) {
+ this.form.areaName = item.name
+ }
+ })
+ },
+ changeMapCenter(){
+ this.searchValue = (this.form.provinceName||'')+(this.form.cityName||'')+(this.form.areaName||'')+(this.form.address||'')
+ this.searchAddress()
+ },
+ changePostion (lng, lat) {
+ if (lng || lat) {
+ this.form.longitude = lng
+ this.form.latitude = lat
+ if(this.map){
+ if(this.marker){
+ this.marker.setMap(null)
+ }
+ var pos =new qq.maps.LatLng(lat,lng);
+ this.map.setCenter(pos)
+ this.marker= new qq.maps.Marker({
+ position: pos,
+ animation:qq.maps.MarkerAnimation.DROP,
+ map:this.map
+ })
+ }
+ }
+ }
}
}
</script>
+<style scoped>
+.map-box {
+ position: relative;
+}
+.map-search {
+ z-index: 1000;
+ display: flex;
+ position: absolute;
+ top: 20px;
+ left: 120px;
+ width: 350px;
+}
+button {
+ border-radius: 0;
+}
+</style>
diff --git a/admin/src/views/business/customerLog.vue b/admin/src/views/business/customerLog.vue
index d0a6099..018720f 100644
--- a/admin/src/views/business/customerLog.vue
+++ b/admin/src/views/business/customerLog.vue
@@ -42,25 +42,39 @@
</el-form>
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
-<!-- <ul class="toolbar" v-permissions="['business:customerlog:create', 'business:customerlog:delete']">
- <li><el-button type="primary" @click="$refs.operaCustomerLogWindow.open('鏂板缓瀹㈡埛鐣欒祫璁板綍淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:customerlog:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:customerlog:delete']">鍒犻櫎</el-button></li>
- </ul>-->
+ <ul class="toolbar" v-permissions="['business:customerlog:create', 'business:customerlog:delete']">
+ <li><el-button type="primary" @click="reSubmitAll(0)" icon="el-icon-plus" v-permissions="['business:customerlog:update']">鎻愪氦鍏ㄩ儴銆愭湭鎻愪氦銆戞暟鎹�</el-button></li>
+ <li><el-button type="primary" @click="reSubmitAll(2)" icon="el-icon-plus" v-permissions="['business:customerlog:update']">閲嶆柊鎻愪氦銆愬け璐ャ�戞暟鎹�</el-button></li>
+ </ul>
<el-table
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="createDate" label="鍒涘缓鏃堕棿" min-width="120px"></el-table-column>
- <el-table-column prop="type" label="鎻愪氦绫诲瀷" min-width="100px">
+ <el-table-column label="搴忓彿" width="55" fixed><template slot-scope="scope" >{{scope.$index+1}}</template></el-table-column>
+ <el-table-column prop="type" label="鎻愪氦绫诲瀷" fixed min-width="100px">
<template slot-scope="{row}">
<span v-if="row.type ==0">娴嬭瘯瑁呬慨椋庢牸</span>
<span v-if="row.type ==1">0鍏冨畾鍒�</span>
<span v-if="row.type ==2">瑁呬慨璁$畻鍣�</span>
</template>
</el-table-column>
+ <el-table-column prop="phone" label="鎵嬫満鍙�" fixed min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="濮撳悕" fixed min-width="100px"></el-table-column>
+ <el-table-column prop="crmStatus" label="crm鎻愪氦鐘舵��" fixed min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.crmStatus ==0" style="color: blue">鏈彁浜�</span>
+ <span v-if="row.crmStatus ==1" style="color: green">宸叉彁浜�</span>
+ <span v-if="row.crmStatus ==2" style="color: red">鎻愪氦澶辫触</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="provinceName" label="鐪佷唤鍚嶇О" min-width="100px">
+ <template slot-scope="{row}">
+ {{row.provinceName||''}}{{row.cityName||''}}
+ </template>
+ </el-table-column>
+ <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="140px"></el-table-column>
<el-table-column prop="orderDate" label="棰勭害閲忔埧鏃堕棿" min-width="120px"></el-table-column>
<el-table-column prop="plaDate" label="璁″垝瑁呬慨寮�濮嬫椂闂�" min-width="120px">
<template slot-scope="{row}">
@@ -117,28 +131,19 @@
</template>
</el-table-column>
<el-table-column prop="styleInfo" label="椋庢牸" min-width="100px"></el-table-column>
- <el-table-column prop="provinceName" label="鐪佷唤鍚嶇О" min-width="100px"></el-table-column>
- <el-table-column prop="cityName" label="鍩庡競鍚嶇О" min-width="100px"></el-table-column>
- <el-table-column prop="phone" label="鎵嬫満鍙�" min-width="100px"></el-table-column>
<el-table-column prop="budget" label="瑁呬慨棰勭畻(鍏�)" min-width="100px"></el-table-column>
- <el-table-column prop="crmStatus" label="crm鎻愪氦鐘舵��" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.crmStatus ==0" style="color: blue">鏈彁浜�</span>
- <span v-if="row.crmStatus ==1" style="color: green">宸叉彁浜�</span>
- <span v-if="row.crmStatus ==2" style="color: red">鎻愪氦澶辫触</span>
- </template>
- </el-table-column>
<el-table-column prop="crmDate" label="crm鎻愪氦鏃堕棿" min-width="100px"></el-table-column>
<el-table-column prop="crmInfo" label="crm鎻愪氦澶囨敞" min-width="100px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:customerlog:update', 'business:customerlog:delete'])"
label="鎿嶄綔"
- min-width="120"
+ min-width="150"
fixed="right"
+ align="center"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaCustomerLogWindow.open('缂栬緫瀹㈡埛鐣欒祫璁板綍淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:customerlog:update']" v-if="row.crmStatus !=1">閲嶆柊鎻愪氦crm</el-button>
+ <!-- <el-button type="text" @click="$refs.operaCustomerLogWindow.open('缂栬緫瀹㈡埛鐣欒祫璁板綍淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']">缂栬緫</el-button>-->
+ <el-button type="text" @click="reSubmit(row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']" v-if="row.crmStatus !=1">閲嶆柊鎻愪氦crm</el-button>
</template>
</el-table-column>
</el-table>
@@ -165,6 +170,7 @@
components: { TableLayout, Pagination, OperaCustomerLogWindow },
data () {
return {
+ running: false,
// 鎼滅储
searchForm: {
queryEndDate: '',
@@ -188,6 +194,31 @@
},
methods: {
// 鏌ヨ鏁版嵁
+ reSubmit (row) {
+ this.api.reSubmit({ id: row.id })
+ .then(res => {
+ this.handlePageChange()
+ })
+ .finally(() => {
+ })
+ },
+ reSubmitAll (status) {
+ this.$dialog.actionConfirm('纭杩涜璇ユ搷浣滃悧锛�?')
+ .then(() => {
+ this.running = true
+ this.api.reSubmitAll({ crmStatus: status })
+ .then(res => {
+ this.handlePageChange()
+ })
+ .finally(() => {
+ })
+ .catch(e => {
+ })
+ .finally(() => {
+ this.running = false
+ })
+ })
+ }
}
}
</script>
diff --git a/admin/src/views/business/departments.vue b/admin/src/views/business/departments.vue
new file mode 100644
index 0000000..b9c6288
--- /dev/null
+++ b/admin/src/views/business/departments.vue
@@ -0,0 +1,134 @@
+<template>
+ <TableLayout :permissions="['business:shop:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="" prop="name">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="parentId">
+ <el-input v-model="searchForm.parentName" placeholder="璇疯緭鍏ヤ笂绾х粍缁囧悕绉�/缂栫爜" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="code">
+ <el-input v-model="searchForm.code" placeholder="璇疯緭鍏ョ粍缁囩紪鐮�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="provinceName">
+ <el-input v-model="searchForm.provinceName" placeholder="璇疯緭鍏ョ渷浠藉悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="cityName">
+ <el-input v-model="searchForm.cityName" placeholder="璇疯緭鍏ュ煄甯傚悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="areaName">
+ <el-input v-model="searchForm.areaName" placeholder="璇疯緭鍏ュ尯鍘垮悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button type="primary" :loading="isWorking.export" v-permissions="['business:shop:exportExcel']" @click="exportExcel">瀵煎嚭</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+<!-- <ul class="toolbar" v-permissions="['business:shop:create', 'business:shop:delete']">
+ <li><el-button type="primary" @click="$refs.operaShopWindow.open('鏂板缓蹇楅偊缁勭粐淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:shop:create']">鏂板缓</el-button></li>
+ <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:shop:delete']">鍒犻櫎</el-button></li>
+ </ul>-->
+ <el-table
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column prop="搴忓彿" width="55"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column>
+ <el-table-column prop="name" label="闂ㄥ簵鍚嶇О" min-width="150px" align="center"></el-table-column>
+ <el-table-column prop="code" label="缂栫爜" min-width="120px" align="center"></el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="80px">
+ <template scope="{row}">
+ <span v-if="row.status == 0" style="color: red">鍋滅敤</span>
+ <span v-if="row.status == 1" style="color: green">姝e父</span>
+ <span v-if="row.status == -1" style="color: grey">宸插垹闄�</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="namePath" label="缁勭粐璺緞" min-width="200px" align="center"></el-table-column>
+ <el-table-column prop="provinceName" label="鐪佸競鍖�" min-width="200px" align="center">
+ <template slot-scope="{row}">
+ {{row.country}}
+ {{row.provinceName}}
+ {{row.cityName}}
+ {{row.areaName}}
+ {{row.town}}
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="linkerName" label="鑱旂郴浜�" min-width="100px" align="center"></el-table-column>
+ <el-table-column prop="linkPhone" label="鑱旂郴鐢佃瘽" min-width="100px" align="center"></el-table-column>
+ <el-table-column prop="address" label="璇︾粏鍦板潃" min-width="200px" align="center"></el-table-column>
+ <el-table-column prop="longitude" label="缁忕含搴�" min-width="150px" align="center">
+ <template slot-scope="{row}">
+ [{{row.longitude}},{{row.latitude}}]
+ </template>
+ </el-table-column>
+ <!--
+ <el-table-column prop="syncDate" label="鏈�鍚庡悓姝ユ椂闂�" min-width="120px"></el-table-column>
+ -->
+ <el-table-column prop="editDate" label="鏈�鍚庢洿鏂版椂闂�" min-width="130px"
+ align="center"></el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:member:update', 'business:member:delete'])"
+ label="鎿嶄綔"
+ min-width="100"
+ align="center"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaShopWindow.open('缂栬緫闂ㄥ簵淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:shop:update']">缂栬緫</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaShopWindow ref="operaShopWindow" @success="handlePageChange"/>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaShopWindow from '@/components/business/OperaShopWindow'
+export default {
+ name: 'Shop',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaShopWindow },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ name: '',
+ parentName: '',
+ status: '',
+ code: '',
+ secondType: 3,
+ type: 2,
+ provinceName: '',
+ cityName: '',
+ areaName: ''
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '蹇楅偊闂ㄥ簵淇℃伅琛�',
+ api: '/business/shop',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ }
+}
+</script>
diff --git a/admin/src/views/timer/timer.vue b/admin/src/views/timer/timer.vue
index 91e4b1e..549e579 100644
--- a/admin/src/views/timer/timer.vue
+++ b/admin/src/views/timer/timer.vue
@@ -16,7 +16,7 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:quartz:create']">
- <li><el-button type="primary" @click="$refs.OperaTimerWindow.open('鏂板缓浠诲姟')" icon="el-icon-plus" v-permissions="['business:devices:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="$refs.OperaTimerWindow.open('鏂板缓浠诲姟')" icon="el-icon-plus" v-permissions="['business:quartz:create']">鏂板缓</el-button></li>
</ul>
<el-table
v-loading="isWorking.search"
diff --git a/server/admin/admin.iml b/server/admin/admin.iml
index 3f494ce..c22228b 100644
--- a/server/admin/admin.iml
+++ b/server/admin/admin.iml
@@ -140,7 +140,9 @@
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
- <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.52" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
diff --git a/server/admin/src/main/java/com/doumee/api/business/CustomerLogController.java b/server/admin/src/main/java/com/doumee/api/business/CustomerLogController.java
index 20332e4..2e792d3 100644
--- a/server/admin/src/main/java/com/doumee/api/business/CustomerLogController.java
+++ b/server/admin/src/main/java/com/doumee/api/business/CustomerLogController.java
@@ -66,6 +66,20 @@
customerLogService.updateById(customerLog);
return ApiResponse.success(null);
}
+ @ApiOperation("鏍规嵁ID閲嶆柊鎻愪氦crm")
+ @PostMapping("/reSubmit")
+ @RequiresPermissions("business:customerlog:update")
+ public ApiResponse reSubmit(@RequestBody CustomerLog customerLog) {
+ customerLogService.reSubmit(customerLog);
+ return ApiResponse.success(null);
+ }
+ @ApiOperation("鏍规嵁crm鐘舵�佹壒閲忔彁浜よ嚦crm")
+ @PostMapping("/reSubmitAll")
+ @RequiresPermissions("business:customerlog:update")
+ public ApiResponse reSubmitAll(@RequestBody CustomerLog customerLog) {
+ customerLogService.reSubmitAll(customerLog);
+ return ApiResponse.success(null);
+ }
@ApiOperation("鍒嗛〉鏌ヨ")
@PostMapping("/page")
diff --git a/server/admin/src/main/java/com/doumee/api/business/PushController.java b/server/admin/src/main/java/com/doumee/api/business/PushController.java
index 3190d34..9ee9794 100644
--- a/server/admin/src/main/java/com/doumee/api/business/PushController.java
+++ b/server/admin/src/main/java/com/doumee/api/business/PushController.java
@@ -38,7 +38,7 @@
ApiResponse<String> r = null;
try {
zbomIAMService.updateShopInfo(token,uuid,timestamp,shopList);
- r = ApiResponse.success("鎿嶄綔鎴愬姛");
+ r = ApiResponse.successIam("鎿嶄綔鎴愬姛");
}catch (BusinessException e){
success = Constants.ONE;
r = ApiResponse.failed(StringUtils.defaultString(e.getMessage(),"鎿嶄綔澶辫触"));
@@ -47,7 +47,7 @@
success = Constants.ONE;
r = ApiResponse.failed("鎿嶄綔澶辫触");
}finally {
- zbomIAMService.saveInterfaceLog("/push/iam/updateUserInfo",Constants.ONE,"IAM鎺ㄩ�佷汉鍛樿处鍙蜂俊鎭�", token, uuid, timestamp, shopList,success, JSONObject.toJSONString(r));
+ zbomIAMService.saveInterfaceLog("/push/iam/updateUserInfo",Constants.ONE,"IAM鎺ㄩ�佺粍缁囦俊鎭�", token, uuid, timestamp, shopList,success, JSONObject.toJSONString(r));
}
return r;
}
diff --git a/server/admin/src/main/java/com/doumee/api/business/ZhongTaiController.java b/server/admin/src/main/java/com/doumee/api/business/ZhongTaiController.java
new file mode 100644
index 0000000..e82ac66
--- /dev/null
+++ b/server/admin/src/main/java/com/doumee/api/business/ZhongTaiController.java
@@ -0,0 +1,48 @@
+package com.doumee.api.business;
+
+import com.doumee.api.BaseController;
+import com.doumee.biz.zbom.ZbomZhongTaiService;
+import com.doumee.biz.zbom.model.zhongtai.ZTAreaListRequest;
+import com.doumee.biz.zbom.model.zhongtai.response.ZTAreaInfoResponse;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
+import com.doumee.dao.admin.request.UpdateShopSortDTO;
+import com.doumee.dao.business.model.Shop;
+import com.doumee.dao.business.vo.ShopTreeVo;
+import com.doumee.service.business.ShopService;
+import io.swagger.annotations.*;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/07/04 14:40
+ */
+@Api(tags = "涓彴瀵规帴鎺ュ彛")
+@RestController
+@RequestMapping("/business/zhongtai")
+public class ZhongTaiController extends BaseController {
+
+ @Autowired
+ private ZbomZhongTaiService zhongTaiService;
+ @ApiOperation("鏍规嵁鐖剁骇缂栫爜鑾峰彇鐪佸尯鏁版嵁")
+ @PostMapping("/areaList")
+ public ApiResponse<List<ZTAreaInfoResponse>> areaList (@RequestBody ZTAreaListRequest param){
+ return ApiResponse.success(zhongTaiService.getAreaList(param));
+ }
+}
diff --git a/server/admin/src/main/java/com/doumee/timer/WeixinTokenJobBiz.java b/server/admin/src/main/java/com/doumee/timer/WeixinTokenJobBiz.java
new file mode 100644
index 0000000..f4a34e1
--- /dev/null
+++ b/server/admin/src/main/java/com/doumee/timer/WeixinTokenJobBiz.java
@@ -0,0 +1,36 @@
+package com.doumee.timer;
+
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.biz.zbom.ZbomIAMService;
+import com.doumee.service.business.MemberService;
+import com.doumee.service.system.SystemDictService;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author 鍏紬鍙�:鐭ヤ簡涓�绗�
+ * @since 2023-07-26 11:44
+ */
+@Component("weixinTokenJob")
+public class WeixinTokenJobBiz implements JobService {
+ private static final Logger log = LoggerFactory.getLogger(WeixinTokenJobBiz.class);
+
+ @Autowired
+ SystemDictDataBiz systemDictService;
+ @Override
+ public void run(String params,String module) {
+ Method method = null;
+ try {
+ systemDictService.updWxMiniToken();
+ log.info("\n ======== 瀹氭椂浠诲姟宸叉墽琛岋細weixinTokenJob.========"+module);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/server/admin/src/main/java/com/doumee/timer/ZbomIAMSyncJobBiz.java b/server/admin/src/main/java/com/doumee/timer/ZbomIAMSyncJobBiz.java
deleted file mode 100644
index 1e5d324..0000000
--- a/server/admin/src/main/java/com/doumee/timer/ZbomIAMSyncJobBiz.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.doumee.timer;
-
-import com.doumee.biz.zbom.ZbomIAMService;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.Method;
-
-/**
- * @author 鍏紬鍙�:鐭ヤ簡涓�绗�
- * @since 2023-07-26 11:44
- */
-@Component("iamServiceJob")
-public class ZbomIAMSyncJobBiz implements JobService {
- private static final Logger log = LoggerFactory.getLogger(ZbomIAMSyncJobBiz.class);
-
- @Autowired
- ZbomIAMService zbomIAMService;
- @Override
- public void run(String params,String module) {
- Method method = null;
- try {
- if(StringUtils.equals(module,"userInit")){
- zbomIAMService.startUserInit(params);
- }else if(StringUtils.equals(module,"orgInit")){
- zbomIAMService.startOrgInit(params);
- }else
- log.info("\n ======== 瀹氭椂浠诲姟宸叉墽琛岋細iamServiceJob.========"+module);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/server/pom.xml b/server/pom.xml
index 64ea08a..b3e7fc4 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -29,7 +29,7 @@
<java.version>1.8</java.version>
<swagger.version>2.9.2</swagger.version>
<swagger.bootstrap-ui.version>1.9.6</swagger.bootstrap-ui.version>
- <fastjson.version>1.2.70</fastjson.version>
+ <fastjson.version>2.0.52</fastjson.version>
<druid.version>1.2.0</druid.version>
<mybatis.plus.version>3.5.7</mybatis.plus.version>
<apache.shiro.version>1.7.0</apache.shiro.version>
diff --git a/server/service/service.iml b/server/service/service.iml
index 057983d..9e1bb2f 100644
--- a/server/service/service.iml
+++ b/server/service/service.iml
@@ -139,7 +139,9 @@
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
- <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.52" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
diff --git a/server/service/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java b/server/service/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java
index 6e2299e..5938cf9 100644
--- a/server/service/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java
+++ b/server/service/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java
@@ -37,4 +37,5 @@
String getPreFixPath(String resourceCode, String targetCode);
+ void updWxMiniToken();
}
diff --git a/server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java b/server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
index 0e7c910..20de185 100644
--- a/server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
+++ b/server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
@@ -7,6 +7,7 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.HttpsUtil;
import com.doumee.dao.business.vo.UnitCodeVo;
import com.doumee.dao.system.model.SystemDict;
import com.doumee.dao.system.model.SystemDictData;
@@ -182,6 +183,36 @@
String targetPath = list.stream().filter(s -> s.getLabel().equals(targetCode)).findFirst().map(s -> s.getCode()).orElse("");
return resourcePath+targetPath;
}
+ @Override
+ public void updWxMiniToken() {
+ updWxMiniTokenDo(Constants.WX_APPID_CUSTOMER,Constants.WX_SECRET_CUSTOMER,Constants.WX_TOKEN_CUSTOMER);
+ updWxMiniTokenDo(Constants.WX_APPID_PERSONNEL,Constants.WX_SECRET_PERSONNEL,Constants.WX_TOKEN_PERSONNEL);
+
+ }
+ public void updWxMiniTokenDo(String appID,String appKey,String token) {
+ String appId = queryByCode(Constants.WX_MINI_CONFIG,appID).getCode();
+ String appSecret = queryByCode(Constants.WX_MINI_CONFIG,appKey).getCode();
+ //鐢熸垚寰俊token
+ String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
+ String response = HttpsUtil.sendGet(url);
+ JSONObject json = JSONObject.parseObject(response);
+ SystemDictData systemDictData = queryByCode(Constants.WX_MINI_CONFIG,token);
+ systemDictData.setCode(json.getString("access_token"));
+ systemDictData.setUpdateTime(new Date());
+ updateByIdNew(systemDictData);
+
+ appId = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode();
+ appSecret = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode();
+ //鐢熸垚寰俊token
+ url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
+ response = HttpsUtil.sendGet(url);
+ json = JSONObject.parseObject(response);
+ systemDictData = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_PERSONNEL);
+ systemDictData.setCode(json.getString("access_token"));
+ systemDictData.setUpdateTime(new Date());
+ updateByIdNew(systemDictData);
+
+ }
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java b/server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java
index f927232..f8babe7 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java
@@ -20,9 +20,9 @@
@Service
public interface ZbomCRMService {
- int dealCustomerLogData(CustomerLog customerLog);
+ void dealCustomerLogData(CustomerLog customerLog);
String zbomEncode(String str);
- String getCrmGoUrl(String userName);
+ String getCrmGoUrl(String userName,Integer type);
CRMBaseResponse<List<CRMCustomerListResponse>> getCustomerList(CrmCustomerListRequest entity );
CRMBaseResponse<List<CRMDaogouBindListResponse>> getDaogouBindList(CrmDaogouBindListRequest entity );
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/ZbomZhongTaiService.java b/server/service/src/main/java/com/doumee/biz/zbom/ZbomZhongTaiService.java
index 9851db4..2327f93 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/ZbomZhongTaiService.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/ZbomZhongTaiService.java
@@ -16,10 +16,19 @@
*/
@Service
public interface ZbomZhongTaiService {
-
-
ZTUserGetTokenResponse getUserToken(ZTUserGetTokenRequest param);
+ ZTSysuserGetTokenResponse getSysuserToken(String mobile);
ZTBaseResponse userUpdateInfo(ZTUserInfoUpdateRequest param);
+ ZTBasePageResponse<ZTProductNewsInfoResponse> pageProductNewsList(ZTContentListRequest param);
+ ZTBasePageResponse<ZTProductInfoResponse> pageProductList(ZTContentListRequest param);
+ ZTBasePageResponse<ZTRealcaseInfoResponse> pageRealcaseList(ZTContentListRequest param);
+ ZTBasePageResponse<ZTVideoInfoResponse> pageVideoList(ZTContentListRequest param);
+ ZTBasePageResponse<ZTCaseInfoResponse> pageWholecaseList(ZTContentListRequest param);
+ ZTBasePageResponse<ZTZbDecoInfoResponse> pageZbDecoList(ZTContentListRequest param);
+ ZTProductInfoResponse getProductInfo(ZTContentInfoRequest param);
+ ZTCaseInfoResponse getWholecaseInfo(ZTContentInfoRequest param);
+ ZTProductNewsInfoResponse getProductNewsInfo(ZTContentInfoRequest param);
+ ZTRealcaseInfoResponse getRealcaseInfo(ZTContentInfoRequest param);
boolean userLogout(ZTBaseRequst param);
List<ZTCatalogInfoResponse> getCatalogList(ZTCatalogListRequest param);
List<ZTTagInfoResponse> getTagList(ZTCatalogListRequest param);
@@ -33,7 +42,11 @@
ZTBasePageResponse<ZTContentListResponse> pageLikeList(ZTContentListRequest param);
ZTBasePageResponse<ZTBehaviorInfoResponse> pageBehavoirList(ZTContentListRequest param);
List<ZTAreaInfoResponse> getAreaList(ZTAreaListRequest param);
+ List<ZTAreaTreeResponse> getAreaTreeList(ZTAreaListRequest param);
boolean bindCustomerFavorites(ZTBindCusFavoriteDoRequest param);
ZSZXCatalogResponse getZSZXCatalogs();
ZTBasePageResponse<ZTCusFavoritesInfoResponse> pageCusFavoriteList(ZTContentListRequest param);
+
+ List<ZTCusCarouselImageResponse> carouselImageList(ZTContentListRequest param);
+ ZTCusCarouselImageResponse carouselImageDetail(ZTDataDetailRequest param);
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
index 52ea66f..60da93d 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
@@ -53,7 +53,10 @@
*/
@Override
@Async
- public int dealCustomerLogData(CustomerLog customerLog){
+ public void dealCustomerLogData(CustomerLog customerLog){
+ if(StringUtils.isBlank(customerLog.getPhone())){
+ return;
+ }
CrmCustomerInfoRequest entity = new CrmCustomerInfoRequest();
entity.setId(customerLog.getId());
entity.setName(customerLog.getName());
@@ -91,7 +94,6 @@
.set(CustomerLog::getCrmStatus,Constants.ONE )
.set(CustomerLog::getCrmInfo,crmInfo )
.set(CustomerLog::getCrmDate,new Date() ));// 鏇存柊鐘舵��
- return status;// 榛樿澶辫触
}
/**
* 鑾峰彇瀵艰喘缁戝畾鍒楄〃
@@ -129,7 +131,7 @@
public <T> CRMBaseResponse<T> sendCusHttpRequest(String interfaceUrl, String name, String param){
log.info("銆�"+name+"銆�================寮�濮�===="+ JSONObject.toJSONString(param));
- String appKey = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_KEY);
+ String appKey = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_POSTCUS_API_KEY);
String url = redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL) + interfaceUrl ;
long _t = System.currentTimeMillis();
if (StringUtils.isNotBlank(appKey)||StringUtils.isNotBlank(url)) {
@@ -242,18 +244,20 @@
* @return
*/
@Override
- public String getCrmGoUrl(String userName){
- StringBuffer sb = new StringBuffer();
- String result = null;
+ public String getCrmGoUrl(String userName,Integer type){
try {
// 鍒涘缓StringBuffer瀵硅薄鐢ㄦ潵鎿嶄綔瀛楃涓�
int _t = (int)(System.currentTimeMillis());
+ String pageKey ="mp";//瀹㈡埛鍒楄〃椤甸潰鐮�
+ if(Constants.equalsInteger(type,Constants.ONE)){
+ pageKey = "mpAddIntention";//鏂板鎰忓悜椤甸潰鐮�
+ }
String appkey = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_AUTH_API_KEY);
- String url = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL)
+ String url = redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL)
+CRMConstants.IntegerUrl.GO_CRM_AUTH_URL
+ "?timestamp="+_t
+"&agent_phone_number=" + URLEncoder.encode(userName, "UTF-8")
- + "&bindKey=mp&sign="+ DigestUtils.md5Hex( _t + appkey);;
+ + "&bindKey="+pageKey+"&sign="+ DigestUtils.md5Hex( _t + appkey);;
return url;
}catch (Exception e){
e.printStackTrace();
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomIAMServiceImpl.java b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomIAMServiceImpl.java
index 5ac9ef0..b59e848 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomIAMServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomIAMServiceImpl.java
@@ -87,7 +87,7 @@
shop.setCreateDate(date);
addShops.add(initShopInfo(shop,model,date));
}else {
- segDelOrgIds.add(shop.getOrgId());
+ segDelOrgIds.add(shop.getCode());
updateShops.add(initShopInfo(shop,model,date));
}
//澶勭悊鍝佺被鏁版嵁閫昏緫
@@ -194,7 +194,7 @@
data.setCreateDate(date);
data.setEditDate(date);
data.setIsdeleted(Constants.ZERO);
- data.setOrgId(shop.getOrgId());
+ data.setOrgId(shop.getCode());
data.setSegId(model.getSegment1());
data.setSegId2(model.getSegment2());
data.setSegId3(model.getSegment3());
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomZhongTaiServiceImpl.java b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomZhongTaiServiceImpl.java
index 07eaea0..8abf61d 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomZhongTaiServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomZhongTaiServiceImpl.java
@@ -61,6 +61,25 @@
return null;
}
/**
+ * 鑾峰彇B绔敤鎴风櫥闄唗oken
+ * @param mobile
+ * @return
+ */
+ @Override
+ public ZTSysuserGetTokenResponse getSysuserToken(String mobile){
+ ZTBaseResponse<ZTSysuserGetTokenResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.USER_MOBILE_FASTLOGIN_URL+"?mobile="+mobile,
+ ZTConstants.IntegerName.USER_MOBILE_FASTLOGIN_NAME,
+ null,
+ null,
+ "",
+ new TypeReference<ZTBaseResponse<ZTSysuserGetTokenResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
* 鑾峰彇鐢ㄦ埛鐧婚檰token
* @return
*/
@@ -95,9 +114,9 @@
ZTBaseResponse<ZTUserGetTokenResponse> result = sendHttpRequest(
ZTConstants.IntegerUrl.USER_UPDATE_URL,
ZTConstants.IntegerName.USER_UPDATE_NAME,
- param.getToken(),
- param.getUserType(),
- JSONObject.toJSONString(param ),
+ null,
+ null,
+ JSONObject.toJSONString(param),
new TypeReference<ZTBaseResponse<ZTUserGetTokenResponse>>(){});
// if(result!=null){
// return result.getData();
@@ -150,7 +169,7 @@
* @return
*/
@Override
- public List<ZTTagInfoResponse> getTagList(ZTCatalogListRequest param){
+ public List<ZTTagInfoResponse> getTagList(ZTCatalogListRequest param){
ZTBaseResponse<List<ZTTagInfoResponse>> result = sendHttpRequest(
ZTConstants.IntegerUrl.TAG_LIST_URL,
ZTConstants.IntegerName.TAG_LIST_NAME,
@@ -180,8 +199,201 @@
new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTContentListResponse>>>(){});
if(result!=null){
return result.getData();
+// TypeReference<ZTBasePageResponse<ZTContentListResponse>> typeReference = new TypeReference<ZTBasePageResponse<ZTContentListResponse>>(){};
+// ZTBasePageResponse<ZTContentListResponse> ztBasePageResponse = JSONObject.parseObject(result.getData(), typeReference.getType());
+// return ztBasePageResponse;
}
return null;
+ }
+ /**
+ * 鑾峰彇瑙嗛鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTZbDecoInfoResponse> pageZbDecoList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTZbDecoInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.ZBDECO_PAGE_LIST_URL,
+ ZTConstants.IntegerName.ZBDECO_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTZbDecoInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇瑙嗛鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTVideoInfoResponse> pageVideoList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTVideoInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.VIDEO_PAGE_LIST_URL,
+ ZTConstants.IntegerName.VIDEO_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTVideoInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇浜у搧璧勮鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTProductNewsInfoResponse> pageProductNewsList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTProductNewsInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.PRODUCT_NEWS_PAGE_LIST_URL,
+ ZTConstants.IntegerName.PRODUCT_NEWS_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTProductNewsInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇浜у搧鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTProductInfoResponse> pageProductList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTProductInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.PRODUCT_PAGE_LIST_URL,
+ ZTConstants.IntegerName.PRODUCT_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTProductInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇鍏ㄥ眿妗堜緥鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTCaseInfoResponse> pageWholecaseList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTCaseInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.WHOLECASE_PAGE_LIST_URL,
+ ZTConstants.IntegerName.WHOLECASE_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTCaseInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇瀹炴櫙妗堜緥鍒楄〃鍒嗛〉
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTBasePageResponse<ZTRealcaseInfoResponse> pageRealcaseList(ZTContentListRequest param){
+ ZTBaseResponse<ZTBasePageResponse<ZTRealcaseInfoResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.REALCASE_PAGE_LIST_URL,
+ ZTConstants.IntegerName.REALCASE_PAGE_LIST_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTBasePageResponse<ZTRealcaseInfoResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇浜у搧璇︽儏
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTProductInfoResponse getProductInfo(ZTContentInfoRequest param){
+ ZTBaseResponse<ZTProductInfoResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.PRODUCT_INFO_URL,
+ ZTConstants.IntegerName.PRODUCT_INFO_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTProductInfoResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇浜у搧璧勮璇︽儏
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTProductNewsInfoResponse getProductNewsInfo(ZTContentInfoRequest param){
+ ZTBaseResponse<ZTProductNewsInfoResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.PRODUCT_NEWS_INFO_URL,
+ ZTConstants.IntegerName.PRODUCT_NEWS_INFO_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTProductNewsInfoResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇瀹炴櫙璧勮璇︽儏
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTRealcaseInfoResponse getRealcaseInfo(ZTContentInfoRequest param){
+ ZTBaseResponse<ZTRealcaseInfoResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.REALCASE_INFO_URL,
+ ZTConstants.IntegerName.REALCASE_INFO_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTRealcaseInfoResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇鍏ㄥ眿璧勮璇︽儏
+ * @param param
+ * @return
+ */
+ @Override
+ public ZTCaseInfoResponse getWholecaseInfo(ZTContentInfoRequest param){
+ ZTBaseResponse<ZTCaseInfoResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.WHOLECASE_INFO_URL,
+ ZTConstants.IntegerName.WHOLECASE_INFO_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTCaseInfoResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
}
/**
* 鑾峰彇鍐呭璇︽儏
@@ -365,6 +577,45 @@
return null;
}
+
+
+ /**
+ * 杞挱鍥惧垪琛�
+ * @param param
+ * @return
+ */
+ @Override
+ public List<ZTCusCarouselImageResponse> carouselImageList(ZTContentListRequest param){
+ ZTBaseResponse<List<ZTCusCarouselImageResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.CUSTOMER_CAROUSEL_IMAGE_URL,
+ ZTConstants.IntegerName.CUSTOMER_CAROUSEL_IMAGE_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<List<ZTCusCarouselImageResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+
+
+ @Override
+ public ZTCusCarouselImageResponse carouselImageDetail(ZTDataDetailRequest param){
+ ZTBaseResponse<ZTCusCarouselImageResponse> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.CUSTOMER_CAROUSEL_IMAGE_DETAIL_URL,
+ ZTConstants.IntegerName.CUSTOMER_CAROUSEL_IMAGE_DETAIL_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<ZTCusCarouselImageResponse>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
+
+
/**
* 鑾峰彇鑾峰彇鐪佸競鍖洪泦鍚�
* @param param
@@ -387,7 +638,28 @@
}
return null;
}
-
+ /**
+ * 鑾峰彇鑾峰彇鐪佸競鍖洪泦鍚�
+ * @param param
+ * @return
+ */
+ @Override
+ public List<ZTAreaTreeResponse> getAreaTreeList(ZTAreaListRequest param){
+ if(StringUtils.isBlank(param.getPid())){
+ param.setPid(ZTConstants.DEFAULT_PID);//榛樿鍙栧叏閮ㄧ渷浠�
+ }
+ ZTBaseResponse<List<ZTAreaTreeResponse>> result = sendHttpRequest(
+ ZTConstants.IntegerUrl.AREA_TREE_URL,
+ ZTConstants.IntegerName.AREA_TREE_NAME,
+ param.getToken(),
+ param.getUserType(),
+ JSONObject.toJSONString(param ),
+ new TypeReference<ZTBaseResponse<List<ZTAreaTreeResponse>>>(){});
+ if(result!=null){
+ return result.getData();
+ }
+ return null;
+ }
public <T> ZTBaseResponse<T> sendHttpRequest(String url,String name,String token,String userType,String param,TypeReference<ZTBaseResponse<T>> typeReference){
log.info("銆�"+name+"銆�================寮�濮�===="+ JSONObject.toJSONString(param));
@@ -395,7 +667,13 @@
int success = 0;
try {
Map<String,String> headers = new HashMap<>();
- headers.put(ZTConstants.HEADER_TOKEN,token);
+ if(StringUtils.equals(userType,ZTConstants.CUSTOMER)){
+ //濡傛灉鏄疌绔鎴�
+ headers.put(ZTConstants.HEADER_TOKEN,token);
+ }else{
+ //濡傛灉鏄疊绔敤鎴�
+ headers.put(ZTConstants.HEADER_SYSUSER_TOKEN,token);
+ }
headers.put(ZTConstants.HEADER_USERTYPE,userType);
String index = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_ZHONGTAI_API_URL);
res = HttpsUtil.postJsonWithHeaders(index+url,param,headers);
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamCategoryModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamCategoryModel.java
index 3683a6f..1ae89d7 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamCategoryModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamCategoryModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -10,82 +11,102 @@
@ApiModel("蹇楅偊IAM缁勭粐鏇存柊鎺ㄩ�丼code鍙傛暟")
public class IamCategoryModel {
@JsonProperty("relevanceCode")
+ @JSONField(name="relevanceCode")
@SerializedName("relevanceCode")
@ApiModelProperty(value = "涓�浣撳晢鐮侊紙s鐮�)")
private String relevanceCode;
@JsonProperty("customerNumber")
+ @JSONField(name="customerNumber")
@ApiModelProperty(value = "鍔犵洘鍟嗙紪鐮�")
@SerializedName("customerNumber")
private String customerNumber;
@JsonProperty("accountSiteId")
+ @JSONField(name="accountSiteId")
@ApiModelProperty(value = "鍝佺墝id")
@SerializedName("accountSiteId")
private String accountSiteId;
@JsonProperty("siteCode")
+ @JSONField(name="siteCode")
@ApiModelProperty(value = "瀹㈡埛绫诲瀷")
@SerializedName("siteCode")
private String siteCode;
@JsonProperty("cityAddress")
+ @JSONField(name="cityAddress")
@ApiModelProperty(value = "钀ラ攢鍩庡競")
@SerializedName("cityAddress")
private String cityAddress;
@JsonProperty("unitCode")
+ @JSONField(name="unitCode")
@ApiModelProperty(value = "鍝佺墝Code")
@SerializedName("unitCode")
private String unitCode;
@JsonProperty("territoryId")
+ @JSONField(name="territoryId")
@ApiModelProperty(value = "钀ラ攢鍖哄煙id路")
@SerializedName("territoryId")
private String territoryId;
@JsonProperty("segment1")
+ @JSONField(name="segment1")
@ApiModelProperty(value = "钀ラ攢鍖哄煙-涓績缂栫爜")
@SerializedName("segment1")
private String segment1;
@JsonProperty("segment2")
+ @JSONField(name="segment2")
@ApiModelProperty(value = "钀ラ攢鍖哄煙-鐪佸尯缂栫爜")
@SerializedName("segment2")
private String segment2;
@JsonProperty("segment3")
+ @JSONField(name="segment3")
@ApiModelProperty(value = "钀ラ攢鍖哄煙-鐗囧尯缂栫爜")
@SerializedName("segment3")
private String segment3;
@JsonProperty("meaning1")
+ @JSONField(name="meaning1")
@ApiModelProperty(value = "钀ラ攢鍖哄煙-涓績")
@SerializedName("meaning1")
private String meaning1;
@JsonProperty("meaning2")
+ @JSONField(name="meaning2")
@ApiModelProperty(value = "钀ラ攢鍖哄煙-鐪佸尯")
@SerializedName("meaning2")
private String meaning2;
@JsonProperty("meaning3")
+ @JSONField(name="meaning3")
@ApiModelProperty(value = "閿�鍖哄煙-鐗囧尯")
@SerializedName("meaning3")
private String meaning3;
@JsonProperty("shipToPerson")
+ @JSONField(name="shipToPerson")
@ApiModelProperty(value = "鏀惰揣浜�")
@SerializedName("shipToPerson")
private String shipToPerson;
@JsonProperty("shipToAddress")
+ @JSONField(name="shipToAddress")
@ApiModelProperty(value = "鏀惰揣鍦板潃")
@SerializedName("shipToAddress")
private String shipToAddress;
@JsonProperty("shipToPhone")
+ @JSONField(name="shipToPhone")
@ApiModelProperty(value = "鏀惰揣浜哄彿鐮�")
@SerializedName("shipToPhone")
private String shipToPhone;
@JsonProperty("operationStatus")
+ @JSONField(name="operationStatus")
@ApiModelProperty(value = "鍝佺墝鐘舵��:NORMAL 姝e父锛孨O-ORDER 涓涓嬪崟锛孨O-SHIPMENT 涓鍙戣揣锛孴ERMINATED 缁堟")
@SerializedName("operationStatus")
private String operationStatus;
@JsonProperty("oldAccountNumber")
+ @JSONField(name="oldAccountNumber")
@ApiModelProperty(value = "瀵瑰簲鍔犵洘鍟�")
@SerializedName("oldAccountNumber")
private String oldAccountNumber;
@JsonProperty("relation")
+ @JSONField(name="relation")
@ApiModelProperty(value = "涓�浣撳晢鎿嶄綔锛�1 鏂板銆�2 鍚堝苟銆�3 鍙樻洿銆�4 浼樺寲")
@SerializedName("relation")
private String relation;
@JsonProperty("solutionId")
+ @JSONField(name="solutionId")
@ApiModelProperty(value = "solutionId")
@SerializedName("solutionId")
private String solutionId;
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamFcodeModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamFcodeModel.java
index 084ba42..7fba50c 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamFcodeModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamFcodeModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -10,86 +11,107 @@
@ApiModel("蹇楅偊IAM缁勭粐鏇存柊鎺ㄩ�丼code鍙傛暟")
public class IamFcodeModel {
@JsonProperty("relevanceCode")
+ @JSONField(name="relevanceCode")
@SerializedName("relevanceCode")
@ApiModelProperty(value = "涓�浣撳晢鐮侊紙s鐮�)")
private String relevanceCode;
@JsonProperty("custAccountId")
+ @JSONField(name="custAccountId")
@SerializedName("custAccountId")
@ApiModelProperty(value = "鍔犵洘鍟唅d")
private String custAccountId;
@JsonProperty("customerNumber")
+ @JSONField(name="customerNumber")
@ApiModelProperty(value = "鍔犵洘鍟嗙紪鐮�")
@SerializedName("customerNumber")
private String customerNumber;
@JsonProperty("customerName")
+ @JSONField(name="customerName")
@ApiModelProperty(value = "鍔犵洘鍟嗗悕绉�")
@SerializedName("customerName")
private String customerName;
@JsonProperty("customerShortName")
+ @JSONField(name="customerShortName")
@ApiModelProperty(value = "鍔犵洘鍟嗙畝绉�")
@SerializedName("customerShortName")
private String customerShortName;
@JsonProperty("registrationAddress")
+ @JSONField(name="registrationAddress")
@ApiModelProperty(value = "娉ㄥ唽鍦板潃")
@SerializedName("registrationAddress")
private String registrationAddress;
@JsonProperty("country")
+ @JSONField(name="country")
@ApiModelProperty(value = "鍥藉")
@SerializedName("country")
private String country;
@JsonProperty("provinceNum")
+ @JSONField(name="provinceNum")
@ApiModelProperty(value = "鐪佸尯缂栫爜路")
@SerializedName("provinceNum")
private String provinceNum;
+ @JSONField(name="provinceName")
@JsonProperty("provinceName")
@ApiModelProperty(value = "鐪佸尯鍚嶇О")
@SerializedName("provinceName")
private String provinceName;
+ @JSONField(name="cityNum")
@JsonProperty("cityNum")
@ApiModelProperty(value = "甯傜紪鐮�")
@SerializedName("cityNum")
private String cityNum;
@JsonProperty("cityName")
+ @JSONField(name="cityName")
@ApiModelProperty(value = "甯傚悕绉�")
@SerializedName("cityName")
private String cityName;
@JsonProperty("countyNum")
+ @JSONField(name="countyNum")
@ApiModelProperty(value = "鍖哄幙缂栫爜")
@SerializedName("countyNum")
private String countyNum;
@JsonProperty("countyName")
+ @JSONField(name="countyName")
@ApiModelProperty(value = "鍖哄幙鍚嶇О")
@SerializedName("countyName")
private String countyName;
@JsonProperty("town")
+ @JSONField(name="town")
@ApiModelProperty(value = "涔¢晣")
@SerializedName("town")
private String town;
@JsonProperty("status")
+ @JSONField(name="status")
@ApiModelProperty(value = "鐘舵�� 涓彴鍙戝竷鐨勭姸鎬侊紝瀵逛笅娓哥郴缁熸棤鎰忎箟锛屼笅娓哥郴缁熷彲涓嶆帴")
@SerializedName("status")
private String status;
@JsonProperty("contactPhone")
+ @JSONField(name="contactPhone")
@ApiModelProperty(value = "娉曚汉鎵嬫満鍙风爜")
@SerializedName("contactPhone")
private String contactPhone;
@JsonProperty("legalPerson")
+ @JSONField(name="legalPerson")
@ApiModelProperty(value = "娉曚汉")
@SerializedName("legalPerson")
private String legalPerson;
@JsonProperty("legalIdentification")
+ @JSONField(name="legalIdentification")
@ApiModelProperty(value = "娉曚汉韬唤璇佸彿鐮�")
@SerializedName("legalIdentification")
private String legalIdentification;
@JsonProperty("accountOwner")
+ @JSONField(name="accountOwner")
@ApiModelProperty(value = "瀹炴帶浜�")
@SerializedName("accountOwner")
private String accountOwner;
@JsonProperty("accountIdentification")
+ @JSONField(name="accountIdentification")
@ApiModelProperty(value = "瀹炴帶浜鸿韩浠借瘉")
@SerializedName("accountIdentification")
private String accountIdentification;
@JsonProperty("taxRegistrationNum")
+ @JSONField(name="taxRegistrationNum")
@ApiModelProperty(value = "绾崇◣鐧昏璇佸彿鐮�")
@SerializedName("taxRegistrationNum")
private String taxRegistrationNum;
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateShopModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateShopModel.java
index f0b3c0b..ea2728e 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateShopModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateShopModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -12,95 +13,118 @@
@Data
@ApiModel("蹇楅偊IAM缁勭粐鏇存柊鎺ㄩ�佸弬鏁�")
public class IamUpateShopModel implements Serializable {
+ @JSONField(name="idt_org__id")
@JsonProperty("idt_org__id")
@SerializedName("idt_org__id")
@ApiModelProperty(value = "閮ㄩ棬ID")
private String idtOrgId;
+ @JSONField(name="idt_org__old_id")
@JsonProperty("idt_org__old_id")
@SerializedName("idt_org__old_id")
@ApiModelProperty(value = "U瀹㈢粍缁嘔D锛屽瓨鏀綰瀹㈣�佺殑缁勭粐id锛屽鏋滄槸IAM鏂板鐨勭粍缁囷紝璇ュ瓧娈靛�间负绌恒��")
private String idtOrgOldId;
+ @JSONField(name="idt_org__name")
@JsonProperty("idt_org__name")
@ApiModelProperty(value = "閮ㄩ棬鍚嶇О")
@SerializedName("idt_org__name")
private String idtOrgName;
+ @JSONField(name="idt_org__parent_id")
@JsonProperty("idt_org__parent_id")
@ApiModelProperty(value = "涓婄骇缁勭粐ID")
@SerializedName("idt_org__parent_id")
private String idtOrgParentId;
+ @JSONField(name="idt_org__remark")
@JsonProperty("idt_org__remark")
@ApiModelProperty(value = "澶囨敞")
@SerializedName("idt_org__remark")
private String idtOrgRemark;
@JsonProperty("idt_org__status")
+ @JSONField(name="idt_org__status")
@ApiModelProperty(value = "鐘舵�� 0鍋滅敤锛�1姝e父锛�-1鍒犻櫎")
@SerializedName("idt_org__status")
private String idtOrgStatus;
@JsonProperty("idt_org__order_num")
+ @JSONField(name="idt_org__order_num")
@ApiModelProperty(value = "鏄剧ず鎺掑簭")
@SerializedName("idt_org__order_num")
private String idtOrgOrderNum;
+ @JSONField(name="idt_org__org_code")
@JsonProperty("idt_org__org_code")
@ApiModelProperty(value = "缁勭粐缂栫爜路")
@SerializedName("idt_org__org_code")
private String idtOrgCode;
+ @JSONField(name="idt_org__sup_org_code")
@JsonProperty("idt_org__sup_org_code")
@ApiModelProperty(value = "涓婄骇缁勭粐缂栫爜")
@SerializedName("idt_org__sup_org_code")
private String idtOrgSupOrgCode;
@JsonProperty("idt_org__source_code")
+ @JSONField(name="idt_org__source_code")
@ApiModelProperty(value = "瀛樻斁S,F锛屽簵闈㈠疄浣撶紪鐮佺瓑")
@SerializedName("idt_org__source_code")
private String idtOrgSourceCode;
+ @JSONField(name="idt_org__first_level_type")
@JsonProperty("idt_org__first_level_type")
@ApiModelProperty(value = "銆愪竴绾х粍缁囩被鍨嬨�戯紙1:HR銆�2:鍔犵洘鍟嗐��3:铏氭嫙缁勭粐锛�")
@SerializedName("idt_org__first_level_type")
private Integer idtOrgFirstLevelType;
@JsonProperty("idt_org__second_level_type")
+ @JSONField(name="idt_org__second_level_type")
@ApiModelProperty(value = "浜岀骇缁勭粐绫诲瀷銆�(1:S(鍔�) , 2:F(鍔�) ,3:搴楅潰(鍔�)锛�4:閮ㄩ棬(HR/鍔�)锛�5:铏氭嫙搴楅潰(鍔�/铏�) ")
@SerializedName("idt_org__second_level_type")
private Integer idtOrgSecondLevelType;
@JsonProperty("idt_org__org_attribute")
+ @JSONField(name="idt_org__org_attribute")
@ApiModelProperty(value = "銆愰儴闂ㄥ睘鎬с�戯紙1:瀹炰綋搴楅潰銆�2:铏氭嫙搴楅潰銆�3:鐢靛晢閮ㄣ��4:娓犻亾閮ㄣ��5:璐㈠姟閮級")
@SerializedName("idt_org__org_attribute")
private Integer idtOrgAttribute;
@JsonProperty("idt_org__work_weixin_id")
+ @JSONField(name="idt_org__work_weixin_id")
@ApiModelProperty(value = "浼佷笟寰俊缁勭粐ID")
@SerializedName("idt_org__work_weixin_id")
private String idtOrgWorkWeixinId;
@JsonProperty("idt_org__dingding_department_id")
+ @JSONField(name="idt_org__dingding_department_id")
@ApiModelProperty(value = "閽夐拤閮ㄩ棬ID")
@SerializedName("idt_org__dingding_department_id")
private String idtOrgDingdingDepartId;
+ @JSONField(name="idt_org__create_time")
@JsonProperty("idt_org__create_time")
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@SerializedName("idt_org__create_time")
private String idtOrgCreateTime;
@JsonProperty("idt_org__creator")
+ @JSONField(name="idt_org__creator")
@ApiModelProperty(value = "鍒涘缓浜�")
@SerializedName("idt_org__creator")
private String idtOrgCreator;
+ @JSONField(name="idt_org__updater")
@JsonProperty("idt_org__updater")
@ApiModelProperty(value = "淇敼浜�")
@SerializedName("idt_org__updater")
private String idtOrgUpdater;
+ @JSONField(name="idt_org__update_time")
@JsonProperty("idt_org__update_time")
@ApiModelProperty(value = "淇敼鏃堕棿")
@SerializedName("idt_org__update_time")
private String idtOrgUpdateTime;
+ @JSONField(name="scode")
@JsonProperty("scode")
@ApiModelProperty(value = "S鐮佷俊鎭� 褰搃dt_org__second_level_type 涓篠鏃讹紝scode鏈夊�硷紝鍚﹀垯鏄痭ull")
@SerializedName("scode")
private IamScodeModel scode;
+ @JSONField(name="fcode")
@JsonProperty("fcode")
@ApiModelProperty(value = "F鐮佷俊鎭� 褰搃dt_org__second_level_type 涓篎鏃讹紝fcode鏈夊�硷紝鍚﹀垯鏄痭ull")
@SerializedName("fcode")
private IamFcodeModel fcode;
+ @JSONField(name="shop")
@JsonProperty("shop")
@ApiModelProperty(value = "搴楅潰淇℃伅 褰搃dt_org__second_level_type 涓哄簵闈㈡椂锛宑ode鏈夊�硷紝鍚﹀垯鏄痭ull")
@SerializedName("shop")
private IamShopModel shop;
@JsonProperty("category")
+ @JSONField(name="category")
@ApiModelProperty(value = "鍝佺被淇℃伅 褰搃dt_org__second_level_type 涓篎鏃讹紝ccategory鏈夊�硷紝鍚﹀垯鏄痆]")
@SerializedName("category")
private List<IamCategoryModel> category;
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateUserModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateUserModel.java
index e3964f8..db0560b 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateUserModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUpateUserModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -17,102 +18,127 @@
* 瀛樺湪锛屽垯闇�瑕佸啀鏍规嵁鎺ㄩ�佺殑鐧诲綍璐﹀彿(app_account__account_no)鍘绘暟鎹簱鏌ヨ鐧诲綍璐﹀彿锛屽鏋滄煡璇㈢殑缁撴灉鏄� 1鏉℃暟鎹苟涓� id 璺熷綋鍓嶆帹閫佺敤鎴� id 鐩稿悓锛屽垯鏇存柊褰撳墠鏁版嵁锛屽惁鍒欐彁绀衡�滆鐢ㄦ埛绯荤粺宸茬粡瀛樺湪锛屾洿鏂板け璐モ��;
* 涓嶅瓨鍦紝涔熼渶瑕佹瘮瀵圭櫥褰曡处鍙�(app_account__account_no)鏄惁璺熷叾瀹冭处鍙风殑鐧诲綍璐﹀彿鐩稿悓,濡傛灉鐩稿悓锛屾彁绀衡�滆鐢ㄦ埛绯荤粺宸茬粡瀛樺湪锛屾柊澧炲け璐モ��:濡傛灉涓嶅瓨鍦紝鍒欐柊澧炴暟鎹��
*/
+ @JSONField(name="idt_user__id")
@JsonProperty("idt_user__id")
@SerializedName("idt_user__id")
@ApiModelProperty(value = "IAM鐢ㄦ埛涓婚敭")
private String idtUserId;
@JsonProperty("idt_user__old_id")
+ @JSONField(name="idt_user__old_id")
@SerializedName("idt_user__old_id")
@ApiModelProperty(value = "鐢ㄦ埛鑰佺殑涓婚敭id锛屽瓨鏀綰瀹㈣�佺敤鎴穒d锛屽鏋滄槸IAM鏂板鐨勭敤鎴凤紝璇ュ瓧娈靛�间负绌猴紝涓嬫父绯荤粺濡傛灉浣跨敤U瀹㈢殑鐢ㄦ埛id浣滀负涓氬姟澶勭悊閫昏緫鐨勪緷鎹紝闇�瑕佸悓姝ヨ瀛楁")
private String idtUserOldId;
+ @JSONField(name="app_account__app_id")
@JsonProperty("app_account__app_id")
@ApiModelProperty(value = "搴旂敤id锛屼笅娓哥郴缁熷彲涓嶅叧蹇�")
@SerializedName("app_account__app_id")
private String appAccountAppId;
+ @JSONField(name="idt_org__parent_id")
@JsonProperty("idt_org__parent_id")
@ApiModelProperty(value = "涓婄骇缁勭粐ID")
@SerializedName("idt_org__parent_id")
private String idtOrgParentId;
+ @JSONField(name="app_account__account_no")
@JsonProperty("app_account__account_no")
@ApiModelProperty(value = "鐢ㄦ埛璐﹀彿锛岃鐪嬬壒鍒鏄�")
@SerializedName("app_account__account_no")
private String appAccountNo;
+ @JSONField(name="app_account__account_pwd")
@JsonProperty("app_account__account_pwd")
@ApiModelProperty(value = "瀵嗙爜")
@SerializedName("app_account__account_pwd")
private String appAccountPwd;
+ @JSONField(name="idt_user__user_name")
@JsonProperty("idt_user__user_name")
@ApiModelProperty(value = "濮撳悕")
@SerializedName("idt_user__user_name")
private String idtUserName;
+ @JSONField(name="idt_user__gender")
@JsonProperty("idt_user__gender")
@ApiModelProperty(value = "鎬у埆 0鐢� 1濂陈�")
@SerializedName("idt_user__gender")
private String idtUserGender;
+ @JSONField(name="idt_user__email")
@JsonProperty("idt_user__email")
@ApiModelProperty(value = "浼佷笟閭")
@SerializedName("idt_user__email")
private String idtUserEmail;
@JsonProperty("idt_user__mobile")
+ @JSONField(name="idt_user__mobile")
@ApiModelProperty(value = "鎵嬫満鍙风爜锛岃鐪嬬壒鍒鏄�")
@SerializedName("idt_user__mobile")
private String idtUserMobile;
+ @JSONField(name="idt_user__uc_job_id")
@JsonProperty("idt_user__uc_job_id")
@ApiModelProperty(value = "U瀹㈠矖浣峣d")
@SerializedName("idt_user__uc_job_id")
private String idtUserUcJobId;
+ @JSONField(name="idt_org__second_level_type")
@JsonProperty("idt_org__second_level_type")
@ApiModelProperty(value = "浜岀骇缁勭粐绫诲瀷銆�(1:S(鍔�) , 2:F(鍔�) ,3:搴楅潰(鍔�)锛�4:閮ㄩ棬(HR/鍔�)锛�5:铏氭嫙搴楅潰(鍔�/铏�) ")
@SerializedName("idt_org__second_level_type")
private String idtOrgSecondLevelType;
+ @JSONField(name="app_account__status")
@JsonProperty("app_account__status")
@ApiModelProperty(value = "璐︽埛鐘舵�� 0鍋滅敤锛�1鍚敤")
@SerializedName("app_account__status")
private String appAccountStatus;
+ @JSONField(name="app_account__creator")
@JsonProperty("app_account__creator")
@ApiModelProperty(value = "鍒涘缓鑰�")
@SerializedName("app_account__creator")
private String appAccountCreator;
+ @JSONField(name="app_account__create_time")
@JsonProperty("app_account__create_time")
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@SerializedName("app_account__create_time")
private String appAccountCreateTime;
+ @JSONField(name="app_account__updater")
@JsonProperty("app_account__updater")
@ApiModelProperty(value = "鏇存柊鑰�")
@SerializedName("app_account__updater")
private String appAccountUpdater;
+ @JSONField(name="app_account__update_time")
@JsonProperty("app_account__update_time")
@ApiModelProperty(value = "鏇存柊鏃堕棿")
@SerializedName("app_account__update_time")
private String appAccountUpdateTime;
+ @JSONField(name="idt_user__work_no")
@JsonProperty("idt_user__work_no")
@ApiModelProperty(value = "宸ュ彿锛岃鐪嬬壒鍒鏄�")
@SerializedName("idt_user__work_no")
private String idtUserWorkNo;
+ @JSONField(name="idt_user__ding_id")
@JsonProperty("idt_user__ding_id")
@ApiModelProperty(value = "閽夐拤鐢ㄦ埛ID")
@SerializedName("idt_user__ding_id")
private String idtUserDingdingId;
+ @JSONField(name="userTypes")
@JsonProperty("userTypes")
@ApiModelProperty(value = "鐢ㄦ埛绫诲瀷锛屼骇鍝佹敮鎸佷竴浜哄涓敤鎴风被鍨�")
@SerializedName("userTypes")
private List<IamUserTypeModel> userTypes;
+ @JSONField(name="idt_org__updater")
@JsonProperty("idt_org__updater")
@ApiModelProperty(value = "鐢ㄦ埛绫诲瀷锛屼骇鍝佹敮鎸佷竴浜哄涓敤鎴风被鍨�")
@SerializedName("idt_org__updater")
private String idtOrgUpdater;
+ @JSONField(name="work_weixin_id")
@JsonProperty("work_weixin_id")
@ApiModelProperty(value = "浼佷笟寰俊鐢ㄦ埛openId")
@SerializedName("work_weixin_id")
private String workWeixinId;
+ @JSONField(name="roles")
@JsonProperty("roles")
@ApiModelProperty(value = "璐﹀彿鍖呭惈鐨勮鑹蹭俊鎭紝鏀寔澶氫釜")
@SerializedName("roles")
private List<IamUserRoleModel> roles;
+ @JSONField(name="orgs")
@JsonProperty("orgs")
@ApiModelProperty(value = "缁勭粐淇℃伅 涓嬫父绯荤粺鍙笉鍏冲績锛岄�氳繃jobs灞炴�у彲浠ュ彇鍒扮粍缁囦俊鎭�")
@SerializedName("orgs")
private List<IamUserOrgModel> orgs;
+ @JSONField(name="jobs")
@JsonProperty("jobs")
@ApiModelProperty(value = "澶氱粍缁囧矖浣嶄俊鎭�")
@SerializedName("jobs")
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserJobModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserJobModel.java
index b58e30f..29132a9 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserJobModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserJobModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -11,14 +12,17 @@
@Data
@ApiModel("蹇楅偊IAM浜哄憳璐﹀彿宀椾綅鍙傛暟")
public class IamUserJobModel implements Serializable {
+ @JSONField(name="idt_user_job_link__org_id")
@JsonProperty("idt_user_job_link__org_id")
@SerializedName("idt_user_job_link__org_id")
@ApiModelProperty(value = "缁勭粐id")
private String orgId;
+ @JSONField(name="idt_org__first_level_type")
@JsonProperty("idt_org__first_level_type")
@SerializedName("idt_org__first_level_type")
@ApiModelProperty(value = "銆愪竴绾х粍缁囩被鍨嬨�戯紙1:HR銆�2:鍔犵洘鍟嗐��3:铏氭嫙缁勭粐锛�")
private String firstLevelType;
+ @JSONField(name="idt_user_job_link__job_id")
@JsonProperty("idt_user_job_link__job_id")
@SerializedName("idt_user_job_link__job_id")
@ApiModelProperty(value = "宀椾綅Id")
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserOrgModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserOrgModel.java
index ecb83bf..a3c2981 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserOrgModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserOrgModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -12,31 +13,38 @@
@ApiModel("蹇楅偊IAM浜哄憳璐﹀彿鎵�灞炵粍缁囧弬鏁�")
public class IamUserOrgModel implements Serializable {
@JsonProperty("idt_org__id")
+ @JSONField(name="idt_org__id")
@SerializedName("idt_org__id")
@ApiModelProperty(value = "缁勭粐id")
private String orgId;
+ @JSONField(name="idt_org__first_level_type")
@JsonProperty("idt_org__first_level_type")
@SerializedName("idt_org__first_level_type")
@ApiModelProperty(value = "銆愪竴绾х粍缁囩被鍨嬨�戯紙1:HR銆�2:鍔犵洘鍟嗐��3:铏氭嫙缁勭粐锛�")
private String firstLevelType;
+ @JSONField(name="idt_org__second_level_type")
@JsonProperty("idt_org__second_level_type")
@SerializedName("idt_org__second_level_type")
@ApiModelProperty(value = "銆愪簩绾х粍缁囩被鍨嬨��")
private String secondLevelType;
- @JsonProperty(" idt_org__old_id")
- @SerializedName(" idt_org__old_id")
+ @JSONField(name="idt_org__old_id")
+ @JsonProperty("idt_org__old_id")
+ @SerializedName("idt_org__old_id")
@ApiModelProperty(value = "鑰両d")
private String orgOldId;
- @JsonProperty(" idt_org__name")
- @SerializedName(" idt_org__name")
+ @JsonProperty("idt_org__name")
+ @JSONField(name="idt_org__name")
+ @SerializedName("idt_org__name")
@ApiModelProperty(value = "缁勭粐鍚嶇О")
private String orgName;
+ @JSONField(name="idt_org__org_code")
@JsonProperty("idt_org__org_code")
@SerializedName("idt_org__org_code")
@ApiModelProperty(value = "缁勭粐缂栫爜")
private String orgCode;
- @JsonProperty(" idt_org__parent_id")
- @SerializedName(" idt_org__parent_id")
+ @JsonProperty("idt_org__parent_id")
+ @JSONField(name="idt_org__parent_id")
+ @SerializedName("idt_org__parent_id")
@ApiModelProperty(value = "涓婄骇id")
private String orgParentId;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserTypeModel.java b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserTypeModel.java
index b684ac8..a19cf3f 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserTypeModel.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/IamUserTypeModel.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
@@ -12,6 +13,7 @@
@Data
@ApiModel("蹇楅偊IAM浜哄憳璐﹀彿绫诲瀷鍙傛暟")
public class IamUserTypeModel implements Serializable {
+ @JSONField(name="idt_user_type__code")
@JsonProperty("idt_user_type__code")
@SerializedName("idt_user_type__code")
@ApiModelProperty(value = "鐢ㄦ埛鏍囪锛堢敤鎴风被鍨嬶紝鍖哄垎HR鍐呴儴鍛樺伐鍜屽姞鐩熷晢鍛樺伐锛�10001鍔犵洘鍟嗭紝10002HR鍐呴儴鍛樺伐")
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java
index c97f9d5..21710ea 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java
@@ -14,9 +14,9 @@
public static final CharSequence CODE_SUCCESS = "1";
public interface IntegerUrl{
String POST_CUS_DATA_URL ="/api/public/zbom/postCusData";
- String CUS_BEFORE_PAGE_LIST_URL ="api/public/mini/program/cusOrBeforeList";
- String DAOGOU_BIND_LIST_URL ="api/public/mini/program/list";
- String GO_CRM_AUTH_URL ="oauth/authorize/jump";
+ String CUS_BEFORE_PAGE_LIST_URL ="/api/public/mini/program/cusOrBeforeList";
+ String DAOGOU_BIND_LIST_URL ="/api/public/mini/program/list";
+ String GO_CRM_AUTH_URL ="/oauth/authorize/jump";
}
public interface IntegerName{
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerListRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerListRequest.java
index 0e76ad3..e7787bd 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerListRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerListRequest.java
@@ -19,4 +19,6 @@
private int page;
@ApiModelProperty(value = "瀹㈡埛鍚嶇О,瀹㈡埛鎵嬫満鍙风爜 ,鍦板潃")
private String keyWords;
+ @ApiModelProperty(value = "瀵艰喘涓婚敭",hidden = true)
+ private Long userId;
}
\ No newline at end of file
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerPostRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerPostRequest.java
index 8088b51..9dcab74 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerPostRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/CrmCustomerPostRequest.java
@@ -1,6 +1,8 @@
package com.doumee.biz.zbom.model.crm;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -10,9 +12,11 @@
import java.util.List;
@Data
+@JsonSerialize
@ApiModel("蹇楅偊CRM瀹㈡埛鐣欒祫鎻愪氦澶栧眰鍙傛暟")
public class CrmCustomerPostRequest extends CRMBaseRequst implements Serializable {
@JsonProperty("cus_info")
@SerializedName("cus_info")
+ @JSONField(name = "cus_info")
private List< CrmCustomerInfoRequest > cusInfo;
}
\ No newline at end of file
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMBaseResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMBaseResponse.java
index 5d93183..45787d8 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMBaseResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMBaseResponse.java
@@ -16,6 +16,7 @@
*/
private String msg;
private int total;
+ private Boolean hasMore;
/**
* 鏁版嵁
*/
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMCustomerListResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMCustomerListResponse.java
index dd1c850..9214dc7 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMCustomerListResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/crm/response/CRMCustomerListResponse.java
@@ -16,6 +16,7 @@
private String userName;// 鐢ㄦ埛鐧诲綍璐﹀彿
private String userId ;//鐢ㄦ埛id涓婚敭
private String productCodeName;// 浜у搧鍚嶇О
+ private String channel;// 娓犻亾淇℃伅
private String customerPhone;// 瀹㈡埛濮撳悕
private String customerName;// 瀹㈡埛鎵嬫満鍙�
private String address ;//鍦板潃璇︽儏
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTActionDoRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTActionDoRequest.java
index 3f5cf00..03a845a 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTActionDoRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTActionDoRequest.java
@@ -16,6 +16,16 @@
* OpenID
*/
private String openId;
+ /**
+ * collect
+ * collect_cancel
+ * like
+ * like_cancel
+ * view
+ * share
+ * download
+ */
+ private String actionType;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTAreaListRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTAreaListRequest.java
index ccc0eb5..d027329 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTAreaListRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTAreaListRequest.java
@@ -13,4 +13,6 @@
*/
private String pid;
+ private String level;
+
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTBaseRequst.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTBaseRequst.java
index d0bb084..ec88038 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTBaseRequst.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTBaseRequst.java
@@ -9,14 +9,11 @@
*/
@Data
public class ZTBaseRequst {
- /**
- * 鐖剁骇缂栫爜
- */
-
- @ApiModelProperty(value = "C绔紶鈥淐USTOMER鈥�, B绔紶'BUSINESS")
+ @ApiModelProperty(value = "C绔紶鈥淐USTOMER鈥�, B绔紶'BUSINESS",hidden = true)
private String userType;
@ApiModelProperty(value = "token" , hidden = true)
private String token;
+ @ApiModelProperty(value = "token" , hidden = true)
private String openId;
@ApiModelProperty(value = "鐢ㄦ埛涓婚敭" , hidden = true)
private String userId;
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTCatalogListRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTCatalogListRequest.java
index 635baa1..01d7587 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTCatalogListRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTCatalogListRequest.java
@@ -13,7 +13,8 @@
* 鐩綍鍞竴缂栫爜,缂栫爜涓虹┖锛屽垯杩斿洖鍏ㄩ儴涓�绾х洰褰�
*
*/
- @ApiModelProperty(value = "蹇楄瑁呬慨 zb_deco 浜у搧 product_intro 璧勮product_info 鍏ㄥ眿妗堜緥 whole_case",notes = "http://api.dev.zbom.7zcloud.com/content/api/catalog")
+ @ApiModelProperty(value = "浜у搧 product_intro銆� 璧勮product_info銆�" +
+ "鍏ㄥ眿妗堜緥 whole_case銆佽疆鎾璫arousel_ad銆佽棰戞帹鑽恦ideo_rec銆佸疄鏅渚媟eal_case",notes = "http://api.dev.zbom.7zcloud.com/content/api/catalog")
private String catalogCode;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTConstants.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTConstants.java
index abedc76..20f32c2 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTConstants.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTConstants.java
@@ -7,7 +7,12 @@
public static Integer CODE_SUCCESS = 200;//鎺ュ彛鎴愬姛杩斿洖鐮�
public static String HEADER_USERTYPE = "userType";//userType鍦℉EADER涓殑鍚嶅瓧
public static String HEADER_TOKEN = "token";//token
+ public static String HEADER_SYSUSER_TOKEN = "z-access-token";//token
public static String DEFAULT_PID = "1";//榛樿鐪佸競鍖簆id=1琛ㄧず鍙栧叏涓浗
+
+ public static final String CUSTOMER = "CUSTOMER";
+ public static final String BUSINESS = "BUSINESS";
+
/**
* 鍒嗙被code
@@ -23,25 +28,55 @@
String CHUFANGSHEJI ="zb_deco_cfsj";
String SHOUNASHEJI ="zb_deco_snsj";
String JIADE_ID ="zb_deco_jdid";
+ String CAROUSEL_AD ="carousel_ad";
+ String VIDEO_REC ="video_rec";
+ String REAL_CASE ="real_case";
}
+
+ public interface ActionType{
+ String COLLECT ="collect";
+ String COLLECT_CANCEL ="collect_cancel";
+ String LIKE ="like";
+ String LIKE_CANCEL ="like_cancel";
+ String VIEW ="view";
+ String SHARE ="share";
+ String DOWNLOAD ="download";
+ }
+
public interface IntegerUrl{
- String USER_UPDATE_URL ="customer/api/sync";
+ String USER_UPDATE_URL ="/customer/api/sync";
String USER_GET_TOKEN_URL ="/customer/api/login";
String USER_LOGOUT_URL ="/customer/api/disable";
String CATALOG_LIST_URL ="/content/api/catalog";
String TAG_LIST_URL ="/content/api/tag";
String CONTENT_LIST_URL ="/content/api/page";
String CONTENT_INFO_URL ="/content/api/detail/";
- String COLLECT_DO_URL ="/content/api/collect";
+// String COLLECT_DO_URL ="/content/api/collect";
+ String COLLECT_DO_URL ="/content/api/addAction";
String VIEW_DO_URL ="/content/api/view";
String SHARE_DO_URL ="/content/api/share";
String LIKE_DO_URL ="/content/api/like";
String COLLECT_LIST_URL ="/behavior/getFavorite";
String LIKE_LIST_URL ="/behavior/getLike";
String AREA_LIST_URL ="/base/admin/bAreaRegion/getChildren";
+ String AREA_TREE_URL ="/base/admin/bAreaRegion/getTree";
+ String AREA_ALL_URL ="/base/admin/bAreaRegion/getNotTree";
String BIND_CUSTOMER_FAVORITES_URL ="/behavior/api/bindCustomerFavorites";
String CUSTOMER_FAVORITES_LIST_URL ="/behavior/api/customerFavorites";
String BEHAVIOR_LIST_URL ="/behavior/api/customerBehaviors";
+ String CUSTOMER_CAROUSEL_IMAGE_URL ="/content/api/carouselAdList";
+ String CUSTOMER_CAROUSEL_IMAGE_DETAIL_URL ="/content/api/carouselAdDetail";
+ String USER_MOBILE_FASTLOGIN_URL ="/sysUser/mobileFastLogin";
+ String VIDEO_PAGE_LIST_URL ="/content/api/videoRecPageList";
+ String ZBDECO_PAGE_LIST_URL ="/content/api/zbDecoPageList";
+ String PRODUCT_NEWS_PAGE_LIST_URL ="/content/api/productInfoPageList";
+ String PRODUCT_NEWS_INFO_URL ="/content/api/productInfoDetail";
+ String PRODUCT_PAGE_LIST_URL ="/content/api/productPageList";
+ String PRODUCT_INFO_URL ="/content/api/productDetail";
+ String WHOLECASE_PAGE_LIST_URL ="/content/api/wholeCasePageList";
+ String WHOLECASE_INFO_URL ="/content/api/wholeCaseDetail";
+ String REALCASE_PAGE_LIST_URL ="/content/api/realCasePageList";
+ String REALCASE_INFO_URL ="/content/api/realCaseDetail";
}
public interface IntegerName{
String USER_UPDATE_NAME ="鐢ㄦ埛淇℃伅鍚屾";
@@ -61,5 +96,24 @@
String BIND_CUSTOMER_FAVORITES_NAME ="缁戝畾瀹㈡埛鍠滄";
String CUSTOMER_FAVORITES_LIST_NAME ="鑾峰彇瀹㈡埛鍠滄";
String BEHAVIOR_LIST_NAME ="鑾峰彇琛屼负杞ㄨ抗";
+
+ String CUSTOMER_CAROUSEL_IMAGE_NAME ="C绔疆鎾浘鍒楄〃";
+ String CUSTOMER_CAROUSEL_IMAGE_DETAIL_NAME ="C绔疆鎾浘璇︽儏";
+
+ String AREA_TREE_NAME ="鍏ㄩ噺鐪佸競鍖烘爲褰㈡暟鎹�";
+ String AREA_ALL_NAME ="鍏ㄩ噺鐪佸競鍖鸿瘎绾ф暟鎹�";
+ String USER_MOBILE_FASTLOGIN_NAME ="B绔敤鎴锋墜鏈哄彿蹇嵎鐧诲綍";
+
+ String VIDEO_PAGE_LIST_NAME ="鑾峰彇瑙嗛鍒楄〃";
+ String ZBDECO_PAGE_LIST_NAME ="鑾峰彇蹇楄瑁呬慨鍒楄〃";
+ String PRODUCT_NEWS_PAGE_LIST_NAME ="鑾峰彇浜у搧鍜ㄨ鍒楄〃";
+ String PRODUCT_NEWS_INFO_NAME ="鑾峰彇浜у搧鍜ㄨ璇︽儏";
+ String PRODUCT_PAGE_LIST_NAME ="鑾峰彇浜у搧鍒楄〃";
+ String PRODUCT_INFO_NAME ="鑾峰彇浜у搧璇︽儏";
+ String WHOLECASE_PAGE_LIST_NAME ="鑾峰彇鍏ㄥ眿妗堜緥鍒楄〃";
+ String WHOLECASE_INFO_NAME ="鑾峰彇鍏ㄥ眿妗堜緥璇︽儏";
+ String REALCASE_PAGE_LIST_NAME ="鑾峰彇瀹炴櫙妗堜緥鍒楄〃";
+ String REALCASE_INFO_NAME ="鑾峰彇瀹炴櫙妗堜緥璇︽儏";
+
}
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTContentListRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTContentListRequest.java
index b210145..dbb6f8b 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTContentListRequest.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTContentListRequest.java
@@ -26,8 +26,8 @@
@ApiModelProperty(value = "鍐呭鏌ヨ鏉′欢")
private String query;
- @ApiModelProperty(value = "鏍囩")
- private String tagCodes;
+// @ApiModelProperty(value = "鏍囩")
+// private String tagCodes;
@ApiModelProperty(value = "鎺掑簭鏂瑰紡 NORMAL - 榛樿锛汬OT - 鏈�鐑紱LATEST - 鏈�鏂帮紱")
private String sortType;
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTDataDetailRequest.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTDataDetailRequest.java
new file mode 100644
index 0000000..a1c4639
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/ZTDataDetailRequest.java
@@ -0,0 +1,15 @@
+package com.doumee.biz.zbom.model.zhongtai;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+
+@Data
+public class ZTDataDetailRequest extends ZTBaseRequst {
+
+ @ApiModelProperty(value = "涓氬姟鏁版嵁涓婚敭")
+ private String id;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTAreaTreeResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTAreaTreeResponse.java
new file mode 100644
index 0000000..5c91553
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTAreaTreeResponse.java
@@ -0,0 +1,43 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 鐪佸競鍖鸿鎯呰繑鍥�
+ */
+@Data
+public class ZTAreaTreeResponse implements Serializable {
+
+
+ /**
+ * ID
+ */
+ private String id;
+ /**
+ * 鍦板尯绛夌骇
+ */
+ private String level;
+ /**
+ * 鍚嶇О
+ */
+ private String name;
+ /**
+ * 鐖剁骇ID
+ */
+ private String parentId;
+ /**
+ * 鎷奸煶
+ */
+ private String pinyin;
+ /**
+ * 涓夌淮瀹剁紪鐮�
+ */
+ private String swjCode;
+
+ List<ZTAreaTreeResponse> children;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTBasePageResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTBasePageResponse.java
index ba905a5..e9907d4 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTBasePageResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTBasePageResponse.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model.zhongtai.response;
+import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonAlias;
import lombok.Data;
@@ -11,21 +12,21 @@
/**
* 璁板綍鍒楄〃
*/
- @JsonAlias(value = {"data","records","userFavoriteList","userBehaviorList","customerFavoritesList"})
+ @JSONField(name="records",alternateNames = {"data","records","userFavoriteList","userBehaviorList","customerFavoritesList"})
private List<T> records;
/**
* 褰撳墠椤�
*/
- @JsonAlias(value = {"pageCount","pageNum"})
+ @JSONField(name="pageNum",alternateNames = {"pageCount","pageNum"})
private String pageNum;
/**
* 姣忛〉鏉℃暟
*/
- @JsonAlias(value = {"pageSize",})
+ @JSONField(name="pageSize",alternateNames = {"pageSize"})
private String pageSize;
/**
* 鎬绘暟
*/
- @JsonAlias(value = {"totalCount","total"})
+ @JSONField(name="total",alternateNames = {"totalCount","total"})
private String total;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java
new file mode 100644
index 0000000..6957f48
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java
@@ -0,0 +1,45 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 妗堜緥璇︽儏杩斿洖
+ */
+@Data
+public class ZTCaseInfoResponse implements Serializable {
+ private String apiSpaceCaseVos;
+ private String caseInfo;
+ /**
+ * 鏀惰棌閲�
+ */
+ private String collectCount;
+ /**
+ * 涓诲浘
+ */
+ private String coverImage;
+ /**
+ * id
+ */
+ private String id;
+ /**
+ * 鏄惁鏀惰棌 true:鏀惰棌 false:鏈敹钘�
+ */
+ private boolean isCollection;
+ private String layoutUlr;
+ private String panorama;
+ /**
+ * 鍙戝竷鏃ユ湡
+ */
+ private String publishDt;
+ /**
+ * 鏍囬
+ */
+ private String title;
+ /**
+ * 娴忚閲�
+ */
+ private String viewCount;
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCatalogInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCatalogInfoResponse.java
index e8511dd..d08cdba 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCatalogInfoResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCatalogInfoResponse.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model.zhongtai.response;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -14,39 +15,48 @@
/**
* 鐩綍鍞竴缂栫爜
*/
+ @ApiModelProperty(value = "鐩綍鍞竴缂栫爜")
private String code;
/**
* 鐩綍棰濆淇℃伅
*/
+ @ApiModelProperty(value = "鐩綍棰濆淇℃伅")
private String expandInfo;
/**
* 鐩綍ID
*/
+ @ApiModelProperty(value = "鐩綍ID")
private String id;
/**
* 鐩綍鍚嶇О
*/
+ @ApiModelProperty(value = "鐩綍鍚嶇О")
private String name;
/**
* 灏侀潰鍥綰RL
*/
+ @ApiModelProperty(value = "灏侀潰鍥綰RL")
private String picture;
/**
* 鐖剁骇鐩綍ID
*/
+ @ApiModelProperty(value = "鐖剁骇鐩綍ID")
private String pid;
/**
* 澶囨敞
*/
+ @ApiModelProperty(value = "澶囨敞")
private String remark;
/**
* 鐩綍鎺掑簭
*/
+ @ApiModelProperty(value = "鐩綍鎺掑簭")
private Integer sort;
/**
* 瀛愮洰褰�
*/
+ @ApiModelProperty(value = "瀛愮洰褰�")
private List<ZTTagInfoResponse> childTagList;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTContentInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTContentInfoResponse.java
index cc2cf79..21525a5 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTContentInfoResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTContentInfoResponse.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model.zhongtai.response;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -14,42 +15,52 @@
/**
* 浣滆��
*/
+ @ApiModelProperty(value = "author")
private String author;
/**
* 鍐呭璇︽儏
*/
+ @ApiModelProperty(value = "鍐呭璇︽儏")
private Map<String, Object> content;
/**
* 鏂囩珷绫诲瀷
*/
+ @ApiModelProperty(value = "鏂囩珷绫诲瀷")
private String contentType;
/**
* 鏂囩珷ID
*/
+ @ApiModelProperty(value = "鏂囩珷ID")
private String id;
/**
* 璇█缂栫爜
*/
+ @ApiModelProperty(value = "璇█缂栫爜")
private String langCode;
/**
* 澶氬浘鐗囧垪琛�
*/
+ @ApiModelProperty(value = "澶氬浘鐗囧垪琛�")
private String picUrls;
/**
* 鍙戝竷鏃ユ湡
*/
+ @ApiModelProperty(value = "鍙戝竷鏃ユ湡")
private String publishDate;
/**
* 鍙戝竷缁勭粐
*/
+ @ApiModelProperty(value = "鍙戝竷缁勭粐")
private String publishDepartment;
/**
* 瀛愭爣棰�
*/
+ @ApiModelProperty(value = "瀛愭爣棰�")
private String subtitle;
/**
* 鏂囩珷鏍囬
*/
+ @ApiModelProperty(value = "鏂囩珷鏍囬")
private String title;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCusCarouselImageResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCusCarouselImageResponse.java
new file mode 100644
index 0000000..1c56e14
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCusCarouselImageResponse.java
@@ -0,0 +1,45 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * C绔綍鎾浘
+ */
+@Data
+public class ZTCusCarouselImageResponse implements Serializable {
+
+ @ApiModelProperty(value = "鏂囩珷ID")
+ private String id;
+
+ @ApiModelProperty(value = "璇█缂栫爜")
+ private String langCode;
+
+ @ApiModelProperty(value = "鏂囩珷鏍囬")
+ private String title;
+
+ @ApiModelProperty(value = "鏂囩珷鍓爣棰�")
+ private String subtitle;
+
+ @ApiModelProperty(value = "鏂囩珷浣滆��")
+ private String author;
+
+ @ApiModelProperty(value = "鍙戝竷鏃ユ湡")
+ private String publishDate;
+
+ @ApiModelProperty(value = "鍙戝竷缁勭粐")
+ private String publishDepartment;
+
+ @ApiModelProperty(value = "灏侀潰鍥剧墖")
+ private String coverImage;
+
+ @ApiModelProperty(value = "鍐呭鎵撳紑鏂瑰紡(鍐呴儴椤甸潰page銆佽棰憊ideo銆佸瘜鏂囨湰text銆佸閮ㄩ摼鎺ink)")
+ private String openType;
+
+ @ApiModelProperty(value = "璺宠浆鍐呭")
+ private String openContent;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductInfoResponse.java
new file mode 100644
index 0000000..a966711
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductInfoResponse.java
@@ -0,0 +1,55 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 浜у搧璇︽儏杩斿洖
+ */
+@Data
+public class ZTProductInfoResponse implements Serializable {
+ private String author;
+ /**
+ * 璇︽儏椤佃疆鎾浘鍒楄〃锛堝瑙嗚鍥撅級
+ */
+ private String[] bannerImgList;
+ private String collectCount;
+ /**
+ * 璇︽儏椤靛瘜鏂囨湰锛堝叏灞嬪畾鍒堕亶鍘唖paceList鐨勫瘜鏂囨湰锛�
+ */
+ private String content;
+ private String coverImage;
+ private String id;
+ private Boolean isCollection;
+ private String langCode;
+ /**
+ * 浜у搧鍙傛暟鍒楄〃
+ */
+ private List<ZTProductParamInfoResponse> productParamList;
+ private String publishDt;
+ private String publishDepartment;
+ /**
+ * 瀹炴櫙鍥惧垪琛�
+ */
+ private String[] realImgList;
+ /**
+ * 绌洪棿鍒楄〃
+ */
+ private List<ZTSpaceInfoResponse> spaceList;
+ private String subtitle;
+ private String title;
+ private String viewCount;
+ private String downloadCount;
+ private String isTop;
+ private String orgId;
+ private String praiseCount;
+ private String shareCount;
+ private String sort;
+ private String type;
+ private String video;
+ private String intro;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductNewsInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductNewsInfoResponse.java
new file mode 100644
index 0000000..f20c7cc
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductNewsInfoResponse.java
@@ -0,0 +1,54 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 浜у搧鍜ㄨ璇︽儏杩斿洖
+ */
+@Data
+public class ZTProductNewsInfoResponse implements Serializable {
+ private String author;
+ /**
+ * 璇︽儏椤佃疆鎾浘鍒楄〃锛堝瑙嗚鍥撅級
+ */
+ private String[] bannerImgList;
+ private String collectCount;
+ /**
+ * 璇︽儏椤靛瘜鏂囨湰锛堝叏灞嬪畾鍒堕亶鍘唖paceList鐨勫瘜鏂囨湰锛�
+ */
+ private String content;
+ private String coverImage;
+ private String id;
+ private Boolean isCollection;
+ private String langCode;
+ /**
+ * 浜у搧鍙傛暟鍒楄〃
+ */
+ private List<ZTProductParamInfoResponse> productParamList;
+ private String publishDt;
+ private String publishDepartment;
+ /**
+ * 瀹炴櫙鍥惧垪琛�
+ */
+ private String[] realImgList;
+ /**
+ * 绌洪棿鍒楄〃
+ */
+ private List<ZTSpaceInfoResponse> spaceList;
+ private String subtitle;
+ private String title;
+ private String viewCount;
+ private String downloadCount;
+ private String isTop;
+ private String orgId;
+ private String praiseCount;
+ private String shareCount;
+ private String sort;
+ private String type;
+ private String contentType;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductParamInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductParamInfoResponse.java
new file mode 100644
index 0000000..9348808
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTProductParamInfoResponse.java
@@ -0,0 +1,22 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 瀹炴櫙妗堜緥璇︽儏杩斿洖
+ */
+@Data
+public class ZTProductParamInfoResponse implements Serializable {
+ /**
+ * 鍙傛暟鍚�
+ */
+ private String paramName;
+ /**
+ * 鍙傛暟鍊�
+ */
+ private String paramValue;
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTRealcaseInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTRealcaseInfoResponse.java
new file mode 100644
index 0000000..42c3e54
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTRealcaseInfoResponse.java
@@ -0,0 +1,34 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 瀹炴櫙妗堜緥璇︽儏杩斿洖
+ */
+@Data
+public class ZTRealcaseInfoResponse implements Serializable {
+ private String caseInfo;
+ private String collectCount;
+ /**
+ * 涓诲浘
+ */
+ private String coverImage;
+ private String id;
+ private String[] imgList;
+ /**
+ * 鏄惁鏀惰棌 true:鏀惰棌 false:鏈敹钘�
+ */
+ private boolean isCollection;
+ /**
+ * 鍙戝竷鏃ユ湡
+ */
+ private String publishDt;
+ /**
+ * 鏍囬
+ */
+ private String title;
+ private String viewCount;
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSpaceInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSpaceInfoResponse.java
new file mode 100644
index 0000000..73dba77
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSpaceInfoResponse.java
@@ -0,0 +1,25 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 瀹炴櫙妗堜緥璇︽儏杩斿洖
+ */
+@Data
+public class ZTSpaceInfoResponse implements Serializable {
+ /**
+ * 绌洪棿鍐呭瀵屾枃鏈�
+ */
+ private String spaceContent;
+ /**
+ * 绌洪棿鍥剧墖
+ */
+ private String spaceImg;
+ /**
+ * 绌洪棿鍚嶇О
+ */
+ private String spaceName;
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSysuserGetTokenResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSysuserGetTokenResponse.java
new file mode 100644
index 0000000..44ed2a8
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTSysuserGetTokenResponse.java
@@ -0,0 +1,58 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ZTSysuserGetTokenResponse implements Serializable {
+ /**
+ * 鐢ㄦ埛id
+ */
+ private String id;
+
+
+ /**
+ * 鏈夋晥鏈� 绉�
+ */
+ private Long expire;
+
+ /**
+ * 褰撳墠鐢ㄦ埛token
+ */
+ private String token;
+ /**
+ * 鐢ㄦ埛璐﹀彿
+ */
+ private String userAccount;
+ /**
+ * 鐢ㄦ埛澶村儚
+ */
+ private String userImg;
+ /**
+ * 鐢ㄦ埛鎵嬫満鍙风爜
+ */
+ private String userMobile;
+ /**
+ * 鐢ㄦ埛濮撳悕
+ */
+ private String userRealName;
+ /**
+ * 鏈嶅姟瀹㈡埛鏁�
+ */
+ private long userServedClients;
+ /**
+ * 寰俊浜岀淮鐮�
+ */
+ private String userWechatQrCode;
+ /**
+ * 浠庝笟骞撮檺
+ */
+ private long userWorkingLife;
+ /**
+ * 浼佷笟寰俊浜岀淮鐮�
+ */
+ private String userWorkWechatQrCode;
+
+
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java
index 91bb89e..9aec07d 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model.zhongtai.response;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -14,18 +15,22 @@
/**
* 鏍囩鍊糃ODE
*/
+ @ApiModelProperty(value = "鏍囩鍊糃ODE")
private String labelValueCode;
/**
* 鏍囩鍊糏D
*/
+ @ApiModelProperty(value = "鏍囩鍊糏D")
private String labelValueId;
/**
* 鏍囩鍊糔AME
*/
+ @ApiModelProperty(value = "鏍囩鍊糔AME")
private String labelValueName;
/**
* 鏍囩鍊兼帓搴�
*/
+ @ApiModelProperty(value = "鏍囩鍊兼帓搴�")
private String labelValueSort;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagInfoResponse.java
index dedebe8..30b6835 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagInfoResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagInfoResponse.java
@@ -1,5 +1,6 @@
package com.doumee.biz.zbom.model.zhongtai.response;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -14,23 +15,28 @@
/**
* 鏍囩CODE
*/
+ @ApiModelProperty(value = "鏍囩CODE")
private String labelCode;
/**
* 鏍囩ID
*/
+ @ApiModelProperty(value = "鏍囩ID")
private String labelId;
/**
* 鏍囩NAME
*/
+ @ApiModelProperty(value = "鏍囩NAME")
private String labelName;
/**
* 鏍囩鎺掑簭
*/
+ @ApiModelProperty(value = "鏍囩鎺掑簭")
private String labelSort;
/**
* 瀛愮洰褰�
*/
+ @ApiModelProperty(value = "瀛愮洰褰�")
private List<ZTTagChildInfoResponse> valueVos;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTUserGetTokenResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTUserGetTokenResponse.java
index 7c622c8..2be1a77 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTUserGetTokenResponse.java
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTUserGetTokenResponse.java
@@ -10,6 +10,10 @@
*鐢ㄦ埛涓存椂绁ㄦ嵁
*/
private String token;
+ /**
+ * 鏈夋晥鏈� 绉�
+ */
+ private Long expire;
}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTVideoInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTVideoInfoResponse.java
new file mode 100644
index 0000000..3a69717
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTVideoInfoResponse.java
@@ -0,0 +1,62 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Map;
+
+
+/**
+ * 鍟嗗搧璇︽儏杩斿洖
+ */
+@Data
+public class ZTVideoInfoResponse implements Serializable {
+ private String author;
+ /**
+ * 鏀惰棌鏁伴噺
+ */
+ private long collectCount;
+ /**
+ * 灏侀潰鍥�
+ */
+ private String coverImage;
+ /**
+ * id
+ */
+ private String id;
+ /**
+ * 鏄惁鏀惰棌
+ */
+ private boolean isCollection;
+ private String langCode;
+ /**
+ * 鍠滄鏁伴噺
+ */
+ private long likeCount;
+ /**
+ * 鍙戝竷缁勭粐
+ */
+ private String publishDepartment;
+ /**
+ * 鍙戝竷鏃堕棿
+ */
+ private String publishDt;
+ /**
+ * 鍒嗕韩鏁伴噺
+ */
+ private long shareCount;
+ private String subtitle;
+ /**
+ * 鏍囬
+ */
+ private String title;
+ /**
+ * 瑙嗛閾炬帴
+ */
+ private String videoUrl;
+ /**
+ * 娴忚鏁伴噺
+ */
+ private String viewCount;
+}
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTZbDecoInfoResponse.java b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTZbDecoInfoResponse.java
new file mode 100644
index 0000000..2f20d30
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTZbDecoInfoResponse.java
@@ -0,0 +1,50 @@
+package com.doumee.biz.zbom.model.zhongtai.response;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 妗堜緥璇︽儏杩斿洖
+ */
+@Data
+public class ZTZbDecoInfoResponse implements Serializable {
+ private String author;
+ private long collectCount;
+ /**
+ * 鍐呭
+ */
+ private String content;
+ /**
+ * 鍐呭绫诲瀷(鏂囨湰text銆侀摼鎺ink銆佽棰憊ideo銆佷骇鍝乸roduct)
+ */
+ private String contentType;
+ /**
+ * 灏侀潰鍥�
+ */
+ private String coverImage;
+ /**
+ * id
+ */
+ private String id;
+ private String intro;
+ /**
+ * 鏄惁鏀惰棌
+ */
+ private boolean isCollection;
+ private String langCode;
+ private long likeCount;
+ private String publishDepartment;
+ /**
+ * 鍙戝竷鏃ユ湡
+ */
+ private String publishDt;
+ private long shareCount;
+ private String subtitle;
+ /**
+ * 鏍囬
+ */
+ private String title;
+ private String viewCount;
+}
diff --git a/server/service/src/main/java/com/doumee/config/Jwt/WebMvcConfig.java b/server/service/src/main/java/com/doumee/config/Jwt/WebMvcConfig.java
index 8fd806c..f856bca 100644
--- a/server/service/src/main/java/com/doumee/config/Jwt/WebMvcConfig.java
+++ b/server/service/src/main/java/com/doumee/config/Jwt/WebMvcConfig.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.biz.zbom.model.zhongtai.ZTConstants;
import com.doumee.config.annotation.UserLoginRequired;
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.constants.ResponseStatus;
@@ -118,7 +119,7 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢ㄦ埛宸茬鐢�,璇疯仈绯荤鐞嗗憳");
}
request.setAttribute(JwtTokenUtil.UserId_Name, memberId);
- request.setAttribute(JwtTokenUtil.UserType, Constants.CUSTOMER);
+ request.setAttribute(JwtTokenUtil.UserType, ZTConstants.CUSTOMER);
return true;
} catch (IllegalArgumentException | JwtException e) {
throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"鏈櫥褰�");
@@ -153,7 +154,7 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢ㄦ埛宸茬鐢�,璇疯仈绯荤鐞嗗憳");
}
request.setAttribute(JwtTokenUtil.UserId_Name, userId);
- request.setAttribute(JwtTokenUtil.UserType, Constants.BUSINESS);
+ request.setAttribute(JwtTokenUtil.UserType, ZTConstants.BUSINESS);
return true;
} catch (IllegalArgumentException | JwtException e) {
throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"鏈櫥褰�");
diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index 0498054..04d4d45 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -53,9 +53,6 @@
public static final String HK_ROOTORG_CODE ="HK_ROOTORG_CODE" ;
public static final String HK_ROOTORG_NAME ="HK_ROOTORG_NAME" ;
public static final String REDIS_TOKEN_KEY = "token_";
- public static final String CUSTOMER = "CUSTOMER";
- public static final String BUSINESS = "BUSINESS";
-
//琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛�
public static final String ZBOM_CRM_AUTH_API_KEY = "ZBOM_CRM_AUTH_API_KEY";
@@ -334,6 +331,7 @@
public static final String WEIXIN_DEFAULT_IMGS = "WEIXIN_DEFAULT_IMGS";
public static final String USER_CARD_DEFAULT_IMG = "USER_CARD_DEFAULT_IMG";
public static final String USERS_FILE = "USERS_FILE";
+ public static final String SHARES_FILE = "SHARES_FILE";
public static final String NEWS_FILE = "NEWS_FILE";
public static final String USER_LABEL = "USER_LABEL";
//鍙戦�佷細璁紑濮� 瀹氭椂鎻愬墠澶氬皯鍒嗛挓鍙戦��
@@ -366,12 +364,14 @@
public static final String WX_MINI_CONFIG = "WX_MINI_CONFIG";
+ public static final String SHARE_HAIBAO_HEADER_TITLE = "SHARE_HAIBAO_HEADER_TITLE";
public static final String WX_APPID_CUSTOMER = "WX_APPID_CUSTOMER";
public static final String WX_SECRET_CUSTOMER = "WX_SECRET_CUSTOMER";
public static final String WX_APPID_PERSONNEL = "WX_APPID_PERSONNEL";
public static final String WX_SECRET_PERSONNEL = "WX_SECRET_PERSONNEL";
public static final String WX_TOKEN_CUSTOMER = "WX_TOKEN_CUSTOMER";
public static final String WX_TOKEN_PERSONNEL = "WX_TOKEN_PERSONNEL";
+ public static final String ZBOM_CRM_POSTCUS_API_KEY = "ZBOM_CRM_POSTCUS_API_KEY";
public interface RedisKeys {
@@ -385,6 +385,8 @@
String ZBOM_ENCODE_URL ="ZBOM_ENCODE_URL";
String ZBOM_SMS_API_KEY ="ZBOM_SMS_API_KEY";
String ZBOM_ZHONGTAI_API_URL ="ZBOM_ZHONGTAI_API_URL";
+ String ZBOM_CRM_POSTCUS_API_KEY ="ZBOM_CRM_POSTCUS_API_KEY";
+ String ZBOM_AREA_REDIS_KEY ="ZBOM_AREA_REDIS_KEY";
String ZBOM_SMS_API_URL ="ZBOM_SMS_API_URL";
String IAM_APPKEY ="IAM_APPKEY";
String SHOP_TREE ="SHOP_TREE";
@@ -706,64 +708,24 @@
Response response = client.newCall(request).execute();
if (response.isSuccessful()) {
InputStream inputStream = new ByteArrayInputStream(response.body().bytes());
-// ByteArrayOutputStream baos = new ByteArrayOutputStream();
-// byte[] buffer = new byte[1024];
-// int len = -1;
-// while ((len = inputStream.read(buffer)) != -1) {
-// baos.write(buffer, 0, len);
-// }
-// System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()));
+ /* ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = -1;
+ while ((len = inputStream.read(buffer)) != -1) {
+ baos.write(buffer, 0, len);
+ }
+ System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()));*/
return inputStream;
}
} catch (Exception e) {
e.printStackTrace();
}
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢熸垚鍥剧墖澶辫触");
+ return null;
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢熸垚鍥剧墖澶辫触");
}
- /**
- * 鍙戦�乬et璇锋眰
- * @param url 璇锋眰URL
- * @param param 璇锋眰鍙傛暟 key:value url鎼哄甫鍙傛暟 鎴栬�呮棤鍙傚彲涓嶅~
- * @return
- */
- public static String doGet(String url, Map<String, String> param) {
- // 鍒涘缓Httpclient瀵硅薄
- CloseableHttpClient httpclient = HttpClients.createDefault();
- String resultString = "";
- CloseableHttpResponse response = null;
- try {
- // 鍒涘缓uri
- URIBuilder builder = new URIBuilder(url);
- if (param != null) {
- for (String key : param.keySet()) {
- builder.addParameter(key, param.get(key));
- }
- }
- URI uri = builder.build();
- // 鍒涘缓http GET璇锋眰
- HttpGet httpGet = new HttpGet(uri);
- // 鎵ц璇锋眰
- response = httpclient.execute(httpGet);
- // 鍒ゆ柇杩斿洖鐘舵�佹槸鍚︿负200
- if (response.getStatusLine().getStatusCode() == 200) {
- resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- if (response != null) {
- response.close();
- }
- httpclient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return resultString;
- }
+
diff --git a/server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java b/server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java
index a09dcac..7d16eae 100644
--- a/server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java
+++ b/server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java
@@ -5,6 +5,7 @@
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.lang3.StringUtils;
+import org.checkerframework.checker.units.qual.C;
import org.springframework.http.MediaType;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
@@ -13,6 +14,7 @@
import javax.imageio.stream.ImageOutputStream;
import java.awt.*;
import java.awt.geom.Ellipse2D;
+import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigDecimal;
@@ -301,7 +303,6 @@
g2.drawRect( 0, 0, 750, 700);
}
- int th = 30;
//鍚嶇О
if(name.length()>5){
name = name.substring(0,5)+"...";
@@ -382,11 +383,170 @@
}
}
- private static BufferedImage getImgIO(String imgurl) {
+ public static BufferedImage getImgIO(String imgurl) {
try {
return ImageIO.read(new URL(imgurl));
}catch (Exception e){
}return null;
}
+ private static BufferedImage getImgIO(InputStream is) {
+ try {
+ return ImageIO.read(is);
+ }catch (Exception e){
+
+ }return null;
+ }
+
+ public static InputStream generateShareImg(String imgurl, InputStream mpCode, String title) {
+
+ BufferedImage bi = new BufferedImage(750, 976, BufferedImage.TYPE_INT_RGB);
+ //寰楀埌瀹冪殑缁樺埗鐜(杩欏紶鍥剧墖鐨勭瑪)
+ Graphics2D g2 = (Graphics2D) bi.getGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ g2.fillRect(0, 0, 750, 976);
+ //鑳屾櫙鍥剧墖
+ dealTitleCenter(g2,th,title);
+ if(StringUtils.isNotBlank(imgurl)){
+ BufferedImage img1 =getImgIO(imgurl);
+ if(img1!=null){
+ int w = img1.getWidth();
+ int h = img1.getHeight();
+ int h1 = (int)((double)w *502/670);
+ int w1 = (int)((double)h *670/502);
+ if(h>h1){
+ h = h1;
+ }
+ if(w>w1){
+ w = w1;
+ }
+ img1 = img1.getSubimage(0,0,w,h);
+ g2.drawImage(setRadius(img1,20,0,0), 40, 204, 670 ,502, null);
+
+ }
+ }
+
+// g2.setColor(Color.white);
+// g2.drawRoundRect(39,204, 672, 502, 1,1);//鐢讳竴涓渾瑙掔煩褰�
+
+ g2.setColor(Color.black);
+ g2.setFont(new Font("榛戜綋", Font.BOLD, 40));
+ g2.drawString("闀挎寜璇嗗埆灏忕▼搴�", 40,768+th);
+ g2.setColor(Color.gray);
+ g2.setFont(new Font("榛戜綋", Font.PLAIN, 32));
+ g2.drawString("鏌ョ湅鏇村绮惧僵鍐呭", 40,820+th);
+
+
+ BufferedImage img3 = getImgIO(mpCode);
+ if(img3!=null){
+ g2.drawImage(img3, 530, 736, 180, 180, null);
+ }
+ InputStream inputStream = bufferedImageToInputStream(bi);
+ return inputStream;
+ }
+
+ /**
+ * 鍥剧墖璁剧疆鍦嗚
+ * @param srcImage
+ * @return
+ * @throws
+ */
+ public static BufferedImage setRadius(BufferedImage srcImage, int radius, int border, int padding){
+ int width = srcImage.getWidth();
+ int height = srcImage.getHeight();
+ int canvasWidth = width + padding * 2;
+ int canvasHeight = height + padding * 2;
+
+ BufferedImage image = new BufferedImage(canvasWidth, canvasHeight, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D gs = image.createGraphics();
+ gs.setComposite(AlphaComposite.Src);
+ gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ gs.setColor(Color.WHITE);
+ gs.fill(new RoundRectangle2D.Float(0, 0, canvasWidth, canvasHeight, radius, radius));
+ gs.setComposite(AlphaComposite.SrcAtop);
+ gs.drawImage(setClip(srcImage, radius), padding, padding, null);
+ if(border !=0){
+ gs.setColor(Color.white);
+ gs.setStroke(new BasicStroke(border));
+ gs.drawRoundRect(padding, padding, canvasWidth - 2 * padding, canvasHeight - 2 * padding, radius, radius);
+ }
+ gs.dispose();
+ return image;
+ }
+
+
+ /**
+ * 鍥剧墖鍒囧渾瑙�
+ * @param srcImage
+ * @param radius
+ * @return
+ */
+ public static BufferedImage setClip(BufferedImage srcImage, int radius){
+ int width = srcImage.getWidth();
+ int height = srcImage.getHeight();
+ BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D gs = image.createGraphics();
+
+ gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ gs.setClip(new RoundRectangle2D.Double(0, 0, width, height, radius, radius));
+ gs.drawImage(srcImage, 0, 0, null);
+ gs.dispose();
+ return image;
+ }
+
+ private static void dealTitleCenter(Graphics2D g2, int th, String title) {
+ String[] titles = title.split("&");
+ for (int i = 0; i < titles.length && i<2; i++) {
+ String name = titles[i];
+ //鍚嶇О
+ if(name.length()>=17){
+ name = name.substring(0,17);
+ }
+ Font font =new Font("榛戜綋", Font.BOLD, 38);
+ FontMetrics fontMetrics = g2.getFontMetrics(font);
+ int centerX = 750 / 2;
+ int textWidth = fontMetrics.stringWidth(name);
+ g2.setColor(Color.black);
+ g2.setFont(font);
+ g2.drawString(name, centerX - textWidth / 2, 60+th+i*55);
+ }
+ }
+ public static int th = 30;
+ public static InputStream generateShareWithUserImg(BufferedImage imgurl, InputStream mpCode, String header, String name) {
+ int w = imgurl.getWidth();
+ int h = imgurl.getHeight();
+ double rate = (double)w/750d;
+
+ //寰楀埌瀹冪殑缁樺埗鐜(杩欏紶鍥剧墖鐨勭瑪)
+ Graphics2D g2 = (Graphics2D) imgurl.getGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ //鑳屾櫙鍥剧墖
+
+ BufferedImage img1 =getImgIO(header);
+ if(img1!=null){
+ g2.drawImage(setRadius(img1,img1.getWidth(),0,0), (int)(20*rate), (int)(h-68*rate), (int)(48*rate) ,(int)(48*rate), null);
+ }
+
+ Font font =new Font("榛戜綋", Font.PLAIN, (int)(28 * rate));
+ FontMetrics fontMetrics = g2.getFontMetrics(font);
+ int textWidth = fontMetrics.stringWidth(name);
+
+ g2.setColor(Color.white);
+ g2.setFont(font);
+ g2.drawString(name, (int) (80*rate),h-(int)((64-th)*rate));
+ g2.setColor(Color.white);
+ g2.setFont(new Font("榛戜綋", Font.PLAIN, (int)(24* rate)));
+ g2.drawString("鎵弿鐪嬫洿澶�", (int)(w -(textWidth+30*rate)),h-(int)(rate*(50-th)));
+
+ BufferedImage img3 = getImgIO(mpCode);
+ if(img3!=null){
+ g2.setColor(Color.white);
+ g2.fillOval((int)(w-130*rate), (int)(h-rate*150), (int)(100*rate) , (int)(100*rate));
+ g2.drawImage(img3, (int)(w-130*rate), (int)(h-rate*150), (int)(100*rate) , (int)(100*rate), null);
+ }
+ InputStream inputStream = bufferedImageToInputStream(imgurl);
+ return inputStream;
+ }
}
diff --git a/server/service/src/main/java/com/doumee/core/wx/AccessToken.java b/server/service/src/main/java/com/doumee/core/wx/AccessToken.java
deleted file mode 100644
index ff6a0c4..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/AccessToken.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.doumee.core.wx;
-
-import lombok.Data;
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @Author : Rk
- * @create 2022/12/7 17:26
- */
-@Data
-public class AccessToken {
-
- private String accessToken;
- //杩囨湡鏃堕棿 褰撳墠绯荤粺鏃堕棿+寰俊浼犳潵鐨勮繃鏈熸椂闂�
- private Long expiresTime;
-
- public AccessToken(String accessToken, String expiresIn) {
- this.accessToken = accessToken;
- this.expiresTime = System.currentTimeMillis()+Integer.parseInt(expiresIn)*1000;
- }
-
- /**
- * 鍒ゆ柇token鏄惁杩囨湡
- * @return
- */
- public boolean isExpired(){
- return System.currentTimeMillis()>expiresTime;
- }
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/TemplateData.java b/server/service/src/main/java/com/doumee/core/wx/TemplateData.java
deleted file mode 100644
index aad9cf6..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/TemplateData.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.doumee.core.wx;
-
-import lombok.Data;
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @Author : Rk
- * @create 2022/12/7 17:28
- */
-@Data
-public class TemplateData {
- private String value;
-
- public TemplateData(String value) {
- this.value = value;
- }
-
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/WXConstant.java b/server/service/src/main/java/com/doumee/core/wx/WXConstant.java
deleted file mode 100644
index d2e0d23..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/WXConstant.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.doumee.core.wx;
-
-/**
- * 鍏紬鍙锋帴鍙e湴鍧�绫�
- *
- * @Author : Rk
- * @create 2023/12/7 10:42
- */
-public class WXConstant {
-
- //鑾峰彇鍏紬鍙� access_token
- public static final String GET_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
-
- //鑾峰彇鐢ㄦ埛淇℃伅
- public static final String GET_USER_INFO_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
-
-
-
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/WxMiniUtilService.java b/server/service/src/main/java/com/doumee/core/wx/WxMiniUtilService.java
deleted file mode 100644
index 8dca404..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/WxMiniUtilService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.doumee.core.wx;
-
-import com.doumee.core.constants.ResponseStatus;
-import com.doumee.core.exception.BusinessException;
-import com.doumee.core.utils.ID;
-//import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest;
-//import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest;
-//import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
-//import com.github.binarywang.wxpay.exception.WxPayException;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-
-/**
- * 寰俊灏忕▼搴�-鍏叡鏂规硶
- */
-@Service
-@Slf4j
-public class WxMiniUtilService {
-
-//
-// /**
-// * 璁㈠崟寰俊閫�娆�
-// * orderNo:鍟嗘埛璁㈠崟鍙�
-// * totalPrice锛氳鍗曟�婚噾棰�
-// * refundPrice锛涢��娆鹃噾棰�
-// */
-// @Transactional(rollbackFor = Exception.class)
-// public static String wxRefund(String orderNo, BigDecimal totalPrice, BigDecimal refundPrice) {
-// try {
-// // 鍙戦�侀��娆捐姹�
-// String refNum = ID.nextGUID();
-// WxPayRefundRequest request = new WxPayRefundRequest();
-// request.setOutTradeNo(orderNo);
-// request.setOutRefundNo(refNum);
-// // request.setTotalFee(2);
-// // request.setRefundFee(1);
-// request.setTotalFee(BaseWxPayRequest.yuanToFen(totalPrice.toString()));
-// request.setRefundFee(BaseWxPayRequest.yuanToFen(refundPrice.toString()));
-// WxPayRefundResult response = WxMiniConfig.wxPayService.refund(request);
-// if ("SUCCESS".equals(response.getReturnCode()) && "SUCCESS".equals(response.getResultCode())) {
-// return refNum;
-// } else {
-// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),response.getErrCode() + response.getErrCodeDes());
-// }
-// } catch (WxPayException e) {
-// e.printStackTrace();
-// }
-// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"閫�娆惧彂鐢熷紓甯歌鑱旂郴绠$悊鍛�");
-// }
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/WxMsgVO.java b/server/service/src/main/java/com/doumee/core/wx/WxMsgVO.java
deleted file mode 100644
index cee69e6..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/WxMsgVO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.doumee.core.wx;
-
-import lombok.Data;
-
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @Author : Rk
- * @create 2022/12/7 17:27
- */
-@Data
-public class WxMsgVO {
- //鐢ㄦ埛openId
- private String touser;
- //妯$増id
- private String template_id;
- //鎺ㄩ�佹枃瀛�
- private Map<String , TemplateData> data;
- //璺宠浆璺緞 锛岄粯璁よ烦杞埌灏忕▼搴忛椤�
- private String page="pages/index/index";
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/WxPayProperties.java b/server/service/src/main/java/com/doumee/core/wx/WxPayProperties.java
deleted file mode 100644
index efe67cb..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/WxPayProperties.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.doumee.core.wx;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @Author : Rk
- * @create 2023/3/22 18:04
- */
-@Component
-@ConfigurationProperties(prefix = "wx.pay")
-@Data
-public class WxPayProperties {
-
- /**
- * AppID
- */
- private String appId;
-
- /**
- * AppSecret
- */
- private String appSecret;
-
- /**
- * 寰俊鍟嗘埛鍙�
- */
- private String mchId;
-
- /**
- * 鏀粯API瀵嗛挜
- */
- private String mchKey;
-
- /**
- * 鏀粯鍥炶皟鍦板潃
- */
- private String notifyUrl;
-
- /**
- * 鏀粯璇佷功(p12)
- */
- private String keyPath;
-
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatConfig.java b/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatConfig.java
deleted file mode 100644
index b6633be..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatConfig.java
+++ /dev/null
@@ -1,60 +0,0 @@
-
-package com.doumee.core.wx.wxPlat;
-
-import com.doumee.biz.system.SystemDictDataBiz;
-import com.doumee.core.utils.Constants;
-import lombok.extern.slf4j.Slf4j;
-import me.chanjar.weixin.mp.api.WxMpService;
-import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
-import me.chanjar.weixin.mp.config.WxMpConfigStorage;
-import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @Author : Rk
- * @create 2023/12/27 9:30
- */
-@Configuration
-@Slf4j
-public class WxPlatConfig {
-
- @Autowired
- private SystemDictDataBiz systemDictDataBiz;
-
- @Bean
- public WxMpConfigStorage wxMpConfigStorage() {
- WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
- try {
- // 鍏紬鍙穉ppId
- configStorage.setAppId(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode());
- // 鍏紬鍙穉ppSecret
- configStorage.setSecret(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode());
- // 鍏紬鍙稵oken
- configStorage.setToken(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode());
- // 鍏紬鍙稥ncodingAESKey
-// configStorage.setAesKey();
- }catch (Exception e){
- log.error("璇诲彇寰俊灏忕▼搴忕浉鍏抽厤缃敊璇�========"+e.getMessage());
- }
-
- return configStorage;
- }
-
-
- /**
- * 澹版槑瀹炰緥
- *
- * @return
- */
- @Bean
- public WxMpService wxMpService() {
- WxMpService wxMpService = new WxMpServiceImpl();
- wxMpService.setWxMpConfigStorage(wxMpConfigStorage());
- return wxMpService;
- }
-
-}
diff --git a/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java b/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
deleted file mode 100644
index 9a82791..0000000
--- a/server/service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.doumee.core.wx.wxPlat;
-
-import com.doumee.dao.business.model.Member;
-import lombok.extern.slf4j.Slf4j;
-import me.chanjar.weixin.common.error.WxErrorException;
-import me.chanjar.weixin.mp.api.WxMpService;
-import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
-import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Component;
-
-/**
- * 寰俊鍏紬鍙烽�氱煡
- *
- * @Author : Rk
- * @create 2023/12/27 9:19
- */
-@Slf4j
-@Component
-public class WxPlatNotice {
-
- /**
- * 寰俊鍏紬鍙稟PI鐨凷ervice
- */
- private final WxMpService wxMpService;
-
- public WxPlatNotice(WxMpService wxMpService) {
- this.wxMpService = wxMpService;
- }
-
- /**
- * 璁垮璁板綍瀹℃壒涓氬姟閫氱煡
- */
- public Boolean sendVisitAuditTemplateNotice(Member visits, String prefix, String tempId){
- if(StringUtils.isBlank(visits.getOpenid())){
- return false;
- }
- WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
- .toUser(visits.getOpenid())
- .templateId(tempId)
- .url(prefix + visits.getId())
- .build();
- String thing1 = "寰呭鎵�";
- if(visits.getStatus()==2){
- thing1 = "瀹℃牳閫氳繃";
- }else if(visits.getStatus()==3){
- thing1 = "瀹℃牳涓嶉�氳繃";
- }else if(visits.getStatus()==5){
- thing1 = "璁惧鎺堟潈鎴愬姛";
- }else if(visits.getStatus()==6){
- thing1 = "璁惧鎺堟潈鏈垚鍔�";
- }
- // 娣诲姞妯℃澘鏁版嵁
- templateMessage.addData(new WxMpTemplateData("thing1", thing1))
- .addData(new WxMpTemplateData("thing2", visits.getName()))
- .addData(new WxMpTemplateData("phone_number6", visits.getPhone()));
- String msgId = null;
- try {
- // 鍙戦�佹ā鏉挎秷鎭�
- msgId = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);
- } catch (WxErrorException e) {
- e.printStackTrace();
- }
- log.warn("路==++--路鎺ㄩ�佸井淇℃ā鏉夸俊鎭細{}路--++==路", msgId != null ? "鎴愬姛" : "澶辫触");
- return msgId != null;
- }
-
-
-}
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/CustomerLog.java b/server/service/src/main/java/com/doumee/dao/business/model/CustomerLog.java
index 5462d9d..554ca9b 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/CustomerLog.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/CustomerLog.java
@@ -10,6 +10,8 @@
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.xpath.operations.Bool;
+
import java.util.Date;
/**
@@ -155,4 +157,12 @@
@TableField(exist = false)
private String openid;
+ @ApiModelProperty(value = "C绔敤鎴蜂富閿�")
+ @TableField(exist = false)
+ private Long memberId;
+
+ @ApiModelProperty(value = "鏄惁鑴辨晱鎵嬫満鍙�",hidden = true)
+ @TableField(exist = false)
+ private Integer isHiddenPhone;
+
}
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/Shop.java b/server/service/src/main/java/com/doumee/dao/business/model/Shop.java
index d9e6717..b3d4007 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/Shop.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/Shop.java
@@ -244,6 +244,10 @@
@TableField(exist = false)
private BigDecimal distance;
+ @ApiModelProperty(value = "璺濈鏄剧ず", example = "1")
+ @TableField(exist = false)
+ private String distanceStr;
+
@ApiModelProperty(value = "闂ㄥ簵瀵艰喘鍒楄〃 ", example = "1")
@TableField(exist = false)
private List<Users> usersList;
diff --git a/server/service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java b/server/service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
index 53331b5..599446e 100644
--- a/server/service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
+++ b/server/service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
@@ -87,14 +87,18 @@
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder
.cronSchedule(quartzJob.getCronExpres())
.withMisfireHandlingInstructionDoNothing();
- // 浠诲姟瑙﹀彂鍣�
- CronTrigger trigger = getCronTrigger(quartzJob.getId())
- .getTriggerBuilder().withIdentity(triggerKey)
- .withSchedule(scheduleBuilder).build();
- trigger.getJobDataMap().put(QuartzJob.JOB_PARAM_KEY, quartzJob);
- scheduler.rescheduleJob(triggerKey, trigger);
- // 鐘舵�佹牎楠�
- checkStop(quartzJob) ;
+ CronTrigger t = getCronTrigger(quartzJob.getId());
+ if(t !=null){
+ // 浠诲姟瑙﹀彂鍣�
+ CronTrigger trigger = t
+ .getTriggerBuilder().withIdentity(triggerKey)
+ .withSchedule(scheduleBuilder).build();
+ trigger.getJobDataMap().put(QuartzJob.JOB_PARAM_KEY, quartzJob);
+ scheduler.rescheduleJob(triggerKey, trigger);
+ // 鐘舵�佹牎楠�
+ checkStop(quartzJob) ;
+ }
+
} catch (SchedulerException e) {
throw new RuntimeException("updateJob Fail",e) ;
}
diff --git a/server/service/src/main/java/com/doumee/dao/web/reqeust/ContentShareImgDto.java b/server/service/src/main/java/com/doumee/dao/web/reqeust/ContentShareImgDto.java
new file mode 100644
index 0000000..c9594a0
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/web/reqeust/ContentShareImgDto.java
@@ -0,0 +1,27 @@
+package com.doumee.dao.web.reqeust;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2024/7/11 17:19
+ */
+@Data
+@ApiModel("鑾峰彇鍐呭娴锋姤鍒嗕韩鐮�")
+public class ContentShareImgDto {
+ @ApiModelProperty(value = "鍥剧墖鍦板潃锛屽畬鏁磋矾寰�")
+ private String imgurl;
+ @ApiModelProperty(value = "灏忕▼搴忕椤甸潰璺緞")
+ private String pageUrl;
+ @ApiModelProperty(value = "鍏宠仈鏂囩珷缂栫爜")
+ private String articleId;
+ @ApiModelProperty(value = "鍒嗕韩绫诲瀷 0娴锋姤鍒嗕韩 1涓嬭浇甯﹀皬绋嬪簭鐮�")
+ private int type;
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/web/response/DailyUpdatesResponse.java b/server/service/src/main/java/com/doumee/dao/web/response/DailyUpdatesResponse.java
new file mode 100644
index 0000000..b3f5dc4
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/web/response/DailyUpdatesResponse.java
@@ -0,0 +1,28 @@
+package com.doumee.dao.web.response;
+
+import com.doumee.biz.zbom.model.zhongtai.response.ZTCatalogInfoResponse;
+import com.doumee.dao.business.model.News;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2024/7/17 14:19
+ */
+@Data
+public class DailyUpdatesResponse {
+
+ @ApiModelProperty(value = "浠婃棩涓婃柊鏁伴噺")
+ private Long dailyUpdateNum;
+
+ @ApiModelProperty(value = "杞彂鏁伴噺")
+ private Long shareNum;
+
+ @ApiModelProperty(value = "鍜ㄨ鍒楄〃")
+ private List<News> newsList;
+
+}
diff --git a/server/service/src/main/java/com/doumee/service/business/CustomerLogService.java b/server/service/src/main/java/com/doumee/service/business/CustomerLogService.java
index b931b2d..8cc05f0 100644
--- a/server/service/src/main/java/com/doumee/service/business/CustomerLogService.java
+++ b/server/service/src/main/java/com/doumee/service/business/CustomerLogService.java
@@ -54,7 +54,7 @@
* @param customerLogs 瀹炰綋闆�
*/
void updateByIdInBatch(List<CustomerLog> customerLogs);
-
+ void reSubmitAll(CustomerLog log);
/**
* 涓婚敭鏌ヨ
*
@@ -94,4 +94,6 @@
* @return long
*/
long count(CustomerLog customerLog);
+
+ void reSubmit(CustomerLog customerLog);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/GetCrmDataService.java b/server/service/src/main/java/com/doumee/service/business/GetCrmDataService.java
new file mode 100644
index 0000000..2fb2372
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/service/business/GetCrmDataService.java
@@ -0,0 +1,26 @@
+package com.doumee.service.business;
+
+import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest;
+import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse;
+import com.doumee.biz.zbom.model.crm.response.CRMCustomerListResponse;
+import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest;
+import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest;
+import com.doumee.biz.zbom.model.zhongtai.response.*;
+
+import java.util.List;
+
+/**
+ * 鐢ㄦ埛琛屼负鏁版嵁淇℃伅琛⊿ervice瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2024/07/04 14:40
+ */
+public interface GetCrmDataService {
+
+ /**
+ * 鑾峰彇CRM 瀹㈡埛鍒楄〃/娼滃鍒楄〃
+ * @param crmCustomerListRequest
+ * @return
+ */
+ CRMBaseResponse<List<CRMCustomerListResponse>> getCrmCustomerList(CrmCustomerListRequest crmCustomerListRequest);
+
+}
diff --git a/server/service/src/main/java/com/doumee/service/business/GetZhongTaiDataService.java b/server/service/src/main/java/com/doumee/service/business/GetZhongTaiDataService.java
index 947d165..b0dba66 100644
--- a/server/service/src/main/java/com/doumee/service/business/GetZhongTaiDataService.java
+++ b/server/service/src/main/java/com/doumee/service/business/GetZhongTaiDataService.java
@@ -1,7 +1,6 @@
package com.doumee.service.business;
-import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest;
-import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest;
+import com.doumee.biz.zbom.model.zhongtai.*;
import com.doumee.biz.zbom.model.zhongtai.response.*;
import java.util.List;
@@ -28,58 +27,124 @@
List<ZTTagInfoResponse> getCataLogTagList(ZTCatalogListRequest param);
/**
- * 鐖跺瓙绾у垎绫绘暟鎹� 鍒嗙被+鏍囩
- * @param ztCatalogListRequest
- * @return
+ * 琛屼负涓氬姟鎺ュ彛
+ * @param userId
+ * @param userType
+ * @param articleId
*/
- List<ZTCatalogInfoResponse> getZTCatalogInfoResponse(ZTCatalogListRequest ztCatalogListRequest);
+ void actionDo(Long userId,String userType,String articleId,String actionType);
/**
- * 鍐呭鍒嗛〉
+ * 娉ㄩ攢鐢ㄦ埛
+ * @param ztBaseRequst
+ */
+ void userLogout(ZTBaseRequst ztBaseRequst);
+
+ /**
+ * 鑾峰彇涓彴鏁版嵁淇℃伅
+ * @param ztAreaListRequest
+ * @return
+ */
+ List<ZTAreaTreeResponse> getZhongTaiAreaTree(ZTAreaListRequest ztAreaListRequest);
+
+ /**
+ * C绔� 鎴戠殑鍠滄鍒楄〃
* @param ztContentListRequest
* @return
*/
- ZTBasePageResponse<ZTContentListResponse> pageContentList(ZTContentListRequest ztContentListRequest);
+ ZTBasePageResponse<ZTCusFavoritesInfoResponse> getZhongTaiCusFavorite(ZTContentListRequest ztContentListRequest);
/**
- * 鍐呭璇︽儏
- * @param id 涓氬姟涓婚敭
- * @param userType 鐢ㄦ埛绫诲瀷
- * @param userId 鐢ㄦ埛涓婚敭
+ * C绔� 杞挱鍥惧垪琛�
+ * @param ztContentListRequest
* @return
*/
- ZTContentInfoResponse getContentInfo(String id, String userType, Long userId);
+ List<ZTCusCarouselImageResponse> getZhongTaiCarouselImage(ZTContentListRequest ztContentListRequest);
/**
- * 鏀惰棌涓氬姟
- * @param userId
- * @param userType
- * @param articleId
+ * C绔� 杞挱鍥捐鎯�
+ * @param ztDataDetailRequest
+ * @return
*/
- void collectContent(Long userId,String userType,String articleId);
+ ZTCusCarouselImageResponse getZhongTaiCarouselImageDetail(ZTDataDetailRequest ztDataDetailRequest);
/**
- * 鏀惰棌涓氬姟
- * @param userId
- * @param userType
- * @param articleId
+ * 涓彴 鍜ㄨ鍒楄〃鎺ュ彛
+ * @param ztContentListRequest
+ * @return
*/
- void likeContent(Long userId,String userType,String articleId);
+ ZTBasePageResponse<ZTProductNewsInfoResponse> getZhongTaiProductNewsPage(ZTContentListRequest ztContentListRequest);
/**
- * 鍐呭鍒嗕韩
- * @param userId
- * @param userType
- * @param articleId
+ * 涓彴 浜у搧鍒楄〃鎺ュ彛
+ * @param ztContentListRequest
+ * @return
*/
- void shareContent(Long userId,String userType,String articleId);
+ ZTBasePageResponse<ZTProductInfoResponse> getZhongTaiProductPage(ZTContentListRequest ztContentListRequest);
+
+ /**
+ * 涓彴 瀹炴櫙妗堜緥鎺ュ彛
+ * @param ztContentListRequest
+ * @return
+ */
+ ZTBasePageResponse<ZTRealcaseInfoResponse> getZhongTaiRealcasePage(ZTContentListRequest ztContentListRequest);
+
+ /**
+ * 涓彴 瑙嗛鍒楄〃鍒嗛〉
+ * @param ztContentListRequest
+ * @return
+ */
+ ZTBasePageResponse<ZTVideoInfoResponse> getZhongTaiVideoPage(ZTContentListRequest ztContentListRequest);
+
+ /**
+ * 涓彴 鍏ㄥ眿妗堜緥鍒楄〃鍒嗛〉
+ * @param ztContentListRequest
+ * @return
+ */
+ ZTBasePageResponse<ZTCaseInfoResponse> getZhongTaiWholecasePage(ZTContentListRequest ztContentListRequest);
+
+ /**
+ * 涓彴 蹇楄瑁呬慨
+ * @param ztContentListRequest
+ * @return
+ */
+ ZTBasePageResponse<ZTZbDecoInfoResponse> getZhongTaiZbDecoPage(ZTContentListRequest ztContentListRequest);
/**
- * 鍐呭娴忚
- * @param userId
+ * 涓彴 - 浜у搧璇︽儏
+ * @param id
* @param userType
- * @param articleId
+ * @param userId
+ * @return
*/
- void viewContent(Long userId,String userType,String articleId);
+ ZTProductInfoResponse getProductInfo(String id,String userType,Long userId);
+
+ /**
+ * 涓彴 - 鍏ㄥ眿璧勮璇︽儏
+ * @param id
+ * @param userType
+ * @param userId
+ * @return
+ */
+ ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId);
+
+ /**
+ * 涓彴 - 浜у搧璧勮璇︽儏
+ * @param id
+ * @param userType
+ * @param userId
+ * @return
+ */
+ ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId);
+
+ /**
+ * 涓彴 - 瀹炴櫙妗堜緥
+ * @param id
+ * @param userType
+ * @param userId
+ * @return
+ */
+ ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId);
+
}
diff --git a/server/service/src/main/java/com/doumee/service/business/InitService.java b/server/service/src/main/java/com/doumee/service/business/InitService.java
index 3ac4288..8dc8c81 100644
--- a/server/service/src/main/java/com/doumee/service/business/InitService.java
+++ b/server/service/src/main/java/com/doumee/service/business/InitService.java
@@ -36,6 +36,7 @@
redisTemplate.opsForValue().set(Constants.RedisKeys.IAM_APPKEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_APPKEY).getCode());
redisTemplate.opsForValue().set(Constants.RedisKeys.IAM_APPID,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_APPID).getCode());
redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_KEY).getCode());
+ redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_POSTCUS_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_POSTCUS_API_KEY).getCode());
redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_AUTH_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_AUTH_API_KEY).getCode());
redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL).getCode());
redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_SMS_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_SMS_API_URL).getCode());
diff --git a/server/service/src/main/java/com/doumee/service/business/MemberService.java b/server/service/src/main/java/com/doumee/service/business/MemberService.java
index 2f77677..5e9279f 100644
--- a/server/service/src/main/java/com/doumee/service/business/MemberService.java
+++ b/server/service/src/main/java/com/doumee/service/business/MemberService.java
@@ -1,5 +1,6 @@
package com.doumee.service.business;
+import com.doumee.biz.zbom.model.zhongtai.ZTBaseRequst;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Member;
@@ -104,7 +105,7 @@
* @param code
* @return
*/
- AccountResponse wxLogin(String code);
+ AccountResponse wxLogin(String code,String iamId);
/**
* 鑾峰彇鎵嬫満鍙�
@@ -134,11 +135,6 @@
* 鐢ㄦ埛娉ㄩ攢
* @param memberId
*/
- void logOff(Long memberId);
+ ZTBaseRequst logOff(Long memberId);
-
- /**
- * 鏇存柊瀹㈡埛绔皬绋嬪簭Token
- */
- void updWxMiniToken();
}
diff --git a/server/service/src/main/java/com/doumee/service/business/NewsService.java b/server/service/src/main/java/com/doumee/service/business/NewsService.java
index 6943e09..d534900 100644
--- a/server/service/src/main/java/com/doumee/service/business/NewsService.java
+++ b/server/service/src/main/java/com/doumee/service/business/NewsService.java
@@ -3,6 +3,8 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.News;
+import com.doumee.dao.web.response.DailyUpdatesResponse;
+
import java.util.List;
/**
@@ -94,4 +96,31 @@
* @return long
*/
long count(News news);
+
+ /**
+ * 瀹氬埗鏈嶅姟鍒楄〃
+ * @return
+ */
+ List<News> getCustomizedNewsList(Integer type,Integer num,Integer fileType);
+
+
+ /**
+ * 瀹氬埗鏈嶅姟淇℃伅璇︽儏 澧炲姞娴忚閲�
+ * @param id
+ * @return
+ */
+ News getCustomizedNewsDetail(Long id);
+
+ /**
+ * 鑾峰彇姣忔棩涓婃柊鏁版嵁
+ * @return
+ */
+ DailyUpdatesResponse getDailyUpdatesResponse(Integer fileType);
+
+ /**
+ * 淇濆瓨鎺ㄥ箍鍜ㄨ鍒嗕韩璁板綍
+ * @param id
+ * @param userId
+ */
+ void saveShareRecord(Long id,Long userId);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/UsersService.java b/server/service/src/main/java/com/doumee/service/business/UsersService.java
index 3246a6a..c376519 100644
--- a/server/service/src/main/java/com/doumee/service/business/UsersService.java
+++ b/server/service/src/main/java/com/doumee/service/business/UsersService.java
@@ -4,6 +4,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.model.Users;
+import com.doumee.dao.web.reqeust.ContentShareImgDto;
import com.doumee.dao.web.reqeust.EditUsersRequest;
import com.doumee.dao.web.response.AccountResponse;
import org.springframework.web.multipart.MultipartFile;
@@ -108,14 +109,13 @@
String importBatch(MultipartFile file);
- Users usersDetail(Long userId);
+ Users usersDetailByIamId(String iamId);
+
+ Users usersDetailById(Long id);
String getUserCard(Users users);
void editUserInfo(EditUsersRequest editUsersRequest);
- /**
- * 鏇存柊鍛樺伐绔皬绋嬪簭Token
- */
- void updWxMiniToken();
+ String getContentShareImg(Users loginUserInfo, ContentShareImgDto param);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ActionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ActionsServiceImpl.java
index 94ab088..e0b089a 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ActionsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ActionsServiceImpl.java
@@ -2,6 +2,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.ActionsMapper;
import com.doumee.dao.business.model.Actions;
@@ -15,6 +16,7 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import java.util.Date;
import java.util.List;
/**
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java
index 3f22e36..0afa131 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java
@@ -20,10 +20,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -216,8 +218,26 @@
List<BjParam> bjParamList = bjParamMapper.selectList(new QueryWrapper<BjParam>()
.lambda().eq(BjParam::getIsdeleted,Constants.ZERO));
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(bjParamList)){
- List<BjParam> roughList = bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")).collect(Collectors.toList());
- List<BjParam> exquisiteList = bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"")).collect(Collectors.toList());
+ List<BjParam> roughList = bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")&& StringUtils.isEmpty(i.getParentId())).collect(Collectors.toList());
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(roughList)){
+ for (BjParam bjParam:roughList) {
+ bjParam.setChildren(
+ bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")
+ && Objects.nonNull(i.getParentId())
+ && i.getParentId().equals(bjParam.getId())).collect(Collectors.toList())
+ );
+ }
+ }
+ List<BjParam> exquisiteList = bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"")&& StringUtils.isEmpty(i.getParentId())).collect(Collectors.toList());
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(exquisiteList)){
+ for (BjParam bjParam:exquisiteList) {
+ bjParam.setChildren(
+ bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"")
+ && Objects.nonNull(i.getParentId())
+ && i.getParentId().equals(bjParam.getId())).collect(Collectors.toList())
+ );
+ }
+ }
bjParamConfigResponse.setRoughList(roughList);
bjParamConfigResponse.setExquisiteList(exquisiteList);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CategorySegServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CategorySegServiceImpl.java
index 36afa7f..a5a95be 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CategorySegServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CategorySegServiceImpl.java
@@ -160,6 +160,9 @@
if (pageWrap.getModel().getScode() != null) {
queryWrapper.lambda().eq(CategorySeg::getScode, pageWrap.getModel().getScode());
}
+ if (pageWrap.getModel().getOrgId() != null) {
+ queryWrapper.lambda().eq(CategorySeg::getOrgId, pageWrap.getModel().getOrgId());
+ }
for(PageWrap.SortData sortData: pageWrap.getSorts()) {
if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
queryWrapper.orderByDesc(sortData.getProperty());
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CrmInterfaceLogServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CrmInterfaceLogServiceImpl.java
index bc518e9..4189d77 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CrmInterfaceLogServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CrmInterfaceLogServiceImpl.java
@@ -5,6 +5,7 @@
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.CrmInterfaceLogMapper;
import com.doumee.dao.business.model.CrmInterfaceLog;
+import com.doumee.dao.business.model.IamInterfaceLog;
import com.doumee.service.business.CrmInterfaceLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -139,13 +140,7 @@
if (pageWrap.getModel().getObjId() != null) {
queryWrapper.lambda().eq(CrmInterfaceLog::getObjId, pageWrap.getModel().getObjId());
}
- for(PageWrap.SortData sortData: pageWrap.getSorts()) {
- if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
- queryWrapper.orderByDesc(sortData.getProperty());
- } else {
- queryWrapper.orderByAsc(sortData.getProperty());
- }
- }
+ queryWrapper.lambda().orderByDesc(CrmInterfaceLog::getCreateDate);
return PageData.from(crmInterfaceLogMapper.selectPage(page, queryWrapper));
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CustomerLogServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CustomerLogServiceImpl.java
index 41dacb0..5e73a02 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CustomerLogServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CustomerLogServiceImpl.java
@@ -1,22 +1,26 @@
package com.doumee.service.business.impl;
+import com.doumee.biz.zbom.ZbomCRMService;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.CustomerLogMapper;
-import com.doumee.dao.business.model.CustomerLog;
-import com.doumee.dao.business.model.IamInterfaceLog;
-import com.doumee.dao.business.model.InterfaceLog;
+import com.doumee.dao.business.model.*;
import com.doumee.service.business.CustomerLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
+import java.util.Objects;
/**
* 瀹㈡埛鐣欒祫璁板綍淇℃伅琛⊿ervice瀹炵幇
@@ -28,6 +32,8 @@
@Autowired
private CustomerLogMapper customerLogMapper;
+ @Autowired
+ private ZbomCRMService zbomCRMService;
@Override
public Long create(CustomerLog customerLog) {
@@ -60,6 +66,37 @@
}
@Override
+ public void reSubmit(CustomerLog customerLog){
+ CustomerLog log = customerLogMapper.selectById(customerLog.getId());
+ if(log ==null || Constants.equalsInteger(log.getIsdeleted(),Constants.ONE)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(Constants.equalsInteger(log.getCrmStatus(),Constants.ONE)){
+ //濡傛灉宸茬粡鎻愪氦鎴愬姛杩�
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ暀璧勬暟鎹凡鎻愪氦锛屾棤闇�閲嶆柊鎻愪氦锛�");
+ }
+ zbomCRMService.dealCustomerLogData(log);
+ }
+ @Override
+ public void reSubmitAll(CustomerLog log){
+ List<CustomerLog> logList = customerLogMapper.selectList(new QueryWrapper<CustomerLog>()
+ .lambda()
+ .eq(CustomerLog::getIsdeleted,Constants.ZERO)
+ .eq(log.getCrmStatus()!=null,CustomerLog::getCrmStatus,log.getCrmStatus())
+ .ne(CustomerLog::getCrmStatus,Constants.ONE));
+ if(logList ==null || logList.size() ==0){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝涓嶅瓨鍦ㄥ緟澶勭悊鏁版嵁");
+ }
+ if(Constants.equalsInteger(log.getCrmStatus(),Constants.ONE)){
+ //濡傛灉宸茬粡鎻愪氦鎴愬姛杩�
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ暀璧勬暟鎹凡鎻愪氦锛屾棤闇�閲嶆柊鎻愪氦锛�");
+ }
+ for(CustomerLog model :logList){
+ zbomCRMService.dealCustomerLogData(model);
+ }
+ }
+
+ @Override
public void updateByIdInBatch(List<CustomerLog> customerLogs) {
if (CollectionUtils.isEmpty(customerLogs)) {
return;
@@ -85,110 +122,124 @@
QueryWrapper<CustomerLog> wrapper = new QueryWrapper<>(customerLog);
return customerLogMapper.selectList(wrapper);
}
-
@Override
public PageData<CustomerLog> findPage(PageWrap<CustomerLog> pageWrap) {
IPage<CustomerLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
- QueryWrapper<CustomerLog> queryWrapper = new QueryWrapper<>();
+ MPJLambdaWrapper<CustomerLog> queryWrapper = new MPJLambdaWrapper<>();
Utils.MP.blankToNull(pageWrap.getModel());
+ queryWrapper.selectAll(CustomerLog.class)
+ .leftJoin(Customer.class,Customer::getId,CustomerLog::getCostomerId)
+ .eq(CustomerLog::getIsdeleted, Constants.ZERO)
+ .eq(Objects.nonNull(pageWrap.getModel().getType()),CustomerLog::getType, pageWrap.getModel().getType())
+ .eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Customer::getMemberId, pageWrap.getModel().getMemberId());
+
if (pageWrap.getModel().getId() != null) {
- queryWrapper.lambda().eq(CustomerLog::getId, pageWrap.getModel().getId());
+ queryWrapper.eq(CustomerLog::getId, pageWrap.getModel().getId());
}
if (pageWrap.getModel().getCreator() != null) {
- queryWrapper.lambda().eq(CustomerLog::getCreator, pageWrap.getModel().getCreator());
+ queryWrapper.eq(CustomerLog::getCreator, pageWrap.getModel().getCreator());
}
if (pageWrap.getModel().getCreateDate() != null) {
- queryWrapper.lambda().ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
- queryWrapper.lambda().le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
+ queryWrapper.ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
+ queryWrapper.le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
}
if (pageWrap.getModel().getEditor() != null) {
- queryWrapper.lambda().eq(CustomerLog::getEditor, pageWrap.getModel().getEditor());
+ queryWrapper.eq(CustomerLog::getEditor, pageWrap.getModel().getEditor());
}
if (pageWrap.getModel().getEditDate() != null) {
- queryWrapper.lambda().ge(CustomerLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
- queryWrapper.lambda().le(CustomerLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
+ queryWrapper.ge(CustomerLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
+ queryWrapper.le(CustomerLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
}
if (pageWrap.getModel().getIsdeleted() != null) {
- queryWrapper.lambda().eq(CustomerLog::getIsdeleted, pageWrap.getModel().getIsdeleted());
+ queryWrapper.eq(CustomerLog::getIsdeleted, pageWrap.getModel().getIsdeleted());
}
if (pageWrap.getModel().getRemark() != null) {
- queryWrapper.lambda().eq(CustomerLog::getRemark, pageWrap.getModel().getRemark());
+ queryWrapper.eq(CustomerLog::getRemark, pageWrap.getModel().getRemark());
}
if (pageWrap.getModel().getOrderDate() != null) {
- queryWrapper.lambda().eq(CustomerLog::getOrderDate, pageWrap.getModel().getOrderDate());
+ queryWrapper.eq(CustomerLog::getOrderDate, pageWrap.getModel().getOrderDate());
}
if (pageWrap.getModel().getPlaDate() != null) {
- queryWrapper.lambda().eq(CustomerLog::getPlaDate, pageWrap.getModel().getPlaDate());
+ queryWrapper.eq(CustomerLog::getPlaDate, pageWrap.getModel().getPlaDate());
}
if (pageWrap.getModel().getDesignType() != null) {
- queryWrapper.lambda().eq(CustomerLog::getDesignType, pageWrap.getModel().getDesignType());
+ queryWrapper.eq(CustomerLog::getDesignType, pageWrap.getModel().getDesignType());
}
if (pageWrap.getModel().getHouseStatus() != null) {
- queryWrapper.lambda().eq(CustomerLog::getHouseStatus, pageWrap.getModel().getHouseStatus());
+ queryWrapper.eq(CustomerLog::getHouseStatus, pageWrap.getModel().getHouseStatus());
}
if (pageWrap.getModel().getDistrict() != null) {
- queryWrapper.lambda().eq(CustomerLog::getDistrict, pageWrap.getModel().getDistrict());
+ queryWrapper.eq(CustomerLog::getDistrict, pageWrap.getModel().getDistrict());
}
if (pageWrap.getModel().getArea() != null) {
- queryWrapper.lambda().eq(CustomerLog::getArea, pageWrap.getModel().getArea());
+ queryWrapper.eq(CustomerLog::getArea, pageWrap.getModel().getArea());
}
if (pageWrap.getModel().getInfo() != null) {
- queryWrapper.lambda().eq(CustomerLog::getInfo, pageWrap.getModel().getInfo());
+ queryWrapper.eq(CustomerLog::getInfo, pageWrap.getModel().getInfo());
}
if (pageWrap.getModel().getCostomerId() != null) {
- queryWrapper.lambda().eq(CustomerLog::getCostomerId, pageWrap.getModel().getCostomerId());
+ queryWrapper.eq(CustomerLog::getCostomerId, pageWrap.getModel().getCostomerId());
}
if (pageWrap.getModel().getHouseType() != null) {
- queryWrapper.lambda().eq(CustomerLog::getHouseType, pageWrap.getModel().getHouseType());
+ queryWrapper.eq(CustomerLog::getHouseType, pageWrap.getModel().getHouseType());
}
if (pageWrap.getModel().getSex() != null) {
- queryWrapper.lambda().eq(CustomerLog::getSex, pageWrap.getModel().getSex());
+ queryWrapper.eq(CustomerLog::getSex, pageWrap.getModel().getSex());
}
if (pageWrap.getModel().getAgeInfo() != null) {
- queryWrapper.lambda().eq(CustomerLog::getAgeInfo, pageWrap.getModel().getAgeInfo());
+ queryWrapper.eq(CustomerLog::getAgeInfo, pageWrap.getModel().getAgeInfo());
}
if (pageWrap.getModel().getStyleInfo() != null) {
- queryWrapper.lambda().eq(CustomerLog::getStyleInfo, pageWrap.getModel().getStyleInfo());
+ queryWrapper.eq(CustomerLog::getStyleInfo, pageWrap.getModel().getStyleInfo());
}
if (pageWrap.getModel().getProvinceName() != null) {
- queryWrapper.lambda().like(CustomerLog::getProvinceName, pageWrap.getModel().getProvinceName());
+ queryWrapper.like(CustomerLog::getProvinceName, pageWrap.getModel().getProvinceName());
}
if (pageWrap.getModel().getCityName() != null) {
- queryWrapper.lambda().like(CustomerLog::getCityName, pageWrap.getModel().getCityName());
+ queryWrapper.like(CustomerLog::getCityName, pageWrap.getModel().getCityName());
}
if (pageWrap.getModel().getProvicneCode() != null) {
- queryWrapper.lambda().eq(CustomerLog::getProvicneCode, pageWrap.getModel().getProvicneCode());
+ queryWrapper.eq(CustomerLog::getProvicneCode, pageWrap.getModel().getProvicneCode());
}
if (pageWrap.getModel().getCityCode() != null) {
- queryWrapper.lambda().eq(CustomerLog::getCityCode, pageWrap.getModel().getCityCode());
+ queryWrapper.eq(CustomerLog::getCityCode, pageWrap.getModel().getCityCode());
}
if (pageWrap.getModel().getPhone() != null) {
- queryWrapper.lambda().like(CustomerLog::getPhone, pageWrap.getModel().getPhone());
+ queryWrapper.like(CustomerLog::getPhone, pageWrap.getModel().getPhone());
}
if (pageWrap.getModel().getType() != null) {
- queryWrapper.lambda().eq(CustomerLog::getType, pageWrap.getModel().getType());
+ queryWrapper.eq(CustomerLog::getType, pageWrap.getModel().getType());
}
if (pageWrap.getModel().getBudget() != null) {
- queryWrapper.lambda().eq(CustomerLog::getBudget, pageWrap.getModel().getBudget());
+ queryWrapper.eq(CustomerLog::getBudget, pageWrap.getModel().getBudget());
}
if (pageWrap.getModel().getCrmStatus() != null) {
- queryWrapper.lambda().eq(CustomerLog::getCrmStatus, pageWrap.getModel().getCrmStatus());
+ queryWrapper.eq(CustomerLog::getCrmStatus, pageWrap.getModel().getCrmStatus());
}
if (pageWrap.getModel().getCrmDate() != null) {
- queryWrapper.lambda().ge(CustomerLog::getCrmDate, Utils.Date.getStart(pageWrap.getModel().getCrmDate()));
- queryWrapper.lambda().le(CustomerLog::getCrmDate, Utils.Date.getEnd(pageWrap.getModel().getCrmDate()));
+ queryWrapper.ge(CustomerLog::getCrmDate, Utils.Date.getStart(pageWrap.getModel().getCrmDate()));
+ queryWrapper.le(CustomerLog::getCrmDate, Utils.Date.getEnd(pageWrap.getModel().getCrmDate()));
}
if (pageWrap.getModel().getCrmInfo() != null) {
- queryWrapper.lambda().eq(CustomerLog::getCrmInfo, pageWrap.getModel().getCrmInfo());
+ queryWrapper.eq(CustomerLog::getCrmInfo, pageWrap.getModel().getCrmInfo());
}
if (pageWrap.getModel().getQueryStartDate() != null) {
- queryWrapper.lambda().ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getQueryStartDate()));
+ queryWrapper.ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getQueryStartDate()));
}
if (pageWrap.getModel().getQueryEndDate() != null) {
- queryWrapper.lambda().le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getQueryEndDate()));
+ queryWrapper.le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getQueryEndDate()));
}
- queryWrapper.lambda().orderByDesc(CustomerLog::getCreateDate);
- return PageData.from(customerLogMapper.selectPage(page, queryWrapper));
+
+ queryWrapper.orderByDesc(CustomerLog::getCreateDate);
+ PageData<CustomerLog> pageData = PageData.from(customerLogMapper.selectJoinPage(page,CustomerLog.class, queryWrapper));
+ for (CustomerLog customerLog:pageData.getRecords()) {
+ if(Objects.nonNull(pageWrap.getModel().getIsHiddenPhone())&& Constants.equalsInteger(pageWrap.getModel().getIsHiddenPhone(),Constants.ZERO)){
+ customerLog.setPhone(
+ customerLog.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")
+ );
+ }
+ }
+ return pageData;
}
@Override
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CustomerServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CustomerServiceImpl.java
index 1416905..5fdc7af 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CustomerServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CustomerServiceImpl.java
@@ -191,13 +191,7 @@
if (pageWrap.getModel().getAreaCode() != null) {
queryWrapper.lambda().eq(Customer::getAreaCode, pageWrap.getModel().getAreaCode());
}
- for(PageWrap.SortData sortData: pageWrap.getSorts()) {
- if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
- queryWrapper.orderByDesc(sortData.getProperty());
- } else {
- queryWrapper.orderByAsc(sortData.getProperty());
- }
- }
+ queryWrapper.lambda().orderByDesc(Customer::getCreateDate );
return PageData.from(customerMapper.selectPage(page, queryWrapper));
}
@@ -245,6 +239,7 @@
customerLog.setIsdeleted(Constants.ZERO);
customerLog.setType(Constants.TWO);
customerLog.setCrmStatus(Constants.ZERO);
+ customerLog.setName(StringUtils.isEmpty(member.getName())?member.getNickname():member.getName());
customerLog.setPhone(customer.getPhone());
customerLog.setBudget(renovationCalculatorDTO.getBudget().multiply(new BigDecimal(10000)).toString());
customerLog.setHouseStatus(renovationCalculatorDTO.getHouseStatus());
@@ -277,7 +272,8 @@
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鐢ㄦ埛淇℃伅");
}
if(StringUtils.isEmpty(member.getPhone())){
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈巿鏉冩墜鏈哄彿");
+ member.setPhone(freeCustomizationDTO.getPhone());
+ memberMapper.updateById(member);
}
Customer customer = customerMapper.selectOne(new QueryWrapper<Customer>().lambda()
.eq(Customer::getPhone,freeCustomizationDTO.getPhone()).eq(Customer::getIsdeleted, Constants.ZERO).last("limit 1"));
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
index 00d2f47..d24c684 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CustomerUserServiceImpl.java
@@ -200,28 +200,34 @@
boolean hasMore = true;
int currentNum = 0;
Date cdate = new Date();
+ List<CRMDaogouBindListResponse> allList = new ArrayList<>();
while (hasMore){
try {
request.setPage(request.getPage()+1);
- currentNum += currentNum;
CRMBaseResponse<List<CRMDaogouBindListResponse>> response = zbomCRMService.getDaogouBindList(request);
if(response==null
|| !StringUtils.equals(response.getCode(), CRMConstants.CODE_SUCCESS)
|| response.getData() ==null
|| response.getData().size() ==0){
hasMore = false;
+ }else{
+ allList.addAll(response.getData());
+ currentNum += response.getTotal();
}
if(currentNum >= response.getTotal()){
hasMore = false;
}
- dealSyncDataBiz(cdate,response.getData());
}catch (Exception e){
hasMore = false;
}
}
+ dealSyncDataBiz(cdate,allList);
}
private void dealSyncDataBiz(Date date,List<CRMDaogouBindListResponse> list) {
+ if(list ==null && list.size()==0){
+ return;
+ }
List<CustomerUser> addList = new ArrayList<>();
List<String> phoneList = new ArrayList<>();
for(CRMDaogouBindListResponse data : list){
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/GetCrmDataServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/GetCrmDataServiceImpl.java
new file mode 100644
index 0000000..08026cc
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/service/business/impl/GetCrmDataServiceImpl.java
@@ -0,0 +1,73 @@
+package com.doumee.service.business.impl;
+
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.biz.zbom.ZbomCRMService;
+import com.doumee.biz.zbom.ZbomZhongTaiService;
+import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest;
+import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse;
+import com.doumee.biz.zbom.model.crm.response.CRMCustomerListResponse;
+import com.doumee.biz.zbom.model.zhongtai.*;
+import com.doumee.biz.zbom.model.zhongtai.response.*;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.dao.business.MemberMapper;
+import com.doumee.dao.business.UsersMapper;
+import com.doumee.dao.business.model.Users;
+import com.doumee.dao.web.response.ZTBaseInfoResponse;
+import com.doumee.service.business.GetCrmDataService;
+import com.doumee.service.business.GetZhongTaiDataService;
+import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2024/7/15 14:12
+ */
+@Service
+public class GetCrmDataServiceImpl implements GetCrmDataService {
+
+ @Autowired
+ private ZbomCRMService zbomCRMService;
+
+ @Autowired
+ private MemberMapper memberMapper;
+
+ @Autowired
+ private UsersMapper usersMapper;
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+ @Override
+ public CRMBaseResponse<List<CRMCustomerListResponse>> getCrmCustomerList(CrmCustomerListRequest crmCustomerListRequest){
+ if(Objects.isNull(crmCustomerListRequest)
+ || Objects.isNull(crmCustomerListRequest.getPage())
+ || Objects.isNull(crmCustomerListRequest.getPageSize())
+ || StringUtils.isBlank(crmCustomerListRequest.getFlag())
+ || Objects.isNull(crmCustomerListRequest.getUserId())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ Users users = usersMapper.selectById(crmCustomerListRequest.getUserId());
+ crmCustomerListRequest.setUserName(users.getIamUsername());
+ CRMBaseResponse<List<CRMCustomerListResponse>> crmBaseResponse = zbomCRMService.getCustomerList(crmCustomerListRequest);
+ if(Objects.isNull(crmBaseResponse)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"CRM鎺ュ彛璇锋眰澶辫触!");
+ }
+ return crmBaseResponse;
+ }
+
+
+
+
+
+
+}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
index e081da9..47b86ee 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
+import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomZhongTaiService;
@@ -7,15 +8,20 @@
import com.doumee.biz.zbom.model.zhongtai.response.*;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.IamInterfaceLogMapper;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.UsersMapper;
+import com.doumee.dao.business.model.Member;
import com.doumee.dao.web.response.ZTBaseInfoResponse;
import com.doumee.service.business.GetZhongTaiDataService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
+import com.google.gson.JsonArray;
import org.apache.commons.lang3.StringUtils;
import org.apache.xpath.operations.Bool;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -43,6 +49,9 @@
@Autowired
private SystemDictDataBiz systemDictDataBiz;
+ @Autowired
+ private RedisTemplate<String, Object> redisTemplate;
+
@Override
@@ -50,12 +59,6 @@
if(Objects.isNull(ztCatalogListRequest)
|| StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
- }
- if(ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.CHANPING)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZIXUN)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.QW_CASE)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍒嗙被淇℃伅閿欒");
}
return zbomZhongTaiService.getCatalogList(ztCatalogListRequest);
}
@@ -67,103 +70,19 @@
|| StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- if(ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.CHANPING)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZIXUN)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.QW_CASE)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍒嗙被淇℃伅閿欒");
- }
return zbomZhongTaiService.getTagList(ztCatalogListRequest);
}
- /**
- * 鑾峰彇鐖跺瓙绾х粨鏋勬暟鎹垪琛�
- * 蹇楄瑁呬慨 zb_deco 浜у搧 product_intro 璧勮product_info 鍏ㄥ眿妗堜緥 whole_case
- * 鑾峰彇鐖跺瓙绾х粨鏋勬暟鎹�
- * @return
- */
@Override
- public List<ZTCatalogInfoResponse> getZTCatalogInfoResponse(ZTCatalogListRequest ztCatalogListRequest){
- if(Objects.isNull(ztCatalogListRequest)
- || StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){
- throw new BusinessException(ResponseStatus.BAD_REQUEST);
- }
- if(ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.CHANPING)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZIXUN)
- ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.QW_CASE)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍒嗙被淇℃伅閿欒");
- }
- List<ZTCatalogInfoResponse> ztCatalogInfoResponseList = zbomZhongTaiService.getCatalogList(ztCatalogListRequest);
- if(CollectionUtils.isNotEmpty(ztCatalogInfoResponseList)){
- for (ZTCatalogInfoResponse ztCatalogInfoResponse:ztCatalogInfoResponseList) {
- ZTCatalogListRequest ztCatalogTagListRequest = new ZTCatalogListRequest();
- ztCatalogTagListRequest.setCatalogCode(ztCatalogInfoResponse.getCode());
- List<ZTTagInfoResponse> ztTagInfoResponseList = zbomZhongTaiService.getTagList(ztCatalogTagListRequest);
- if(CollectionUtils.isNotEmpty(ztCatalogInfoResponseList)){
- ztCatalogInfoResponse.setChildTagList(ztTagInfoResponseList);
- }
- }
- }
- return ztCatalogInfoResponseList;
- }
-
-
- /**
- * 鍐呭 鍒嗛〉鏁版嵁
- * @param ztContentListRequest
- * @return
- */
- @Override
- public ZTBasePageResponse<ZTContentListResponse> pageContentList(ZTContentListRequest ztContentListRequest){
- if(Objects.isNull(ztContentListRequest)
- || Objects.isNull(ztContentListRequest.getPageNum())
- || Objects.isNull(ztContentListRequest.getPageSize())
- || StringUtils.isBlank(ztContentListRequest.getCatalogCode())
- || StringUtils.isBlank(ztContentListRequest.getTagCodes())
- || StringUtils.isBlank(ztContentListRequest.getQuery())
- || StringUtils.isBlank(ztContentListRequest.getSortType())
- ){
- throw new BusinessException(ResponseStatus.BAD_REQUEST);
- }
- //鏌ヨ 涓彴
- ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
- Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
- ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
- String catalogCode = ztContentListRequest.getCatalogCode();
- if(catalogCode.equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
- ||catalogCode.equals(ZTConstants.CatalogCode.CHANPING)
- ||catalogCode.equals(ZTConstants.CatalogCode.ZIXUN)
- ||catalogCode.equals(ZTConstants.CatalogCode.QW_CASE)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍒嗙被淇℃伅閿欒");
- }
- ZTBasePageResponse<ZTContentListResponse> response = zbomZhongTaiService.pageContentList(ztContentListRequest);
- return response;
- }
-
-
-
- @Override
- public ZTContentInfoResponse getContentInfo(String id,String userType,Long userId){
- //鏌ヨ 涓彴 TOKEN
- ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
- ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest();
- ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
- ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
- ztContentListRequest.setId(id);
- ZTContentInfoResponse response = zbomZhongTaiService.getContentInfo(ztContentListRequest);
- return response;
- }
-
- @Override
- public void collectContent(Long userId,String userType,String articleId){
+ public void actionDo(Long userId,String userType,String articleId,String actionType){
ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
ZTActionDoRequest param = new ZTActionDoRequest();
param.setOpenId(ztBaseInfoResponse.getOpenId());
param.setUserType(userType);
param.setArticleId(articleId);
param.setToken(ztBaseInfoResponse.getToken());
+ param.setActionType(actionType);
ZTBaseResponse ztBaseResponse = zbomZhongTaiService.collectDo(param);
if(Objects.isNull(ztBaseResponse)){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴鎺ュ彛鍝嶅簲澶辫触");
@@ -175,62 +94,203 @@
}
@Override
- public void likeContent(Long userId,String userType,String articleId){
- ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
- ZTActionBatchDoRequest param = new ZTActionBatchDoRequest();
- param.setOpenId(ztBaseInfoResponse.getOpenId());
- param.setUserType(userType);
- param.setToken(ztBaseInfoResponse.getToken());
- List<ZTActionDoRequest> list = new ArrayList<>();
- ZTActionDoRequest ztActionDoRequest = new ZTActionDoRequest();
- ztActionDoRequest.setArticleId(articleId);
- param.setList(list);
- ZTBaseResponse ztBaseResponse = zbomZhongTaiService.likeDo(param);
- if(Objects.isNull(ztBaseResponse)){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴鎺ュ彛鍝嶅簲澶辫触");
+ public ZTBasePageResponse<ZTCusFavoritesInfoResponse> getZhongTaiCusFavorite(ZTContentListRequest ztContentListRequest){
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setOpenId(ztBaseInfoResponse.getOpenId());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse ztAreaTreeResponses = zbomZhongTaiService.pageCusFavoriteList(ztContentListRequest);
+ return ztAreaTreeResponses;
+ }
+
+
+
+
+ @Override
+ @Async
+ public void userLogout(ZTBaseRequst ztBaseRequst){
+ zbomZhongTaiService.userLogout(ztBaseRequst);
+ }
+
+ @Override
+ public List<ZTAreaTreeResponse> getZhongTaiAreaTree(ZTAreaListRequest ztAreaListRequest){
+ String data = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_AREA_REDIS_KEY);
+ List<ZTAreaTreeResponse> ztAreaTreeResponses = new ArrayList<>();
+ if(StringUtils.isBlank(data)){
+ ztAreaTreeResponses = zbomZhongTaiService.getAreaTreeList(ztAreaListRequest);
+ redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_AREA_REDIS_KEY,JSONArray.toJSONString(ztAreaTreeResponses));
}else{
- if(!ztBaseResponse.getSuccess()){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴璇锋眰淇℃伅寮傚父锛�"+ztBaseResponse.getMsg());
- }
+ ztAreaTreeResponses = JSONArray.parseArray(data,ZTAreaTreeResponse.class);
}
+ return ztAreaTreeResponses;
+ }
+
+ @Override
+ public List<ZTCusCarouselImageResponse> getZhongTaiCarouselImage(ZTContentListRequest ztContentListRequest){
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setOpenId(ztBaseInfoResponse.getOpenId());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ List<ZTCusCarouselImageResponse> ztCusCarouselImageResponseList = zbomZhongTaiService.carouselImageList(ztContentListRequest);
+ return ztCusCarouselImageResponseList;
+ }
+
+ @Override
+ public ZTCusCarouselImageResponse getZhongTaiCarouselImageDetail(ZTDataDetailRequest ztDataDetailRequest){
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,Long.valueOf(ztDataDetailRequest.getUserId()),ztDataDetailRequest.getUserType());
+ ztDataDetailRequest.setOpenId(ztBaseInfoResponse.getOpenId());
+ ztDataDetailRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTCusCarouselImageResponse ztCusCarouselImageResponse = zbomZhongTaiService.carouselImageDetail(ztDataDetailRequest);
+ return ztCusCarouselImageResponse;
+ }
+
+
+
+ @Override
+ public ZTBasePageResponse<ZTProductNewsInfoResponse> getZhongTaiProductNewsPage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTProductNewsInfoResponse> response = zbomZhongTaiService.pageProductNewsList(ztContentListRequest);
+ return response;
}
@Override
- public void shareContent(Long userId,String userType,String articleId){
- ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
- ZTActionDoRequest param = new ZTActionDoRequest();
- param.setArticleId(articleId);
- param.setOpenId(ztBaseInfoResponse.getOpenId());
- param.setUserType(userType);
- param.setToken(ztBaseInfoResponse.getToken());
- ZTBaseResponse ztBaseResponse = zbomZhongTaiService.shareDo(param);
- if(Objects.isNull(ztBaseResponse)){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴鎺ュ彛鍝嶅簲澶辫触");
- }else{
- if(!ztBaseResponse.getSuccess()){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴璇锋眰淇℃伅寮傚父锛�"+ztBaseResponse.getMsg());
- }
+ public ZTBasePageResponse<ZTProductInfoResponse> getZhongTaiProductPage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTProductInfoResponse> response = zbomZhongTaiService.pageProductList(ztContentListRequest);
+ return response;
}
@Override
- public void viewContent(Long userId,String userType,String articleId){
- ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
- ZTActionDoRequest param = new ZTActionDoRequest();
- param.setArticleId(articleId);
- param.setOpenId(ztBaseInfoResponse.getOpenId());
- param.setUserType(userType);
- param.setToken(ztBaseInfoResponse.getToken());
- ZTBaseResponse ztBaseResponse = zbomZhongTaiService.viewDo(param);
- if(Objects.isNull(ztBaseResponse)){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴鎺ュ彛鍝嶅簲澶辫触");
- }else{
- if(!ztBaseResponse.getSuccess()){
- throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"涓彴璇锋眰淇℃伅寮傚父锛�"+ztBaseResponse.getMsg());
- }
+ public ZTBasePageResponse<ZTRealcaseInfoResponse> getZhongTaiRealcasePage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTRealcaseInfoResponse> response = zbomZhongTaiService.pageRealcaseList(ztContentListRequest);
+ return response;
+ }
+
+
+ @Override
+ public ZTBasePageResponse<ZTVideoInfoResponse> getZhongTaiVideoPage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTVideoInfoResponse> response = zbomZhongTaiService.pageVideoList(ztContentListRequest);
+ return response;
+ }
+
+ @Override
+ public ZTBasePageResponse<ZTCaseInfoResponse> getZhongTaiWholecasePage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTCaseInfoResponse> response = zbomZhongTaiService.pageWholecaseList(ztContentListRequest);
+ return response;
+ }
+
+
+ @Override
+ public ZTBasePageResponse<ZTZbDecoInfoResponse> getZhongTaiZbDecoPage(ZTContentListRequest ztContentListRequest){
+ if(Objects.isNull(ztContentListRequest)
+ || Objects.isNull(ztContentListRequest.getPageNum())
+ || Objects.isNull(ztContentListRequest.getPageSize())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ //鏌ヨ 涓彴
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,
+ Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType());
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ZTBasePageResponse<ZTZbDecoInfoResponse> response = zbomZhongTaiService.pageZbDecoList(ztContentListRequest);
+ return response;
+ }
+
+
+ @Override
+ public ZTProductInfoResponse getProductInfo(String id,String userType,Long userId){
+ //鏌ヨ 涓彴 TOKEN
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
+ ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest();
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
+ ztContentListRequest.setId(id);
+ ZTProductInfoResponse response = zbomZhongTaiService.getProductInfo(ztContentListRequest);
+ return response;
+ }
+
+ @Override
+ public ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId){
+ //鏌ヨ 涓彴 TOKEN
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
+ ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest();
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
+ ztContentListRequest.setId(id);
+ ZTCaseInfoResponse response = zbomZhongTaiService.getWholecaseInfo(ztContentListRequest);
+ return response;
+ }
+
+ @Override
+ public ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId){
+ //鏌ヨ 涓彴 TOKEN
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
+ ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest();
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
+ ztContentListRequest.setId(id);
+ ZTProductNewsInfoResponse response = zbomZhongTaiService.getProductNewsInfo(ztContentListRequest);
+ return response;
+ }
+
+ @Override
+ public ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId){
+ //鏌ヨ 涓彴 TOKEN
+ ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType);
+ ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest();
+ ztContentListRequest.setToken(ztBaseInfoResponse.getToken());
+ ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
+ ztContentListRequest.setId(id);
+ ZTRealcaseInfoResponse response = zbomZhongTaiService.getRealcaseInfo(ztContentListRequest);
+ return response;
}
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 70150df..37739e1 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -2,13 +2,18 @@
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
-import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomZhongTaiService;
import com.doumee.biz.zbom.model.zhongtai.ZTBaseRequst;
+import com.doumee.biz.zbom.model.zhongtai.ZTConstants;
import com.doumee.biz.zbom.model.zhongtai.ZTUserGetTokenRequest;
import com.doumee.biz.zbom.model.zhongtai.ZTUserInfoUpdateRequest;
import com.doumee.biz.zbom.model.zhongtai.response.ZTBaseResponse;
+import com.doumee.biz.zbom.model.zhongtai.response.ZTSysuserGetTokenResponse;
import com.doumee.biz.zbom.model.zhongtai.response.ZTUserGetTokenResponse;
import com.doumee.config.Jwt.JwtPayLoad;
import com.doumee.config.Jwt.JwtTokenUtil;
@@ -16,48 +21,32 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
-import com.doumee.core.oss.FileModel;
import com.doumee.core.utils.CodeVerifyUtils;
import com.doumee.core.utils.Constants;
-import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.core.wx.WxMiniConfig;
import com.doumee.dao.business.CustomerUserMapper;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.UsersMapper;
import com.doumee.dao.business.model.CustomerUser;
-import com.doumee.dao.business.model.InterfaceLog;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.model.Users;
-import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.web.reqeust.EditMemberRequest;
import com.doumee.dao.web.reqeust.WxPhoneRequest;
import com.doumee.dao.web.response.AccountResponse;
import com.doumee.dao.web.response.ZTBaseInfoResponse;
-import com.doumee.service.business.CustomerService;
import com.doumee.service.business.MemberService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.chanjar.weixin.common.error.WxErrorException;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.Response;
-import org.apache.catalina.User;
import org.apache.commons.lang3.StringUtils;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
/**
* 鐢ㄦ埛淇℃伅琛⊿ervice瀹炵幇
@@ -277,16 +266,23 @@
@Override
- public AccountResponse wxLogin(String code){
+ public AccountResponse wxLogin(String code,String iamId){
try {
- //鑾峰彇寰俊鏁忔劅鏁版嵁
+// 鑾峰彇寰俊鏁忔劅鏁版嵁
WxMaJscode2SessionResult session = WxMiniConfig.wxCustomerService.getUserService().getSessionInfo(code);
String openId = session.getOpenid();
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(openId)) {
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鑾峰彇openid澶辫触锛佽鑱旂郴绠$悊鍛�");
}
+// String openId = code;
Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("OPENID", openId));
- String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_CUSTOMER).getCode();
+ Users users = new Users();
+ if(StringUtils.isBlank(iamId)){
+ users = usersMapper.selectOne(new QueryWrapper<Users>().lambda()
+ .eq(Users::getIamId,iamId)
+ .last("limit 1")
+ );
+ }
if (member == null) {
member = new Member();
member.setNickname("寰俊鐢ㄦ埛"+ CodeVerifyUtils.createVerificationCode(4));
@@ -294,23 +290,30 @@
member.setIsdeleted(Constants.ZERO);
member.setOpenid(openId);
member.setType(Constants.ZERO);
- member.setAuthStatus(Constants.ZERO);
- // ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto);
- // if(Objects.isNull(ztUserGetTokenResponse)){
- // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴鏈嶅姟璋冭捣澶辫触!");
- // }else{
- // member.setToken(ztUserGetTokenResponse.getToken());
- // }
+ //濡傛灉缁戝畾浜嗗璐� 鍒欑洿鎺ヤ娇鐢ㄥ凡缁戝畾瀵艰喘淇℃伅 璺宠繃鎵嬫満鍙风粦瀹氱殑鐘舵��
+ if(Objects.nonNull(users)){
+ member.setAuthStatus(Constants.TWO);
+ }else{
+ member.setAuthStatus(Constants.ZERO);
+ }
+ ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member);
+ if(Objects.isNull(ztUserGetTokenResponse)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴鏈嶅姟璋冭捣澶辫触!");
+ }else{
+ member.setToken(ztUserGetTokenResponse.getToken());
+ }
memberMapper.insert(member);
- member = this.getMemberInfo(member.getId());
+ this.saveCustomerUser(users,member.getId());
}else{
- // ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto);
- // if(Objects.isNull(ztUserGetTokenResponse)){
- // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴鏈嶅姟璋冭捣澶辫触!");
- // }else{
- // member.setToken(ztUserGetTokenResponse.getToken());
- // }
+ ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member);
+ if(Objects.isNull(ztUserGetTokenResponse)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴鏈嶅姟璋冭捣澶辫触!");
+ }else{
+ member.setToken(ztUserGetTokenResponse.getToken());
+ }
+ this.saveCustomerUser(users,member.getId());
member = this.getMemberInfo(member.getId());
+
}
//鍒涘缓token
JwtPayLoad payLoad = new JwtPayLoad(member.getId(),Constants.ZERO);
@@ -325,6 +328,29 @@
}
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"寰俊鐧诲綍寮傚父锛佽鑱旂郴绠$悊鍛�");
}
+
+ public void saveCustomerUser(Users users,Long memberId){
+ if(!(Objects.nonNull(users)&&Objects.nonNull(memberId))){
+ return;
+ }
+ if( customerUserMapper.selectCount(new QueryWrapper<CustomerUser>().lambda()
+ .eq(CustomerUser::getIsdeleted,Constants.ZERO)
+ .eq(CustomerUser::getUserId,users.getId())
+ .eq(CustomerUser::getMemberId,memberId)) <= Constants.ZERO ){
+ CustomerUser customerUser = new CustomerUser();
+ customerUser.setUserId(users.getId());
+ customerUser.setCreateDate(new Date());
+ customerUser.setMemberId(memberId);
+ customerUser.setPhone(users.getPhone());
+ customerUser.setIamUserId(users.getIamId());
+ customerUser.setName(users.getName());
+ customerUser.setUsername(users.getIamUsername());
+ customerUser.setAddr(users.getShopAddress());
+ customerUserMapper.insert(customerUser);
+ //TODO 绛夊緟璋冭捣涓彴鎺ュ彛
+ }
+ }
+
@Override
public String getWxMiniPhone(WxPhoneRequest wxPhoneRequest){
@@ -399,7 +425,7 @@
ztUserInfoUpdateRequest.setPlatform(Constants.PLATFORM);
ztUserInfoUpdateRequest.setPhone(member.getPhone());
ztUserInfoUpdateRequest.setName(member.getNickname());
- ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
+// ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName());
ztUserInfoUpdateRequest.setFullAddress(member.getAddress());
String prefix = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() +
systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER).getCode();
@@ -430,6 +456,15 @@
String prefix = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() +
systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER).getCode();
member.setPrefix(prefix);
+ if( customerUserMapper.selectCount(new QueryWrapper<CustomerUser>().lambda().eq(CustomerUser::getIsdeleted,Constants.ZERO).eq(CustomerUser::getMemberId,member.getId()))>0){
+ member.setAuthStatus(Constants.TWO);
+ }else{
+ if(StringUtils.isBlank(member.getPhone())){
+ member.setAuthStatus(Constants.ZERO);
+ }else{
+ member.setAuthStatus(Constants.ONE);
+ }
+ }
return member;
}
@@ -439,12 +474,12 @@
public static ZTBaseInfoResponse getZTToken(ZbomZhongTaiService zbomZhongTaiService,
MemberMapper memberMapper, UsersMapper usersMapper, SystemDictDataBiz systemDictDataBiz, Long id, String userType){
ZTBaseInfoResponse ztBaseInfoResponse = new ZTBaseInfoResponse();
- if(userType.equals(Constants.CUSTOMER)){
+ if(userType.equals(ZTConstants.CUSTOMER)){
Member member = memberMapper.selectById(id);
if(Objects.isNull(member)){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- ztBaseInfoResponse.setUserType(Constants.CUSTOMER);
+ ztBaseInfoResponse.setUserType(ZTConstants.CUSTOMER);
ztBaseInfoResponse.setOpenId(member.getOpenid());
//濡傛灉鏃犳湁鏁堟湡/宸茶繃鏈� 閲嶆柊鑾峰彇
if(Objects.isNull(member.getTokenDate()) || member.getTokenDate().getTime()<=System.currentTimeMillis() ){
@@ -455,24 +490,25 @@
param.setOpenId(member.getOpenid());
ZTUserGetTokenResponse ztUserGetTokenResponse = zbomZhongTaiService.getUserToken(param);
if(Objects.nonNull(ztUserGetTokenResponse)){
+// Date date =new Date(System.currentTimeMillis()+(Constants.formatLongNum(ztUserGetTokenResponse.getExpire())<=0?2*60*60*1000:ztUserGetTokenResponse.getExpire()*1000));
member.setToken(ztUserGetTokenResponse.getToken());
- //TODO 鏆傛棤杩囨湡鏃ユ湡
- memberMapper.update(new UpdateWrapper<Member>().lambda().set(Member::getToken,ztUserGetTokenResponse.getToken())
+ memberMapper.update(new UpdateWrapper<Member>().lambda()
+ .set(Member::getToken,ztUserGetTokenResponse.getToken())
+// .set(Member::getTokenDate,date)//榛樿鏈夋晥鏈熶负涓ゅ皬鏃�
.eq(Member::getId,member.getId()));
ztBaseInfoResponse.setToken(ztUserGetTokenResponse.getToken());
- return ztBaseInfoResponse;
}else{
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴TOKEN鑾峰彇澶辫触锛岃鑱旂郴绠$悊鍛�");
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴TOKEN鑾峰彇澶辫触锛岃鑱旂郴绠$悊鍛�");
}
}
ztBaseInfoResponse.setToken(member.getToken());
return ztBaseInfoResponse;
- }else if(userType.equals(Constants.BUSINESS)){
+ }else if(userType.equals(ZTConstants.BUSINESS)){
Users users = usersMapper.selectById(id);
if(Objects.isNull(users)){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- ztBaseInfoResponse.setUserType(Constants.BUSINESS);
+ ztBaseInfoResponse.setUserType(ZTConstants.BUSINESS);
ztBaseInfoResponse.setOpenId(users.getOpenid());
if(Objects.isNull(users.getTokenDate()) || users.getTokenDate().getTime()<=System.currentTimeMillis() ){
ZTUserGetTokenRequest param = new ZTUserGetTokenRequest();
@@ -480,30 +516,32 @@
String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_CUSTOMER).getCode();
param.setAppId(appId);
param.setOpenId(users.getOpenid());
- ZTUserGetTokenResponse ztUserGetTokenResponse = zbomZhongTaiService.getUserToken(param);
+ ZTSysuserGetTokenResponse ztUserGetTokenResponse = zbomZhongTaiService.getSysuserToken(users.getPhone());
if(Objects.nonNull(ztUserGetTokenResponse)){
users.setToken(ztUserGetTokenResponse.getToken());
- //TODO 鏆傛棤杩囨湡鏃ユ湡
+ Date date =new Date(System.currentTimeMillis()+(Constants.formatLongNum(ztUserGetTokenResponse.getExpire())<=0?2*60*60*1000:ztUserGetTokenResponse.getExpire()*1000));
usersMapper.update(new UpdateWrapper<Users>().lambda().set(Users::getToken,ztUserGetTokenResponse.getToken())
+ .set(Users::getTokenDate,date)//榛樿鏈夋晥鏈熶负涓ゅ皬鏃�
.eq(Users::getId,users.getId()));
ztBaseInfoResponse.setToken(ztUserGetTokenResponse.getToken());
return ztBaseInfoResponse;
}else{
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴TOKEN鑾峰彇澶辫触锛岃鑱旂郴绠$悊鍛�");
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴TOKEN鑾峰彇澶辫触锛岃鑱旂郴绠$悊鍛�");
}
}
ztBaseInfoResponse.setToken(users.getToken());
- return ztBaseInfoResponse;
+// return ztBaseInfoResponse;
}else{
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍙傛暟閿欒");
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍙傛暟閿欒");
}
+ return ztBaseInfoResponse;
}
@Override
- public void logOff(Long memberId){
+ public ZTBaseRequst logOff(Long memberId){
Member member = memberMapper.selectById(memberId);
if(Objects.isNull(member)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -512,40 +550,21 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢ㄦ埛宸叉敞閿�");
}
//鏍¢獙鐢ㄦ埛token淇℃伅
- MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,member.getId(),Constants.CUSTOMER);
+ MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,member.getId(),ZTConstants.CUSTOMER);
//璋冭捣涓彴娉ㄩ攢鎺ュ彛
ZTBaseRequst ztBaseRequst = new ZTBaseRequst();
- ztBaseRequst.setUserType(Constants.CUSTOMER);
+ ztBaseRequst.setUserType(ZTConstants.CUSTOMER);
ztBaseRequst.setOpenId(member.getOpenid());
ztBaseRequst.setToken(member.getToken());
- Boolean logoutFlag = zbomZhongTaiService.userLogout(ztBaseRequst);
- if(logoutFlag){
- memberMapper.update(new UpdateWrapper<Member>().lambda()
- .set(Member::getPhone,null)
- .set(Member::getEditDate,new Date())
- .eq(Member::getId,member.getId())
- );
- return;
- }
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓彴娉ㄩ攢澶辫触锛岃鑱旂郴绠$悊鍛�");
+ memberMapper.update(new UpdateWrapper<Member>().lambda()
+ .set(Member::getPhone,null)
+ .set(Member::getEditDate,new Date())
+ .eq(Member::getId,member.getId())
+ );
+ return ztBaseRequst;
}
- @Override
- public void updWxMiniToken(){
- DefaultWebSecurityManager manager = new DefaultWebSecurityManager();
- ThreadContext.bind(manager);
- String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_CUSTOMER).getCode();
- String appSecret = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_SECRET_CUSTOMER).getCode();
- //鐢熸垚寰俊token
- String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
- String response = Constants.doGet(url,null);
- JSONObject json = JSONObject.parseObject(response);
- SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_CUSTOMER);
- systemDictData.setCode(json.getString("access_token"));
- systemDictData.setUpdateTime(new Date());
- systemDictDataBiz.updateByIdNew(systemDictData);
- }
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/NewsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/NewsServiceImpl.java
index f51413f..f138695 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/NewsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/NewsServiceImpl.java
@@ -1,17 +1,23 @@
package com.doumee.service.business.impl;
import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.ActionsMapper;
import com.doumee.dao.business.MultifileMapper;
import com.doumee.dao.business.NewsMapper;
+import com.doumee.dao.business.model.Actions;
import com.doumee.dao.business.model.BjParam;
import com.doumee.dao.business.model.Multifile;
import com.doumee.dao.business.model.News;
import com.doumee.dao.system.model.SystemUser;
+import com.doumee.dao.web.response.DailyUpdatesResponse;
import com.doumee.service.business.NewsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -25,9 +31,9 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import javax.swing.*;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* 璧勮鍜屽畾鍒舵湇鍔′俊鎭〃Service瀹炵幇
@@ -43,6 +49,8 @@
private MultifileMapper multifileMapper;
@Autowired
private SystemDictDataBiz systemDictDataBiz;
+ @Autowired
+ private ActionsMapper actionsMapper;
@Override
@Transactional
@@ -55,6 +63,8 @@
param.setCreateDate(new Date());
param.setEditDate(param.getCreateDate());
param.setPublishUserid(param.getCreator());
+ param.setLookNum(Constants.ZERO);
+ param.setDonwloadNum(Constants.ZERO);
param.setFileType(Constants.formatIntegerNum(param.getFileType()));
newsMapper.insert(param);
if(param.getFileList()!=null && param.getFileList().size()>0){
@@ -242,6 +252,7 @@
if (pageWrap.getModel().getType() != null) {
queryWrapper.eq(News::getType, pageWrap.getModel().getType());
}
+ queryWrapper.orderByDesc(News::getCreateDate);
PageData<News> pageData = PageData.from(newsMapper.selectJoinPage(page, News.class,queryWrapper));
if(pageData!=null && pageData.getRecords()!=null && pageData.getRecords().size()>0){
@@ -318,4 +329,95 @@
QueryWrapper<News> wrapper = new QueryWrapper<>(news);
return newsMapper.selectCount(wrapper);
}
+
+
+ /**
+ * 鏌ヨ瀹氬埗鏈嶅姟鍒楄〃
+ * @return
+ */
+ @Override
+ public List<News> getCustomizedNewsList(Integer type,Integer num,Integer fileType){
+ List<News> list = newsMapper.selectList(new QueryWrapper<News>().lambda()
+ .eq(News::getIsdeleted,Constants.ZERO)
+ .eq(News::getType,type)
+ .eq(News::getStatus,Constants.ZERO)
+ .eq(Objects.nonNull(fileType),News::getFileType,fileType)
+ .last(Objects.nonNull(num),"limit " + num)
+ .orderByAsc(News::getSortnum)
+ );
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(list)){
+ List<Long> idList = list.stream().map(i->i.getId()).collect(Collectors.toList());
+ List<Multifile> files = dealMultifileList(idList);
+ for(News model : list){
+ setFilelistById(model,files);
+ }
+ }
+ return list;
+ }
+
+ @Override
+ public News getCustomizedNewsDetail(Long id){
+ News news = newsMapper.selectById(id);
+ if(Objects.isNull(news)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ List<Long> idList = new ArrayList<>();
+ idList.add(id);
+ List<Multifile> files = dealMultifileList(idList);
+ setFilelistById(news,files);
+ //澧炲姞娴忚閲�
+ newsMapper.update(new UpdateWrapper<News>().lambda()
+ .setSql( " LOOK_NUM = ( LOOK_NUM + 1 ) ").eq(News::getId,id));
+ return news;
+ }
+
+
+ /**
+ * 姣忔棩涓婃柊
+ * @return
+ */
+ @Override
+ public DailyUpdatesResponse getDailyUpdatesResponse(Integer fileType){
+ DailyUpdatesResponse dailyUpdatesResponse = new DailyUpdatesResponse();
+ dailyUpdatesResponse.setDailyUpdateNum(
+ newsMapper.selectCount(new QueryWrapper<News>().lambda()
+ .eq(News::getIsdeleted,Constants.ZERO)
+ .like(News::getCreateDate, DateUtil.getDateLong(new Date()))
+ .eq(News::getType,Constants.ONE)
+ ));
+ dailyUpdatesResponse.setShareNum(
+ actionsMapper.selectCount(new QueryWrapper<Actions>())
+ );
+ dailyUpdatesResponse.setNewsList(
+ this.getCustomizedNewsList(Constants.ZERO,Constants.THREE,fileType)
+ );
+ return dailyUpdatesResponse;
+ }
+
+ @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+ @Override
+ public void saveShareRecord(Long id,Long userId){
+ News news = newsMapper.selectById(id);
+ if(Objects.isNull(news)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ Actions actions = new Actions();
+ actions.setCreateDate(new Date());
+ actions.setIsDeleted(Constants.ZERO);
+ actions.setType(Constants.ZERO);
+ actions.setObjId(id);
+ actions.setObjType(Constants.ZERO);
+ actions.setMemberId(userId);
+ actions.setTitle(news.getTitle());
+ actions.setContent(news.getContent());
+ actions.setSubTitle(news.getSubTitle());
+ actionsMapper.insert(actions);
+ //澧炲姞鍒嗕韩閲�
+ newsMapper.update(new UpdateWrapper<News>().lambda()
+ .setSql( " DONWLOAD_NUM = ( DONWLOAD_NUM + 1 ) ").eq(News::getId,id));
+
+ }
+
+
+
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
index a7813f5..a556d35 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
@@ -41,6 +41,7 @@
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
+import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
@@ -904,23 +905,25 @@
}
IPage<Shop> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
MPJLambdaWrapper<Shop> queryWrapper = new MPJLambdaWrapper<>();
- queryWrapper.select("ID,NAME,ADDRESS,PROVINCE_NAME,CITY_NAME,AREA_NAME,TOWN,AREA_NAME,LEGAL_PHONE," +
- " CONVERT (ST_Distance_Sphere (point ("+pageWrap.getModel().getLongitude()+", "+pageWrap.getModel().getLatitude()+" ), point ( LONGITUDE, LATITUDE )) /1000,decimal(15,2)) as distance ")
+ queryWrapper.select("ID,NAME,ADDRESS,PROVINCE_NAME,CITY_NAME,AREA_NAME,TOWN,AREA_NAME,LEGAL_PHONE " +
+ " , (6371 * ACOS(COS(RADIANS("+pageWrap.getModel().getLatitude()+")) * COS(RADIANS(latitude)) * COS(RADIANS(longitude) - RADIANS("+pageWrap.getModel().getLongitude()+")) + SIN(RADIANS("+pageWrap.getModel().getLatitude()+")) * SIN(RADIANS(latitude)) ) ) as distance " )
.eq("isdeleted",Constants.ZERO)
.isNotNull("LATITUDE")
.isNotNull("LONGITUDE")
- .eq("ATTRIBUTE",Constants.ONE)
+ .eq("TYPE",Constants.TWO)
+ .eq("SECOND_TYPE",Constants.THREE)
+ .eq("STATUS",Constants.ONE)
.orderByAsc(" distance ");
Utils.MP.blankToNull(pageWrap.getModel());
PageData<Shop> pageData = PageData.from(shopMapper.selectPage(page, queryWrapper));
String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) +
StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode());
for (Shop shop:pageData.getRecords()) {
+ this.dealDistance(shop);
//鏌ヨ闂ㄥ簵涓嬪璐暟鎹�
List<Users> usersList =usersMapper.selectList(new QueryWrapper<Users>().lambda().eq(Users::getDepartmentId,shop.getId())
.eq(Users::getIsdeleted,Constants.ZERO)
.eq(Users::getStatus,Constants.ONE)
- .eq(Users::getType,Constants.ZERO)
);
for (Users users:usersList) {
if(StringUtils.isNotBlank(users.getImgurl())){
@@ -932,6 +935,29 @@
return pageData;
}
+ /**
+ * 澶勭悊闂ㄥ簵璺濈鏄剧ず
+ * @param shop
+ */
+ public void dealDistance(Shop shop){
+ if(Objects.isNull(shop.getDistance())){
+ shop.setDistanceStr("-");
+ }else{
+ //璺濈灏忎簬1鍏噷 鏄剧ず绫�
+ if(shop.getDistance().compareTo(BigDecimal.ONE)<Constants.ZERO){
+ BigDecimal distanceM = shop.getDistance().multiply(new BigDecimal(1000).setScale(0));
+ //100绫充箣鍐�
+ if(distanceM.compareTo(new BigDecimal(100))<0){
+ shop.setDistanceStr("<100绫�");
+ }else{
+ shop.setDistanceStr(distanceM.divide(BigDecimal.valueOf(1)).setScale(2,BigDecimal.ROUND_HALF_UP) + "m");
+ }
+ }else{
+ shop.setDistanceStr(shop.getDistance().divide(BigDecimal.valueOf(1)).setScale(2,BigDecimal.ROUND_HALF_UP) + "km");
+ }
+ }
+ }
+
@Override
public Shop shopDetail(Long id,Long memberId) {
QueryWrapper<Shop> queryWrapper = new QueryWrapper<Shop>();
@@ -939,8 +965,8 @@
Member member = memberMapper.selectById(memberId);
//濡傛灉浜哄憳娌℃湁缁忕含搴︿俊鎭紝鍒欎笉鏌ヨ璺濈
if(Objects.nonNull(member)&&Objects.nonNull(member.getLatitude())&&Objects.nonNull(member.getLongitude())){
- queryWrapper.select("ID,NAME,ADDRESS,PROVINCE_NAME,CITY_NAME,AREA_NAME,TOWN,AREA_NAME,LEGAL_PHONE," +
- " CONVERT (ST_Distance_Sphere (point ("+member.getLongitude()+", "+member.getLatitude()+" ), point ( LONGITUDE, LATITUDE )) /1000,decimal(15,2)) as distance ");
+ queryWrapper.select("ID,NAME,ADDRESS,PROVINCE_NAME,CITY_NAME,AREA_NAME,TOWN,AREA_NAME,LEGAL_PHONE " +
+ " , (6371 * ACOS(COS(RADIANS("+member.getLatitude()+")) * COS(RADIANS(latitude)) * COS(RADIANS(longitude) - RADIANS("+member.getLongitude()+")) + SIN(RADIANS("+member.getLatitude()+")) * SIN(RADIANS(latitude)) ) ) as distance " );
}
}
queryWrapper.eq("id",id);
@@ -953,8 +979,8 @@
List<Users> usersList =usersMapper.selectList(new QueryWrapper<Users>().lambda().eq(Users::getDepartmentId,shop.getId())
.eq(Users::getIsdeleted,Constants.ZERO)
.eq(Users::getStatus,Constants.ONE)
- .eq(Users::getType,Constants.ZERO)
);
+ this.dealDistance(shop);
for (Users users:usersList) {
if(StringUtils.isNotBlank(users.getImgurl())){
users.setImgurlFull(prefix + users.getImgurl());
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
index a4a01e9..9f68729 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
@@ -29,6 +29,7 @@
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.web.reqeust.EditUsersRequest;
+import com.doumee.dao.web.reqeust.ContentShareImgDto;
import com.doumee.dao.web.response.AccountResponse;
import com.doumee.service.business.UsersService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -51,6 +52,7 @@
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
+import java.awt.image.BufferedImage;
import java.io.InputStream;
import java.util.*;
import java.util.concurrent.Callable;
@@ -330,26 +332,26 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"褰撳墠璐︽埛宸插仠鐢紝璇疯仈绯荤鐞嗗憳");
}
//楠岃瘉鐭俊
- SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda()
- .eq(SmsEmail::getType, Constants.ZERO)
- .eq(SmsEmail::getPhone, phone)
- .eq(SmsEmail::getRemark, code)
- .eq(SmsEmail::getIsdeleted, Constants.ZERO)
- );
- if(model == null){
- throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佷笉姝g‘锛岃閲嶆柊鍙戦�佸啀璇曪紒");
- }
- if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){
- throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇曪紒");
- }
- model.setStatus(Constants.ONE);
- model.setEditDate(new Date());
- if(model.getCreateDate() !=null &&
- System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){
- smsEmailMapper.updateById(model);
- throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇晘");
- }
- smsEmailMapper.updateById(model);
+// SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda()
+// .eq(SmsEmail::getType, Constants.ZERO)
+// .eq(SmsEmail::getPhone, phone)
+// .eq(SmsEmail::getRemark, code)
+// .eq(SmsEmail::getIsdeleted, Constants.ZERO)
+// );
+// if(model == null){
+// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佷笉姝g‘锛岃閲嶆柊鍙戦�佸啀璇曪紒");
+// }
+// if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){
+// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇曪紒");
+// }
+// model.setStatus(Constants.ONE);
+// model.setEditDate(new Date());
+// if(model.getCreateDate() !=null &&
+// System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){
+// smsEmailMapper.updateById(model);
+// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇晘");
+// }
+// smsEmailMapper.updateById(model);
//鍒涘缓token
JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ONE);
String token = JwtTokenUtil.generateToken(payLoad);
@@ -621,6 +623,78 @@
}
+ @Override
+ public String getContentShareImg(Users users, ContentShareImgDto param){
+ if(StringUtils.isBlank(param.getImgurl())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+
+ String shareFolder = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.SHARES_FILE).getCode();
+ String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode();
+ if(param.getType() == 1){
+ //澶氬浘甯︿簩缁寸爜涓嬭浇
+ return dealShareImgWithUser(param,users,shareFolder,path);
+ }else{
+ return dealShareImgNoUser(param,users,shareFolder,path);
+ }
+ }
+
+ private String dealShareImgWithUser(ContentShareImgDto param, Users users, String shareFolder, String path) {
+ BufferedImage img1 =GeneratePicUtil.getImgIO(param.getImgurl());
+ if(img1 ==null){
+ return param.getImgurl();
+ }
+ /* if(img1.getWidth() <200 && img1.getHeight()<100){
+ return param.getImgurl();
+ }
+*/
+ String defualtHeader = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.USER_CARD_HEADER_IMG).getCode();
+ String imgurl =StringUtils.isNotBlank(users.getImgurl())?path+(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.USERS_FILE).getCode())+users.getImgurl():defualtHeader;
+ String url =null;
+ //鍐呭鍒嗕韩娴锋姤鍥剧墖
+ InputStream mpCode = Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(),
+ "userId="+users.getId()+"&articleId="+param.getArticleId(),
+ param.getPageUrl());//灏忕▼搴�
+
+ InputStream inputStream = GeneratePicUtil.generateShareWithUserImg(
+ img1
+ ,mpCode
+ ,imgurl
+ ,StringUtils.defaultString(users.getName(),"-"));
+ TyyZosUtil obs = new TyyZosUtil( systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ENDPOINT).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_ID).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_KEY).getCode());
+ String key = DateUtil.getNowShortDate()+"/"+UUID.randomUUID().toString() + ".jpg";
+ String fileName =shareFolder+ key;
+ if (obs.uploadInputstreamObject(inputStream,systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.BUCKETNAME).getCode(), fileName)) {
+ url = path+fileName;
+ }
+ return url;
+
+ }
+
+ private String dealShareImgNoUser(ContentShareImgDto param, Users users, String shareFolder, String path) {
+ String url =null;
+ //鍐呭鍒嗕韩娴锋姤鍥剧墖
+ InputStream mpCode = Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(),
+ "userId="+users.getId()+"&articleId="+param.getArticleId(),
+ param.getPageUrl());//灏忕▼搴�
+
+ String title = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.SHARE_HAIBAO_HEADER_TITLE).getCode();
+ InputStream inputStream = GeneratePicUtil.generateShareImg(
+ param.getImgurl()
+ ,mpCode
+ ,title);
+ TyyZosUtil obs = new TyyZosUtil( systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ENDPOINT).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_ID).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_KEY).getCode());
+ String key = DateUtil.getNowShortDate()+"/"+UUID.randomUUID().toString() + ".jpg";
+ String fileName =shareFolder+ key;
+ if (obs.uploadInputstreamObject(inputStream,systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.BUCKETNAME).getCode(), fileName)) {
+ url = path+fileName;
+ }
+ return url;
+ }
@Override
public String getUserCard(Users users){
@@ -664,11 +738,32 @@
}
@Override
- public Users usersDetail(Long userId){
- Users users = usersMapper.selectById(userId);
+ public Users usersDetailByIamId(String iamId){
+ Users users = usersMapper.selectOne(new QueryWrapper<Users>().lambda().eq(Users::getIamId,iamId).last("limit 1"));
if(Objects.isNull(users)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
+ if(!Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鐢ㄦ埛宸茬鐢�");
+ }
+ getUsersDetail(users);
+ return users;
+ }
+
+ @Override
+ public Users usersDetailById(Long id){
+ Users users = usersMapper.selectById(id);
+ if(Objects.isNull(users)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鐢ㄦ埛宸茬鐢�");
+ }
+ getUsersDetail(users);
+ return users;
+ }
+
+ public void getUsersDetail(Users users){
String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) +
StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode());
if(StringUtils.isNotBlank(users.getImgurl())){
@@ -695,7 +790,6 @@
}
}
}
- return users;
}
@@ -727,21 +821,7 @@
- @Override
- public void updWxMiniToken(){
- DefaultWebSecurityManager manager = new DefaultWebSecurityManager();
- ThreadContext.bind(manager);
- String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode();
- String appSecret = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_SECRET_PERSONNEL).getCode();
- //鐢熸垚寰俊token
- String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
- String response = Constants.doGet(url,null);
- JSONObject json = JSONObject.parseObject(response);
- SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_PERSONNEL);
- systemDictData.setCode(json.getString("access_token"));
- systemDictData.setUpdateTime(new Date());
- systemDictDataBiz.updateByIdNew(systemDictData);
- }
+
}
diff --git a/server/service/src/main/java/com/doumee/service/system/SystemDictService.java b/server/service/src/main/java/com/doumee/service/system/SystemDictService.java
index 074b1e1..cb60ca6 100644
--- a/server/service/src/main/java/com/doumee/service/system/SystemDictService.java
+++ b/server/service/src/main/java/com/doumee/service/system/SystemDictService.java
@@ -84,4 +84,5 @@
* @date 2023/03/21 14:49
*/
long count(SystemDict systemDict);
+
}
diff --git a/server/service/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java b/server/service/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java
index 4d6e880..b2b5789 100644
--- a/server/service/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java
@@ -1,5 +1,9 @@
package com.doumee.service.system.impl;
+import com.alibaba.fastjson.JSONObject;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.HttpsUtil;
+import com.doumee.dao.system.model.SystemDictData;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.doumee.core.model.PageData;
@@ -16,6 +20,7 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
+import java.util.Date;
import java.util.List;
/**
@@ -94,4 +99,5 @@
Wrapper<SystemDict> wrapper = new QueryWrapper<>(systemDict);
return systemDictMapper.selectCount(wrapper);
}
+
}
diff --git a/server/service/src/main/java/com/doumee/service/timer/QuartzJobService.java b/server/service/src/main/java/com/doumee/service/timer/QuartzJobService.java
index 4b218d8..a312bad 100644
--- a/server/service/src/main/java/com/doumee/service/timer/QuartzJobService.java
+++ b/server/service/src/main/java/com/doumee/service/timer/QuartzJobService.java
@@ -7,11 +7,13 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.timer.entity.JobState;
import com.doumee.dao.timer.entity.QuartzJob;
import com.doumee.dao.timer.mapper.QuartzJobMapper;
import com.doumee.dao.timer.scheduler.QuartzManage;
+import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -41,6 +43,7 @@
* 鏂板浠诲姟
*/
public int insert(QuartzJob quartzJob) {
+ quartzJob.setState(Constants.ZERO);
int flag = quartzJobMapper.insert(quartzJob) ;
if (flag > 0){
quartzManage.createJob(quartzJob) ;
diff --git a/server/web/src/main/java/com/doumee/api/ScheduleTool.java b/server/web/src/main/java/com/doumee/api/ScheduleTool.java
index 363cb0d..7923406 100644
--- a/server/web/src/main/java/com/doumee/api/ScheduleTool.java
+++ b/server/web/src/main/java/com/doumee/api/ScheduleTool.java
@@ -5,7 +5,6 @@
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.HttpsUtil;
-import com.doumee.core.wx.WXConstant;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.service.system.SystemDictDataService;
import lombok.extern.slf4j.Slf4j;
@@ -51,30 +50,6 @@
@Value("${debug_model}")
private Boolean timing;
- /**
- * 鏇存柊寰俊鍏紬鍙� ACCESS_TOKEN
- * @throws Exception
- */
- @Scheduled(fixedDelay=1000 * 60 * 90)
- public void updAccessToken(){
- DefaultSecurityManager securityManager = new DefaultSecurityManager();
- SecurityUtils.setSecurityManager(securityManager);
-
- String appId = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode();
- String appSecret = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode();
- //鐢熸垚寰俊token
- String url = WXConstant.GET_ACCESS_TOKEN_URL.replace("APPID",appId).replace("APPSECRET",appSecret);
- String response = HttpsUtil.get(url,false);
- JSONObject json = JSONObject.parseObject(response);
- System.out.println(json);
- SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN);
- if(!Objects.isNull(systemDictData)){
- systemDictData.setCode(json.getString("access_token"));
- systemDictData.setUpdateTime(new Date());
- systemDictDataService.updateById(systemDictData);
- log.info(" 鏇存柊寰俊鍏紬鍙� ACCESS_TOKEN =========> " + systemDictData.getCode() );
- }
- }
diff --git a/server/web/src/main/java/com/doumee/api/web/ApiController.java b/server/web/src/main/java/com/doumee/api/web/ApiController.java
index 969c732..64e7118 100644
--- a/server/web/src/main/java/com/doumee/api/web/ApiController.java
+++ b/server/web/src/main/java/com/doumee/api/web/ApiController.java
@@ -42,7 +42,6 @@
return request;
}
-
/**
* 鑾峰彇鐢ㄦ埛ID
*
@@ -75,7 +74,6 @@
Member user = memberService.findById(userId);
return user;
}
-
protected Long getUserType() {
Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserType);
diff --git a/server/web/src/main/java/com/doumee/api/web/CatalogApi.java b/server/web/src/main/java/com/doumee/api/web/CatalogApi.java
index 5926997..7d1264f 100644
--- a/server/web/src/main/java/com/doumee/api/web/CatalogApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CatalogApi.java
@@ -36,7 +36,6 @@
@Autowired
public SmsEmailService smsEmailService;
-
@ApiOperation(value = "C绔皬绋嬪簭-鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁", notes = "鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁")
@PostMapping("/getZSZXCatalogs")
public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() {
diff --git a/server/web/src/main/java/com/doumee/api/web/CommonApi.java b/server/web/src/main/java/com/doumee/api/web/CommonApi.java
index 3404a88..4fd3597 100644
--- a/server/web/src/main/java/com/doumee/api/web/CommonApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CommonApi.java
@@ -4,6 +4,7 @@
import com.doumee.biz.zbom.ZbomZhongTaiService;
import com.doumee.biz.zbom.model.zhongtai.ZTAreaListRequest;
import com.doumee.biz.zbom.model.zhongtai.response.ZTAreaInfoResponse;
+import com.doumee.biz.zbom.model.zhongtai.response.ZTAreaTreeResponse;
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
@@ -45,6 +46,9 @@
@Autowired
private ZbomZhongTaiService zbomZhongTaiService;
+ @Autowired
+ private GetZhongTaiDataService getZhongTaiDataService;
+
@ApiOperation(value = "鑾峰彇鍖哄垝淇℃伅", notes = "瀹㈡埛绔皬绋嬪簭")
@PostMapping("/getArea")
public ApiResponse<List<ZTAreaInfoResponse>> getArea(@RequestBody ZTAreaListRequest ztAreaListRequest) {
@@ -56,7 +60,17 @@
}
-
-
+ @ApiOperation(value = "鑾峰彇鍖哄垝鍏ㄩ噺鏍戝舰淇℃伅", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getAreaTree")
+ public ApiResponse<List<ZTAreaTreeResponse>> getAreaTree(@RequestBody ZTAreaListRequest ztAreaListRequest) {
+ if(StringUtils.isBlank(ztAreaListRequest.getPid())){
+ ztAreaListRequest.setPid("1");
+ }
+ if(StringUtils.isBlank(ztAreaListRequest.getLevel())){
+ ztAreaListRequest.setLevel("5");
+ }
+ List<ZTAreaTreeResponse> ztAreaInfoResponses = getZhongTaiDataService.getZhongTaiAreaTree(ztAreaListRequest);
+ return ApiResponse.success(ztAreaInfoResponses);
+ }
}
diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
index 747d3b4..da00ef7 100644
--- a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
@@ -2,16 +2,18 @@
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomCRMService;
+import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest;
+import com.doumee.biz.zbom.model.zhongtai.ZTConstants;
+import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest;
+import com.doumee.biz.zbom.model.zhongtai.ZTDataDetailRequest;
+import com.doumee.biz.zbom.model.zhongtai.response.*;
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
-import com.doumee.dao.business.model.CustomerLog;
-import com.doumee.dao.business.model.Member;
-import com.doumee.dao.business.model.Shop;
-import com.doumee.dao.business.model.Users;
+import com.doumee.dao.business.model.*;
import com.doumee.dao.web.reqeust.*;
import com.doumee.dao.web.response.AccountResponse;
import com.doumee.dao.web.response.BjParamConfigResponse;
@@ -30,7 +32,9 @@
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
+import java.beans.Customizer;
import java.io.InputStream;
+import java.util.List;
/**
* Created by IntelliJ IDEA.
@@ -45,7 +49,6 @@
@Slf4j
public class CustomerApi extends ApiController{
-
@Autowired
private MemberService memberService;
@@ -56,24 +59,39 @@
private CustomerService customerService;
@Autowired
- private ZbomCRMService zbomCRMService;
+ private GetZhongTaiDataService getZhongTaiDataService;
@Autowired
private ShopService shopService;
@Autowired
private UsersService usersService;
+ @Autowired
+ private ZbomCRMService zbomCRMService;
@Autowired
private CustomerUserService customerUserService;
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+ @Autowired
+ private CustomerLogService customerLogService;
+
+ @Autowired
+ private NewsService newsService;
+
+ @Autowired
+ private ActionsService actionsService;
@ApiOperation(value = "瀹㈡埛绔皬绋嬪簭鐧婚檰", notes = "瀹㈡埛绔皬绋嬪簭")
@GetMapping("/wxLoginCustomer")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "寰俊code", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "iamId", value = "瀵艰喘涓婚敭", required = false),
})
- public ApiResponse<AccountResponse> wxLoginCustomer(@RequestParam String code) {
- return ApiResponse.success(memberService.wxLogin(code));
+ public ApiResponse<AccountResponse> wxLoginCustomer(@RequestParam String code,String iamId) {
+ return ApiResponse.success(memberService.wxLogin(code,iamId));
}
@LoginRequired
@@ -156,7 +174,7 @@
public ApiResponse saveRenovationCalculator(@RequestBody RenovationCalculatorDTO renovationCalculatorDTO) {
renovationCalculatorDTO.setMemberId(getMemberId());
CustomerLog customerLog =customerService.saveRenovationCalculator(renovationCalculatorDTO);
-// zbomCRMService.dealCustomerLogData(customerLog);
+ zbomCRMService.dealCustomerLogData(customerLog);
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
@@ -170,11 +188,11 @@
public ApiResponse saveFreeCustomizationApply(@RequestBody FreeCustomizationDTO freeCustomizationDTO) {
freeCustomizationDTO.setMemberId(getMemberId());
CustomerLog customerLog = customerService.saveFreeCustomizationApply(freeCustomizationDTO);
-// zbomCRMService.dealCustomerLogData(customerLog);
+ zbomCRMService.dealCustomerLogData(customerLog);
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
- @LoginRequired
+ /* @LoginRequired
@ApiOperation(value = "娴嬭瘯瑁呬慨椋庢牸", notes = "瀹㈡埛绔皬绋嬪簭")
@PostMapping("/saveTestTrimStyle")
@ApiImplicitParams({
@@ -183,15 +201,15 @@
public ApiResponse saveTestTrimStyle(@RequestBody TestTrimStyleDTO testTrimStyleDTO) {
testTrimStyleDTO.setMemberId(getMemberId());
CustomerLog customerLog = customerService.saveTestTrimStyle(testTrimStyleDTO);
-// zbomCRMService.dealCustomerLogData(customerLog);
+ zbomCRMService.dealCustomerLogData(customerLog);
return ApiResponse.success("鎿嶄綔鎴愬姛");
- }
+ }*/
@LoginRequired
@ApiOperation(value = "鐢ㄦ埛娉ㄩ攢", notes = "瀹㈡埛绔皬绋嬪簭")
@GetMapping("/logOff")
public ApiResponse logOff() {
- memberService.logOff(getMemberId());
+ getZhongTaiDataService.userLogout(memberService.logOff(getMemberId()));
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
@@ -230,13 +248,13 @@
@LoginRequired
@ApiOperation(value = "瀵艰喘璇︽儏", notes = "瀹㈡埛绔皬绋嬪簭")
- @GetMapping("/usersDetail")
+ @GetMapping("/usersDetailByIamId")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
- @ApiImplicitParam(paramType = "query", dataType = "Long", name = "userId", value = "瀵艰喘涓婚敭", required = true)
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "iamId", value = "瀵艰喘IAM缂栫爜", required = true)
})
- public ApiResponse<Users> usersDetail (@RequestParam Long userId) {
- return ApiResponse.success(usersService.usersDetail(userId));
+ public ApiResponse<Users> usersDetailByIamId (@RequestParam String iamId) {
+ return ApiResponse.success(usersService.usersDetailByIamId(iamId));
}
@@ -247,13 +265,11 @@
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
})
public ApiResponse testToken () {
- memberService.updWxMiniToken();
+ systemDictDataBiz.updWxMiniToken();
return ApiResponse.success("鏇存柊鎴愬姛");
}
- @Autowired
- private SystemDictDataBiz systemDictDataBiz;
@LoginRequired
@ApiOperation(value = "鑾峰彇鍒嗕韩灏忕▼搴忎簩缁寸爜锛堝浘鐗囨祦锛宨mg鏍囩src鎸囧畾锛�", notes = "瀹㈡埛绔皬绋嬪簭")
@@ -274,6 +290,271 @@
}
}
+ @LoginRequired
+ @ApiOperation(value = "鎴戠殑棰勭害 鍒嗛〉鏌ヨ",notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/customerLogPage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<PageData<CustomerLog>> customerLogPage(@RequestBody PageWrap<CustomerLog> pageWrap) {
+ pageWrap.getModel().setCostomerId(getMemberId().toString());
+ pageWrap.getModel().setIsHiddenPhone(Constants.ZERO);
+ return ApiResponse.success(customerLogService.findPage(pageWrap));
+ }
+
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "鍒嗙被鏁版嵁 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getCatalogList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<ZTCatalogInfoResponse>> getCatalogList (@RequestBody ZTCatalogListRequest ztCatalogListRequest ) {
+ List<ZTCatalogInfoResponse> ztCatalogInfoResponseList = getZhongTaiDataService.getCatalogList(ztCatalogListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztCatalogInfoResponseList);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "鏍囩鏁版嵁 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getCataLogTagList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<ZTTagInfoResponse>> getCataLogTagList(@RequestBody ZTCatalogListRequest ztCatalogListRequest ) {
+ List<ZTTagInfoResponse> ztTagInfoResponseList = getZhongTaiDataService.getCataLogTagList(ztCatalogListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztTagInfoResponseList);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "琛屼负鍐呭鎺ュ彛 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/actionDo")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "鍐呭涓婚敭", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "actionType", value = "琛屼负绫诲瀷锛氭敹钘忥細collect;鍙栨秷鏀惰棌锛歝ollect_cancel;鍠滄锛歭ike;鍙栨秷鍠滄锛歭ike_cancel锛涙祻瑙堬細view;鍒嗕韩锛歴hare;涓嬭浇锛歞ownload", required = true),
+ })
+ public ApiResponse actionDo(@RequestParam String id,@RequestParam String actionType) {
+ getZhongTaiDataService.actionDo(getMemberId(),ZTConstants.CUSTOMER,id,actionType);
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "瀹氬埗鏈嶅姟鍒楄〃", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getCustomizedNewsList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<News>> getCustomizedNewsList() {
+ return ApiResponse.success("鏌ヨ鎴愬姛",newsService.getCustomizedNewsList(Constants.ONE,null,null));
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "瀹氬埗鏈嶅姟璇︽儏", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getCustomizedNewsDetail")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "Long", name = "id", value = "涓氬姟鏁版嵁涓婚敭", required = true),
+ })
+ public ApiResponse<News> getCustomizedNewsDetail(@RequestParam Long id) {
+ return ApiResponse.success("鏌ヨ鎴愬姛",newsService.getCustomizedNewsDetail(id));
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "淇濆瓨鎺ㄥ箍鍜ㄨ鍒嗕韩璁板綍", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/saveShareRecord")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "Long", name = "id", value = "鎺ㄥ箍鍜ㄨ涓婚敭", required = true),
+ })
+ public ApiResponse saveShareRecord(@RequestParam Long id) {
+ newsService.saveShareRecord(id,getMemberId());
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "鎴戠殑鍠滄鍒楄〃", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiCusFavorite")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTCusFavoritesInfoResponse>> getZhongTaiCusFavorite(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTCusFavoritesInfoResponse> ztBasePageResponse = getZhongTaiDataService.getZhongTaiCusFavorite(ztContentListRequest);
+ return ApiResponse.success("鑾峰彇鎴愬姛",ztBasePageResponse);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "杞挱鍥惧垪琛�", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiCarouselImage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<ZTCusCarouselImageResponse>> getZhongTaiCarouselImage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ List<ZTCusCarouselImageResponse> ztCusCarouselImageResponseList = getZhongTaiDataService.getZhongTaiCarouselImage(ztContentListRequest);
+ return ApiResponse.success("鑾峰彇鎴愬姛",ztCusCarouselImageResponseList);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "杞挱鍥捐鎯�", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiCarouselImageDetail")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTCusCarouselImageResponse> getZhongTaiCarouselImageDetail(@RequestBody ZTDataDetailRequest ztDataDetailRequest) {
+ ztDataDetailRequest.setUserId(getMemberId()+"");
+ ztDataDetailRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTCusCarouselImageResponse ztCusCarouselImageResponse = getZhongTaiDataService.getZhongTaiCarouselImageDetail(ztDataDetailRequest);
+ return ApiResponse.success("鑾峰彇鎴愬姛",ztCusCarouselImageResponse);
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "鍜ㄨ鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiProductNewsPage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTProductNewsInfoResponse>> getZhongTaiProductNewsPage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTProductNewsInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiProductNewsPage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "浜у搧鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiProductPage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTProductInfoResponse>> getZhongTaiProductPage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTProductInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiProductPage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "瀹炴櫙鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiRealcasePage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTRealcaseInfoResponse>> getZhongTaiRealcasePage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTRealcaseInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiRealcasePage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "瑙嗛鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiVideoPage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTVideoInfoResponse>> getZhongTaiVideoPage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTVideoInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiVideoPage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "鍏ㄥ眿妗堜緥鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiWholecasePage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTCaseInfoResponse>> getZhongTaiWholecasePage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTCaseInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiWholecasePage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "蹇楄瑁呬慨鍒嗛〉鍒楄〃 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @PostMapping("/getZhongTaiZbDecoPage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ZTBasePageResponse<ZTZbDecoInfoResponse>> getZhongTaiZbDecoPage(@RequestBody ZTContentListRequest ztContentListRequest) {
+ ztContentListRequest.setUserId(getMemberId()+"");
+ ztContentListRequest.setUserType(ZTConstants.CUSTOMER);
+ ZTBasePageResponse<ZTZbDecoInfoResponse> ztBasePageResponse= getZhongTaiDataService.getZhongTaiZbDecoPage(ztContentListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztBasePageResponse);
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "鍏ㄥ眿妗堜緥璇︽儏 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getWholecaseInfo")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "鍐呭涓婚敭", required = true),
+ })
+ public ApiResponse<ZTCaseInfoResponse> getWholecaseInfo(@RequestParam String id) {
+ ZTCaseInfoResponse ztCaseInfoResponse= getZhongTaiDataService.getWholecaseInfo(id,ZTConstants.CUSTOMER,getMemberId());
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztCaseInfoResponse);
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "浜у搧璧勮璇︽儏 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getProductNewsInfo")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "鍐呭涓婚敭", required = true),
+ })
+ public ApiResponse<ZTProductNewsInfoResponse> getProductNewsInfo(@RequestParam String id) {
+ ZTProductNewsInfoResponse ztProductNewsInfoResponse= getZhongTaiDataService.getProductNewsInfo(id,ZTConstants.CUSTOMER,getMemberId());
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztProductNewsInfoResponse);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "瀹炴櫙妗堜緥 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getRealcaseInfo")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "鍐呭涓婚敭", required = true),
+ })
+ public ApiResponse<ZTRealcaseInfoResponse> getRealcaseInfo(@RequestParam String id) {
+ ZTRealcaseInfoResponse ztRealcaseInfoResponse= getZhongTaiDataService.getRealcaseInfo(id,ZTConstants.CUSTOMER,getMemberId());
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztRealcaseInfoResponse);
+ }
+
+
+
+ @LoginRequired
+ @ApiOperation(value = "浜у搧璇︽儏 - 涓彴", notes = "瀹㈡埛绔皬绋嬪簭")
+ @GetMapping("/getProductInfo")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "鍐呭涓婚敭", required = true),
+ })
+ public ApiResponse<ZTProductInfoResponse> getProductInfo(@RequestParam String id) {
+ ZTProductInfoResponse ztProductInfoResponse= getZhongTaiDataService.getProductInfo(id,ZTConstants.CUSTOMER,getMemberId());
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztProductInfoResponse);
+ }
+
+
diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
index 1e284a3..964a8ee 100644
--- a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
@@ -1,17 +1,24 @@
package com.doumee.api.web;
+import com.doumee.biz.zbom.ZbomCRMService;
import com.doumee.biz.zbom.ZbomZhongTaiService;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.News;
+import com.doumee.dao.web.response.DailyUpdatesResponse;
import com.doumee.dao.web.response.ZSZXCatalogResponse;
+import com.doumee.service.business.NewsService;
import com.doumee.service.business.SmsEmailService;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
/**
* Created by IntelliJ IDEA.
@@ -32,11 +39,45 @@
@Autowired
public SmsEmailService smsEmailService;
+ @Autowired
+ public ZbomCRMService zbomCRMService;
- @ApiOperation(value = "C绔皬绋嬪簭-鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁", notes = "鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁")
+ @Autowired
+ public NewsService newsService;
+
+
+ @ApiOperation(value = "銆怌绔皬绋嬪簭銆戣幏鍙栭椤靛織璇磋淇洓涓ā鍧楃被鐩暟鎹�", notes = "鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁锛岃儗鏅浘鏆傛椂鍐欐锛屽弬鑰僓I")
@PostMapping("/getZSZXCatalogs")
public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() {
return ApiResponse.success(zbomZhongTaiService.getZSZXCatalogs());
}
+
+
+ @ApiOperation(value = "銆怋绔皬绋嬪簭銆戞瘡鏃ヤ笂鏂版暟鎹�")
+ @GetMapping("/getDailyUpdates")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "fileType", value = "闄勪欢绫诲瀷 0鍥剧墖 1瑙嗛", required = false)
+ })
+ public ApiResponse<DailyUpdatesResponse> getDailyUpdates(Integer fileType) {
+ return ApiResponse.success(newsService.getDailyUpdatesResponse(fileType));
+ }
+
+
+ @ApiOperation("銆怋绔皬绋嬪簭銆� 鎺ㄥ箍鍜ㄨ鍒嗛〉")
+ @PostMapping("/newsPage")
+ public ApiResponse<PageData<News>> newsPage (@RequestBody PageWrap<News> pageWrap) {
+ return ApiResponse.success(newsService.findPage(pageWrap));
+ }
+
+
+
+ @ApiOperation(value = "鑾峰彇瀹㈡埛绠$悊鎺堟潈-鍒楄〃璺宠浆鍦板潃", notes = "鑾峰彇瀹㈡埛绠$悊鎺堟潈璺宠浆鍦板潃")
+ @GetMapping("/getCrmAuthUrl")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "绫诲瀷 0瀹㈡埛鍒楄〃 1璺宠浆鏂板鎰忓悜瀹㈡埛", required = true)
+ })
+ public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) {
+ return ApiResponse.success(zbomCRMService.getCrmGoUrl(this.getLoginUserInfo().getIamUsername(),type));
+ }
}
diff --git a/server/web/src/main/java/com/doumee/api/web/PersonnelApi.java b/server/web/src/main/java/com/doumee/api/web/PersonnelApi.java
index 440f720..7548ae8 100644
--- a/server/web/src/main/java/com/doumee/api/web/PersonnelApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/PersonnelApi.java
@@ -1,21 +1,28 @@
package com.doumee.api.web;
+import com.doumee.biz.zbom.ZbomCRMService;
+import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest;
+import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse;
+import com.doumee.biz.zbom.model.crm.response.CRMCustomerListResponse;
+import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest;
+import com.doumee.biz.zbom.model.zhongtai.ZTConstants;
+import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest;
+import com.doumee.biz.zbom.model.zhongtai.response.*;
import com.doumee.config.annotation.LoginRequired;
import com.doumee.config.annotation.UserLoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Shop;
import com.doumee.dao.business.model.SmsEmail;
import com.doumee.dao.web.reqeust.EditMemberRequest;
import com.doumee.dao.web.reqeust.EditShopDTO;
import com.doumee.dao.web.reqeust.EditUsersRequest;
+import com.doumee.dao.web.reqeust.ContentShareImgDto;
import com.doumee.dao.web.response.AccountResponse;
-import com.doumee.service.business.MemberService;
-import com.doumee.service.business.ShopService;
-import com.doumee.service.business.SmsEmailService;
-import com.doumee.service.business.UsersService;
+import com.doumee.service.business.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -25,6 +32,8 @@
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
/**
* Created by IntelliJ IDEA.
@@ -48,6 +57,11 @@
@Autowired
public ShopService shopService;
+ @Autowired
+ public GetCrmDataService getCrmDataService;
+
+ @Autowired
+ private GetZhongTaiDataService getZhongTaiDataService;
@ApiOperation(value = "灏忕▼搴忕櫥闄�", notes = "鍛樺伐绔皬绋嬪簭")
@GetMapping("/loginByWx")
@@ -57,7 +71,6 @@
public ApiResponse<AccountResponse> loginByWx(@RequestParam String code) {
return ApiResponse.success(usersService.wxLogin(code));
}
-
@ApiOperation(value = "鍙戦�佺煭淇¢獙璇佺爜", notes = "鍛樺伐绔皬绋嬪簭")
@GetMapping("/sendSms")
@@ -92,7 +105,7 @@
@ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "寰俊code", required = true),
})
public ApiResponse bindingOpenid(@RequestParam String code) {
- usersService.bindingOpenid(code,getMemberId());
+ usersService.bindingOpenid(code,getUserId());
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
@@ -103,10 +116,9 @@
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
})
public ApiResponse getUserDetail() {
- usersService.usersDetail(getMemberId());
+ usersService.usersDetailById(getUserId());
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
-
@UserLoginRequired
@ApiOperation(value = "鏇存柊涓汉淇℃伅", notes = "鍛樺伐绔皬绋嬪簭")
@@ -115,12 +127,10 @@
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
})
public ApiResponse editUsers(@RequestBody EditUsersRequest editUsersRequest) {
- editUsersRequest.setUserId(getMemberId());
+ editUsersRequest.setUserId(getUserId());
usersService.editUserInfo(editUsersRequest);
return ApiResponse.success("鏇存柊鎴愬姛");
}
-
-
@UserLoginRequired
@ApiOperation(value = "闂ㄥ簵鍒嗛〉", notes = "鍛樺伐绔皬绋嬪簭")
@PostMapping("/shopPage")
@@ -159,5 +169,44 @@
return ApiResponse.success(usersService.getUserCard(this.getLoginUserInfo()));
}
+ @ApiOperation(value = "鑾峰彇鍐呭鍒嗕韩娴锋姤", notes = "鑾峰彇鍐呭鍒嗕韩娴锋姤锛屽姞灏忕▼搴忕爜")
+ @PostMapping("/getContentShareImg")
+ public ApiResponse<String> getContentShareImg(@RequestBody ContentShareImgDto param) {
+ return ApiResponse.success(usersService.getContentShareImg(this.getLoginUserInfo(),param));
+ }
+
+ @UserLoginRequired
+ @ApiOperation(value = "鑾峰彇瀹㈡埛/娼滃鍒楄〃", notes = "鍛樺伐绔皬绋嬪簭")
+ @PostMapping("/getCustomerList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<CRMBaseResponse<List<CRMCustomerListResponse>>> getCustomerList(@RequestBody CrmCustomerListRequest crmCustomerListRequest) {
+ crmCustomerListRequest.setUserId(getUserId());
+ return ApiResponse.success(getCrmDataService.getCrmCustomerList(crmCustomerListRequest));
+ }
+
+ @UserLoginRequired
+ @ApiOperation(value = "鍒嗙被鏁版嵁 - 涓彴", notes = "鍛樺伐绔皬绋嬪簭")
+ @PostMapping("/getCatalogList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<ZTCatalogInfoResponse>> getCatalogList (@RequestBody ZTCatalogListRequest ztCatalogListRequest ) {
+ List<ZTCatalogInfoResponse> ztCatalogInfoResponseList = getZhongTaiDataService.getCatalogList(ztCatalogListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztCatalogInfoResponseList);
+ }
+
+ @UserLoginRequired
+ @ApiOperation(value = "鏍囩鏁版嵁 - 涓彴", notes = "鍛樺伐绔皬绋嬪簭")
+ @PostMapping("/getCataLogTagList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<List<ZTTagInfoResponse>> getCataLogTagList(@RequestBody ZTCatalogListRequest ztCatalogListRequest ) {
+ List<ZTTagInfoResponse> ztTagInfoResponseList = getZhongTaiDataService.getCataLogTagList(ztCatalogListRequest);
+ return ApiResponse.success("鏌ヨ鎴愬姛",ztTagInfoResponseList);
+ }
+
}
diff --git a/server/web/web.iml b/server/web/web.iml
index 3f494ce..c22228b 100644
--- a/server/web/web.iml
+++ b/server/web/web.iml
@@ -140,7 +140,9 @@
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
- <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.52" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
diff --git a/server/zbomyoujia.iml b/server/zbomyoujia.iml
index 8de2d75..6a48115 100644
--- a/server/zbomyoujia.iml
+++ b/server/zbomyoujia.iml
@@ -128,7 +128,9 @@
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
- <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.52" level="project" />
+ <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.52" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
--
Gitblit v1.9.3