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 * @Date2025/3/4 16:36
*/ */
@Api(tags = "官方app") @Api(tags = "官方app")
@RestController @RestController
@RequestMapping("app") @RequestMapping("app")
public class PlaFormController extends BaseController { public class PlaFormController extends BaseController {
@Autowired @Autowired
@ -37,10 +37,10 @@ public class PlaFormController extends BaseController {
* *
*/ */
@ApiOperation(value = "模型列表") @ApiOperation(value = "模型列表")
@PostMapping("/list") @GetMapping("/list")
public List<PlatForm> list(@RequestBody PlatForm platForm) { public List<PlatForm> list() {
return platFormService.listplatForm(platForm); return platFormService.list();
} }
/*** /***
@ -53,8 +53,9 @@ public class PlaFormController extends BaseController {
@PostMapping("/UrlFile") @PostMapping("/UrlFile")
public AjaxResult zipUrlFile(@RequestParam MultipartFile file) { public AjaxResult zipUrlFile(@RequestParam MultipartFile file) {
String s = OssUtil.uploadMultipartFile(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 = "删除联系") @ApiOperation(value = "删除联系")
@GetMapping("delete") @GetMapping("delete")
public AjaxResult delete(@Valid @NotNull(message = "id不能为空") @RequestParam Long id) { 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 @Service
public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> implements PlatFormService { public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> implements PlatFormService {
@Autowired
private PlatFormService platFormService;
/** /**
* app * app
@ -39,7 +36,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
*/ */
@Override @Override
public List<PlatForm> listplatForm(PlatForm platForm) { 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 = "详情") @ApiOperation(value = "详情")
@PostMapping("finById") @PostMapping("finById")
public R<ToActivity> finById(@RequestBody PlatForm platForm) { public R<ToActivity> finById(@RequestBody PlatForm platForm) {
platFormService.getById(platForm.getId()); baseMapper.selectById(platForm.getId());
return R.ok(); return R.ok();
} }
@ -65,7 +62,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "添加") @ApiOperation(value = "添加")
@PostMapping("add") @PostMapping("add")
public R<Object> add(@RequestBody PlatForm platForm) { public R<Object> add(@RequestBody PlatForm platForm) {
platFormService.save(platForm); baseMapper.insert(platForm);
return R.ok(); return R.ok();
} }
@ -78,7 +75,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@PostMapping("update") @PostMapping("update")
public R<Object> update(@RequestBody PlatForm platForm) { public R<Object> update(@RequestBody PlatForm platForm) {
platFormService.updateById(platForm); baseMapper.updateById(platForm);
return R.ok(); return R.ok();
} }
@ -91,7 +88,7 @@ public class PlatFormServiceImpl extends ServiceImpl<PlatFormMapper, PlatForm> i
@ApiOperation(value = "删除") @ApiOperation(value = "删除")
@PostMapping("delete") @PostMapping("delete")
public R<Object> delete(@RequestBody PlatForm platForm) { public R<Object> delete(@RequestBody PlatForm platForm) {
platFormService.removeById(platForm); baseMapper.deleteById(platForm);
return R.ok(); return R.ok();
} }

View File

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