Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
2f7d1940
Commit
2f7d1940
authored
Jul 15, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev
parents
e4cfb077
39f83f7c
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
330 additions
and
42 deletions
+330
-42
XxLogInterceptor.java
.../github/wxiaoqi/security/common/log/XxLogInterceptor.java
+1
-0
NacosWatch.java
...om/github/wxiaoqi/security/monitor/config/NacosWatch.java
+123
-0
NacosWatchAutoConfiguration.java
.../security/monitor/config/NacosWatchAutoConfiguration.java
+18
-0
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+8
-0
PublicController.java
.../github/wxiaoqi/security/admin/rest/PublicController.java
+22
-8
pom.xml
xx-common/xx-common-platform-web/pom.xml
+4
-0
OrderTypeEnum.java
.../xxfc/platform/order/contant/enumerate/OrderTypeEnum.java
+6
-6
RefundTypeEnum.java
...xxfc/platform/order/contant/enumerate/RefundTypeEnum.java
+5
-5
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+59
-9
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+2
-2
pom.xml
xx-universal/xx-universal-api/pom.xml
+1
-0
SmsTemplateDTO.java
.../java/com/xxfc/platform/universal/dto/SmsTemplateDTO.java
+12
-0
ThirdFeign.java
...in/java/com/xxfc/platform/universal/feign/ThirdFeign.java
+1
-1
Ueditor.java
...src/main/java/com/xxfc/platform/universal/vo/Ueditor.java
+14
-0
pom.xml
xx-universal/xx-universal-server/pom.xml
+6
-6
CCPRestSmsBiz.java
...n/java/com/xxfc/platform/universal/biz/CCPRestSmsBiz.java
+20
-0
SmsController.java
...com/xxfc/platform/universal/controller/SmsController.java
+1
-1
UploadController.java
.../xxfc/platform/universal/controller/UploadController.java
+13
-4
BranchCompany.java
.../java/com/xxfc/platform/vehicle/entity/BranchCompany.java
+14
-0
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/log/XxLogInterceptor.java
View file @
2f7d1940
...
...
@@ -68,6 +68,7 @@ public class XxLogInterceptor{
}
}
catch
(
BaseException
e
){
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
ObjectRestResponse
.
createFailedResult
(
e
.
getStatus
(),
e
.
getMessage
()));
throw
e
;
}
catch
(
Exception
e
){
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
ObjectRestResponse
.
createFailedResult
(
500
,
e
.
getMessage
()));
throw
e
;
...
...
ace-control/ace-monitor/src/main/java/com/github/wxiaoqi/security/monitor/config/NacosWatch.java
0 → 100644
View file @
2f7d1940
/*
* Copyright (C) 2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
github
.
wxiaoqi
.
security
.
monitor
.
config
;
import
com.alibaba.nacos.api.naming.listener.EventListener
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.cloud.alibaba.nacos.NacosDiscoveryProperties
;
import
org.springframework.cloud.client.discovery.event.HeartbeatEvent
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisherAware
;
import
org.springframework.context.SmartLifecycle
;
import
org.springframework.scheduling.TaskScheduler
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicLong
;
/**
* @author xiaojing
*/
public
class
NacosWatch
implements
ApplicationEventPublisherAware
,
SmartLifecycle
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
NacosWatch
.
class
);
private
final
NacosDiscoveryProperties
properties
;
private
long
watchDelay
=
30000
;
private
final
TaskScheduler
taskScheduler
;
private
final
AtomicLong
nacosWatchIndex
=
new
AtomicLong
(
0
);
private
final
AtomicBoolean
running
=
new
AtomicBoolean
(
false
);
private
ApplicationEventPublisher
publisher
;
private
ScheduledFuture
<?>
watchFuture
;
private
Set
<
String
>
cacheServices
=
new
HashSet
<>();
private
HashMap
<
String
,
EventListener
>
subscribeListeners
=
new
HashMap
<>();
public
NacosWatch
(
NacosDiscoveryProperties
properties
)
{
this
(
properties
,
getTaskScheduler
());
}
public
NacosWatch
(
NacosDiscoveryProperties
properties
,
TaskScheduler
taskScheduler
)
{
this
.
properties
=
properties
;
this
.
taskScheduler
=
taskScheduler
;
}
private
static
ThreadPoolTaskScheduler
getTaskScheduler
()
{
ThreadPoolTaskScheduler
taskScheduler
=
new
ThreadPoolTaskScheduler
();
taskScheduler
.
initialize
();
return
taskScheduler
;
}
@Override
public
void
setApplicationEventPublisher
(
ApplicationEventPublisher
publisher
)
{
this
.
publisher
=
publisher
;
}
@Override
public
boolean
isAutoStartup
()
{
return
true
;
}
@Override
public
void
stop
(
Runnable
callback
)
{
this
.
stop
();
callback
.
run
();
}
@Override
public
void
start
()
{
if
(
this
.
running
.
compareAndSet
(
false
,
true
))
{
this
.
watchFuture
=
this
.
taskScheduler
.
scheduleWithFixedDelay
(
this
::
nacosServicesWatch
,
watchDelay
);
}
}
@Override
public
void
stop
()
{
if
(
this
.
running
.
compareAndSet
(
true
,
false
)
&&
this
.
watchFuture
!=
null
)
{
this
.
watchFuture
.
cancel
(
true
);
}
}
@Override
public
boolean
isRunning
()
{
return
false
;
}
@Override
public
int
getPhase
()
{
return
0
;
}
public
void
nacosServicesWatch
()
{
// nacos doesn't support watch now , publish an event every 30 seconds.
this
.
publisher
.
publishEvent
(
new
HeartbeatEvent
(
this
,
nacosWatchIndex
.
getAndIncrement
()));
}
}
ace-control/ace-monitor/src/main/java/com/github/wxiaoqi/security/monitor/config/NacosWatchAutoConfiguration.java
0 → 100644
View file @
2f7d1940
package
com
.
github
.
wxiaoqi
.
security
.
monitor
.
config
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.cloud.alibaba.nacos.NacosDiscoveryProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
@Configuration
public
class
NacosWatchAutoConfiguration
{
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty
(
value
=
"spring.cloud.nacos.discovery.watch.enabled"
,
matchIfMissing
=
true
)
public
NacosWatch
nacosWatch
(
NacosDiscoveryProperties
nacosDiscoveryProperties
)
{
return
new
NacosWatch
(
nacosDiscoveryProperties
);
}
}
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
2f7d1940
...
...
@@ -39,6 +39,14 @@ public interface UserFeign {
@RequestMapping
(
value
=
"/public/userinfo-by-uid"
)
public
ObjectRestResponse
<
UserDTO
>
userinfoByUid
(
@RequestParam
(
"uid"
)
Integer
uid
);
/**
* id获取用户信息
* @param id
* @return
*/
@RequestMapping
(
value
=
"/public/app/userinfo-by-id"
)
public
ObjectRestResponse
<
AppUserDTO
>
userDetailById
(
@RequestParam
(
"id"
)
Integer
id
);
/**
*status:0-判断是否认证过,1-认证成功后修改用户认证状态
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/PublicController.java
View file @
2f7d1940
...
...
@@ -22,10 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.*
;
/**
* ${DESCRIPTION}
...
...
@@ -70,14 +68,30 @@ public class PublicController {
ObjectRestResponse
userDetailByToken
(
String
token
)
throws
Exception
{
String
username
=
userAuthUtil
.
getInfoFromToken
(
token
).
getId
();
if
(
username
==
null
)
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
AppUserDTO
userDTO
=
new
AppUserDTO
();
Integer
userid
=
Integer
.
parseInt
(
username
);
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
userid
));
}
@RequestMapping
(
value
=
"/app/userinfo-by-id"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
<
AppUserDTO
>
userDetailById
(
Integer
id
)
throws
Exception
{
if
(
id
==
null
)
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
id
));
}
private
AppUserDTO
getAppUserInfoById
(
Integer
userid
)
throws
IllegalAccessException
,
InvocationTargetException
{
AppUserDTO
userDTO
=
new
AppUserDTO
();
//获取用户基础信息
AppUserVo
userVo
=
detailBiz
.
getUserInfoById
(
userid
);
if
(
userVo
==
null
)
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashSet
<
String
>()
{{
add
(
"用户不存在!"
);}});
}
Integer
id
=
userVo
.
getId
();
Integer
positionId
=
userVo
.
getPositionId
();
...
...
@@ -94,7 +108,7 @@ public class PublicController {
userDTO
.
setPositionName
(
userPosition
.
getName
());
}
userDTO
.
setId
(
id
);
return
new
ObjectRestResponse
<
AppUserDetail
>().
rel
(
true
).
data
(
userDTO
)
;
return
userDTO
;
}
@RequestMapping
(
value
=
"/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
...
...
xx-common/xx-common-platform-web/pom.xml
View file @
2f7d1940
...
...
@@ -53,6 +53,10 @@
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
1.3.4
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/OrderTypeEnum.java
View file @
2f7d1940
...
...
@@ -17,14 +17,14 @@ public enum OrderTypeEnum {
*/
private
String
desc
;
p
rivate
static
Map
<
Integer
,
String
>
codeAndDesc
=
new
HashMap
<
Integer
,
String
>();
p
ublic
static
Map
<
Integer
,
OrderTypeEnum
>
codeAndDesc
=
new
HashMap
<
Integer
,
OrderTypeEnum
>();
//Maps.newHashMap();
//
static{
// for(VehicleBookRecordStatus constantType : VehicleBookRecordStatus
.values()){
// codeAndDesc.put(constantType.getCode(),constantType.getDesc()
);
//
}
//
}
static
{
for
(
OrderTypeEnum
enumE
:
OrderTypeEnum
.
values
()){
codeAndDesc
.
put
(
enumE
.
getCode
(),
enumE
);
}
}
OrderTypeEnum
(
Integer
code
,
String
desc
){
this
.
code
=
code
;
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/RefundTypeEnum.java
View file @
2f7d1940
...
...
@@ -19,11 +19,11 @@ public enum RefundTypeEnum {
private
static
Map
<
Integer
,
String
>
codeAndDesc
=
new
HashMap
<
Integer
,
String
>();
//Maps.newHashMap();
//
static{
// for(VehicleBookRecordStatus constantType : VehicleBookRecordStatus
.values()){
// codeAndDesc.put(constantType.getCode(),constantType
.getDesc());
//
}
//
}
static
{
for
(
RefundTypeEnum
enumE
:
RefundTypeEnum
.
values
()){
codeAndDesc
.
put
(
enumE
.
getCode
(),
enumE
.
getDesc
());
}
}
RefundTypeEnum
(
Integer
code
,
String
desc
){
this
.
code
=
code
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
2f7d1940
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.dto.UserMemberDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
...
@@ -20,6 +22,7 @@ import com.xxfc.platform.order.pojo.order.OrderListVo;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.universal.dto.SmsTemplateDTO
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.vo.OrderRefundVo
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
...
...
@@ -382,7 +385,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
* @param orderNo
* @param tradeNo
*/
@Transactional
public
void
payNotifyHandle
(
String
orderNo
,
String
tradeNo
,
Integer
type
)
{
OrderRentVehicleDetail
orvd
=
new
OrderRentVehicleDetail
();
OrderMemberDetail
omd
=
new
OrderMemberDetail
();
BaseOrder
baseOrder
=
this
.
selectOne
(
new
BaseOrder
()
{{
setNo
(
orderNo
);
}});
...
...
@@ -401,23 +407,25 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
if
(
OrderTypeEnum
.
MEMBER
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
//直接设置订单完成
updateOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
OrderMemberDetail
omd
=
orderMemberDetailBiz
.
selectOne
(
new
OrderMemberDetail
(){{
omd
=
orderMemberDetailBiz
.
selectOne
(
new
OrderMemberDetail
(){{
setOrderId
(
baseOrder
.
getId
());
}});
//触发会员效益
ObjectRestResponse
orr
=
userFeign
.
buyMember
(
new
UserMemberDTO
()
{{
UserMemberDTO
userMemberDTO
=
new
UserMemberDTO
()
{{
setUserId
(
baseOrder
.
getUserId
());
setDiscount
(
omd
.
getRebate
());
setIsBind
(
ISBIND_BIND
);
setMemberLevel
(
omd
.
getMemberLevel
());
setRentFreeDays
(
omd
.
getRentFreeNum
());
setTotalNumber
(
omd
.
getRentFreeNum
());
}});
}};
userMemberDTO
.
setMemberLevel
(
omd
.
getMemberLevel
());
userMemberDTO
.
setRentFreeDays
(
omd
.
getRentFreeNum
());
userMemberDTO
.
setTotalNumber
(
omd
.
getRentFreeNum
());
userMemberDTO
.
setDiscount
(
omd
.
getRebate
());
ObjectRestResponse
orr
=
userFeign
.
buyMember
(
userMemberDTO
);
log
.
info
(
"orr.getStatus() : "
+
orr
.
getStatus
()
);
}
else
if
(
OrderTypeEnum
.
RentVehicle
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
updateOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
());
OrderRentVehicleDetail
orvd
=
orderRentVehicleBiz
.
selectOne
(
new
OrderRentVehicleDetail
(){{
orvd
=
orderRentVehicleBiz
.
selectOne
(
new
OrderRentVehicleDetail
(){{
setOrderId
(
baseOrder
.
getId
());
}});
//车辆预定审核通过
...
...
@@ -436,7 +444,49 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
//站点总人数添加
tourFeign
.
updateTourGoodPersonNum
(
otd
.
getVerificationId
(),
TourFeign
.
TOTAL_PERSON
,
otd
.
getTotalNumber
());
}
try
{
this
.
updateSelectiveByIdRe
(
updateOrder
);
}
finally
{
OrderTypeEnum
orderTypeEnum
=
OrderTypeEnum
.
codeAndDesc
.
get
(
baseOrder
.
getType
());
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
baseOrder
.
getUserId
()).
getData
();
Integer
smstype
;
List
<
String
>
smsParams
=
new
ArrayList
<
String
>();
smsParams
.
add
(
baseOrder
.
getRealAmount
().
toString
());
switch
(
orderTypeEnum
)
{
case
RentVehicle:
if
(
orvd
.
getFreeDays
()
>
0
)
{
smstype
=
SmsTemplateDTO
.
RENT_MEMENT
;
smsParams
.
add
(
orvd
.
getFreeDays
().
toString
());
smsParams
.
add
(
appUserDTO
.
getRentFreeDays
().
toString
());
}
else
{
smstype
=
SmsTemplateDTO
.
RENT_NORMAL
;
}
thirdFeign
.
sendTemplate
(
new
SmsTemplateDTO
(){{
setPhoneNumbers
(
appUserDTO
.
getUsername
());
setType
(
smstype
);
setParams
(
smsParams
.
toArray
(
new
String
[
smsParams
.
size
()]));
}});
break
;
case
TOUR:
thirdFeign
.
sendTemplate
(
new
SmsTemplateDTO
(){{
setPhoneNumbers
(
appUserDTO
.
getUsername
());
setType
(
SmsTemplateDTO
.
TOUR
);
setParams
(
smsParams
.
toArray
(
new
String
[
smsParams
.
size
()]));
}});
break
;
case
MEMBER:
smsParams
.
add
(
omd
.
getRentFreeNum
().
toString
());
smsParams
.
add
(
appUserDTO
.
getRentFreeDays
().
toString
());
thirdFeign
.
sendTemplate
(
new
SmsTemplateDTO
(){{
setPhoneNumbers
(
appUserDTO
.
getUsername
());
setType
(
SmsTemplateDTO
.
MEMENT
);
setParams
(
smsParams
.
toArray
(
new
String
[
smsParams
.
size
()]));
}});
break
;
default
:
break
;
}
}
}
else
{
log
.
error
(
" order has payed , orderNo:{}, tradeNo:{} "
,
orderNo
,
tradeNo
);
}
...
...
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
2f7d1940
...
...
@@ -88,7 +88,7 @@
from tour_good g
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id
where g.recommend=1 and g.status=1 and g.is_del=0
where g.recommend=1 and g.status=1 and g.is_del=0
and t.is_del=0
GROUP BY g.id
ORDER BY g.rank DESC ,g.id DESC
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
...
...
@@ -104,7 +104,7 @@
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id
<where>
g.is_del=0
g.is_del=0
and t.is_del=0
<if
test=
"params.name != null and params.name != ''"
>
and (g.`name` like CONCAT('%',#{params.name},'%') or g.introduce like CONCAT('%',#{params.name},'%'))
</if>
...
...
xx-universal/xx-universal-api/pom.xml
View file @
2f7d1940
...
...
@@ -41,6 +41,7 @@
<artifactId>
httpclient
</artifactId>
<version>
4.5
</version>
</dependency>
<!-- 短信机-->
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/dto/SmsTemplateDTO.java
View file @
2f7d1940
...
...
@@ -12,6 +12,18 @@ import lombok.Data;
*/
@Data
public
class
SmsTemplateDTO
{
public
static
final
int
RENT_NORMAL
=
1
;
public
static
final
int
RENT_MEMENT
=
2
;
public
static
final
int
TOUR
=
3
;
public
static
final
int
MEMENT
=
4
;
//租/还车公司相同(订单支付后立即发送给相关负责人)
public
static
final
int
TAAKE_CAR
=
5
;
//租/还车公司不同(发给租车公司负责人,订单支付后发送)
public
static
final
int
DIFFERENT_TAAKE_CAR
=
6
;
// 租/还车公司不同(发给还车公司负责人,订单出车后发))(相同不发)
public
static
final
int
ALSO_CAR
=
7
;
//取消订单
public
static
final
int
CANCEL
=
8
;
//类型:1-租车订单通知(普通用户),2-租车订单短信(会员权益),3-旅游订单短信,4-加入会员通知
private
Integer
type
;
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/ThirdFeign.java
View file @
2f7d1940
...
...
@@ -31,7 +31,7 @@ public interface ThirdFeign {
//发送短信模板消息
public
JSONObject
sendCode
(
@RequestParam
(
"phone"
)
String
phone
,
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"templateCode"
)
String
templateCode
);
//云通讯短信机
@RequestMapping
(
value
=
"/
app/unauth/sendTemplate"
,
method
=
RequestMethod
.
GE
T
)
@RequestMapping
(
value
=
"/
sms/app/unauth/sendTemplate"
,
method
=
RequestMethod
.
POS
T
)
public
ObjectRestResponse
sendTemplate
(
SmsTemplateDTO
smsTemplateDTO
);
@RequestMapping
(
value
=
"/file/app/unauth/uploadFiles"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
uploadFiles
(
@RequestParam
(
value
=
"files"
)
MultipartFile
[]
files
);
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/vo/Ueditor.java
0 → 100644
View file @
2f7d1940
package
com
.
xxfc
.
platform
.
universal
.
vo
;
import
lombok.Data
;
@Data
public
class
Ueditor
{
private
String
url
;
private
String
original
;
private
String
state
;
private
String
title
;
}
xx-universal/xx-universal-server/pom.xml
View file @
2f7d1940
...
...
@@ -27,6 +27,12 @@
<dependency>
<groupId>
com.aliyun
</groupId>
<artifactId>
aliyun-java-sdk-core
</artifactId>
<exclusions>
<exclusion>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
</exclusion>
</exclusions>
<version>
4.4.2
</version>
</dependency>
<dependency>
...
...
@@ -72,12 +78,6 @@
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.github.wxiaoqi
</groupId>
<artifactId>
ace-admin-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.alipay.sdk
</groupId>
<artifactId>
alipay-sdk-java
</artifactId>
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/CCPRestSmsBiz.java
View file @
2f7d1940
...
...
@@ -17,6 +17,14 @@ public class CCPRestSmsBiz{
public
static
final
String
TEMPLATE_ID_ORDER_TOUR
=
"457272"
;
//加入会员通知4
public
static
final
String
TEMPLATE_ID_MEMBER
=
"457273"
;
//租/还车公司相同(订单支付后立即发送给相关负责人)5
public
static
final
String
TEMPLATE_ID_TAAKE_CAR
=
"457501"
;
//租/还车公司不同(发给租车公司负责人,订单支付后发送)6
public
static
final
String
TEMPLATE_ID_DIFFERENT_TAAKE_CAR
=
"457502"
;
// 租/还车公司不同(发给还车公司负责人,订单出车后发))(相同不发)7
public
static
final
String
TEMPLATE_ID_ALSO_CAR
=
"457503"
;
//取消订单8
public
static
final
String
TEMPLATE_ID_CANCEL
=
"457506"
;
//发送模板消息
...
...
@@ -34,6 +42,18 @@ public class CCPRestSmsBiz{
case
4
:
CCPRestSmsUtils
.
sendTemplateSMS
(
phoneNumbers
,
params
,
TEMPLATE_ID_MEMBER
);
break
;
case
5
:
CCPRestSmsUtils
.
sendTemplateSMS
(
phoneNumbers
,
params
,
TEMPLATE_ID_TAAKE_CAR
);
break
;
case
6
:
CCPRestSmsUtils
.
sendTemplateSMS
(
phoneNumbers
,
params
,
TEMPLATE_ID_DIFFERENT_TAAKE_CAR
);
break
;
case
7
:
CCPRestSmsUtils
.
sendTemplateSMS
(
phoneNumbers
,
params
,
TEMPLATE_ID_ALSO_CAR
);
break
;
case
8
:
CCPRestSmsUtils
.
sendTemplateSMS
(
phoneNumbers
,
params
,
TEMPLATE_ID_CANCEL
);
break
;
}
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/SmsController.java
View file @
2f7d1940
...
...
@@ -44,7 +44,7 @@ public class SmsController {
return
smsService
.
smsByCode
(
phone
,
code
,
templateCode
);
}
@RequestMapping
(
value
=
"/app/unauth/sendTemplate"
,
method
=
RequestMethod
.
GE
T
)
@RequestMapping
(
value
=
"/app/unauth/sendTemplate"
,
method
=
RequestMethod
.
POS
T
)
public
ObjectRestResponse
sendTemplate
(
@RequestBody
SmsTemplateDTO
smsTemplateDTO
)
throws
Exception
{
if
(
smsTemplateDTO
==
null
){
return
ObjectRestResponse
.
createDefaultFail
();
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/UploadController.java
View file @
2f7d1940
...
...
@@ -5,14 +5,12 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
com.xxfc.platform.universal.service.UploadService
;
import
com.xxfc.platform.universal.utils.PublicMsg
;
import
com.xxfc.platform.universal.vo.Ueditor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -103,9 +101,20 @@ public class UploadController{
//以下是图片上传的方法
@RequestMapping
(
value
=
"/app/unauth/ueditor"
)
@ResponseBody
public
String
ueditor
(
HttpServletRequest
request
)
{
return
PublicMsg
.
UEDITOR_CONFIG
;
}
@RequestMapping
(
value
=
"/app/unauth/ueditor"
,
method
=
RequestMethod
.
POST
)
public
Ueditor
imgUpload
(
MultipartFile
upfile
)
throws
Exception
{
Ueditor
ueditor
=
new
Ueditor
();
ueditor
.
setUrl
(
uploadService
.
uploadFile
(
upfile
,
"admin"
));
ueditor
.
setOriginal
(
upfile
.
getOriginalFilename
());
ueditor
.
setState
(
"SUCCESS"
);
ueditor
.
setTitle
(
upfile
.
getOriginalFilename
());
return
ueditor
;
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/BranchCompany.java
View file @
2f7d1940
...
...
@@ -105,4 +105,18 @@ public class BranchCompany {
private
Integer
zoneId
;
private
String
phone
;
/**
* 租车客服电话
*/
@Column
(
name
=
"vehice_service_phone"
)
@ApiModelProperty
(
"租车客服电话"
)
private
Integer
vehiceServicePhone
;
/**
* 旅游客服电话
*/
@Column
(
name
=
"tour_service_phone"
)
@ApiModelProperty
(
"旅游客服电话"
)
private
Integer
tourServicePhone
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment