refactor(communityCenter): 调整平台官方联系

master
yang 2025-03-08 09:40:09 +08:00
parent af07e353ee
commit 337a72b06c
3 changed files with 14 additions and 17 deletions

View File

@ -25,8 +25,8 @@ import java.util.List;
* @Date2025/3/4 16:36
*/
@Api(tags = "官方app")
@RestController
@RequestMapping("app")
@RestController
@RequestMapping("app")
public class PlaFormController extends BaseController {
@Autowired
@ -37,10 +37,10 @@ public class PlaFormController extends BaseController {
*
*/
@ApiOperation(value = "模型列表")
@PostMapping("/list")
public List<PlatForm> list(@RequestBody PlatForm platForm) {
@GetMapping("/list")
public List<PlatForm> list() {
return platFormService.listplatForm(platForm);
return platFormService.list();
}
/***
@ -53,8 +53,9 @@ public class PlaFormController extends BaseController {
@PostMapping("/UrlFile")
public AjaxResult zipUrlFile(@RequestParam MultipartFile file) {
String s = OssUtil.uploadMultipartFile(file);
return AjaxResult.success(s);
return AjaxResult.success("上传成功", s);
}
/**
*
*/
@ -92,7 +93,7 @@ public class PlaFormController extends BaseController {
/**
*
* */
*/
@ApiOperation(value = "删除联系")
@GetMapping("delete")
public AjaxResult delete(@Valid @NotNull(message = "id不能为空") @RequestParam Long id) {
@ -101,5 +102,4 @@ public class PlaFormController extends BaseController {
}
}

View File

@ -27,9 +27,6 @@ import java.util.List;
@Service
public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> implements PlatFormService {
@Autowired
private PlatFormService platFormService;
/**
* app
@ -39,7 +36,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
*/
@Override
public List<PlatForm> listplatForm(PlatForm platForm) {
return platFormService.listplatForm(platForm);
return baseMapper.listplatForm(platForm);
}
@ -52,7 +49,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "详情")
@PostMapping("finById")
public R<ToActivity> finById(@RequestBody PlatForm platForm) {
platFormService.getById(platForm.getId());
baseMapper.selectById(platForm.getId());
return R.ok();
}
@ -65,7 +62,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "添加")
@PostMapping("add")
public R<Object> add(@RequestBody PlatForm platForm) {
platFormService.save(platForm);
baseMapper.insert(platForm);
return R.ok();
}
@ -78,7 +75,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "修改")
@PostMapping("update")
public R<Object> update(@RequestBody PlatForm platForm) {
platFormService.updateById(platForm);
baseMapper.updateById(platForm);
return R.ok();
}
@ -91,7 +88,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "删除")
@PostMapping("delete")
public R<Object> delete(@RequestBody PlatForm platForm) {
platFormService.removeById(platForm);
baseMapper.deleteById(platForm);
return R.ok();
}

View File

@ -4,6 +4,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mcwl.resource.mapper.PlatFormMapper">
<select id="listplatForm" resultType="com.mcwl.resource.domain.request.PlatForm">
select name,url from p_pic
select id,name,url from g_pic
</select>
</mapper>