maven 文件集成
This commit is contained in:
@@ -42,28 +42,29 @@
|
||||
<version>1.7.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zlt</groupId>
|
||||
<artifactId>zlt-iot-spring-boot-starter</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.statemachine</groupId>
|
||||
<artifactId>spring-statemachine-core</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.83</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+7
@@ -6,6 +6,7 @@ import com.zlt.tourism.annotation.ValidPhoneNumber;
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-09-27 13:52
|
||||
@@ -15,6 +16,12 @@ public class PhoneNumberValidator implements ConstraintValidator<ValidPhoneNumbe
|
||||
|
||||
// 手机号正则表达式(以中国手机号为例)
|
||||
private static final String PHONE_PATTERN = "^1[3-9]\\d{9}$";
|
||||
|
||||
@Override
|
||||
public void initialize(ValidPhoneNumber validPhoneNumber) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(String phoneNumber, ConstraintValidatorContext context) {
|
||||
// 当手机号为null时返回true,交给@Nullable等其他机制处理
|
||||
|
||||
+1
-2
@@ -6,10 +6,9 @@ import org.springframework.amqp.core.BindingBuilder;
|
||||
import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.core.TopicExchange;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
@Configuration
|
||||
//@Configuration
|
||||
@Slf4j
|
||||
public class QueueConfig {
|
||||
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
import com.zlt.tourism.model.iking.AudioFileInfoEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -12,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface AudioFileInfoDao extends SuperMapper<AudioFileInfoEntity> {
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zlt.tourism.model.iking.IkDeviceEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -18,7 +17,7 @@ import java.util.Map;
|
||||
* @create 2024/7/25 16:26
|
||||
**/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface IkDeviceDao extends BaseMapper<IkDeviceEntity> {
|
||||
|
||||
/**
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
@@ -18,7 +17,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
* @date 2020-05-19 16:54:32
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface IkMissionDao extends SuperMapper<IkMissionEntity> {
|
||||
|
||||
IPage<IkMissionEntity> getPage(Page<IkMissionEntity> queryPage, @Param("params") MissionServicePageQuery params);
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zlt.tourism.model.iking.IkOrganizationEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -14,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* @create 2024/8/7 14:32
|
||||
**/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface IkOrganizationDao extends BaseMapper<IkOrganizationEntity> {
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -20,7 +19,7 @@ import java.util.Map;
|
||||
* @create 2024/8/7 9:44
|
||||
**/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface IkRouteDao extends BaseMapper<IkRouteEntity> {
|
||||
|
||||
/**
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
import com.zlt.tourism.model.iking.IkSysUserEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -12,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface IkSysUserDao extends SuperMapper<IkSysUserEntity> {
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
import com.zlt.tourism.model.iking.MissionImageEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -17,7 +16,7 @@ import java.util.Map;
|
||||
* @create 2024/8/31 11:18
|
||||
**/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface MissionImageDao extends SuperMapper<MissionImageEntity> {
|
||||
|
||||
/**
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
import com.zlt.tourism.model.iking.MissionImageUserEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -12,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface MissionImageUserDao extends SuperMapper<MissionImageUserEntity> {
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.central.db.mapper.SuperMapper;
|
||||
import com.zlt.tourism.model.iking.MissionRecordVideoUserEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -12,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface MissionRecordVideoUserDao extends SuperMapper<MissionRecordVideoUserEntity> {
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zlt.tourism.dto.other.IndustryDTO;
|
||||
import com.zlt.tourism.model.tourism.ResourceRolesIndustryEntity;
|
||||
@@ -19,7 +18,7 @@ import java.util.Map;
|
||||
* @date 2021-04-20 09:30:26
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface ResourceRolesIndustryDao extends BaseMapper<ResourceRolesIndustryEntity> {
|
||||
|
||||
/**
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.zlt.tourism.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zlt.tourism.dto.other.StationControlDTO;
|
||||
import com.zlt.tourism.model.tourism.StationControlEntity;
|
||||
@@ -18,7 +17,7 @@ import java.util.Map;
|
||||
* @date 2020-12-28 18:39:00
|
||||
*/
|
||||
@Mapper
|
||||
@DS("mgnt")
|
||||
//@DS("mgnt")
|
||||
public interface StationControlDao extends BaseMapper<StationControlEntity> {
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@ public class MissionManager {
|
||||
int pages = 0;
|
||||
List<MissionRecordVideoDTO> list = new ArrayList<>();
|
||||
Result result = stationWebService.getVideoList(query);
|
||||
if (result != null && 0 == result.getFlag() && result.getData() != null) {
|
||||
Object data = result.getData();
|
||||
if (result != null && 0 == result.getResp_code() && result.getDatas() != null) {
|
||||
Object data = result.getDatas();
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(data));
|
||||
if (jsonObject.containsKey("totalCount")) {
|
||||
total = jsonObject.getInteger("totalCount");
|
||||
|
||||
+4
-4
@@ -126,7 +126,7 @@ public class TourismOrderManager {
|
||||
}
|
||||
}
|
||||
|
||||
return Result.succeed();
|
||||
return Result.succeed("创建成功");
|
||||
}
|
||||
|
||||
private CreateOrderDTO getOrderDTO(ExecuteMissionDTO model){
|
||||
@@ -198,7 +198,7 @@ public class TourismOrderManager {
|
||||
public Result<TourismOrderEnity> queryExecutionOrder(String deviceSn){
|
||||
if(StringUtils.isNotBlank(deviceSn)){
|
||||
TourismOrderEnity order = orderService.queryExecutionOrder(deviceSn);
|
||||
return Result.of(order);
|
||||
return Result.succeed(order);
|
||||
}
|
||||
return Result.failed("机库sn不能为空");
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public class TourismOrderManager {
|
||||
}
|
||||
}
|
||||
vo.setList(orderInfoDTOS);
|
||||
return Result.of(vo);
|
||||
return Result.succeed(vo);
|
||||
}
|
||||
|
||||
public Boolean cancelWaitOrder(Long id){
|
||||
@@ -249,7 +249,7 @@ public class TourismOrderManager {
|
||||
Objects.nonNull(finshStatusEnity)?finshStatusEnity.getCreatedAt():null,
|
||||
query.getPage(),
|
||||
query.getLimit());
|
||||
return Result.of(pageInfo);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
public Result<TourismOrderEnity> finishExecuteMission(Long id){
|
||||
|
||||
+1
-2
@@ -4,14 +4,13 @@ package com.zlt.tourism.mq.consumer;
|
||||
import com.zlt.tourism.service.TourismOrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @ClassName: NotifyMsgConsumer
|
||||
**/
|
||||
@Component
|
||||
//@Component
|
||||
@Slf4j
|
||||
public class NotifyMsgConsumer {
|
||||
|
||||
|
||||
+1
-2
@@ -2,7 +2,6 @@ package com.zlt.tourism.mq.producer;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -11,7 +10,7 @@ import javax.annotation.Resource;
|
||||
* @ClassName: NotifyMsgProducer
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
//@Component
|
||||
public class NotifyMsgProducer {
|
||||
|
||||
@Resource
|
||||
|
||||
+8
-7
@@ -43,8 +43,8 @@ public class TourismUserServiceImpl extends BaseServiceImpl<TourismUserDao, Tour
|
||||
@Resource
|
||||
RedisRepository redisRepository;
|
||||
|
||||
@Resource
|
||||
MessageCenterService messageCenterService;
|
||||
// @Resource
|
||||
// MessageCenterService messageCenterService;
|
||||
|
||||
@Resource
|
||||
TourismUserDao tourismUserDao;
|
||||
@@ -96,11 +96,12 @@ public class TourismUserServiceImpl extends BaseServiceImpl<TourismUserDao, Tour
|
||||
SendMessageReq messageReq=new SendMessageReq();
|
||||
messageReq.setPhoneNum(mobile);
|
||||
messageReq.setContent("您的验证码为:".concat(code));
|
||||
Result result= messageCenterService.sendNotification(messageReq);
|
||||
log.info("文旅发送短信验证码返回的参数是:{}",result.toString());
|
||||
if(result.getResp_code()==0){
|
||||
return Result.succeed("短信验证码发送成功,一分钟内有效");
|
||||
}
|
||||
// Result result=
|
||||
//// messageCenterService.sendNotification(messageReq);
|
||||
//// log.info("文旅发送短信验证码返回的参数是:{}",result.toString());
|
||||
// if(result.getResp_code()==0){
|
||||
// return Result.succeed("短信验证码发送成功,一分钟内有效");
|
||||
// }
|
||||
return Result.failed("短信验证码发送失败,请验证手机号是否正确");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user