Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
4a0c8a40
Commit
4a0c8a40
authored
Aug 20, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享有礼补数据
parent
e7c1a1a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
TestController.java
...gic/haoban/manage/web/controller/test/TestController.java
+27
-1
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/test/TestController.java
View file @
4a0c8a40
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
test
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
...
...
@@ -16,6 +17,7 @@ import com.gic.haoban.manage.web.qo.TestQo;
import
com.gic.haoban.manage.web.vo.TestVo
;
import
com.gic.sharing.core.service.api.service.MqApiService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -25,6 +27,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* Created 2018/12/17.
*
...
...
@@ -34,7 +38,7 @@ import java.util.Map;
@RequestMapping
(
"/test"
)
public
class
TestController
extends
WebBaseController
{
private
static
final
Logger
logger
=
getLogger
(
TestController
.
class
);
@Autowired
private
TestApiService
testApiService
;
...
...
@@ -109,4 +113,26 @@ public class TestController extends WebBaseController {
mqApiService
.
run
(
key
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 创建定时器
*
* @return
*/
@RequestMapping
(
"/sharing-import-batch"
)
@ResponseBody
public
HaobanResponse
sharingImportBatch
(
String
key
)
{
if
(
StringUtils
.
isBlank
(
key
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_0
);
}
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
key
);
int
num
=
jsonArray
.
size
();
int
i
=
0
;
for
(
Object
obj
:
jsonArray
)
{
i
=
i
+
1
;
logger
.
info
(
"执行num:"
+
i
+
":total"
+
num
);
mqApiService
.
run
(
JSONObject
.
toJSONString
(
obj
));
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
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