新增客户端举报接口权限
This commit is contained in:
parent
74314aa26c
commit
cdc41c428c
@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ -17,7 +18,7 @@ import java.util.Date;
|
||||
@Accessors(chain = true)
|
||||
@TableName("sns_user_report")
|
||||
@ApiModel("社交平台用户举报记录表(含审计跟踪)")
|
||||
public class SnsUserReport {
|
||||
public class SnsUserReport implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "自增主键ID", example = "1")
|
||||
private Long id;
|
||||
@ -104,11 +105,11 @@ public class SnsUserReport {
|
||||
|
||||
@TableField(value = "created_at", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
@ApiModelProperty(value = "记录创建时间", example = "2023-01-01T00:00:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createdAt;
|
||||
|
||||
@TableField(value = "updated_at", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
@ApiModelProperty(value = "记录最后更新时间", example = "2023-01-02T00:00:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date updatedAt;
|
||||
}
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
package com.suisung.mall.sns.controller.mobile;
|
||||
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.modules.sns.SnsUserReport;
|
||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||
import com.suisung.mall.sns.service.SnsUserReportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "社交平台用户举报记录控制器")
|
||||
@RequestMapping("/mobile/sns/snsUserReport")
|
||||
@RestController
|
||||
public class SnsUserReportMobileController extends BaseControllerImpl {
|
||||
|
||||
@Resource
|
||||
private SnsUserReportService snsUserReportService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "举报记录表-分页列表查询", notes = "举报记录表-分页列表查询")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult list(@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
return snsUserReportService.findPageSnsUserReport(pageNum, pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 举报提交
|
||||
*
|
||||
* @param snsUserReport
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "举报记录表-举报提交", notes = "举报记录表-举报提交")
|
||||
@RequestMapping(value = "/submitReport", method = RequestMethod.POST)
|
||||
public CommonResult submitReport(@Validated @RequestParam("snsUserReport") SnsUserReport snsUserReport,@RequestParam("files") List<MultipartFile> files) {
|
||||
return snsUserReportService.submitReport(snsUserReport,files);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
3
sql/shop/dev/20250813_dml_02.sql
Normal file
3
sql/shop/dev/20250813_dml_02.sql
Normal file
@ -0,0 +1,3 @@
|
||||
INSERT INTO `admin_base_protocol` (`ctl`, `met`, `db`, `rights_id`, `log`, `path`,`comment`) VALUES ('/mobile/sns/snsUserReport/list', 'index', 'master', '', '0', '/mobile/sns/snsUserReport/list','移动端举报查询接口');
|
||||
|
||||
INSERT INTO `admin_base_protocol` (`ctl`, `met`, `db`, `rights_id`, `log`, `path`,`comment`) VALUES ('/mobile/sns/snsUserReport/submitReport', 'index', 'master', '', '0', '/mobile/sns/snsUserReport/submitReport','移动端举报提交接口');
|
||||
Loading…
Reference in New Issue
Block a user