wip: phase-52 backend
This commit is contained in:
+6
-6
@@ -30,7 +30,7 @@ public class MsgSubscriptionController {
|
||||
* @param dto 订阅信息
|
||||
* @return 订阅 ID
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:add')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:add')")
|
||||
@PostMapping
|
||||
public Result<Long> create(@Valid @RequestBody MsgSubscriptionDTO dto) {
|
||||
Long id = msgSubscriptionService.create(dto);
|
||||
@@ -44,7 +44,7 @@ public class MsgSubscriptionController {
|
||||
* @param dto 订阅信息
|
||||
* @return 成功响应
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:edit')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:edit')")
|
||||
@PutMapping("/{id}")
|
||||
public Result<Void> update(@PathVariable Long id, @Valid @RequestBody MsgSubscriptionDTO dto) {
|
||||
msgSubscriptionService.update(id, dto);
|
||||
@@ -57,7 +57,7 @@ public class MsgSubscriptionController {
|
||||
* @param id 订阅 ID
|
||||
* @return 成功响应
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:delete')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:delete')")
|
||||
@DeleteMapping("/{id}")
|
||||
public Result<Void> delete(@PathVariable Long id) {
|
||||
msgSubscriptionService.delete(id);
|
||||
@@ -70,7 +70,7 @@ public class MsgSubscriptionController {
|
||||
* @param id 订阅 ID
|
||||
* @return 订阅详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:query')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:query')")
|
||||
@GetMapping("/{id}")
|
||||
public Result<MsgSubscriptionVO> getById(@PathVariable Long id) {
|
||||
MsgSubscriptionVO vo = msgSubscriptionService.getById(id);
|
||||
@@ -83,7 +83,7 @@ public class MsgSubscriptionController {
|
||||
* @param query 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:list')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:list')")
|
||||
@GetMapping
|
||||
public Result<PageResult<MsgSubscriptionVO>> list(MsgSubscriptionQueryDTO query) {
|
||||
PageResult<MsgSubscriptionVO> result = msgSubscriptionService.list(query);
|
||||
@@ -97,7 +97,7 @@ public class MsgSubscriptionController {
|
||||
* @param status 新状态
|
||||
* @return 成功响应
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermission('system:message:subscription:edit')")
|
||||
@PreAuthorize("hasAuthority('system:message:subscription:edit')")
|
||||
@PutMapping("/{id}/status")
|
||||
public Result<Void> updateStatus(@PathVariable Long id, @RequestParam String status) {
|
||||
msgSubscriptionService.updateStatus(id, status);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.ljwx.platform.app.infra.mapper;
|
||||
|
||||
import com.ljwx.platform.app.domain.entity.MsgSubscription;
|
||||
import com.ljwx.platform.core.domain.MsgSubscription;
|
||||
import com.ljwx.platform.app.dto.MsgSubscriptionQueryDTO;
|
||||
import com.ljwx.platform.app.vo.MsgSubscriptionVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.ljwx.platform.app.service;
|
||||
|
||||
import com.ljwx.platform.app.domain.entity.MsgSubscription;
|
||||
import com.ljwx.platform.core.domain.MsgSubscription;
|
||||
import com.ljwx.platform.app.dto.MsgSubscriptionDTO;
|
||||
import com.ljwx.platform.app.dto.MsgSubscriptionQueryDTO;
|
||||
import com.ljwx.platform.app.infra.mapper.MsgSubscriptionMapper;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.ljwx.platform.app.infra.mapper.MsgSubscriptionMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="com.ljwx.platform.app.domain.entity.MsgSubscription">
|
||||
<resultMap id="BaseResultMap" type="com.ljwx.platform.core.domain.MsgSubscription">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="template_id" property="templateId" />
|
||||
|
||||
@@ -14,6 +14,11 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MsgSubscription extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user