|
@@ -51,8 +51,9 @@ public class TaPolicyTypeController extends BaseController {
|
51
|
51
|
* @return
|
52
|
52
|
*/
|
53
|
53
|
@ApiOperation(value = "admin-购房政策类型列表", notes = "admin-购房政策类型列表")
|
54
|
|
- @RequestMapping(value="/taPolicyType",method= RequestMethod.GET)
|
55
|
|
- public ResponseBean taPolicyTypeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
|
54
|
+ @RequestMapping(value="/{plat}/taPolicyType",method= RequestMethod.GET)
|
|
55
|
+ public ResponseBean taPolicyTypeList(@PathVariable String plat,
|
|
56
|
+ @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
56
|
57
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
57
|
58
|
@RequestHeader("authorization") String token, HttpServletRequest request){
|
58
|
59
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -61,7 +62,7 @@ public class TaPolicyTypeController extends BaseController {
|
61
|
62
|
IPage<TaPolicyType> pg = new Page<>(pageNum, pageSize);
|
62
|
63
|
LambdaQueryWrapper<TaPolicyType> queryWrapper = new LambdaQueryWrapper<>();
|
63
|
64
|
queryWrapper.eq(TaPolicyType::getOrgId,getOrgId(request));
|
64
|
|
- queryWrapper.orderByDesc(TaPolicyType::getCreateDate);
|
|
65
|
+ queryWrapper.orderByDesc(TaPolicyType::getSort);
|
65
|
66
|
|
66
|
67
|
IPage<TaPolicyType> result = iTaPolicyTypeService.page(pg, queryWrapper);
|
67
|
68
|
responseBean.addSuccess(result);
|
|
@@ -79,8 +80,10 @@ public class TaPolicyTypeController extends BaseController {
|
79
|
80
|
* @return
|
80
|
81
|
*/
|
81
|
82
|
@ApiOperation(value = "admin-购房政策类型新增", notes = "admin-购房政策类型新增")
|
82
|
|
- @RequestMapping(value="/taPolicyType",method= RequestMethod.POST)
|
83
|
|
- public ResponseBean taPolicyTypeAdd(@RequestBody TaPolicyType taPolicyType, @RequestHeader("authorization") String token, HttpServletRequest request){
|
|
83
|
+ @RequestMapping(value="/admin/taPolicyType",method= RequestMethod.POST)
|
|
84
|
+ public ResponseBean taPolicyTypeAdd(@RequestBody TaPolicyType taPolicyType,
|
|
85
|
+ @RequestHeader("authorization") String token,
|
|
86
|
+ HttpServletRequest request){
|
84
|
87
|
ResponseBean responseBean = new ResponseBean();
|
85
|
88
|
try {
|
86
|
89
|
taPolicyType.setOrgId(getOrgId(request));
|
|
@@ -104,8 +107,10 @@ public class TaPolicyTypeController extends BaseController {
|
104
|
107
|
*/
|
105
|
108
|
@ApiOperation(value = "admin-购房政策类型删除", notes = "admin-购房政策类型删除")
|
106
|
109
|
@ResponseBody
|
107
|
|
- @RequestMapping(value="/taPolicyType/{id}", method= RequestMethod.DELETE)
|
108
|
|
- public ResponseBean taPolicyTypeDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
|
|
110
|
+ @RequestMapping(value="/admin/taPolicyType/{id}", method= RequestMethod.DELETE)
|
|
111
|
+ public ResponseBean taPolicyTypeDelete(@PathVariable String id,
|
|
112
|
+ @RequestHeader("authorization") String token,
|
|
113
|
+ HttpServletRequest request){
|
109
|
114
|
ResponseBean responseBean = new ResponseBean();
|
110
|
115
|
try {
|
111
|
116
|
if(iTaPolicyTypeService.removeById(id)){
|
|
@@ -128,9 +133,11 @@ public class TaPolicyTypeController extends BaseController {
|
128
|
133
|
* @return
|
129
|
134
|
*/
|
130
|
135
|
@ApiOperation(value = "admin-购房政策类型修改", notes = "admin-购房政策类型修改")
|
131
|
|
- @RequestMapping(value="/taPolicyType/{id}",method= RequestMethod.PUT)
|
|
136
|
+ @RequestMapping(value="/admin/taPolicyType/{id}",method= RequestMethod.PUT)
|
132
|
137
|
public ResponseBean taPolicyTypeUpdate(@PathVariable String id,
|
133
|
|
- @RequestBody TaPolicyType taPolicyType, @RequestHeader("authorization") String token, HttpServletRequest request){
|
|
138
|
+ @RequestBody TaPolicyType taPolicyType,
|
|
139
|
+ @RequestHeader("authorization") String token,
|
|
140
|
+ HttpServletRequest request){
|
134
|
141
|
ResponseBean responseBean = new ResponseBean();
|
135
|
142
|
try {
|
136
|
143
|
if (iTaPolicyTypeService.updateById(taPolicyType)){
|
|
@@ -151,8 +158,10 @@ public class TaPolicyTypeController extends BaseController {
|
151
|
158
|
* @param id 实体ID
|
152
|
159
|
*/
|
153
|
160
|
@ApiOperation(value = "admin-购房政策类型详情", notes = "admin-购房政策类型详情")
|
154
|
|
- @RequestMapping(value="/taPolicyType/{id}",method= RequestMethod.GET)
|
155
|
|
- public ResponseBean taPolicyTypeGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
|
|
161
|
+ @RequestMapping(value="/admin/taPolicyType/{id}",method= RequestMethod.GET)
|
|
162
|
+ public ResponseBean taPolicyTypeGet(@PathVariable String id,
|
|
163
|
+ @RequestHeader("authorization") String token,
|
|
164
|
+ HttpServletRequest request){
|
156
|
165
|
ResponseBean responseBean = new ResponseBean();
|
157
|
166
|
try {
|
158
|
167
|
responseBean.addSuccess(iTaPolicyTypeService.getById(id));
|