代码补正
This commit is contained in:
parent
251735740f
commit
fd353a54d1
@ -38,7 +38,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询系统通知列表
|
* 查询系统通知列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:list')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public CommonResult list(SysAnnouncement sysAnnouncement)
|
public CommonResult list(SysAnnouncement sysAnnouncement)
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 导出系统通知列表
|
* 导出系统通知列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:export')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SysAnnouncement sysAnnouncement)
|
public void export(HttpServletResponse response, SysAnnouncement sysAnnouncement)
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取系统通知详细信息
|
* 获取系统通知详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:query')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public CommonResult getInfo(@PathVariable("id") Long id)
|
public CommonResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增系统通知
|
* 新增系统通知
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:add')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public CommonResult add(@RequestBody SysAnnouncement sysAnnouncement)
|
public CommonResult add(@RequestBody SysAnnouncement sysAnnouncement)
|
||||||
{
|
{
|
||||||
@ -82,7 +82,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改系统通知
|
* 修改系统通知
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:edit')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public CommonResult edit(@RequestBody SysAnnouncement sysAnnouncement)
|
public CommonResult edit(@RequestBody SysAnnouncement sysAnnouncement)
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ public class SysAnnouncementController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除系统通知
|
* 删除系统通知
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('announcement:announcement:remove')")
|
@PreAuthorize("@ss.hasPermission('announcement:announcement:remove')")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public CommonResult remove(@PathVariable Long[] ids)
|
public CommonResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
|
@ -155,10 +155,9 @@ public class RescueInfoController extends BaseController {
|
|||||||
* 查询【请填写功能名称】列表
|
* 查询【请填写功能名称】列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/driverList")
|
@GetMapping("/driverList")
|
||||||
public TableDataInfo driverList(DriverInfoDto driverInfoDto) {
|
public CommonResult driverList(DriverInfoDto driverInfoDto) {
|
||||||
startPage();
|
|
||||||
List<DriverInfo2Dto> list = rescueInfoService.driverListApp(driverInfoDto);
|
List<DriverInfo2Dto> list = rescueInfoService.driverListApp(driverInfoDto);
|
||||||
return getDataTable(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,9 @@ import java.io.IOException;
|
|||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
|
||||||
/**`1
|
/**
|
||||||
|
* `1
|
||||||
|
*
|
||||||
* @Author: chuxia0811
|
* @Author: chuxia0811
|
||||||
* @Date: 2023/7/9 10:21
|
* @Date: 2023/7/9 10:21
|
||||||
* @Description :
|
* @Description :
|
||||||
@ -25,9 +27,11 @@ public class UserAnnouncementSocket {
|
|||||||
public static ConcurrentHashMap<String, Session> sessionMap = new ConcurrentHashMap<>();
|
public static ConcurrentHashMap<String, Session> sessionMap = new ConcurrentHashMap<>();
|
||||||
//关键代码,设置一个静态上下文属性appcontext
|
//关键代码,设置一个静态上下文属性appcontext
|
||||||
private static ApplicationContext appcontext;
|
private static ApplicationContext appcontext;
|
||||||
|
|
||||||
public static void setAppcontext(ApplicationContext appcontext) {
|
public static void setAppcontext(ApplicationContext appcontext) {
|
||||||
UserAnnouncementSocket.appcontext = appcontext;
|
UserAnnouncementSocket.appcontext = appcontext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ApplicationContext getAppcontext() {
|
public static ApplicationContext getAppcontext() {
|
||||||
return appcontext;
|
return appcontext;
|
||||||
}
|
}
|
||||||
@ -36,6 +40,7 @@ public class UserAnnouncementSocket {
|
|||||||
/**
|
/**
|
||||||
* 创建连接
|
* 创建连接
|
||||||
* 用于监听建立连接,当有客户端与该服务端点建立连接时,将会自回调该注解标注的方法
|
* 用于监听建立连接,当有客户端与该服务端点建立连接时,将会自回调该注解标注的方法
|
||||||
|
*
|
||||||
* @param session
|
* @param session
|
||||||
* @param userId
|
* @param userId
|
||||||
*/
|
*/
|
||||||
@ -53,6 +58,7 @@ public class UserAnnouncementSocket {
|
|||||||
* latitude:125.33,
|
* latitude:125.33,
|
||||||
* positionInfo:"山东省济南市市中区八一立交桥"
|
* positionInfo:"山东省济南市市中区八一立交桥"
|
||||||
* }
|
* }
|
||||||
|
*
|
||||||
* @param msg
|
* @param msg
|
||||||
* @param userId
|
* @param userId
|
||||||
*/
|
*/
|
||||||
@ -64,6 +70,7 @@ public class UserAnnouncementSocket {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于监听连接关闭,当客户端与该服务端点断开连接时,将会回调该注解标注的方法
|
* 用于监听连接关闭,当客户端与该服务端点断开连接时,将会回调该注解标注的方法
|
||||||
|
*
|
||||||
* @param session
|
* @param session
|
||||||
* @param userId
|
* @param userId
|
||||||
*/
|
*/
|
||||||
@ -76,6 +83,7 @@ public class UserAnnouncementSocket {
|
|||||||
/**
|
/**
|
||||||
* 用于监听该连接上的任何错误,当客户端与该服务端点的连接发生任何异常,都将回调该注解标注的方法
|
* 用于监听该连接上的任何错误,当客户端与该服务端点的连接发生任何异常,都将回调该注解标注的方法
|
||||||
* 注意该方法的参数必选Throwable,可选Sessiion以及0-n个String参数,且String参数需要使用@PathParam注解标注
|
* 注意该方法的参数必选Throwable,可选Sessiion以及0-n个String参数,且String参数需要使用@PathParam注解标注
|
||||||
|
*
|
||||||
* @param throwable
|
* @param throwable
|
||||||
* @param driverId
|
* @param driverId
|
||||||
*/
|
*/
|
||||||
@ -86,6 +94,7 @@ public class UserAnnouncementSocket {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送给指定的用户
|
* 发送给指定的用户
|
||||||
|
*
|
||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
public void sendMessage(String message, String userId) throws IOException {
|
public void sendMessage(String message, String userId) throws IOException {
|
||||||
@ -94,6 +103,4 @@ public class UserAnnouncementSocket {
|
|||||||
session.getAsyncRemote().sendText(message);
|
session.getAsyncRemote().sendText(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class RescueInfo extends TenantBaseDO
|
|||||||
private String isAppointment;
|
private String isAppointment;
|
||||||
|
|
||||||
/** 救援时间 */
|
/** 救援时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
|
||||||
@Excel(name = "救援时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
@Excel(name = "救援时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||||
private Date rescueTime;
|
private Date rescueTime;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ public class RescueInfo extends TenantBaseDO
|
|||||||
@Excel(name = "实付金额")
|
@Excel(name = "实付金额")
|
||||||
private Double payMoneyYuan;
|
private Double payMoneyYuan;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
|
||||||
@Excel(name = "收款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
@Excel(name = "收款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||||
private Date payTime;
|
private Date payTime;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ -130,11 +130,13 @@ public class YudaoWebSecurityConfigurerAdapter {
|
|||||||
// 1.1 静态资源,可匿名访问
|
// 1.1 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
|
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
|
||||||
|
|
||||||
|
// 登录可以匿名访问
|
||||||
.antMatchers(HttpMethod.POST, "/admin-api/rescue/login",
|
.antMatchers(HttpMethod.POST, "/admin-api/rescue/login",
|
||||||
"/admin-api/rescue/loginApp",
|
"/admin-api/rescue/loginApp",
|
||||||
"/admin-api/rescue/wxLogin",
|
"/admin-api/rescue/wxLogin",
|
||||||
"/admin-api/system/auth/loginApp",
|
"/admin-api/system/auth/loginApp",
|
||||||
"/admin-api/rescue/driverLogin").anonymous()
|
"/admin-api/rescue/driverLogin").anonymous()
|
||||||
|
|
||||||
// 1.2 设置 @PermitAll 无需认证
|
// 1.2 设置 @PermitAll 无需认证
|
||||||
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
|
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
|
||||||
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()
|
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()
|
||||||
|
Loading…
Reference in New Issue
Block a user