From 68985c22a03d280a96e89f4d0e67f144259fab92 Mon Sep 17 00:00:00 2001 From: 安瑾然 <107107765@qq.com> Date: 星期三, 13 七月 2022 11:54:54 +0800 Subject: [PATCH] commit --- src/main/java/com/example/jz/dao/CauseDao.java | 5 src/main/java/com/example/jz/modle/entity/Cause.java | 159 ++++------ src/main/java/com/example/jz/dao/ReportDao.java | 15 + src/main/java/com/example/jz/modle/entity/Sensitive.java | 49 +++ src/main/java/com/example/jz/modle/entity/Report.java | 159 ++++++++++ src/main/java/com/example/jz/service/impl/SensitiveServiceImpl.java | 19 + src/main/java/com/example/jz/controller/ReportController.java | 88 +++++ src/main/java/com/example/jz/controller/CauseController.java | 7 src/main/java/com/example/jz/service/impl/CauseServiceImpl.java | 5 src/main/java/com/example/jz/modle/vo/SensitiveVO.java | 37 ++ src/main/java/com/example/jz/modle/entity/Group.java | 3 src/main/java/com/example/jz/service/SensitiveService.java | 15 + src/main/java/com/example/jz/config/DefaultExceptionHandlerConfig.java | 21 src/main/java/com/example/jz/controller/CommonQuestionController.java | 42 ++ /dev/null | 18 - src/main/java/com/example/jz/service/ReportService.java | 15 + src/main/java/com/example/jz/controller/SensitiveController.java | 122 ++++++++ src/main/java/com/example/jz/controller/TestController.java | 29 + src/main/java/com/example/jz/controller/PublicityController.java | 8 src/main/java/com/example/jz/modle/dto/SensitiveDto.java | 35 ++ src/main/java/com/example/jz/dao/SensitiveDao.java | 15 + src/main/java/com/example/jz/service/CauseService.java | 4 src/main/java/com/example/jz/service/impl/ReportServiceImpl.java | 19 + 23 files changed, 742 insertions(+), 147 deletions(-) diff --git a/src/main/java/com/example/jz/config/DefaultExceptionHandlerConfig.java b/src/main/java/com/example/jz/config/DefaultExceptionHandlerConfig.java index ce97b0b..9e267cc 100644 --- a/src/main/java/com/example/jz/config/DefaultExceptionHandlerConfig.java +++ b/src/main/java/com/example/jz/config/DefaultExceptionHandlerConfig.java @@ -2,6 +2,7 @@ import com.example.jz.exception.BusinessException; import com.example.jz.modle.R; +import org.springframework.core.annotation.Order; import org.springframework.stereotype.Controller; import org.springframework.validation.BindException; import org.springframework.web.bind.MethodArgumentNotValidException; @@ -15,23 +16,15 @@ @RestControllerAdvice public class DefaultExceptionHandlerConfig { - - @ExceptionHandler(BindException.class) - public R<String> bindExceptionHandler(BindException e) { - e.printStackTrace(); - return R.failed(e.getBindingResult().getFieldErrors().get(0).getDefaultMessage()); - - } - - @ExceptionHandler(MethodArgumentNotValidException.class) - public R<String> methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException e) { - e.printStackTrace(); - return R.failed(e.getBindingResult().getFieldErrors().get(0).getDefaultMessage()); - } - @ExceptionHandler(BusinessException.class) public R<String> unauthorizedExceptionHandler(BusinessException e) { e.printStackTrace(); return R.failed(e.getMessage()); } + + @ExceptionHandler(Exception.class) + public R<String> ExceptionHandler(Exception e) { + e.printStackTrace(); + return R.failed(e.getMessage()); + } } diff --git a/src/main/java/com/example/jz/controller/CauseController.java b/src/main/java/com/example/jz/controller/CauseController.java index 29f16da..c0ec5f2 100644 --- a/src/main/java/com/example/jz/controller/CauseController.java +++ b/src/main/java/com/example/jz/controller/CauseController.java @@ -1,5 +1,7 @@ package com.example.jz.controller; + + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.api.ApiController; import com.baomidou.mybatisplus.extension.api.R; @@ -13,10 +15,10 @@ import java.util.List; /** - * (Cause)琛ㄦ帶鍒跺眰 + * 妗堜欢琛�(Cause)琛ㄦ帶鍒跺眰 * * @author makejava - * @since 2022-07-11 16:55:40 + * @since 2022-07-13 11:52:57 */ @RestController @RequestMapping("cause") @@ -83,3 +85,4 @@ return success(this.causeService.removeByIds(idList)); } } + diff --git a/src/main/java/com/example/jz/controller/CommonQuestionController.java b/src/main/java/com/example/jz/controller/CommonQuestionController.java index a8256a0..3fecef8 100644 --- a/src/main/java/com/example/jz/controller/CommonQuestionController.java +++ b/src/main/java/com/example/jz/controller/CommonQuestionController.java @@ -14,7 +14,7 @@ import javax.annotation.Resource; import java.io.Serializable; -import java.util.List; +import java.util.Date; /** * 甯歌闂琛�(CommonQuestion)琛ㄦ帶鍒跺眰 @@ -66,6 +66,8 @@ @PostMapping @ApiOperation(value = "鏂板鏁版嵁", notes = "鏂板鏁版嵁") public R<Boolean> insert(@RequestBody CommonQuestion commonQuestion) { + commonQuestion.setStatus(0); + commonQuestion.setCtime(new Date()); return R.ok(commonQuestionService.save(commonQuestion)); } @@ -78,18 +80,50 @@ @PutMapping @ApiOperation(value = "淇敼鏁版嵁", notes = "淇敼鏁版嵁") public R<Boolean> update(@RequestBody CommonQuestion commonQuestion) { + if (commonQuestion.getId() == 1) { + commonQuestion.setReleaseTime(new Date()); + } return R.ok(commonQuestionService.updateById(commonQuestion)); } /** * 鍒犻櫎鏁版嵁 * - * @param idList 涓婚敭缁撳悎 + * @param id 涓婚敭 * @return 鍒犻櫎缁撴灉 */ @DeleteMapping @ApiOperation(value = "鍒犻櫎鏁版嵁", notes = "鍒犻櫎鏁版嵁") - public R<Boolean> delete(@RequestParam("idList") List<Long> idList) { - return R.ok(commonQuestionService.removeByIds(idList)); + public R<Boolean> delete(@RequestParam("id") Serializable id) { + return R.ok(commonQuestionService.removeById(id)); + } + + /** + * 鍙戝竷 + * + * @param id 涓婚敭 + * @return 鍙戝竷缁撴灉 + */ + @ApiOperation(value = "鍙戝竷", notes = "鍙戝竷") + @GetMapping("release/{id}") + public R<Boolean> release(@PathVariable Serializable id) { + CommonQuestion commonQuestion = commonQuestionService.getById(id); + commonQuestion.setReleaseTime(new Date()); + commonQuestion.setStatus(1); + return R.ok(commonQuestionService.updateById(commonQuestion)); + } + + /** + * 涓嬫灦 + * + * @param id 涓婚敭 + * @return 鍙戝竷缁撴灉 + */ + @ApiOperation(value = "涓嬫灦", notes = "涓嬫灦") + @GetMapping("offline/{id}") + public R<Boolean> offline(@PathVariable Serializable id) { + CommonQuestion commonQuestion = commonQuestionService.getById(id); + commonQuestion.setStatus(2); + return R.ok(commonQuestionService.updateById(commonQuestion)); } } diff --git a/src/main/java/com/example/jz/controller/PublicityController.java b/src/main/java/com/example/jz/controller/PublicityController.java index 8ae7a06..7604fde 100644 --- a/src/main/java/com/example/jz/controller/PublicityController.java +++ b/src/main/java/com/example/jz/controller/PublicityController.java @@ -88,9 +88,9 @@ * @param id 涓婚敭缁撳悎 * @return 鎵ц缁撴灉 */ - @GetMapping("status/down/{id}") + @GetMapping("offline/{id}") @ApiOperation("涓嬫灦鍏叡瀹d紶") - public R<Boolean> undercarriage(@PathVariable Serializable id) { + public R<Boolean> offline(@PathVariable Serializable id) { return R.ok(publicityService.undercarriage(id)); } @@ -100,9 +100,9 @@ * @param id 涓婚敭缁撳悎 * @return 鎵ц缁撴灉 */ - @GetMapping("status/up/{id}") + @GetMapping("release/{id}") @ApiOperation("涓婃灦鍏叡瀹d紶") - public R<Boolean> grounding(@PathVariable Serializable id) { + public R<Boolean> release(@PathVariable Serializable id) { return R.ok(publicityService.grounding(id)); } diff --git a/src/main/java/com/example/jz/controller/ReportController.java b/src/main/java/com/example/jz/controller/ReportController.java new file mode 100644 index 0000000..7e4bdf8 --- /dev/null +++ b/src/main/java/com/example/jz/controller/ReportController.java @@ -0,0 +1,88 @@ +package com.example.jz.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.api.ApiController; +import com.baomidou.mybatisplus.extension.api.R; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.example.jz.modle.entity.Report; +import com.example.jz.service.ReportService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 鎶ユ琛�(Report)琛ㄦ帶鍒跺眰 + * + * @author makejava + * @since 2022-07-13 11:52:58 + */ +@RestController +@RequestMapping("report") +public class ReportController extends ApiController { + /** + * 鏈嶅姟瀵硅薄 + */ + @Resource + private ReportService reportService; + + /** + * 鍒嗛〉鏌ヨ鎵�鏈夋暟鎹� + * + * @param page 鍒嗛〉瀵硅薄 + * @param report 鏌ヨ瀹炰綋 + * @return 鎵�鏈夋暟鎹� + */ + @GetMapping + public R selectAll(Page<Report> page, Report report) { + return success(this.reportService.page(page, new QueryWrapper<>(report))); + } + + /** + * 閫氳繃涓婚敭鏌ヨ鍗曟潯鏁版嵁 + * + * @param id 涓婚敭 + * @return 鍗曟潯鏁版嵁 + */ + @GetMapping("{id}") + public R selectOne(@PathVariable Serializable id) { + return success(this.reportService.getById(id)); + } + + /** + * 鏂板鏁版嵁 + * + * @param report 瀹炰綋瀵硅薄 + * @return 鏂板缁撴灉 + */ + @PostMapping + public R insert(@RequestBody Report report) { + return success(this.reportService.save(report)); + } + + /** + * 淇敼鏁版嵁 + * + * @param report 瀹炰綋瀵硅薄 + * @return 淇敼缁撴灉 + */ + @PutMapping + public R update(@RequestBody Report report) { + return success(this.reportService.updateById(report)); + } + + /** + * 鍒犻櫎鏁版嵁 + * + * @param idList 涓婚敭缁撳悎 + * @return 鍒犻櫎缁撴灉 + */ + @DeleteMapping + public R delete(@RequestParam("idList") List<Long> idList) { + return success(this.reportService.removeByIds(idList)); + } +} + diff --git a/src/main/java/com/example/jz/controller/SensitiveController.java b/src/main/java/com/example/jz/controller/SensitiveController.java new file mode 100644 index 0000000..ca2f760 --- /dev/null +++ b/src/main/java/com/example/jz/controller/SensitiveController.java @@ -0,0 +1,122 @@ +package com.example.jz.controller; + + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.api.ApiController; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.example.jz.modle.PageParam; +import com.example.jz.modle.R; +import com.example.jz.modle.entity.Sensitive; +import com.example.jz.modle.dto.SensitiveDto; +import com.example.jz.modle.vo.SensitiveVO; +import com.example.jz.service.SensitiveService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +/** + * 鏁忔劅璇嶈〃(Sensitive)琛ㄦ帶鍒跺眰 + * + * @author 瀹夌懢鐒� + * @since 2022-07-13 09:54:49 + */ +@RestController +@RequestMapping("sensitive") +@ApiOperation("鏁忔劅璇嶈〃(Sensitive)琛ㄦ帶鍒跺眰") +@Api(tags = "鏁忔劅璇嶈〃(Sensitive)琛ㄦ帴鍙�") +public class SensitiveController extends ApiController { + /** + * 鏈嶅姟瀵硅薄 + */ + @Resource + private SensitiveService sensitiveService; + + /** + * 鍒嗛〉鏌ヨ鎵�鏈夋暟鎹� + * + * @param page 鍒嗛〉瀵硅薄 + * @param sensitive 鏌ヨ瀹炰綋 + * @return 鎵�鏈夋暟鎹� + */ + @GetMapping + @ApiOperation("鍒嗛〉鏌ヨ鎵�鏈夋暟鎹�") + public R<Page<SensitiveVO>> selectAll(PageParam<Sensitive> page, Sensitive sensitive) { + Page<Sensitive> sensitivePage = sensitiveService.page(page, new QueryWrapper<>(sensitive)); + // 灏唖ensitive杞崲鎴恠ensitiveVO + List<SensitiveVO> sensitiveVOList = new ArrayList<>(); + for (Sensitive s : sensitivePage.getRecords()) { + SensitiveVO sensitiveVO = new SensitiveVO(); + BeanUtil.copyProperties(s, sensitiveVO); + sensitiveVO.setWords(Arrays.asList(s.getWord().split(","))); + sensitiveVOList.add(sensitiveVO); + } + // 灏佽鍒嗛〉鏁版嵁 + Page<SensitiveVO> sensitiveVOPage = new PageParam<SensitiveVO>(); + BeanUtil.copyProperties(sensitivePage, sensitiveVOPage); + sensitiveVOPage.setRecords(sensitiveVOList); + return R.ok(sensitiveVOPage); + } + + /** + * 閫氳繃涓婚敭鏌ヨ鍗曟潯鏁版嵁 + * + * @param id 涓婚敭 + * @return 鍗曟潯鏁版嵁 + */ + @GetMapping("{id}") + @ApiOperation("閫氳繃涓婚敭鏌ヨ鍗曟潯鏁版嵁") + public R<SensitiveVO> selectOne(@PathVariable Serializable id) { + Sensitive sensitive = sensitiveService.getById(id); + SensitiveVO sensitiveVO = new SensitiveVO(); + BeanUtil.copyProperties(sensitive, sensitiveVO); + sensitiveVO.setWords(Arrays.asList(sensitive.getWord().split(","))); + return R.ok(sensitiveVO); + } + + /** + * 鏂板鏁版嵁 + * + * @param sensitiveDto 瀹炰綋瀵硅薄 + * @return 鏂板缁撴灉 + */ + @PostMapping + @ApiOperation("鏂板鏁版嵁") + public R<Boolean> insert(@RequestBody SensitiveDto sensitiveDto) { + Sensitive sensitive = new Sensitive().setCreator(sensitiveDto.getCreator()).setCtime(new Date()).setWord(String.join(",", sensitiveDto.getWords())); + return R.ok(sensitiveService.save(sensitive)); + } + + /** + * 淇敼鏁版嵁 + * + * @param sensitiveDto 瀹炰綋瀵硅薄 + * @return 淇敼缁撴灉 + */ + @PutMapping + @ApiOperation("淇敼鏁版嵁") + public R<Boolean> update(@RequestBody SensitiveDto sensitiveDto) { + Sensitive sensitive = new Sensitive().setId(sensitiveDto.getId()).setCreator(sensitiveDto.getCreator()).setWord(String.join(",", sensitiveDto.getWords())); + return R.ok(sensitiveService.updateById(sensitive)); + } + + /** + * 鍒犻櫎鏁版嵁 + * + * @param id 涓婚敭 + * @return 鍒犻櫎缁撴灉 + */ + @DeleteMapping + @ApiOperation("鍒犻櫎鏁版嵁") + public R<Boolean> delete(@RequestParam("id") Serializable id) { + return R.ok(sensitiveService.removeById(id)); + } +} + diff --git a/src/main/java/com/example/jz/controller/TestController.java b/src/main/java/com/example/jz/controller/TestController.java new file mode 100644 index 0000000..7cdf69a --- /dev/null +++ b/src/main/java/com/example/jz/controller/TestController.java @@ -0,0 +1,29 @@ +package com.example.jz.controller; + +import com.example.jz.exception.BusinessException; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author 瀹夌懢鐒� + * @data 2022/7/13 - 11:24 AM + * @description + */ +@RestController("test") +@Api(value = "娴嬭瘯鎺ュ彛", tags = "娴嬭瘯鎺ュ彛") +public class TestController { + + @GetMapping("/business") + @ApiOperation("涓氬姟寮傚父娴嬭瘯") + public String test() { + throw new BusinessException("涓氬姟寮傚父"); + } + + @GetMapping("/custom") + @ApiOperation("閫氱敤寮傚父娴嬭瘯") + public String test2() { + throw new NullPointerException("绌烘寚閽堝紓甯�"); + } +} diff --git a/src/main/java/com/example/jz/dao/CauseDao.java b/src/main/java/com/example/jz/dao/CauseDao.java index 7338e9b..ae27aa3 100644 --- a/src/main/java/com/example/jz/dao/CauseDao.java +++ b/src/main/java/com/example/jz/dao/CauseDao.java @@ -4,11 +4,12 @@ import com.example.jz.modle.entity.Cause; /** - * (Cause)琛ㄦ暟鎹簱璁块棶灞� + * 妗堜欢琛�(Cause)琛ㄦ暟鎹簱璁块棶灞� * * @author makejava - * @since 2022-07-11 16:55:40 + * @since 2022-07-13 11:52:57 */ public interface CauseDao extends BaseMapper<Cause> { } + diff --git a/src/main/java/com/example/jz/dao/ReportDao.java b/src/main/java/com/example/jz/dao/ReportDao.java new file mode 100644 index 0000000..1ec0ee3 --- /dev/null +++ b/src/main/java/com/example/jz/dao/ReportDao.java @@ -0,0 +1,15 @@ +package com.example.jz.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.example.jz.modle.entity.Report; + +/** + * 鎶ユ琛�(Report)琛ㄦ暟鎹簱璁块棶灞� + * + * @author makejava + * @since 2022-07-13 11:52:58 + */ +public interface ReportDao extends BaseMapper<Report> { + +} + diff --git a/src/main/java/com/example/jz/dao/SensitiveDao.java b/src/main/java/com/example/jz/dao/SensitiveDao.java new file mode 100644 index 0000000..e45e96d --- /dev/null +++ b/src/main/java/com/example/jz/dao/SensitiveDao.java @@ -0,0 +1,15 @@ +package com.example.jz.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.example.jz.modle.entity.Sensitive; + +/** + * 鏁忔劅璇嶈〃(Sensitive)琛ㄦ暟鎹簱璁块棶灞� + * + * @author makejava + * @since 2022-07-13 09:54:49 + */ +public interface SensitiveDao extends BaseMapper<Sensitive> { + +} + diff --git a/src/main/java/com/example/jz/modle/dto/SensitiveDto.java b/src/main/java/com/example/jz/modle/dto/SensitiveDto.java new file mode 100644 index 0000000..d718229 --- /dev/null +++ b/src/main/java/com/example/jz/modle/dto/SensitiveDto.java @@ -0,0 +1,35 @@ +package com.example.jz.modle.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.util.Date; +import java.util.List; + +/** + * @author 瀹夌懢鐒� + * @data 2022/7/13 - 10:02 AM + * @description + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class SensitiveDto { + @ApiModelProperty(value = "鏁忔劅璇峣d") + private Integer id; + //鏁忔劅璇嶏紝鐢�,鍒嗛殧 + @ApiModelProperty(value = "鏁忔劅璇�") + private List<String> words; + //鍒涘缓鑰� + @ApiModelProperty(value = "鍒涘缓鑰�") + private String creator; + //鍒涘缓鏃堕棿 + @ApiModelProperty(value = "鍒涘缓鏃堕棿") + private Date ctime; +} diff --git a/src/main/java/com/example/jz/modle/entity/Cause.java b/src/main/java/com/example/jz/modle/entity/Cause.java index 0ea029c..3469987 100644 --- a/src/main/java/com/example/jz/modle/entity/Cause.java +++ b/src/main/java/com/example/jz/modle/entity/Cause.java @@ -1,60 +1,36 @@ package com.example.jz.modle.entity; -import java.io.Serializable; import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + /** - * (Cause)瀹炰綋绫� + * 妗堜欢琛�(Cause)琛ㄥ疄浣撶被 * * @author makejava - * @since 2022-07-12 16:50:57 + * @since 2022-07-13 11:52:57 */ -public class Cause implements Serializable { - private static final long serialVersionUID = 944957375480792530L; - /** - * 妗堜欢ID - */ +@TableName("qyjz.cause") +public class Cause extends Model<Cause> { + //id private Integer id; - /** - * 澶村儚鍦板潃 - */ - private String pic; - /** - * 鎶ユ浜� - */ - private String reporter; - /** - * 鎶ユ浜烘墜鏈哄彿 - */ - private String mobile; - /** - * 鎶ユ浜鸿韩浠借瘉鍙� - */ - private String idcard; - /** - * 鏄惁浠e姙 Y锛堜唬鍔烇級 N锛堜笉鏄唬鍔烇級 - */ - private String isCommission; - /** - * 娑夋閲戦 - */ - private String amountInvolved; - /** - * 鎶ユ鏉愭枡鍥剧墖鍦板潃 澶氫釜鐢�,鍒嗛殧 - */ - private String reportMaterials; - /** - * 鎶ユ鏃堕棿 - */ - private Date reportTime; - /** - * 鎶ユ鏂瑰紡 - */ - private String reportMethod; - /** - * 鍒涘缓浜篿d - */ - private Integer creator; + //妗堜欢缂栧彿 + private String number; + //妗堜欢鍚嶇О + private String name; + //绗竴娆℃鍙戞椂闂� + private Date firstTime; + //鍒涘缓鏃堕棿 + private Date ctime; + //鐘舵�� 0鏈鏍� 1涓嶄簣绔嬫 2鍙楃悊涓� 3宸茬粨妗� + private String status; + //璐熻矗浜篿d + private Integer userId; + //妗堜欢鎻忚堪 + private String description; public Integer getId() { @@ -65,85 +41,70 @@ this.id = id; } - public String getPic() { - return pic; + public String getNumber() { + return number; } - public void setPic(String pic) { - this.pic = pic; + public void setNumber(String number) { + this.number = number; } - public String getReporter() { - return reporter; + public String getName() { + return name; } - public void setReporter(String reporter) { - this.reporter = reporter; + public void setName(String name) { + this.name = name; } - public String getMobile() { - return mobile; + public Date getFirstTime() { + return firstTime; } - public void setMobile(String mobile) { - this.mobile = mobile; + public void setFirstTime(Date firstTime) { + this.firstTime = firstTime; } - public String getIdcard() { - return idcard; + public Date getCtime() { + return ctime; } - public void setIdcard(String idcard) { - this.idcard = idcard; + public void setCtime(Date ctime) { + this.ctime = ctime; } - public String getIsCommission() { - return isCommission; + public String getStatus() { + return status; } - public void setIsCommission(String isCommission) { - this.isCommission = isCommission; + public void setStatus(String status) { + this.status = status; } - public String getAmountInvolved() { - return amountInvolved; + public Integer getUserId() { + return userId; } - public void setAmountInvolved(String amountInvolved) { - this.amountInvolved = amountInvolved; + public void setUserId(Integer userId) { + this.userId = userId; } - public String getReportMaterials() { - return reportMaterials; + public String getDescription() { + return description; } - public void setReportMaterials(String reportMaterials) { - this.reportMaterials = reportMaterials; + public void setDescription(String description) { + this.description = description; } - public Date getReportTime() { - return reportTime; + /** + * 鑾峰彇涓婚敭鍊� + * + * @return 涓婚敭鍊� + */ + @Override + protected Serializable pkVal() { + return this.id; } - - public void setReportTime(Date reportTime) { - this.reportTime = reportTime; } - - public String getReportMethod() { - return reportMethod; - } - - public void setReportMethod(String reportMethod) { - this.reportMethod = reportMethod; - } - - public Integer getCreator() { - return creator; - } - - public void setCreator(Integer creator) { - this.creator = creator; - } - -} diff --git a/src/main/java/com/example/jz/modle/entity/Group.java b/src/main/java/com/example/jz/modle/entity/Group.java index 8bf288e..1d7b931 100644 --- a/src/main/java/com/example/jz/modle/entity/Group.java +++ b/src/main/java/com/example/jz/modle/entity/Group.java @@ -1,5 +1,7 @@ package com.example.jz.modle.entity; +import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; import java.util.Date; @@ -10,6 +12,7 @@ * @author makejava * @since 2022-07-12 16:50:59 */ +@TableName("qyjz.group") public class Group implements Serializable { private static final long serialVersionUID = 208063400600909704L; /** diff --git a/src/main/java/com/example/jz/modle/entity/Report.java b/src/main/java/com/example/jz/modle/entity/Report.java new file mode 100644 index 0000000..5c99828 --- /dev/null +++ b/src/main/java/com/example/jz/modle/entity/Report.java @@ -0,0 +1,159 @@ +package com.example.jz.modle.entity; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 鎶ユ琛�(Report)琛ㄥ疄浣撶被 + * + * @author makejava + * @since 2022-07-13 11:52:58 + */ +@TableName("qyjz.report") +public class Report extends Model<Report> { + //妗堜欢ID + private Integer id; + //澶村儚鍦板潃 + private String pic; + //鎶ユ浜篿d + private Integer userId; + //鏄惁浠e姙 1锛堜唬鍔烇級 0锛堜笉鏄唬鍔烇級 + private String isCommission; + //娑夋閲戦 + private String amountInvolved; + //鎶ユ鏉愭枡鍥剧墖鍦板潃 澶氫釜鐢�,鍒嗛殧 + private String reportMaterials; + //鎶ユ鏃堕棿 + private Date reportTime; + //鎶ユ鏂瑰紡 + private String reportMethod; + //鍒涘缓浜篿d + private Integer creator; + //鐘舵�侊紝1涓洪�氳繃 0涓烘湭瀹℃牳 + private Integer status; + //鍒涘缓鏃堕棿 + private Date ctime; + //琚獥鏃堕棿 + private Date cheatTime; + //琛ュ厖淇℃伅 + private String information; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPic() { + return pic; + } + + public void setPic(String pic) { + this.pic = pic; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getIsCommission() { + return isCommission; + } + + public void setIsCommission(String isCommission) { + this.isCommission = isCommission; + } + + public String getAmountInvolved() { + return amountInvolved; + } + + public void setAmountInvolved(String amountInvolved) { + this.amountInvolved = amountInvolved; + } + + public String getReportMaterials() { + return reportMaterials; + } + + public void setReportMaterials(String reportMaterials) { + this.reportMaterials = reportMaterials; + } + + public Date getReportTime() { + return reportTime; + } + + public void setReportTime(Date reportTime) { + this.reportTime = reportTime; + } + + public String getReportMethod() { + return reportMethod; + } + + public void setReportMethod(String reportMethod) { + this.reportMethod = reportMethod; + } + + public Integer getCreator() { + return creator; + } + + public void setCreator(Integer creator) { + this.creator = creator; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCtime() { + return ctime; + } + + public void setCtime(Date ctime) { + this.ctime = ctime; + } + + public Date getCheatTime() { + return cheatTime; + } + + public void setCheatTime(Date cheatTime) { + this.cheatTime = cheatTime; + } + + public String getInformation() { + return information; + } + + public void setInformation(String information) { + this.information = information; + } + + /** + * 鑾峰彇涓婚敭鍊� + * + * @return 涓婚敭鍊� + */ + @Override + protected Serializable pkVal() { + return this.id; + } + } + diff --git a/src/main/java/com/example/jz/modle/entity/Sensitive.java b/src/main/java/com/example/jz/modle/entity/Sensitive.java new file mode 100644 index 0000000..dd95f08 --- /dev/null +++ b/src/main/java/com/example/jz/modle/entity/Sensitive.java @@ -0,0 +1,49 @@ +package com.example.jz.modle.entity; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 鏁忔劅璇嶈〃(Sensitive)琛ㄥ疄浣撶被 + * + * @author 瀹夌懢鐒� + * @since 2022-07-13 09:54:49 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@TableName("qyjz.sensitive") +public class Sensitive extends Model<Sensitive> { + //鏁忔劅璇峣d + @TableId + private Integer id; + //鏁忔劅璇嶏紝鐢�,鍒嗛殧 + private String word; + //鍒涘缓鑰� + private String creator; + //鍒涘缓鏃堕棿 + private Date ctime; + + /** + * 鑾峰彇涓婚敭鍊� + * + * @return 涓婚敭鍊� + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/src/main/java/com/example/jz/modle/vo/SensitiveVO.java b/src/main/java/com/example/jz/modle/vo/SensitiveVO.java new file mode 100644 index 0000000..d71b9a1 --- /dev/null +++ b/src/main/java/com/example/jz/modle/vo/SensitiveVO.java @@ -0,0 +1,37 @@ +package com.example.jz.modle.vo; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.util.Date; +import java.util.List; + +/** + * @author 瀹夌懢鐒� + * @data 2022/7/13 - 10:02 AM + * @description + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class SensitiveVO { + @ApiModelProperty(value = "鏁忔劅璇峣d") + private Integer id; + //鏁忔劅璇嶏紝鐢�,鍒嗛殧 + @ApiModelProperty(value = "鏁忔劅璇�") + private List<String> words; + //鍒涘缓鑰� + @ApiModelProperty(value = "鍒涘缓鑰�") + private String creator; + //鍒涘缓鏃堕棿 + @ApiModelProperty(value = "鍒涘缓鏃堕棿") + private Date ctime; +} diff --git a/src/main/java/com/example/jz/service/CauseService.java b/src/main/java/com/example/jz/service/CauseService.java index af8cbbb..a7aba8a 100644 --- a/src/main/java/com/example/jz/service/CauseService.java +++ b/src/main/java/com/example/jz/service/CauseService.java @@ -4,10 +4,10 @@ import com.example.jz.modle.entity.Cause; /** - * (Cause)琛ㄦ湇鍔℃帴鍙� + * 妗堜欢琛�(Cause)琛ㄦ湇鍔℃帴鍙� * * @author makejava - * @since 2022-07-11 16:55:41 + * @since 2022-07-13 11:52:58 */ public interface CauseService extends IService<Cause> { diff --git a/src/main/java/com/example/jz/service/ReportService.java b/src/main/java/com/example/jz/service/ReportService.java new file mode 100644 index 0000000..5f21172 --- /dev/null +++ b/src/main/java/com/example/jz/service/ReportService.java @@ -0,0 +1,15 @@ +package com.example.jz.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.example.jz.modle.entity.Report; + +/** + * 鎶ユ琛�(Report)琛ㄦ湇鍔℃帴鍙� + * + * @author makejava + * @since 2022-07-13 11:52:58 + */ +public interface ReportService extends IService<Report> { + +} + diff --git a/src/main/java/com/example/jz/service/SensitiveService.java b/src/main/java/com/example/jz/service/SensitiveService.java new file mode 100644 index 0000000..06efddc --- /dev/null +++ b/src/main/java/com/example/jz/service/SensitiveService.java @@ -0,0 +1,15 @@ +package com.example.jz.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.example.jz.modle.entity.Sensitive; + +/** + * 鏁忔劅璇嶈〃(Sensitive)琛ㄦ湇鍔℃帴鍙� + * + * @author makejava + * @since 2022-07-13 09:54:50 + */ +public interface SensitiveService extends IService<Sensitive> { + +} + diff --git a/src/main/java/com/example/jz/service/impl/CauseServiceImpl.java b/src/main/java/com/example/jz/service/impl/CauseServiceImpl.java index b88d5f7..c6af4f0 100644 --- a/src/main/java/com/example/jz/service/impl/CauseServiceImpl.java +++ b/src/main/java/com/example/jz/service/impl/CauseServiceImpl.java @@ -7,12 +7,13 @@ import org.springframework.stereotype.Service; /** - * (Cause)琛ㄦ湇鍔″疄鐜扮被 + * 妗堜欢琛�(Cause)琛ㄦ湇鍔″疄鐜扮被 * * @author makejava - * @since 2022-07-11 16:55:41 + * @since 2022-07-13 11:52:58 */ @Service("causeService") public class CauseServiceImpl extends ServiceImpl<CauseDao, Cause> implements CauseService { } + diff --git a/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java b/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java new file mode 100644 index 0000000..924ec9f --- /dev/null +++ b/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java @@ -0,0 +1,19 @@ +package com.example.jz.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.example.jz.dao.ReportDao; +import com.example.jz.modle.entity.Report; +import com.example.jz.service.ReportService; +import org.springframework.stereotype.Service; + +/** + * 鎶ユ琛�(Report)琛ㄦ湇鍔″疄鐜扮被 + * + * @author makejava + * @since 2022-07-13 11:52:58 + */ +@Service("reportService") +public class ReportServiceImpl extends ServiceImpl<ReportDao, Report> implements ReportService { + +} + diff --git a/src/main/java/com/example/jz/service/impl/SensitiveServiceImpl.java b/src/main/java/com/example/jz/service/impl/SensitiveServiceImpl.java new file mode 100644 index 0000000..e83dc30 --- /dev/null +++ b/src/main/java/com/example/jz/service/impl/SensitiveServiceImpl.java @@ -0,0 +1,19 @@ +package com.example.jz.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.example.jz.dao.SensitiveDao; +import com.example.jz.modle.entity.Sensitive; +import com.example.jz.service.SensitiveService; +import org.springframework.stereotype.Service; + +/** + * 鏁忔劅璇嶈〃(Sensitive)琛ㄦ湇鍔″疄鐜扮被 + * + * @author makejava + * @since 2022-07-13 09:54:50 + */ +@Service("sensitiveService") +public class SensitiveServiceImpl extends ServiceImpl<SensitiveDao, Sensitive> implements SensitiveService { + +} + diff --git a/src/test/java/com/example/jz/MinIOTest.java b/src/test/java/com/example/jz/MinIOTest.java deleted file mode 100644 index baf8412..0000000 --- a/src/test/java/com/example/jz/MinIOTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.example.jz; - -import com.example.jz.service.MinIOService; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class MinIOTest { - @Autowired - MinIOService minIOService; - - @Test - void testFileDelete() { - - } - -} -- Gitblit v1.8.0