| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smstemplet:list')") |
| | | @PostMapping("/list") |
| | | public Map<String, Object> list(@RequestBody SmsTemplet smsTemplet) { |
| | | if (StringUtils.isEmpty(smsTemplet.getUserName()) && StringUtils.isEmpty(smsTemplet.getWardCode()) && StringUtils.isEmpty(smsTemplet.getDeptCode())) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | smsTemplet.setUserName(user.getUserName()); |
| | | smsTemplet.setNickName(user.getNickName()); |
| | | } |
| | | //这个不需要分页,一个科室也不会有多少条短信模板 |
| | | smsTemplet.setPageNum(null); |
| | | smsTemplet.setPageSize(null); |
| | |
| | | @Log(title = "短信模板", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SmsTemplet smsTemplet) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | smsTemplet.setUserName(user.getUserName()); |
| | | smsTemplet.setNickName(user.getNickName()); |
| | | return toAjax(smsTempletService.insertSmsTemplet(smsTemplet)); |
| | | } |
| | | |