diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSmsSendRecordController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSmsSendRecordController.java new file mode 100644 index 000000000..00321cd0e --- /dev/null +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSmsSendRecordController.java @@ -0,0 +1,134 @@ + +/** + * @Project: emis + * @Title: EmisSmsSendRecordController.java + * @author linfso + * @date 2024-06-16 09:33:47 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

短信发送记录表 控制器

+ */ + +package com.xdadan.erp.web.emis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.xdadan.erp.common.annotation.Log; +import com.xdadan.erp.common.core.controller.BaseController; +import com.xdadan.erp.common.core.domain.AjaxResult; +import com.xdadan.erp.common.core.page.TableDataInfo; +import com.xdadan.erp.common.enums.BusinessType; +import com.xdadan.erp.common.utils.StringUtils; +import com.xdadan.erp.common.utils.poi.ExcelUtil; + +import com.xdadan.erp.emis.domain.EmisSmsSendRecord; +import com.xdadan.erp.emis.service.IEmisSmsSendRecordService; + +/** + * 短信发送记录表Controller + * + * @author linfso + * @date 2024-06-16 09:33:47 + */ +@RestController +@RequestMapping("/emis/emisSmsSendRecord") +public class EmisSmsSendRecordController extends BaseController +{ + @Autowired + private IEmisSmsSendRecordService emisSmsSendRecordService; + + /** + * 查询短信发送记录表列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:list')") + @GetMapping("/list") + public TableDataInfo list(EmisSmsSendRecord emisSmsSendRecord) + { + startPage(); + List list = emisSmsSendRecordService.selectEmisSmsSendRecordList(emisSmsSendRecord); + return getDataTable(list); + } + + + /** + * 检查是否重复 + * + * @param emisSmsSendRecord + * @return 数量 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:list')") + @GetMapping("/checkUnique") + public AjaxResult checkUnique(EmisSmsSendRecord emisSmsSendRecord) + { + int cnt=emisSmsSendRecordService.checkUnique(emisSmsSendRecord); + return AjaxResult.success("检查成功",cnt); + } + + + /** + * 导出短信发送记录表列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:export')") + @Log(title = "短信发送记录表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmisSmsSendRecord emisSmsSendRecord) + { + List list = emisSmsSendRecordService.selectEmisSmsSendRecordList(emisSmsSendRecord); + ExcelUtil util = new ExcelUtil(EmisSmsSendRecord.class); + util.exportExcel(response, list, "短信发送记录表数据"); + } + + /** + * 获取短信发送记录表详细信息 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(emisSmsSendRecordService.selectEmisSmsSendRecordById(id)); + } + + /** + * 新增短信发送记录表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:add')") + @Log(title = "短信发送记录表", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmisSmsSendRecord emisSmsSendRecord) + { + return toAjax(emisSmsSendRecordService.insertEmisSmsSendRecord(emisSmsSendRecord)); + } + + /** + * 修改短信发送记录表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:edit')") + @Log(title = "短信发送记录表", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmisSmsSendRecord emisSmsSendRecord) + { + return toAjax(emisSmsSendRecordService.updateEmisSmsSendRecord(emisSmsSendRecord)); + } + + /** + * 删除短信发送记录表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisSmsSendRecord:remove')") + @Log(title = "短信发送记录表", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emisSmsSendRecordService.deleteEmisSmsSendRecordByIds(ids)); + } +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSmsSendRecord.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSmsSendRecord.java new file mode 100644 index 000000000..6b0ff2095 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisSmsSendRecord.java @@ -0,0 +1,71 @@ +/** + * @Project: emis + * @Title: EmisSmsSendRecord.java + * @author linfso + * @date 2024-06-16 09:33:47 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

短信发送记录表 实体类

+ */ + +package com.xdadan.erp.emis.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.xdadan.erp.common.annotation.Excel; +import com.xdadan.erp.common.core.domain.BaseEntity; +import com.xdadan.erp.common.core.domain.TreeEntity; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + + +/** + * @ClassName EmisSmsSendRecord + * @Description 短信发送记录表 + * @author linfso + * @date 2024-06-16 09:33:47 + */ + @Data +public class EmisSmsSendRecord extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /* id */ + private Long id; + /* 运单号 */ + private String billCode; + /* 发送站点编码 */ + private String sendSiteCode; + /* 站点名称 */ + private String sendSiteName; + /* 发件人名称 */ + private String sendManName; + /* 发送人编码 */ + private String sendManCode; + /* 短信类型 1-发件 2-签收 */ + private String smsType; + /* 目标号码 */ + private String phone; + /* 短信内容 */ + private String content; + /* 单条发送费用 */ + private String fee; + /* 发送渠道 */ + private String smsChannel; + /* 发送时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date sendDate; + /* 渠道发送状态 0-未发送 1-已发送 -1 发送错误 */ + private String sendStatus; + /* 渠道错误代码 */ + private String errCode; + /* 渠道错误信息 */ + private String errMsg; + /* 任务处理时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date taskDate; + +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSmsSendRecordMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSmsSendRecordMapper.java new file mode 100644 index 000000000..2105d6b03 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisSmsSendRecordMapper.java @@ -0,0 +1,80 @@ +/** + * @Project: emis + * @Title: EmisSmsSendRecordMapper.java + * @author linfso + * @date 2024-06-16 09:33:47 + * @Copyright: ShangHai Doitinfo 2022 All rights reserved. + * @version v1.0 + * @Description:

短信发送记录表 Mapper 接口

+ * Warning : This file is generate by ai tools,don't edit!!! + */ +package com.xdadan.erp.emis.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xdadan.erp.emis.domain.EmisSmsSendRecord; +/** + * @ClassName EmisSmsSendRecordMapper + * @Description

短信发送记录表 Mapper 接口

+ * @author linfso + * @date 2024-06-16 09:33:47 + */ +public interface EmisSmsSendRecordMapper extends BaseMapper +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisSmsSendRecord selectEmisSmsSendRecordById(Long id); + + /** + * 查询列表 + * + * @param emisSmsSendRecord + * @return 集合 + */ + public List selectEmisSmsSendRecordList(EmisSmsSendRecord emisSmsSendRecord); + + + /** + * 检查是否重复 + * + * @param emisSmsSendRecord + * @return 数量 + */ + public int checkUnique(EmisSmsSendRecord emisSmsSendRecord); + + + /** + * 新增 + * + * @param emisSmsSendRecord + * @return + */ + public int insertEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord); + + /** + * 修改 + * + * @param emisSmsSendRecord + * @return + */ + public int updateEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord); + + /** + * 删除 + * + * @param id 主键 + * @return 结果 + */ + public int deleteEmisSmsSendRecordById(Long id); + + /** + * 批量删除 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmisSmsSendRecordByIds(Long[] ids); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSmsSendRecordService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSmsSendRecordService.java new file mode 100644 index 000000000..7bd147e7c --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisSmsSendRecordService.java @@ -0,0 +1,78 @@ + /** + * @Project: emis + * @Title: EmisSmsSendRecordService.java + * @author linfso + * @date 2024-06-16 09:33:47 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

短信发送记录表 服务类接口

+ */ +package com.xdadan.erp.emis.service; + +import java.util.List; +import com.xdadan.erp.emis.domain.EmisSmsSendRecord; + +/** + * @ClassName EmisSmsSendRecordService + * @Description 短信发送记录表 + * @author linfso + * @date 2024-06-16 09:33:47 + */ +public interface IEmisSmsSendRecordService +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisSmsSendRecord selectEmisSmsSendRecordById(Long id); + + /** + * 查询短信发送记录表列表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 短信发送记录表集合 + */ + public List selectEmisSmsSendRecordList(EmisSmsSendRecord emisSmsSendRecord); + + + /** + * 检查是否重复 + * + * @param emisSmsSendRecord + * @return 数量 + */ + public int checkUnique(EmisSmsSendRecord emisSmsSendRecord); + + /** + * 新增短信发送记录表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 结果 + */ + public int insertEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord); + + /** + * 修改短信发送记录表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 结果 + */ + public int updateEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord); + + /** + * 批量删除短信发送记录表 + * + * @param ids 需要删除的短信发送记录表主键集合 + * @return 结果 + */ + public int deleteEmisSmsSendRecordByIds(Long[] ids); + + /** + * 删除短信发送记录表信息 + * + * @param id 短信发送记录表主键 + * @return 结果 + */ + public int deleteEmisSmsSendRecordById(Long id); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSmsSendRecordServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSmsSendRecordServiceImpl.java new file mode 100644 index 000000000..2e14b28d6 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisSmsSendRecordServiceImpl.java @@ -0,0 +1,117 @@ + /** + * @Project: emis + * @Title: EmisSmsSendRecordServiceImpl.java + * @author linfso + * @date 2024-06-16 09:33:47 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

短信发送记录表 实体类

+ */ + +package com.xdadan.erp.emis.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xdadan.erp.emis.domain.EmisSmsSendRecord; +import com.xdadan.erp.emis.mapper.EmisSmsSendRecordMapper; +import com.xdadan.erp.emis.service.IEmisSmsSendRecordService; + +/** + * 短信发送记录表Service业务层处理 + * + * @author linfso + * @date 2024-06-16 09:33:47 + */ +@Service +public class EmisSmsSendRecordServiceImpl implements IEmisSmsSendRecordService +{ + @Autowired + private EmisSmsSendRecordMapper emisSmsSendRecordMapper; + + /** + * 查询短信发送记录表 + * + * @param id 短信发送记录表主键 + * @return 短信发送记录表 + */ + @Override + public EmisSmsSendRecord selectEmisSmsSendRecordById(Long id) + { + return emisSmsSendRecordMapper.selectEmisSmsSendRecordById(id); + } + + + /** + * 查询短信发送记录表列表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 短信发送记录表 + */ + @Override + public List selectEmisSmsSendRecordList(EmisSmsSendRecord emisSmsSendRecord) + { + return emisSmsSendRecordMapper.selectEmisSmsSendRecordList(emisSmsSendRecord); + } + + /** + * 检查是否重复 + * + * @param emisSmsSendRecord + * @return 数量 + */ + @Override + public int checkUnique(EmisSmsSendRecord emisSmsSendRecord) + { + return emisSmsSendRecordMapper.checkUnique(emisSmsSendRecord); + } + + /** + * 新增短信发送记录表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 结果 + */ + @Override + public int insertEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord) + { + return emisSmsSendRecordMapper.insertEmisSmsSendRecord(emisSmsSendRecord); + } + + /** + * 修改短信发送记录表 + * + * @param emisSmsSendRecord 短信发送记录表 + * @return 结果 + */ + @Override + public int updateEmisSmsSendRecord(EmisSmsSendRecord emisSmsSendRecord) + { + return emisSmsSendRecordMapper.updateEmisSmsSendRecord(emisSmsSendRecord); + } + + /** + * 批量删除短信发送记录表 + * + * @param ids 需要删除的短信发送记录表主键 + * @return 结果 + */ + @Override + public int deleteEmisSmsSendRecordByIds(Long[] ids) + { + return emisSmsSendRecordMapper.deleteEmisSmsSendRecordByIds(ids); + } + + /** + * 删除短信发送记录表信息 + * + * @param id 短信发送记录表主键 + * @return 结果 + */ + @Override + public int deleteEmisSmsSendRecordById(Long id) + { + return emisSmsSendRecordMapper.deleteEmisSmsSendRecordById(id); + } + +} diff --git a/emis-biz/src/main/resources/mapper/EmisSmsSendRecordMapper.xml b/emis-biz/src/main/resources/mapper/EmisSmsSendRecordMapper.xml new file mode 100644 index 000000000..0fe672d28 --- /dev/null +++ b/emis-biz/src/main/resources/mapper/EmisSmsSendRecordMapper.xml @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, bill_code, send_site_code, send_site_name, send_man_name, send_man_code, sms_type, phone, content, fee, sms_channel, send_date, send_status, err_code, err_msg, task_date, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_sms_send_record + + + + + + + + + + insert into emis_sms_send_record + + id, + bill_code, + send_site_code, + send_site_name, + send_man_name, + send_man_code, + sms_type, + phone, + content, + fee, + sms_channel, + send_date, + send_status, + err_code, + err_msg, + task_date, + remark, + tenant_id, + del_flag, + create_by, + create_time, + update_by, + update_time, + create_site, + update_site, + + + #{id}, + #{billCode}, + #{sendSiteCode}, + #{sendSiteName}, + #{sendManName}, + #{sendManCode}, + #{smsType}, + #{phone}, + #{content}, + #{fee}, + #{smsChannel}, + #{sendDate}, + #{sendStatus}, + #{errCode}, + #{errMsg}, + #{taskDate}, + #{remark}, + #{tenantId}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{createSite}, + #{updateSite}, + + + + + update emis_sms_send_record + + bill_code = #{billCode}, + send_site_code = #{sendSiteCode}, + send_site_name = #{sendSiteName}, + send_man_name = #{sendManName}, + send_man_code = #{sendManCode}, + sms_type = #{smsType}, + phone = #{phone}, + content = #{content}, + fee = #{fee}, + sms_channel = #{smsChannel}, + send_date = #{sendDate}, + send_status = #{sendStatus}, + err_code = #{errCode}, + err_msg = #{errMsg}, + task_date = #{taskDate}, + remark = #{remark}, + tenant_id = #{tenantId}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_site = #{createSite}, + update_site = #{updateSite}, + + where id = #{id} + + + + delete from emis_sms_send_record where id = #{id} + + + + delete from emis_sms_send_record where id in + + #{id} + + + \ No newline at end of file