| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComSanshuoIndustryCenter; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import com.panzhihua.service_community.service.ComSanShuoIndustryCenterService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class ComSanShuoIndustryCenterApi extends BaseController { |
| | | @Resource |
| | | private ComSanShuoIndustryCenterService comSanShuoIndustryCenterService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | |
| | | return R.ok(comSanShuoIndustryCenterService.pageIndustryCenter(keyWord,page,size)); |
| | | } |
| | | |
| | | @GetMapping("/appletsList") |
| | | public R appletsList(){ |
| | | return R.ok(comSanShuoIndustryCenterService.list(new QueryWrapper<ComSanshuoIndustryCenter>().eq("status",1).eq("del_flag",1))); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam Long id){ |
| | | return R.ok(comSanShuoIndustryCenterService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 添加业务中心 |
| | | * */ |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | comSanShuoIndustryCenterDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return R.ok(comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO)); |
| | | return comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | * */ |
| | | @PutMapping |
| | | public R update(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | return R.ok(comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO)); |
| | | return comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除业务中心 |
| | | * */ |
| | | @DeleteMapping("/remove/{id}") |
| | | public R remove(@PathVariable("id") Long id){ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id") Long id){ |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(id); |
| | | center.setDelFlag(0); |
| | | center.setStatus(0); |