|
@@ -36,14 +36,16 @@ public class TaMiniappTemplateController extends BaseController {
|
36
|
36
|
* @param pageSize
|
37
|
37
|
* @return
|
38
|
38
|
*/
|
39
|
|
- @RequestMapping(value="/taMiniappTemplate",method= RequestMethod.GET)
|
40
|
|
- public ResponseBean taMiniappTemplateList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
|
39
|
+ @RequestMapping(value="/center/taMiniappTemplate/{miniAppId}",method= RequestMethod.GET)
|
|
40
|
+ public ResponseBean taMiniappTemplateList(@PathVariable String miniappId,
|
|
41
|
+ @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
41
|
42
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
42
|
43
|
ResponseBean responseBean = new ResponseBean();
|
43
|
44
|
try {
|
44
|
45
|
//使用分页插件
|
45
|
46
|
IPage<TaMiniappTemplate> pg = new Page<>(pageNum, pageSize);
|
46
|
47
|
QueryWrapper<TaMiniappTemplate> queryWrapper = new QueryWrapper<>();
|
|
48
|
+ queryWrapper.eq("miniapp_id",miniappId);
|
47
|
49
|
queryWrapper.orderByDesc("create_date");
|
48
|
50
|
|
49
|
51
|
IPage<TaMiniappTemplate> result = iTaMiniappTemplateService.page(pg, queryWrapper);
|
|
@@ -61,7 +63,7 @@ public class TaMiniappTemplateController extends BaseController {
|
61
|
63
|
* @param taMiniappTemplate 实体对象
|
62
|
64
|
* @return
|
63
|
65
|
*/
|
64
|
|
- @RequestMapping(value="/taMiniappTemplate",method= RequestMethod.POST)
|
|
66
|
+ @RequestMapping(value="/center/taMiniappTemplate",method= RequestMethod.POST)
|
65
|
67
|
public ResponseBean taMiniappTemplateAdd(@RequestBody TaMiniappTemplate taMiniappTemplate){
|
66
|
68
|
ResponseBean responseBean = new ResponseBean();
|
67
|
69
|
try {
|
|
@@ -83,7 +85,7 @@ public class TaMiniappTemplateController extends BaseController {
|
83
|
85
|
* @param id 实体ID
|
84
|
86
|
*/
|
85
|
87
|
@ResponseBody
|
86
|
|
- @RequestMapping(value="/taMiniappTemplate/{id}", method= RequestMethod.DELETE)
|
|
88
|
+ @RequestMapping(value="/center/taMiniappTemplate/{id}", method= RequestMethod.DELETE)
|
87
|
89
|
public ResponseBean taMiniappTemplateDelete(@PathVariable Integer id){
|
88
|
90
|
ResponseBean responseBean = new ResponseBean();
|
89
|
91
|
try {
|
|
@@ -106,11 +108,12 @@ public class TaMiniappTemplateController extends BaseController {
|
106
|
108
|
* @param taMiniappTemplate 实体对象
|
107
|
109
|
* @return
|
108
|
110
|
*/
|
109
|
|
- @RequestMapping(value="/taMiniappTemplate/{id}",method= RequestMethod.PUT)
|
|
111
|
+ @RequestMapping(value="/center/taMiniappTemplate/{id}",method= RequestMethod.PUT)
|
110
|
112
|
public ResponseBean taMiniappTemplateUpdate(@PathVariable Integer id,
|
111
|
113
|
@RequestBody TaMiniappTemplate taMiniappTemplate){
|
112
|
114
|
ResponseBean responseBean = new ResponseBean();
|
113
|
115
|
try {
|
|
116
|
+ taMiniappTemplate.setSerialNo(id);
|
114
|
117
|
if (iTaMiniappTemplateService.updateById(taMiniappTemplate)){
|
115
|
118
|
responseBean.addSuccess(taMiniappTemplate);
|
116
|
119
|
}else {
|
|
@@ -128,7 +131,7 @@ public class TaMiniappTemplateController extends BaseController {
|
128
|
131
|
* 根据id查询对象
|
129
|
132
|
* @param id 实体ID
|
130
|
133
|
*/
|
131
|
|
- @RequestMapping(value="/taMiniappTemplate/{id}",method= RequestMethod.GET)
|
|
134
|
+ @RequestMapping(value="/center/taMiniappTemplate/{id}",method= RequestMethod.GET)
|
132
|
135
|
public ResponseBean taMiniappTemplateGet(@PathVariable Integer id){
|
133
|
136
|
ResponseBean responseBean = new ResponseBean();
|
134
|
137
|
try {
|