Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
b25d36ad
Commit
b25d36ad
authored
Sep 11, 2023
by
陆正友
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复短信问题
parent
9fbc9711
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
sms_batch_send.lsc
src/main/webapp/modules/sys/SYS420/sms_batch_send.lsc
+31
-6
No files found.
src/main/webapp/modules/sys/SYS420/sms_batch_send.lsc
View file @
b25d36ad
...
...
@@ -11,12 +11,37 @@
importPackage(Packages.com.hand.hap.system.dto);
//step2 发送短信
function sendsms() {
// 查询待发送短信表
var contract_collection = $bm('sys.SYS420.reminder_sms_list');
contract_collection.update();
}
sendsms();
]]>
</s:server-script>
// 查询待发送短信表
var contract_collection = $bm('sys.SYS420.reminder_sms_list');
contract_collection.update();
var sms_list_bm = $bm('sys.SYS420.reminder_sms_loop');
println($ctx.parameter.batch_id);
var sms_list_result = sms_list_bm.queryAsMap({
"batch_id": $ctx.parameter.batch_id
});
var sms_list_records = sms_list_result.getChildren();
for (var i = 0; i < sms_list_records.length; i++) {
println(1);
var Phones = sms_list_records[i].phone_number;
var content = sms_list_records[i].text;
var sms_id = sms_list_records[i].sms_id;
try {
var example = new Example();
var result = example.setSingleSms(content, Phones);
var req_response = result.toString();
} catch (e) {
println("抛出异常:" + e);
}
//发送后请求更新
$bm('sys.SYS420.reminder_sms_loop').update({
sms_id: sms_id,
result: req_response
});
}
}
sendsms();
]]>
</s:server-script>
</a:init-procedure>
<a:service-output
output=
"/parameter"
/>
</a:service>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment