|
@@ -1,39 +1,42 @@
|
|
package com.hcloud.microserver.system.bank.controller;
|
|
package com.hcloud.microserver.system.bank.controller;
|
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
-import com.hcloud.microserver.system.bank.bo.CarbonBaseController;
|
|
+import com.hcloud.microserver.commoncore.base.BaseController;
|
|
import com.hcloud.microserver.system.bank.service.PovertyAreaService;
|
|
import com.hcloud.microserver.system.bank.service.PovertyAreaService;
|
|
import com.hcloud.microserver.commoncore.base.ResponseBase;
|
|
import com.hcloud.microserver.commoncore.base.ResponseBase;
|
|
import com.hcloud.microserver.system.facade.carbon.entity.PovertyArea;
|
|
import com.hcloud.microserver.system.facade.carbon.entity.PovertyArea;
|
|
import com.hcloud.microserver.system.facade.carbon.forms.PovertyAreaForm;
|
|
import com.hcloud.microserver.system.facade.carbon.forms.PovertyAreaForm;
|
|
|
|
+import com.hcloud.microserver.system.util.CurrUserUtil;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
@Slf4j
|
|
@Slf4j
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/web/area")
|
|
@RequestMapping("/web/area")
|
|
@Api(tags = "贫困区域管理服务",description = "贫困区域管理服务")
|
|
@Api(tags = "贫困区域管理服务",description = "贫困区域管理服务")
|
|
-public class PovertyAreaController extends CarbonBaseController {
|
|
+public class PovertyAreaController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private PovertyAreaService povertyAreaService;
|
|
private PovertyAreaService povertyAreaService;
|
|
|
|
|
|
@ApiOperation("分页查询贫困区域")
|
|
@ApiOperation("分页查询贫困区域")
|
|
@PostMapping("/searchByPage")
|
|
@PostMapping("/searchByPage")
|
|
- public ResponseBase searchByPage(@RequestBody PovertyAreaForm povertyAreaForm) {
|
|
+ public ResponseBase<List<PovertyArea>> searchByPage(@RequestBody PovertyAreaForm povertyAreaForm) {
|
|
- PageInfo pageInfo = this.povertyAreaService.queryListByPage(povertyAreaForm);
|
|
+ PageInfo<PovertyArea> list = this.povertyAreaService.getListByPage(povertyAreaForm);
|
|
- return responseSuccess(pageInfo);
|
|
+ return responseSuccess(list);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("新增贫困区域")
|
|
@ApiOperation("新增贫困区域")
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
public ResponseBase save(@RequestBody PovertyAreaForm povertyAreaForm) {
|
|
public ResponseBase save(@RequestBody PovertyAreaForm povertyAreaForm) {
|
|
|
|
|
|
- povertyAreaForm.setCreateUser(this.getUserId());
|
|
+ povertyAreaForm.setCreateUser(CurrUserUtil.getUserId());
|
|
- povertyAreaForm.setModifiedUser(this.getUserId());
|
|
+ povertyAreaForm.setModifiedUser(CurrUserUtil.getUserId());
|
|
int success = this.povertyAreaService.save(povertyAreaForm);
|
|
int success = this.povertyAreaService.save(povertyAreaForm);
|
|
if (success>0) {
|
|
if (success>0) {
|
|
return responseResultSuccess();
|
|
return responseResultSuccess();
|
|
@@ -63,7 +66,7 @@ public class PovertyAreaController extends CarbonBaseController {
|
|
|
|
|
|
@ApiOperation("查询贫困区域明细")
|
|
@ApiOperation("查询贫困区域明细")
|
|
@GetMapping("/findByGuid")
|
|
@GetMapping("/findByGuid")
|
|
- public ResponseBase findByGuid(@RequestParam(name = "guid") String guid) {
|
|
+ public ResponseBase<PovertyArea> findByGuid(@RequestParam(name = "guid") String guid) {
|
|
PovertyArea povertyArea = this.povertyAreaService.findByGuid(guid);
|
|
PovertyArea povertyArea = this.povertyAreaService.findByGuid(guid);
|
|
return responseResultSuccess(povertyArea);
|
|
return responseResultSuccess(povertyArea);
|
|
}
|
|
}
|