| | |
| | | package com.ltkj.web.controller.system; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.framework.config.UserHoder; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/hosp/TjTeamContactLog") |
| | | @Api(tags = "A--团队预约沟通记录接口") |
| | | public class TjTeamContactLogController extends BaseController { |
| | | @Autowired |
| | | private ITjTeamContactLogService tjTeamContactLogService; |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | |
| | | /** |
| | | * 查询团队预约沟通记录列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "查询团队预约沟通记录列表") |
| | | public TableDataInfo list(TjTeamContactLog tjTeamContactLog) { |
| | | startPage(); |
| | | List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog); |
| | |
| | | * 获取团队预约沟通记录详细信息 |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | @ApiOperation(value = "获取团队预约沟通记录详细信息") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(tjTeamContactLogService.selectTjTeamContactLogById(id)); |
| | | } |
| | |
| | | */ |
| | | @Log(title = "团队预约沟通记录", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @ApiOperation(value = "新增团队预约沟通记录") |
| | | public AjaxResult add(@RequestBody TjTeamContactLog tjTeamContactLog) { |
| | | return toAjax(tjTeamContactLogService.insertTjTeamContactLog(tjTeamContactLog)); |
| | | |
| | | SysUser user = userService.getById(tjTeamContactLog.getContactUserId()); |
| | | if(null !=user)tjTeamContactLog.setContactUserName(user.getNickName()); |
| | | tjTeamContactLog.setContactTime(new Date()); |
| | | return toAjax(tjTeamContactLogService.save(tjTeamContactLog)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Log(title = "团队预约沟通记录", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @ApiOperation(value = "修改团队预约沟通记录") |
| | | public AjaxResult edit(@RequestBody TjTeamContactLog tjTeamContactLog) { |
| | | return toAjax(tjTeamContactLogService.updateTjTeamContactLog(tjTeamContactLog)); |
| | | return toAjax(tjTeamContactLogService.updateById(tjTeamContactLog)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Log(title = "团队预约沟通记录", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @ApiOperation(value = "删除团队预约沟通记录") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(tjTeamContactLogService.deleteTjTeamContactLogByIds(ids)); |
| | | } |