mirror of https://gitee.com/y_project/RuoYi.git
短信接口开发
parent
951bfa9ef6
commit
3ee21d9e42
|
@ -154,7 +154,7 @@
|
||||||
</plugin> -->
|
</plugin> -->
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
<!-- <resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<excludes>
|
<excludes>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<exclude>*.xml</exclude>
|
<exclude>*.xml</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>-->
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class WSSmsTaskTblController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult addSave(SmsTaskTbl smsTaskTbl)
|
public AjaxResult addSave(SmsTaskTbl smsTaskTbl)
|
||||||
{
|
{
|
||||||
|
smsTaskTbl.setSmsBusiType("WS");
|
||||||
return toAjax(smsTaskTblService.insertSmsTaskTbl(smsTaskTbl));
|
return toAjax(smsTaskTblService.insertSmsTaskTbl(smsTaskTbl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,6 @@
|
||||||
<input name="taskName" class="form-control" type="text" required>
|
<input name="taskName" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">短信类型:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select name="smsBusiType" class="form-control m-b" th:with="type=${@dict.getType('sys_sms_busi_type')}">
|
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">单价:</label>
|
<label class="col-sm-3 control-label">单价:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
@ -58,7 +50,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">
|
||||||
<label class="col-sm-3 control-label">任务状态:</label>
|
<label class="col-sm-3 control-label">任务状态:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_sms_task_status')}">
|
<div class="radio-box" th:each="dict : ${@dict.getType('sys_sms_task_status')}">
|
||||||
|
@ -66,7 +58,7 @@
|
||||||
<label th:for="${'taskStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
<label th:for="${'taskStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Date;
|
||||||
* WS短信任务配置对象 sms_task_tbl
|
* WS短信任务配置对象 sms_task_tbl
|
||||||
*
|
*
|
||||||
* @author dorion
|
* @author dorion
|
||||||
* @date 2024-06-01
|
* @date 2024-06-27
|
||||||
*/
|
*/
|
||||||
public class SmsTaskTbl extends BaseEntity
|
public class SmsTaskTbl extends BaseEntity
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,14 @@ public class SmsTaskTbl extends BaseEntity
|
||||||
@Excel(name = "短信类型")
|
@Excel(name = "短信类型")
|
||||||
private String smsBusiType;
|
private String smsBusiType;
|
||||||
|
|
||||||
|
/** 接口返回的任务id */
|
||||||
|
@Excel(name = "接口返回的任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/** 渠道id */
|
||||||
|
@Excel(name = "渠道id")
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
/** 单价 */
|
/** 单价 */
|
||||||
@Excel(name = "单价")
|
@Excel(name = "单价")
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
@ -48,9 +56,11 @@ public class SmsTaskTbl extends BaseEntity
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
/** 物料文件MD5值 */
|
/** 物料文件MD5值 */
|
||||||
|
@Excel(name = "物料文件MD5值")
|
||||||
private String fileMd5;
|
private String fileMd5;
|
||||||
|
|
||||||
/** 任务文本内容base64加密字符串 */
|
/** 任务文本内容base64加密字符串 */
|
||||||
|
@Excel(name = "任务文本内容base64加密字符串")
|
||||||
private String context;
|
private String context;
|
||||||
|
|
||||||
/** 内容类型 */
|
/** 内容类型 */
|
||||||
|
@ -69,6 +79,10 @@ public class SmsTaskTbl extends BaseEntity
|
||||||
@Excel(name = "物料总数")
|
@Excel(name = "物料总数")
|
||||||
private Long issueCount;
|
private Long issueCount;
|
||||||
|
|
||||||
|
/** 用户id */
|
||||||
|
@Excel(name = "用户id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
public void setIdSmsTask(Long idSmsTask)
|
public void setIdSmsTask(Long idSmsTask)
|
||||||
{
|
{
|
||||||
this.idSmsTask = idSmsTask;
|
this.idSmsTask = idSmsTask;
|
||||||
|
@ -96,6 +110,24 @@ public class SmsTaskTbl extends BaseEntity
|
||||||
{
|
{
|
||||||
return smsBusiType;
|
return smsBusiType;
|
||||||
}
|
}
|
||||||
|
public void setTaskId(Long taskId)
|
||||||
|
{
|
||||||
|
this.taskId = taskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTaskId()
|
||||||
|
{
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
|
public void setChannelId(String channelId)
|
||||||
|
{
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId()
|
||||||
|
{
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
public void setPrice(BigDecimal price)
|
public void setPrice(BigDecimal price)
|
||||||
{
|
{
|
||||||
this.price = price;
|
this.price = price;
|
||||||
|
@ -186,27 +218,39 @@ public class SmsTaskTbl extends BaseEntity
|
||||||
{
|
{
|
||||||
return issueCount;
|
return issueCount;
|
||||||
}
|
}
|
||||||
|
public void setUserId(String userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("idSmsTask", getIdSmsTask())
|
.append("idSmsTask", getIdSmsTask())
|
||||||
.append("taskName", getTaskName())
|
.append("taskName", getTaskName())
|
||||||
.append("smsBusiType", getSmsBusiType())
|
.append("smsBusiType", getSmsBusiType())
|
||||||
.append("price", getPrice())
|
.append("taskId", getTaskId())
|
||||||
.append("taskBeginTime", getTaskBeginTime())
|
.append("channelId", getChannelId())
|
||||||
.append("fileName", getFileName())
|
.append("price", getPrice())
|
||||||
.append("filePath", getFilePath())
|
.append("taskBeginTime", getTaskBeginTime())
|
||||||
.append("fileMd5", getFileMd5())
|
.append("fileName", getFileName())
|
||||||
.append("context", getContext())
|
.append("filePath", getFilePath())
|
||||||
.append("smsContentType", getSmsContentType())
|
.append("fileMd5", getFileMd5())
|
||||||
.append("taskStatus", getTaskStatus())
|
.append("context", getContext())
|
||||||
.append("successRate", getSuccessRate())
|
.append("smsContentType", getSmsContentType())
|
||||||
.append("issueCount", getIssueCount())
|
.append("taskStatus", getTaskStatus())
|
||||||
.append("createBy", getCreateBy())
|
.append("successRate", getSuccessRate())
|
||||||
.append("createTime", getCreateTime())
|
.append("issueCount", getIssueCount())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("userId", getUserId())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("createBy", getCreateBy())
|
||||||
.toString();
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,7 +303,7 @@ public class ShiroConfig
|
||||||
// 注册相关
|
// 注册相关
|
||||||
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
||||||
filterChainDefinitionMap.put("/api/**", "anon");
|
filterChainDefinitionMap.put("/api/**", "anon");
|
||||||
filterChainDefinitionMap.put("/common/download", "anon");
|
filterChainDefinitionMap.put("/profile/upload/**", "anon");
|
||||||
// 系统权限列表
|
// 系统权限列表
|
||||||
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class UndelegateEnergyTask {
|
||||||
|
|
||||||
TrxExchangeInfo trxExchangeInfoExample = TrxExchangeInfo.builder()
|
TrxExchangeInfo trxExchangeInfoExample = TrxExchangeInfo.builder()
|
||||||
.delegateStatus(dictValue)
|
.delegateStatus(dictValue)
|
||||||
.fcd(DateUtil.offsetDay(new Date(),-2))
|
// .fcd(DateUtil.offsetDay(new Date(),-2))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
List<TrxExchangeMonitorAccountInfo> trxExchangeMonitorAccountInfoList = trxExchangeInfoService.selectTrxExchangeMonitorAccountInfo(trxExchangeInfoExample);
|
List<TrxExchangeMonitorAccountInfo> trxExchangeMonitorAccountInfoList = trxExchangeInfoService.selectTrxExchangeMonitorAccountInfo(trxExchangeInfoExample);
|
||||||
|
|
|
@ -9,5 +9,5 @@ public interface IU02cxApi {
|
||||||
String getToken(GetTokenRequest getTokenRequest);
|
String getToken(GetTokenRequest getTokenRequest);
|
||||||
|
|
||||||
|
|
||||||
String addTask(String requestBody, String token, String appId) throws IOException;
|
Long addTask(String requestBody, String token, String appId) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class U02cxApiImpl implements IU02cxApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String addTask(String requestBody, String token, String appId) throws IOException {
|
public Long addTask(String requestBody, String token, String appId) throws IOException {
|
||||||
|
|
||||||
HttpHeaders httpHeaders = new HttpHeaders();
|
HttpHeaders httpHeaders = new HttpHeaders();
|
||||||
|
|
||||||
|
@ -44,28 +44,17 @@ public class U02cxApiImpl implements IU02cxApi {
|
||||||
httpHeaders.add("appId",appId);
|
httpHeaders.add("appId",appId);
|
||||||
httpHeaders.add("token",token);
|
httpHeaders.add("token",token);
|
||||||
|
|
||||||
// ResponseEntity<AddTaskResponse> responseEntity = RestTemplateUtils.post("http://cot5b.u02cx.com:20086/whatsApi/api/task/addTask", httpHeaders, requestBody, AddTaskResponse.class);
|
ResponseEntity<AddTaskResponse> responseEntity = RestTemplateUtils.post("http://cot5b.u02cx.com:20086/whatsApi/api/task/addTask", httpHeaders, requestBody, AddTaskResponse.class);
|
||||||
ResponseEntity<String> responseEntity = RestTemplateUtils.post("http://cot5b.u02cx.com:20086/whatsApi/api/task/addTask", httpHeaders, requestBody, String.class);
|
|
||||||
Preconditions.checkState(responseEntity.getStatusCode().is2xxSuccessful(), "addTask failed");
|
Preconditions.checkState(responseEntity.getStatusCode().is2xxSuccessful(), "addTask failed");
|
||||||
|
|
||||||
// AddTaskResponse addTaskResponse = responseEntity.getBody();
|
AddTaskResponse addTaskResponse = responseEntity.getBody();
|
||||||
String response = responseEntity.getBody();
|
|
||||||
Preconditions.checkNotNull(addTaskResponse, "addTaskResponse is null");
|
Preconditions.checkNotNull(addTaskResponse, "addTaskResponse is null");
|
||||||
|
|
||||||
int status = addTaskResponse.getStatus();
|
int status = addTaskResponse.getStatus();
|
||||||
Preconditions.checkState(0 == status, "addTask failed:" + ApiConstants.returnCodeMap.get(status)+",msg:"+addTaskResponse.getMsg());
|
Preconditions.checkState(0 == status, "addTask failed:" + ApiConstants.returnCodeMap.get(status)+",msg:"+addTaskResponse.getMsg());
|
||||||
|
|
||||||
// CloseableHttpClient httpclient = HttpClients.createDefault();
|
|
||||||
// HttpPost httpPost = new HttpPost("http://cot5b.u02cx.com:20086/whatsApi/api/task/addTask");
|
|
||||||
// httpPost.setHeader("Content-Type", "application/json");
|
|
||||||
// httpPost.setHeader("appId", appId);
|
|
||||||
// httpPost.setHeader("token", token);
|
|
||||||
// httpPost.setEntity(new StringEntity(requestBody, "utf8"));
|
|
||||||
// CloseableHttpResponse reportResponse = httpclient.execute(httpPost);
|
|
||||||
// String body = EntityUtils.toString(reportResponse.getEntity(), "utf8");
|
|
||||||
//
|
|
||||||
// AddTaskResponse addTaskResponse = JSONUtil.toBean(body, AddTaskResponse.class);
|
|
||||||
|
|
||||||
return addTaskResponse.getTaskId().toString();
|
|
||||||
|
return addTaskResponse.getTaskId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,6 +136,8 @@ public class EnergyTenantTransferHandler {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static TrxExchangeInfo buildTrxExchangeInfo(TenantInfo tenantInfo, String eneryBusiTypeByDay) {
|
private static TrxExchangeInfo buildTrxExchangeInfo(TenantInfo tenantInfo, String eneryBusiTypeByDay) {
|
||||||
String delegateStatus = DictUtils.getDictValue("sys_delegate_status", "已委托");
|
String delegateStatus = DictUtils.getDictValue("sys_delegate_status", "已委托");
|
||||||
//查看有没有没回收的能量,有的话先回收
|
//查看有没有没回收的能量,有的话先回收
|
||||||
|
@ -144,7 +146,7 @@ public class EnergyTenantTransferHandler {
|
||||||
.fromAddress(tenantInfo.getReceiverAddress())
|
.fromAddress(tenantInfo.getReceiverAddress())
|
||||||
.delegateStatus(delegateStatus)
|
.delegateStatus(delegateStatus)
|
||||||
.energyBusiType(eneryBusiTypeByDay)
|
.energyBusiType(eneryBusiTypeByDay)
|
||||||
.fcd(DateUtil.offsetDay(new Date(), -2))
|
// .fcd(DateUtil.offsetDay(new Date(), -2))
|
||||||
.build();
|
.build();
|
||||||
return trxExchangeInfo;
|
return trxExchangeInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil;
|
||||||
import com.ruoyi.common.core.domain.entity.SmsTaskTbl;
|
import com.ruoyi.common.core.domain.entity.SmsTaskTbl;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.system.api.IU02cxApi;
|
import com.ruoyi.system.api.IU02cxApi;
|
||||||
import com.ruoyi.system.api.entity.U02cx.AddTaskRequest;
|
import com.ruoyi.system.api.entity.U02cx.AddTaskRequest;
|
||||||
import com.ruoyi.system.api.entity.U02cx.GetTokenRequest;
|
import com.ruoyi.system.api.entity.U02cx.GetTokenRequest;
|
||||||
|
@ -79,7 +80,7 @@ public class SmsTaskTblServiceImpl implements ISmsTaskTblService
|
||||||
BeanUtils.copyProperties(smsChannelTbl, getTokenRequest);
|
BeanUtils.copyProperties(smsChannelTbl, getTokenRequest);
|
||||||
|
|
||||||
String token = u02cxApi.getToken(getTokenRequest);
|
String token = u02cxApi.getToken(getTokenRequest);
|
||||||
log.info("token:{}", token);
|
log.debug("token:{}", token);
|
||||||
AddTaskRequest addTaskRequest = new AddTaskRequest();
|
AddTaskRequest addTaskRequest = new AddTaskRequest();
|
||||||
addTaskRequest.setTaskName(smsTaskTbl.getTaskName())
|
addTaskRequest.setTaskName(smsTaskTbl.getTaskName())
|
||||||
.setPrice(smsTaskTbl.getPrice())
|
.setPrice(smsTaskTbl.getPrice())
|
||||||
|
@ -91,19 +92,26 @@ public class SmsTaskTblServiceImpl implements ISmsTaskTblService
|
||||||
.setType(Integer.parseInt(smsTaskTbl.getSmsContentType()));
|
.setType(Integer.parseInt(smsTaskTbl.getSmsContentType()));
|
||||||
try {
|
try {
|
||||||
// 将公钥字符串转换为 PublicKey 对象
|
// 将公钥字符串转换为 PublicKey 对象
|
||||||
// PublicKey publicKey = KeyUtils.getPublicKeyFromBase64String(smsChannelTbl.getPublicKey());
|
|
||||||
|
|
||||||
// 使用公钥加密数据
|
// 使用公钥加密数据
|
||||||
String jsonStr = JSONUtil.toJsonStr(addTaskRequest);
|
String jsonStr = JSONUtil.toJsonStr(addTaskRequest);
|
||||||
log.info("jsonStr:{}", jsonStr);
|
log.debug("jsonStr:{}", jsonStr);
|
||||||
// String encryptedData = EncryptionUtils.encrypt(jsonStr, publicKey);
|
// String encryptedData = EncryptionUtils.encrypt(jsonStr, publicKey);
|
||||||
String encryptedData = RsaUtils.encryptData(jsonStr, smsChannelTbl.getPublicKey());
|
String encryptedData = RsaUtils.encryptData(jsonStr, smsChannelTbl.getPublicKey());
|
||||||
String taskId = u02cxApi.addTask(encryptedData,token,smsChannelTbl.getAppId());
|
Long taskId = u02cxApi.addTask(encryptedData,token,smsChannelTbl.getAppId());
|
||||||
|
|
||||||
|
smsTaskTbl.setTaskId(taskId);
|
||||||
|
smsTaskTbl.setChannelId(smsChannelTbl.getChannelId());
|
||||||
|
Long userId = ShiroUtils.getUserId();
|
||||||
|
smsTaskTbl.setUserId(userId.toString());
|
||||||
|
String loginName = ShiroUtils.getLoginName();
|
||||||
|
smsTaskTbl.setCreateBy(loginName);
|
||||||
|
smsTaskTbl.setUpdateBy(loginName);
|
||||||
|
smsTaskTbl.setTaskStatus("0");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
smsTaskTbl.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return smsTaskTblMapper.insertSmsTaskTbl(smsTaskTbl);
|
return smsTaskTblMapper.insertSmsTaskTbl(smsTaskTbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.SmsTaskTblMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SmsTaskTblMapper">
|
||||||
|
|
||||||
<resultMap type="SmsTaskTbl" id="SmsTaskTblResult">
|
<resultMap type="SmsTaskTbl" id="SmsTaskTblResult">
|
||||||
<result property="idSmsTask" column="id_sms_task" />
|
<result property="idSmsTask" column="id_sms_task" />
|
||||||
<result property="taskName" column="task_name" />
|
<result property="taskName" column="task_name" />
|
||||||
<result property="smsBusiType" column="sms_busi_type" />
|
<result property="smsBusiType" column="sms_busi_type" />
|
||||||
|
<result property="taskId" column="task_id" />
|
||||||
|
<result property="channelId" column="channel_id" />
|
||||||
<result property="price" column="price" />
|
<result property="price" column="price" />
|
||||||
<result property="taskBeginTime" column="task_begin_time" />
|
<result property="taskBeginTime" column="task_begin_time" />
|
||||||
<result property="fileName" column="file_name" />
|
<result property="fileName" column="file_name" />
|
||||||
|
@ -18,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="taskStatus" column="task_status" />
|
<result property="taskStatus" column="task_status" />
|
||||||
<result property="successRate" column="success_rate" />
|
<result property="successRate" column="success_rate" />
|
||||||
<result property="issueCount" column="issue_count" />
|
<result property="issueCount" column="issue_count" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
|
@ -25,14 +28,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSmsTaskTblVo">
|
<sql id="selectSmsTaskTblVo">
|
||||||
select id_sms_task, task_name, sms_busi_type, price, task_begin_time, file_name, file_path, file_md5, context, sms_content_type, task_status, success_rate, issue_count, create_by, create_time, update_by, update_time from sms_task_tbl
|
select id_sms_task, task_name, sms_busi_type, task_id, channel_id, price, task_begin_time, file_name, file_path, file_md5, context, sms_content_type, task_status, success_rate, issue_count, user_id, create_by, create_time, update_by, update_time from sms_task_tbl
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSmsTaskTblList" parameterType="SmsTaskTbl" resultMap="SmsTaskTblResult">
|
<select id="selectSmsTaskTblList" parameterType="SmsTaskTbl" resultMap="SmsTaskTblResult">
|
||||||
<include refid="selectSmsTaskTblVo"/>
|
<include refid="selectSmsTaskTblVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
|
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
|
||||||
|
<if test="smsBusiType != null and smsBusiType != ''"> and sms_busi_type = #{smsBusiType}</if>
|
||||||
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if>
|
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if>
|
||||||
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
@ -47,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskName != null and taskName != ''">task_name,</if>
|
<if test="taskName != null and taskName != ''">task_name,</if>
|
||||||
<if test="smsBusiType != null">sms_busi_type,</if>
|
<if test="smsBusiType != null">sms_busi_type,</if>
|
||||||
|
<if test="taskId != null">task_id,</if>
|
||||||
|
<if test="channelId != null">channel_id,</if>
|
||||||
<if test="price != null">price,</if>
|
<if test="price != null">price,</if>
|
||||||
<if test="taskBeginTime != null">task_begin_time,</if>
|
<if test="taskBeginTime != null">task_begin_time,</if>
|
||||||
<if test="fileName != null">file_name,</if>
|
<if test="fileName != null">file_name,</if>
|
||||||
|
@ -57,14 +64,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskStatus != null">task_status,</if>
|
<if test="taskStatus != null">task_status,</if>
|
||||||
<if test="successRate != null">success_rate,</if>
|
<if test="successRate != null">success_rate,</if>
|
||||||
<if test="issueCount != null">issue_count,</if>
|
<if test="issueCount != null">issue_count,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskName != null and taskName != ''">#{taskName},</if>
|
<if test="taskName != null and taskName != ''">#{taskName},</if>
|
||||||
<if test="smsBusiType != null">#{smsBusiType},</if>
|
<if test="smsBusiType != null">#{smsBusiType},</if>
|
||||||
|
<if test="taskId != null">#{taskId},</if>
|
||||||
|
<if test="channelId != null">#{channelId},</if>
|
||||||
<if test="price != null">#{price},</if>
|
<if test="price != null">#{price},</if>
|
||||||
<if test="taskBeginTime != null">#{taskBeginTime},</if>
|
<if test="taskBeginTime != null">#{taskBeginTime},</if>
|
||||||
<if test="fileName != null">#{fileName},</if>
|
<if test="fileName != null">#{fileName},</if>
|
||||||
|
@ -75,11 +85,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskStatus != null">#{taskStatus},</if>
|
<if test="taskStatus != null">#{taskStatus},</if>
|
||||||
<if test="successRate != null">#{successRate},</if>
|
<if test="successRate != null">#{successRate},</if>
|
||||||
<if test="issueCount != null">#{issueCount},</if>
|
<if test="issueCount != null">#{issueCount},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSmsTaskTbl" parameterType="SmsTaskTbl">
|
<update id="updateSmsTaskTbl" parameterType="SmsTaskTbl">
|
||||||
|
@ -87,6 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
|
<if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
|
||||||
<if test="smsBusiType != null">sms_busi_type = #{smsBusiType},</if>
|
<if test="smsBusiType != null">sms_busi_type = #{smsBusiType},</if>
|
||||||
|
<if test="taskId != null">task_id = #{taskId},</if>
|
||||||
|
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||||
<if test="price != null">price = #{price},</if>
|
<if test="price != null">price = #{price},</if>
|
||||||
<if test="taskBeginTime != null">task_begin_time = #{taskBeginTime},</if>
|
<if test="taskBeginTime != null">task_begin_time = #{taskBeginTime},</if>
|
||||||
<if test="fileName != null">file_name = #{fileName},</if>
|
<if test="fileName != null">file_name = #{fileName},</if>
|
||||||
|
@ -97,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskStatus != null">task_status = #{taskStatus},</if>
|
<if test="taskStatus != null">task_status = #{taskStatus},</if>
|
||||||
<if test="successRate != null">success_rate = #{successRate},</if>
|
<if test="successRate != null">success_rate = #{successRate},</if>
|
||||||
<if test="issueCount != null">issue_count = #{issueCount},</if>
|
<if test="issueCount != null">issue_count = #{issueCount},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
|
Loading…
Reference in New Issue