refactor(communityCenter): 调整平台官方联系
parent
af07e353ee
commit
337a72b06c
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
* @Date:2025/3/4 16:36
|
* @Date:2025/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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue