Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
613de8fd
Commit
613de8fd
authored
Jan 25, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
a0878418
0af9a2db
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
342 additions
and
96 deletions
+342
-96
DeviceController.java
...in/java/share/web/controller/system/DeviceController.java
+2
-1
DeviceGatewayController.java
.../share/web/controller/system/DeviceGatewayController.java
+5
-4
DeviceLogController.java
...java/share/web/controller/system/DeviceLogController.java
+2
-1
DeviceStatusLogController.java
...hare/web/controller/system/DeviceStatusLogController.java
+2
-1
SaobeiApiLogController.java
...a/share/web/controller/system/SaobeiApiLogController.java
+6
-5
Device.java
share-system/src/main/java/share/system/domain/Device.java
+1
-0
DeviceDto.java
...e-system/src/main/java/share/system/domain/DeviceDto.java
+15
-0
DeviceGatewayDto.java
...m/src/main/java/share/system/domain/DeviceGatewayDto.java
+15
-0
DeviceLogDto.java
...ystem/src/main/java/share/system/domain/DeviceLogDto.java
+19
-0
DeviceStatusLogDto.java
...src/main/java/share/system/domain/DeviceStatusLogDto.java
+15
-0
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+4
-0
SaobeiApiLogDto.java
...em/src/main/java/share/system/domain/SaobeiApiLogDto.java
+19
-0
SmsLog.java
share-system/src/main/java/share/system/domain/SmsLog.java
+10
-0
SRoomVo.java
...-system/src/main/java/share/system/domain/vo/SRoomVo.java
+5
-0
SaobeiApiLogMapper.java
...src/main/java/share/system/mapper/SaobeiApiLogMapper.java
+2
-1
SaobeiApiLogService.java
...c/main/java/share/system/service/SaobeiApiLogService.java
+2
-1
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+1
-0
SaobeiApiLogServiceImpl.java
...va/share/system/service/impl/SaobeiApiLogServiceImpl.java
+2
-1
SmsServiceImpl.java
...c/main/java/share/system/service/impl/SmsServiceImpl.java
+17
-10
DeviceGatewayMapper.xml
.../src/main/resources/mapper/system/DeviceGatewayMapper.xml
+38
-14
DeviceLogMapper.xml
...stem/src/main/resources/mapper/system/DeviceLogMapper.xml
+30
-11
DeviceMapper.xml
...-system/src/main/resources/mapper/system/DeviceMapper.xml
+41
-16
DeviceStatusLogMapper.xml
...rc/main/resources/mapper/system/DeviceStatusLogMapper.xml
+30
-13
SRoomMapper.xml
...e-system/src/main/resources/mapper/system/SRoomMapper.xml
+5
-0
SaobeiApiLogMapper.xml
...m/src/main/resources/mapper/system/SaobeiApiLogMapper.xml
+43
-16
SmsLogMapper.xml
...-system/src/main/resources/mapper/system/SmsLogMapper.xml
+11
-1
No files found.
share-admin/src/main/java/share/web/controller/system/DeviceController.java
View file @
613de8fd
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.SecurityUtils
;
import
share.common.utils.SecurityUtils
;
import
share.system.domain.DeviceDto
;
import
share.system.mqtt.MqttGatewayComponent
;
import
share.system.mqtt.MqttGatewayComponent
;
import
share.system.domain.Device
;
import
share.system.domain.Device
;
import
share.system.domain.vo.DeviceParamVo
;
import
share.system.domain.vo.DeviceParamVo
;
...
@@ -51,7 +52,7 @@ public class DeviceController extends BaseController
...
@@ -51,7 +52,7 @@ public class DeviceController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:device:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:device:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Device
device
)
public
TableDataInfo
list
(
Device
Dto
device
)
{
{
startPage
();
startPage
();
List
<
Device
>
list
=
deviceService
.
selectDeviceList
(
device
);
List
<
Device
>
list
=
deviceService
.
selectDeviceList
(
device
);
...
...
share-admin/src/main/java/share/web/controller/system/DeviceGatewayController.java
View file @
613de8fd
...
@@ -18,6 +18,7 @@ import share.common.core.domain.AjaxResult;
...
@@ -18,6 +18,7 @@ import share.common.core.domain.AjaxResult;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.SecurityUtils
;
import
share.common.utils.SecurityUtils
;
import
share.system.domain.DeviceGateway
;
import
share.system.domain.DeviceGateway
;
import
share.system.domain.DeviceGatewayDto
;
import
share.system.service.DeviceGatewayService
;
import
share.system.service.DeviceGatewayService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -43,10 +44,10 @@ public class DeviceGatewayController extends BaseController
...
@@ -43,10 +44,10 @@ public class DeviceGatewayController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:gateway:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:gateway:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
DeviceGateway
deviceGateway
)
public
TableDataInfo
list
(
DeviceGateway
Dto
deviceGatewayDto
)
{
{
startPage
();
startPage
();
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
);
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
Dto
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -56,10 +57,10 @@ public class DeviceGatewayController extends BaseController
...
@@ -56,10 +57,10 @@ public class DeviceGatewayController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:gateway:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:gateway:export')"
)
@Log
(
title
=
"设备网关信息"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"设备网关信息"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
DeviceGateway
deviceGateway
)
public
void
export
(
HttpServletResponse
response
,
DeviceGateway
Dto
deviceGateway
)
{
{
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
);
List
<
DeviceGateway
>
list
=
deviceGatewayService
.
selectDeviceGatewayList
(
deviceGateway
);
ExcelUtil
<
DeviceGateway
>
util
=
new
ExcelUtil
<
DeviceGateway
>(
DeviceGateway
.
class
);
ExcelUtil
<
DeviceGateway
>
util
=
new
ExcelUtil
<>(
DeviceGateway
.
class
);
util
.
exportExcel
(
response
,
list
,
"设备网关信息数据"
);
util
.
exportExcel
(
response
,
list
,
"设备网关信息数据"
);
}
}
...
...
share-admin/src/main/java/share/web/controller/system/DeviceLogController.java
View file @
613de8fd
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.DeviceLog
;
import
share.system.domain.DeviceLog
;
import
share.system.domain.DeviceLogDto
;
import
share.system.service.DeviceLogService
;
import
share.system.service.DeviceLogService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -39,7 +40,7 @@ public class DeviceLogController extends BaseController
...
@@ -39,7 +40,7 @@ public class DeviceLogController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:log:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:log:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
DeviceLog
deviceLog
)
public
TableDataInfo
list
(
DeviceLog
Dto
deviceLog
)
{
{
startPage
();
startPage
();
List
<
DeviceLog
>
list
=
deviceLogService
.
selectDeviceLogList
(
deviceLog
);
List
<
DeviceLog
>
list
=
deviceLogService
.
selectDeviceLogList
(
deviceLog
);
...
...
share-admin/src/main/java/share/web/controller/system/DeviceStatusLogController.java
View file @
613de8fd
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.DeviceStatusLog
;
import
share.system.domain.DeviceStatusLog
;
import
share.system.domain.DeviceStatusLogDto
;
import
share.system.service.DeviceStatusLogService
;
import
share.system.service.DeviceStatusLogService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -39,7 +40,7 @@ public class DeviceStatusLogController extends BaseController
...
@@ -39,7 +40,7 @@ public class DeviceStatusLogController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:statusLog:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:statusLog:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
DeviceStatusLog
deviceStatusLog
)
public
TableDataInfo
list
(
DeviceStatusLog
Dto
deviceStatusLog
)
{
{
startPage
();
startPage
();
List
<
DeviceStatusLog
>
list
=
deviceStatusLogService
.
selectDeviceStatusLogList
(
deviceStatusLog
);
List
<
DeviceStatusLog
>
list
=
deviceStatusLogService
.
selectDeviceStatusLogList
(
deviceStatusLog
);
...
...
share-admin/src/main/java/share/web/controller/system/SaobeiApiLogController.java
View file @
613de8fd
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLogDto
;
import
share.system.service.SaobeiApiLogService
;
import
share.system.service.SaobeiApiLogService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -39,10 +40,10 @@ public class SaobeiApiLogController extends BaseController
...
@@ -39,10 +40,10 @@ public class SaobeiApiLogController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:saobeilog:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:saobeilog:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SaobeiApiLog
saobeiApiLog
)
public
TableDataInfo
list
(
SaobeiApiLog
Dto
saobeiApiLogDto
)
{
{
startPage
();
startPage
();
List
<
SaobeiApiLog
>
list
=
saobeiApiLogService
.
selectSaobeiApiLogList
(
saobeiApiLog
);
List
<
SaobeiApiLog
Dto
>
list
=
saobeiApiLogService
.
selectSaobeiApiLogList
(
saobeiApiLogDto
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -52,10 +53,10 @@ public class SaobeiApiLogController extends BaseController
...
@@ -52,10 +53,10 @@ public class SaobeiApiLogController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:saobeilog:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:saobeilog:export')"
)
@Log
(
title
=
"扫呗接口调用日志"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"扫呗接口调用日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SaobeiApiLog
saobeiApiLog
)
public
void
export
(
HttpServletResponse
response
,
SaobeiApiLog
Dto
saobeiApiLog
)
{
{
List
<
SaobeiApiLog
>
list
=
saobeiApiLogService
.
selectSaobeiApiLogList
(
saobeiApiLog
);
List
<
SaobeiApiLog
Dto
>
list
=
saobeiApiLogService
.
selectSaobeiApiLogList
(
saobeiApiLog
);
ExcelUtil
<
SaobeiApiLog
>
util
=
new
ExcelUtil
<
SaobeiApiLog
>(
SaobeiApiLog
.
class
);
ExcelUtil
<
SaobeiApiLog
Dto
>
util
=
new
ExcelUtil
<>(
SaobeiApiLogDto
.
class
);
util
.
exportExcel
(
response
,
list
,
"扫呗接口调用日志数据"
);
util
.
exportExcel
(
response
,
list
,
"扫呗接口调用日志数据"
);
}
}
...
...
share-system/src/main/java/share/system/domain/Device.java
View file @
613de8fd
...
@@ -106,6 +106,7 @@ public class Device extends BaseEntity
...
@@ -106,6 +106,7 @@ public class Device extends BaseEntity
.
append
(
"gatewayId"
,
getGatewayId
())
.
append
(
"gatewayId"
,
getGatewayId
())
.
append
(
"voltage"
,
getVoltage
())
.
append
(
"voltage"
,
getVoltage
())
.
append
(
"signalValue"
,
getSignalValue
())
.
append
(
"signalValue"
,
getSignalValue
())
.
append
(
"roomId"
,
getRoomId
())
.
toString
();
.
toString
();
}
}
}
}
share-system/src/main/java/share/system/domain/DeviceDto.java
0 → 100644
View file @
613de8fd
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
DeviceDto
extends
Device
{
/**
* 门店ID
*/
private
Long
storeId
;
}
share-system/src/main/java/share/system/domain/DeviceGatewayDto.java
0 → 100644
View file @
613de8fd
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
DeviceGatewayDto
extends
DeviceGateway
{
/**
* 门店id
*/
private
String
storeId
;
}
share-system/src/main/java/share/system/domain/DeviceLogDto.java
0 → 100644
View file @
613de8fd
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
DeviceLogDto
extends
DeviceLog
{
/**
* 门店id
*/
private
Long
storeId
;
/**
* 房间id
*/
private
Long
roomId
;
}
share-system/src/main/java/share/system/domain/DeviceStatusLogDto.java
0 → 100644
View file @
613de8fd
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
DeviceStatusLogDto
extends
DeviceStatusLog
{
/**
* 门店id
*/
private
Long
storeId
;
}
share-system/src/main/java/share/system/domain/SRoom.java
View file @
613de8fd
...
@@ -32,6 +32,10 @@ public class SRoom extends BaseEntity
...
@@ -32,6 +32,10 @@ public class SRoom extends BaseEntity
@Excel
(
name
=
"门店ID"
)
@Excel
(
name
=
"门店ID"
)
private
Long
storeId
;
private
Long
storeId
;
/** 排序值 */
@Excel
(
name
=
"排序值"
)
private
String
sort
;
/** 房间名称 */
/** 房间名称 */
@Excel
(
name
=
"房间名称"
)
@Excel
(
name
=
"房间名称"
)
private
String
name
;
private
String
name
;
...
...
share-system/src/main/java/share/system/domain/SaobeiApiLogDto.java
0 → 100644
View file @
613de8fd
package
share
.
system
.
domain
;
import
lombok.Data
;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public
class
SaobeiApiLogDto
extends
SaobeiApiLog
{
/**
* 门店id
*/
private
Long
storeId
;
/**
* 房间id
*/
private
Long
roomId
;
}
share-system/src/main/java/share/system/domain/SmsLog.java
View file @
613de8fd
...
@@ -21,6 +21,14 @@ public class SmsLog extends BaseEntity
...
@@ -21,6 +21,14 @@ public class SmsLog extends BaseEntity
/** 主键 */
/** 主键 */
private
Long
id
;
private
Long
id
;
/** 门店id */
@Excel
(
name
=
"门店id"
)
private
Long
storeId
;
/** 房间id */
@Excel
(
name
=
"房间id"
)
private
Long
roomId
;
/** 发送手机号码 */
/** 发送手机号码 */
@Excel
(
name
=
"发送手机号码"
)
@Excel
(
name
=
"发送手机号码"
)
private
String
phone
;
private
String
phone
;
...
@@ -54,6 +62,8 @@ public class SmsLog extends BaseEntity
...
@@ -54,6 +62,8 @@ public class SmsLog extends BaseEntity
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"id"
,
getId
())
.
append
(
"storeId"
,
getStoreId
())
.
append
(
"roomId"
,
getRoomId
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"templateId"
,
getTemplateId
())
.
append
(
"templateId"
,
getTemplateId
())
.
append
(
"signature"
,
getSignature
())
.
append
(
"signature"
,
getSignature
())
...
...
share-system/src/main/java/share/system/domain/vo/SRoomVo.java
View file @
613de8fd
...
@@ -34,6 +34,10 @@ public class SRoomVo extends BaseEntity
...
@@ -34,6 +34,10 @@ public class SRoomVo extends BaseEntity
@ApiModelProperty
(
value
=
"门店ID"
)
@ApiModelProperty
(
value
=
"门店ID"
)
private
Long
storeId
;
private
Long
storeId
;
/** 排序值 */
@Excel
(
name
=
"排序值"
)
private
String
sort
;
/** 门店名称 */
/** 门店名称 */
@ApiModelProperty
(
value
=
"门店名称"
)
@ApiModelProperty
(
value
=
"门店名称"
)
private
String
storeName
;
private
String
storeName
;
...
@@ -140,6 +144,7 @@ public class SRoomVo extends BaseEntity
...
@@ -140,6 +144,7 @@ public class SRoomVo extends BaseEntity
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"id"
,
getId
())
.
append
(
"storeId"
,
getStoreId
())
.
append
(
"storeId"
,
getStoreId
())
.
append
(
"sort"
,
getSort
())
.
append
(
"storeName"
,
getStoreName
())
.
append
(
"storeName"
,
getStoreName
())
.
append
(
"name"
,
getName
())
.
append
(
"name"
,
getName
())
.
append
(
"roomType"
,
getRoomType
())
.
append
(
"roomType"
,
getRoomType
())
...
...
share-system/src/main/java/share/system/mapper/SaobeiApiLogMapper.java
View file @
613de8fd
...
@@ -3,6 +3,7 @@ package share.system.mapper;
...
@@ -3,6 +3,7 @@ package share.system.mapper;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLogDto
;
/**
/**
* 扫呗接口调用日志Mapper接口
* 扫呗接口调用日志Mapper接口
...
@@ -26,7 +27,7 @@ public interface SaobeiApiLogMapper extends BaseMapper<SaobeiApiLog>
...
@@ -26,7 +27,7 @@ public interface SaobeiApiLogMapper extends BaseMapper<SaobeiApiLog>
* @param saobeiApiLog 扫呗接口调用日志
* @param saobeiApiLog 扫呗接口调用日志
* @return 扫呗接口调用日志集合
* @return 扫呗接口调用日志集合
*/
*/
public
List
<
SaobeiApiLog
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
);
public
List
<
SaobeiApiLog
Dto
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
);
/**
/**
* 新增扫呗接口调用日志
* 新增扫呗接口调用日志
...
...
share-system/src/main/java/share/system/service/SaobeiApiLogService.java
View file @
613de8fd
...
@@ -3,6 +3,7 @@ package share.system.service;
...
@@ -3,6 +3,7 @@ package share.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLogDto
;
/**
/**
* 扫呗接口调用日志Service接口
* 扫呗接口调用日志Service接口
...
@@ -26,7 +27,7 @@ public interface SaobeiApiLogService extends IService<SaobeiApiLog>
...
@@ -26,7 +27,7 @@ public interface SaobeiApiLogService extends IService<SaobeiApiLog>
* @param saobeiApiLog 扫呗接口调用日志
* @param saobeiApiLog 扫呗接口调用日志
* @return 扫呗接口调用日志集合
* @return 扫呗接口调用日志集合
*/
*/
public
List
<
SaobeiApiLog
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
);
public
List
<
SaobeiApiLog
Dto
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
);
/**
/**
* 新增扫呗接口调用日志
* 新增扫呗接口调用日志
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
613de8fd
...
@@ -405,6 +405,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -405,6 +405,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
newSConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
newSConsumerCoupon
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
int
insert
=
baseMapper
.
insert
(
newSConsumerCoupon
);
int
insert
=
baseMapper
.
insert
(
newSConsumerCoupon
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
//优惠券数量减一
//优惠券数量减一
...
...
share-system/src/main/java/share/system/service/impl/SaobeiApiLogServiceImpl.java
View file @
613de8fd
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SaobeiApiLogDto
;
import
share.system.mapper.SaobeiApiLogMapper
;
import
share.system.mapper.SaobeiApiLogMapper
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.domain.SaobeiApiLog
;
import
share.system.service.SaobeiApiLogService
;
import
share.system.service.SaobeiApiLogService
;
...
@@ -40,7 +41,7 @@ public class SaobeiApiLogServiceImpl extends ServiceImpl<SaobeiApiLogMapper, Sao
...
@@ -40,7 +41,7 @@ public class SaobeiApiLogServiceImpl extends ServiceImpl<SaobeiApiLogMapper, Sao
* @return 扫呗接口调用日志
* @return 扫呗接口调用日志
*/
*/
@Override
@Override
public
List
<
SaobeiApiLog
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
)
public
List
<
SaobeiApiLog
Dto
>
selectSaobeiApiLogList
(
SaobeiApiLog
saobeiApiLog
)
{
{
return
saobeiApiLogMapper
.
selectSaobeiApiLogList
(
saobeiApiLog
);
return
saobeiApiLogMapper
.
selectSaobeiApiLogList
(
saobeiApiLog
);
}
}
...
...
share-system/src/main/java/share/system/service/impl/SmsServiceImpl.java
View file @
613de8fd
...
@@ -71,11 +71,13 @@ public class SmsServiceImpl implements SmsService {
...
@@ -71,11 +71,13 @@ public class SmsServiceImpl implements SmsService {
* 短信发送
* 短信发送
*
*
* @param phone
* @param phone
* @param storeId
* @param roomId
* @return
* @return
*/
*/
private
boolean
sendSms
(
String
phone
,
Integer
tag
,
String
content
)
{
private
boolean
sendSms
(
String
phone
,
Integer
tag
,
String
content
,
Long
storeId
,
Long
roomId
)
{
try
{
try
{
JSONObject
jsonObject
=
sendOneSms
(
phone
,
content
,
String
.
valueOf
(
tag
));
JSONObject
jsonObject
=
sendOneSms
(
phone
,
content
,
String
.
valueOf
(
tag
)
,
storeId
,
roomId
);
boolean
isSendSuccess
=
Objects
.
nonNull
(
jsonObject
);
boolean
isSendSuccess
=
Objects
.
nonNull
(
jsonObject
);
if
(
tag
==
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
())
{
if
(
tag
==
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
())
{
if
(!
isSendSuccess
)
{
if
(!
isSendSuccess
)
{
...
@@ -95,7 +97,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -95,7 +97,7 @@ public class SmsServiceImpl implements SmsService {
public
boolean
sendSmsCode
(
String
phone
)
{
public
boolean
sendSmsCode
(
String
phone
)
{
// redisUtil.set(sConsumerService.getValidateCodeRedisKey(phone), "123456", Long.valueOf(Constants.CONFIG_KEY_SMS_CODE_EXPIRE), TimeUnit.MINUTES);
// redisUtil.set(sConsumerService.getValidateCodeRedisKey(phone), "123456", Long.valueOf(Constants.CONFIG_KEY_SMS_CODE_EXPIRE), TimeUnit.MINUTES);
String
content
=
getSmsContent
(
phone
,
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
());
String
content
=
getSmsContent
(
phone
,
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CODE_TEMP
.
getCode
(),
content
,
null
,
null
);
}
}
@Override
@Override
...
@@ -104,7 +106,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -104,7 +106,7 @@ public class SmsServiceImpl implements SmsService {
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP
.
getValue
());
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP
.
getValue
());
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -116,7 +118,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -116,7 +118,7 @@ public class SmsServiceImpl implements SmsService {
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP_15
.
getValue
());
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP_15
.
getValue
());
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP_15
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_TEMP_15
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -128,7 +130,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -128,7 +130,7 @@ public class SmsServiceImpl implements SmsService {
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getValue
());
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getValue
());
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
(),
store
.
getAddress
());
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
(),
store
.
getAddress
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -140,7 +142,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -140,7 +142,7 @@ public class SmsServiceImpl implements SmsService {
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getValue
());
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getValue
());
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
());
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -152,7 +154,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -152,7 +154,7 @@ public class SmsServiceImpl implements SmsService {
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_STOP_TEMP
.
getValue
());
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_CLEAN_RECORDS_STOP_TEMP
.
getValue
());
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
store
.
getAddress
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_STOP_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_CLEAN_RECORDS_STOP_TEMP
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -165,7 +167,7 @@ public class SmsServiceImpl implements SmsService {
...
@@ -165,7 +167,7 @@ public class SmsServiceImpl implements SmsService {
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
store
.
getName
(),
room
.
getName
(),
DeviceStatusEnum
.
getNameStr
(
deviceStatusLog
.
getStatus
()));
DeviceStatusEnum
.
getNameStr
(
deviceStatusLog
.
getStatus
()));
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_DEVICE_ABNORMAL_TEMP
.
getCode
(),
content
);
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_DEVICE_ABNORMAL_TEMP
.
getCode
(),
content
,
store
.
getId
(),
room
.
getId
()
);
}
else
{
}
else
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
@@ -235,11 +237,14 @@ public class SmsServiceImpl implements SmsService {
...
@@ -235,11 +237,14 @@ public class SmsServiceImpl implements SmsService {
/**
/**
* 单独发送
* 单独发送
*
* @param phone 手机号
* @param phone 手机号
* @param content 发送内容
* @param content 发送内容
* @param storeId 门店id
* @param roomId 房间id
* @return
* @return
*/
*/
private
JSONObject
sendOneSms
(
String
phone
,
String
content
,
String
smsType
)
{
private
JSONObject
sendOneSms
(
String
phone
,
String
content
,
String
smsType
,
Long
storeId
,
Long
roomId
)
{
// 发送内容添加短信签名
// 发送内容添加短信签名
String
smsContent
=
StrUtil
.
concat
(
true
,
signature
,
content
);
String
smsContent
=
StrUtil
.
concat
(
true
,
signature
,
content
);
JSONObject
param
=
JSONUtil
.
createObj
();
JSONObject
param
=
JSONUtil
.
createObj
();
...
@@ -257,6 +262,8 @@ public class SmsServiceImpl implements SmsService {
...
@@ -257,6 +262,8 @@ public class SmsServiceImpl implements SmsService {
smsLog
.
setContent
(
content
);
smsLog
.
setContent
(
content
);
smsLog
.
setSignature
(
signature
);
smsLog
.
setSignature
(
signature
);
smsLog
.
setSmsType
(
smsType
);
smsLog
.
setSmsType
(
smsType
);
smsLog
.
setStoreId
(
storeId
);
smsLog
.
setRoomId
(
roomId
);
try
{
try
{
JSONObject
jsonObject
=
smsUtil
.
postFrom
(
url
,
param
);
JSONObject
jsonObject
=
smsUtil
.
postFrom
(
url
,
param
);
smsLog
.
setResultParam
(
JSONUtil
.
toJsonStr
(
jsonObject
));
smsLog
.
setResultParam
(
JSONUtil
.
toJsonStr
(
jsonObject
));
...
...
share-system/src/main/resources/mapper/system/DeviceGatewayMapper.xml
View file @
613de8fd
...
@@ -36,21 +36,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -36,21 +36,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
</sql>
<select
id=
"selectDeviceGatewayList"
parameterType=
"DeviceGateway"
resultMap=
"DeviceGatewayResult"
>
<select
id=
"selectDeviceGatewayList"
parameterType=
"DeviceGateway"
resultMap=
"DeviceGatewayResult"
>
<include
refid=
"selectDeviceGatewayVo"
/>
select
t1.id,
t1.dev_name,
t1.dev_mac,
t1.dev_id,
t1.dev_psw,
t1.dev_ver,
t1.dev_type,
t1.`group`,
t1.status,
t1.mqtt_iP,
t1.mqtt_port,
t1.mqtt_user,
t1.mqtt_paswd,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.dev_position,
t1.last_report_date,
t1.last_report_content
from s_device_gateway t1
left join s_store t2 on t1.group = t2.device_group
<where>
<where>
<if
test=
"devName != null and devName != ''"
>
and dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devName != null and devName != ''"
>
and t1.dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devMac != null and devMac != ''"
>
and dev_mac = #{devMac}
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t1.dev_mac = #{devMac}
</if>
<if
test=
"devId != null and devId != ''"
>
and dev_id = #{devId}
</if>
<if
test=
"devId != null and devId != ''"
>
and t1.dev_id = #{devId}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and dev_psw = #{devPsw}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and t1.dev_psw = #{devPsw}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and dev_ver = #{devVer}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and t1.dev_ver = #{devVer}
</if>
<if
test=
"devType != null and devType != ''"
>
and dev_type = #{devType}
</if>
<if
test=
"devType != null and devType != ''"
>
and t1.dev_type = #{devType}
</if>
<if
test=
"group != null and group != ''"
>
and `group` = #{group}
</if>
<if
test=
"group != null and group != ''"
>
and t1.group = #{group}
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
<if
test=
"status != null and status != ''"
>
and t1.status = #{status}
</if>
<if
test=
"mqttIp != null and mqttIp != ''"
>
and mqtt_iP = #{mqttIp}
</if>
<if
test=
"mqttIp != null and mqttIp != ''"
>
and t1.mqtt_iP = #{mqttIp}
</if>
<if
test=
"mqttPort != null and mqttPort != ''"
>
and mqtt_port = #{mqttPort}
</if>
<if
test=
"mqttPort != null and mqttPort != ''"
>
and t1.mqtt_port = #{mqttPort}
</if>
<if
test=
"mqttUser != null and mqttUser != ''"
>
and mqtt_user = #{mqttUser}
</if>
<if
test=
"mqttUser != null and mqttUser != ''"
>
and t1.mqtt_user = #{mqttUser}
</if>
<if
test=
"mqttPaswd != null and mqttPaswd != ''"
>
and mqtt_paswd = #{mqttPaswd}
</if>
<if
test=
"mqttPaswd != null and mqttPaswd != ''"
>
and t1.mqtt_paswd = #{mqttPaswd}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and dev_position = #{devPosition}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and t1.dev_position = #{devPosition}
</if>
<if
test=
"storeId != null"
>
and t2.id = #{storeId}
</if>
</where>
</where>
</select>
</select>
...
...
share-system/src/main/resources/mapper/system/DeviceLogMapper.xml
View file @
613de8fd
...
@@ -33,19 +33,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -33,19 +33,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
</sql>
<select
id=
"selectDeviceLogList"
parameterType=
"DeviceLog"
resultMap=
"DeviceLogResult"
>
<select
id=
"selectDeviceLogList"
parameterType=
"DeviceLog"
resultMap=
"DeviceLogResult"
>
<include
refid=
"selectDeviceLogVo"
/>
select
t1.id,
t1.dev_mac,
t1.dev_id,
t1.seq,
t1.mqtt_type,
t1.mqtt_describe,
t1.payload,
t1.topic,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.`result`,
t1.description
from s_device_log t1
join s_device t2 on t1.dev_id = t2.dev_id
join s_room t3 on t2.room_id = t3.id
join s_store t4 on t3.store_id = t4.id
<where>
<where>
<if
test=
"devMac != null and devMac != ''"
>
and s
1.dev_mac = #{devMac}
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t
1.dev_mac = #{devMac}
</if>
<if
test=
"devId != null and devId != ''"
>
and s
1.dev_id = #{devId}
</if>
<if
test=
"devId != null and devId != ''"
>
and t
1.dev_id = #{devId}
</if>
<if
test=
"seq != null and seq != ''"
>
and s
1.seq = #{seq}
</if>
<if
test=
"seq != null and seq != ''"
>
and t
1.seq = #{seq}
</if>
<if
test=
"mqttType != null and mqttType != ''"
>
and s
1.mqtt_type = #{mqttType}
</if>
<if
test=
"mqttType != null and mqttType != ''"
>
and t
1.mqtt_type = #{mqttType}
</if>
<if
test=
"mqttDescribe != null and mqttDescribe != ''"
>
and s
1.mqtt_describe = #{mqttDescribe}
</if>
<if
test=
"mqttDescribe != null and mqttDescribe != ''"
>
and t
1.mqtt_describe = #{mqttDescribe}
</if>
<if
test=
"payload != null and payload != ''"
>
and s
1.payload = #{payload}
</if>
<if
test=
"payload != null and payload != ''"
>
and t
1.payload = #{payload}
</if>
<if
test=
"topic != null and topic != ''"
>
and s
1.topic = #{topic}
</if>
<if
test=
"topic != null and topic != ''"
>
and t
1.topic = #{topic}
</if>
<if
test=
"store
Name != null and storeName != ''"
>
and s4.name like concat('%', #{storeName}, '%')
</if>
<if
test=
"store
Id != null"
>
and t4.id = #{storeId}
</if>
<if
test=
"room
Name != null and roomName != ''"
>
and s3.name like concat('%', #{roomName}, '%')
</if>
<if
test=
"room
Id != null"
>
and t3.id = #{roomId}
</if>
</where>
</where>
order by
s1.
create_time desc
order by create_time desc
</select>
</select>
<select
id=
"selectDeviceLogById"
parameterType=
"Long"
resultMap=
"DeviceLogResult"
>
<select
id=
"selectDeviceLogById"
parameterType=
"Long"
resultMap=
"DeviceLogResult"
>
...
...
share-system/src/main/resources/mapper/system/DeviceMapper.xml
View file @
613de8fd
...
@@ -35,23 +35,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -35,23 +35,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
</sql>
<select
id=
"selectDeviceList"
parameterType=
"Device"
resultMap=
"DeviceResult"
>
<select
id=
"selectDeviceList"
parameterType=
"Device"
resultMap=
"DeviceResult"
>
<include
refid=
"selectDeviceVo"
/>
select
t1.id,
t1.dev_name,
t1.dev_mac,
t1.dev_id,
t1.dev_psw,
t1.dev_ver,
t1.dev_type,
t1.projt_id,
t1.projt_psw,
t1.`group`,
t1.status,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.dev_position,
t1.gateway_id,
t1.voltage,
t1.signal_value,
t1.room_id
from s_device t1
left join s_room t2 on t1.room_id = t2.id
left join s_store t3 on t2.store_id = t3.id
<where>
<where>
<if
test=
"devName != null and devName != ''"
>
and dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devName != null and devName != ''"
>
and t1.dev_name like concat('%', #{devName}, '%')
</if>
<if
test=
"devMac != null and devMac != ''"
>
and dev_mac = #{devMac}
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t1.dev_mac = #{devMac}
</if>
<if
test=
"devId != null and devId != ''"
>
and dev_id = #{devId}
</if>
<if
test=
"devId != null and devId != ''"
>
and t1.dev_id = #{devId}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and dev_psw = #{devPsw}
</if>
<if
test=
"devPsw != null and devPsw != ''"
>
and t1.dev_psw = #{devPsw}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and dev_ver = #{devVer}
</if>
<if
test=
"devVer != null and devVer != ''"
>
and t1.dev_ver = #{devVer}
</if>
<if
test=
"devType != null and devType != ''"
>
and dev_type = #{devType}
</if>
<if
test=
"devType != null and devType != ''"
>
and t1.dev_type = #{devType}
</if>
<if
test=
"projtId != null and projtId != ''"
>
and projt_id = #{projtId}
</if>
<if
test=
"projtId != null and projtId != ''"
>
and t1.projt_id = #{projtId}
</if>
<if
test=
"projtPsw != null and projtPsw != ''"
>
and projt_psw = #{projtPsw}
</if>
<if
test=
"projtPsw != null and projtPsw != ''"
>
and t1.projt_psw = #{projtPsw}
</if>
<if
test=
"group != null and group != ''"
>
and `group` = #{group}
</if>
<if
test=
"group != null and group != ''"
>
and t1.group = #{group}
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
<if
test=
"status != null and status != ''"
>
and t1.status = #{status}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and dev_position = #{devPosition}
</if>
<if
test=
"devPosition != null and devPosition != ''"
>
and t1.dev_position = #{devPosition}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
and gateway_id = #{gatewayId}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
and t1.gateway_id = #{gatewayId}
</if>
<if
test=
"voltage != null and voltage != ''"
>
and voltage = #{voltage}
</if>
<if
test=
"voltage != null and voltage != ''"
>
and t1.voltage = #{voltage}
</if>
<if
test=
"signalValue != null and signalValue != ''"
>
and signal_value = #{signalValue}
</if>
<if
test=
"signalValue != null and signalValue != ''"
>
and t1.signal_value = #{signalValue}
</if>
<if
test=
"roomId != null"
>
and room_id = #{roomId}
</if>
<if
test=
"roomId != null"
>
and t1.room_id = #{roomId}
</if>
<if
test=
"storeId != null"
>
and t3.id = #{storeId}
</if>
</where>
</where>
</select>
</select>
...
...
share-system/src/main/resources/mapper/system/DeviceStatusLogMapper.xml
View file @
613de8fd
...
@@ -32,21 +32,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -32,21 +32,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
</sql>
<select
id=
"selectDeviceStatusLogList"
parameterType=
"DeviceStatusLog"
resultMap=
"DeviceStatusLogResult"
>
<select
id=
"selectDeviceStatusLogList"
parameterType=
"DeviceStatusLog"
resultMap=
"DeviceStatusLogResult"
>
<include
refid=
"selectDeviceStatusLogVo"
/>
select
t1.id,
t1.dev_id,
t1.dev_mac,
t1.is_abnormal,
t1.status,
t1.room_id,
t1.voltage,
t1.signal_value,
t1.create_time,
t1.update_time,
t1.remark,
t1.operate_log_id,
t1.is_send_sms,
t1.previous_status
from s_device_status_log t1
join s_room t2 on t1.room_id = t2.id
join s_store t3 on t2.store_id = t3.id
<where>
<where>
<if
test=
"devId != null and devId != ''"
>
and s
1.dev_id = #{devId}
</if>
<if
test=
"devId != null and devId != ''"
>
and t
1.dev_id = #{devId}
</if>
<if
test=
"devMac != null and devMac != ''"
>
and s
1.dev_mac = #{devMac}
</if>
<if
test=
"devMac != null and devMac != ''"
>
and t
1.dev_mac = #{devMac}
</if>
<if
test=
"isAbnormal != null "
>
and s
1.is_abnormal = #{isAbnormal}
</if>
<if
test=
"isAbnormal != null "
>
and t
1.is_abnormal = #{isAbnormal}
</if>
<if
test=
"status != null and status != ''"
>
and s
1.status = #{status}
</if>
<if
test=
"status != null and status != ''"
>
and t
1.status = #{status}
</if>
<if
test=
"roomId != null "
>
and s
1.room_id = #{roomId}
</if>
<if
test=
"roomId != null "
>
and t
1.room_id = #{roomId}
</if>
<if
test=
"voltage != null and voltage != ''"
>
and s
1.voltage = #{voltage}
</if>
<if
test=
"voltage != null and voltage != ''"
>
and t
1.voltage = #{voltage}
</if>
<if
test=
"signalValue != null and signalValue != ''"
>
and s
1.signal_value = #{signalValue}
</if>
<if
test=
"signalValue != null and signalValue != ''"
>
and t
1.signal_value = #{signalValue}
</if>
<if
test=
"operateLogId != null "
>
and s
1.operate_log_id = #{operateLogId}
</if>
<if
test=
"operateLogId != null "
>
and t
1.operate_log_id = #{operateLogId}
</if>
<if
test=
"isSendSms != null "
>
and s
1.is_send_sms = #{isSendSms}
</if>
<if
test=
"isSendSms != null "
>
and t
1.is_send_sms = #{isSendSms}
</if>
<if
test=
"
storeName != null and storeName != ''"
>
and s4.name like concat('%', #{storeName}, '%')
</if>
<if
test=
"
roomId != null "
>
and t2.id = #{roomId}
</if>
<if
test=
"
roomName != null and roomName != ''"
>
and s3.name like concat('%', #{roomName}, '%')
</if>
<if
test=
"
storeId != null "
>
and t3.id = #{storeId}
</if>
</where>
</where>
order by
s1.
create_time desc
order by create_time desc
</select>
</select>
<select
id=
"selectDeviceStatusLogById"
parameterType=
"Long"
resultMap=
"DeviceStatusLogResult"
>
<select
id=
"selectDeviceStatusLogById"
parameterType=
"Long"
resultMap=
"DeviceStatusLogResult"
>
...
...
share-system/src/main/resources/mapper/system/SRoomMapper.xml
View file @
613de8fd
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<resultMap
type=
"SRoom"
id=
"SRoomResult"
>
<resultMap
type=
"SRoom"
id=
"SRoomResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"images"
column=
"images"
/>
<result
property=
"images"
column=
"images"
/>
...
@@ -69,6 +70,7 @@
...
@@ -69,6 +70,7 @@
<if
test=
"params1 != null and params1 != ''"
>
and params1 = #{params1}
</if>
<if
test=
"params1 != null and params1 != ''"
>
and params1 = #{params1}
</if>
<if
test=
"params2 != null and params2 != ''"
>
and params2 = #{params2}
</if>
<if
test=
"params2 != null and params2 != ''"
>
and params2 = #{params2}
</if>
</where>
</where>
order by sort desc
</select>
</select>
<select
id=
"selectSRoomById"
parameterType=
"Long"
resultMap=
"SRoomResult"
>
<select
id=
"selectSRoomById"
parameterType=
"Long"
resultMap=
"SRoomResult"
>
...
@@ -79,6 +81,7 @@
...
@@ -79,6 +81,7 @@
<insert
id=
"insertSRoom"
parameterType=
"SRoom"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertSRoom"
parameterType=
"SRoom"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_room
insert into s_room
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"roomType != null"
>
room_type,
</if>
<if
test=
"roomType != null"
>
room_type,
</if>
...
@@ -100,6 +103,7 @@
...
@@ -100,6 +103,7 @@
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"sort != null"
>
#{sort},
</if>
<if
test=
"storeId != null"
>
#{storeId},
</if>
<if
test=
"storeId != null"
>
#{storeId},
</if>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"roomType != null"
>
#{roomType},
</if>
<if
test=
"roomType != null"
>
#{roomType},
</if>
...
@@ -125,6 +129,7 @@
...
@@ -125,6 +129,7 @@
<update
id=
"updateSRoom"
parameterType=
"SRoom"
>
<update
id=
"updateSRoom"
parameterType=
"SRoom"
>
update s_room
update s_room
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"sort != null"
>
sort = #{sort},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId},
</if>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
...
...
share-system/src/main/resources/mapper/system/SaobeiApiLogMapper.xml
View file @
613de8fd
...
@@ -31,23 +31,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -31,23 +31,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, pay_ver, pay_type, service_id, merchant_no, terminal_id, terminal_ip, terminal_trace, terminal_time, out_trade_no, request_params, response_params, result, result_msg, create_time, create_by, update_by, update_time, remark, flag from s_saobei_api_log
select id, pay_ver, pay_type, service_id, merchant_no, terminal_id, terminal_ip, terminal_trace, terminal_time, out_trade_no, request_params, response_params, result, result_msg, create_time, create_by, update_by, update_time, remark, flag from s_saobei_api_log
</sql>
</sql>
<select
id=
"selectSaobeiApiLogList"
parameterType=
"SaobeiApiLog"
resultMap=
"SaobeiApiLogResult"
>
<select
id=
"selectSaobeiApiLogList"
parameterType=
"SaobeiApiLog"
resultType=
"SaobeiApiLogDto"
>
<include
refid=
"selectSaobeiApiLogVo"
/>
select
t1.id,
t3.store_id,
t3.room_id,
t1.pay_ver,
t1.pay_type,
t1.service_id,
t1.merchant_no,
t1.terminal_id,
t1.terminal_ip,
t1.terminal_trace,
t1.terminal_time,
t1.out_trade_no,
t1.request_params,
t1.response_params,
t1.result,
t1.result_msg,
t1.create_time,
t1.create_by,
t1.update_by,
t1.update_time,
t1.remark,
t1.flag
from s_saobei_api_log t1
join s_wechat_pay_info t2 on t1.terminal_trace = t2.out_trade_no
join s_order t3 on t2.out_trade_no = t3.out_trade_no
<where>
<where>
<if
test=
"payVer != null and payVer != ''"
>
and pay_ver = #{payVer}
</if>
<if
test=
"storeId != null"
>
and t3.store_id = #{storeId}
</if>
<if
test=
"payType != null and payType != ''"
>
and pay_type = #{payType}
</if>
<if
test=
"roomId != null"
>
and t3.room_id = #{roomId}
</if>
<if
test=
"serviceId != null and serviceId != ''"
>
and service_id = #{serviceId}
</if>
<if
test=
"payVer != null and payVer != ''"
>
and t1.pay_ver = #{payVer}
</if>
<if
test=
"merchantNo != null and merchantNo != ''"
>
and merchant_no = #{merchantNo}
</if>
<if
test=
"payType != null and payType != ''"
>
and t1.pay_type = #{payType}
</if>
<if
test=
"terminalId != null and terminalId != ''"
>
and terminal_id = #{terminalId}
</if>
<if
test=
"serviceId != null and serviceId != ''"
>
and t1.service_id = #{serviceId}
</if>
<if
test=
"terminalIp != null and terminalIp != ''"
>
and terminal_ip = #{terminalIp}
</if>
<if
test=
"merchantNo != null and merchantNo != ''"
>
and t1.merchant_no = #{merchantNo}
</if>
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and terminal_trace = #{terminalTrace}
</if>
<if
test=
"terminalId != null and terminalId != ''"
>
and t1.terminal_id = #{terminalId}
</if>
<if
test=
"terminalTime != null and terminalTime != ''"
>
and terminal_time = #{terminalTime}
</if>
<if
test=
"terminalIp != null and terminalIp != ''"
>
and t1.terminal_ip = #{terminalIp}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and t1.terminal_trace = #{terminalTrace}
</if>
<if
test=
"requestParams != null and requestParams != ''"
>
and request_params = #{requestParams}
</if>
<if
test=
"terminalTime != null and terminalTime != ''"
>
and t1.terminal_time = #{terminalTime}
</if>
<if
test=
"responseParams != null and responseParams != ''"
>
and response_params = #{responseParams}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and t1.out_trade_no = #{outTradeNo}
</if>
<if
test=
"result != null and result != ''"
>
and result = #{result}
</if>
<if
test=
"requestParams != null and requestParams != ''"
>
and t1.request_params = #{requestParams}
</if>
<if
test=
"resultMsg != null and resultMsg != ''"
>
and result_msg = #{resultMsg}
</if>
<if
test=
"responseParams != null and responseParams != ''"
>
and t1.response_params = #{responseParams}
</if>
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
<if
test=
"result != null and result != ''"
>
and t1.result = #{result}
</if>
<if
test=
"resultMsg != null and resultMsg != ''"
>
and t1.result_msg = #{resultMsg}
</if>
<if
test=
"flag != null and flag != ''"
>
and t1.flag = #{flag}
</if>
</where>
</where>
order by create_time desc
order by create_time desc
</select>
</select>
...
...
share-system/src/main/resources/mapper/system/SmsLogMapper.xml
View file @
613de8fd
...
@@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"SmsLog"
id=
"SmsLogResult"
>
<resultMap
type=
"SmsLog"
id=
"SmsLogResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"roomId"
column=
"room_id"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"templateId"
column=
"template_id"
/>
<result
property=
"templateId"
column=
"template_id"
/>
<result
property=
"signature"
column=
"signature"
/>
<result
property=
"signature"
column=
"signature"
/>
...
@@ -21,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -21,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectSmsLogVo"
>
<sql
id=
"selectSmsLogVo"
>
select id, phone, template_id, signature, content, sms_type, create_by, create_time, update_by, update_time, remark, result, result_param from s_sms_log
select id,
store_id, room_id,
phone, template_id, signature, content, sms_type, create_by, create_time, update_by, update_time, remark, result, result_param from s_sms_log
</sql>
</sql>
<select
id=
"selectSmsLogList"
parameterType=
"SmsLog"
resultMap=
"SmsLogResult"
>
<select
id=
"selectSmsLogList"
parameterType=
"SmsLog"
resultMap=
"SmsLogResult"
>
<include
refid=
"selectSmsLogVo"
/>
<include
refid=
"selectSmsLogVo"
/>
<where>
<where>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"storeId != null"
>
and store_id = #{storeId}
</if>
<if
test=
"roomId != null"
>
and room_id = #{roomId}
</if>
<if
test=
"templateId != null and templateId != ''"
>
and template_id = #{templateId}
</if>
<if
test=
"templateId != null and templateId != ''"
>
and template_id = #{templateId}
</if>
<if
test=
"signature != null and signature != ''"
>
and signature = #{signature}
</if>
<if
test=
"signature != null and signature != ''"
>
and signature = #{signature}
</if>
<if
test=
"content != null and content != ''"
>
and content = #{content}
</if>
<if
test=
"content != null and content != ''"
>
and content = #{content}
</if>
...
@@ -46,6 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -46,6 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertSmsLog"
parameterType=
"SmsLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertSmsLog"
parameterType=
"SmsLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_sms_log
insert into s_sms_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"roomId != null"
>
room_id,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"templateId != null"
>
template_id,
</if>
<if
test=
"templateId != null"
>
template_id,
</if>
<if
test=
"signature != null"
>
signature,
</if>
<if
test=
"signature != null"
>
signature,
</if>
...
@@ -60,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -60,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"resultParam != null"
>
result_param,
</if>
<if
test=
"resultParam != null"
>
result_param,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
#{storeId},
</if>
<if
test=
"roomId != null"
>
#{roomId},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"templateId != null"
>
#{templateId},
</if>
<if
test=
"templateId != null"
>
#{templateId},
</if>
<if
test=
"signature != null"
>
#{signature},
</if>
<if
test=
"signature != null"
>
#{signature},
</if>
...
@@ -78,6 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -78,6 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"updateSmsLog"
parameterType=
"SmsLog"
>
<update
id=
"updateSmsLog"
parameterType=
"SmsLog"
>
update s_sms_log
update s_sms_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
store_id = #{storeId},
</if>
<if
test=
"roomId != null"
>
room_id = #{roomId},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"templateId != null"
>
template_id = #{templateId},
</if>
<if
test=
"templateId != null"
>
template_id = #{templateId},
</if>
<if
test=
"signature != null"
>
signature = #{signature},
</if>
<if
test=
"signature != null"
>
signature = #{signature},
</if>
...
...
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