|
|
@@ -16,7 +16,6 @@ import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
|
|
|
|
import com.iformall.domain.po.WxSubsidy; |
|
|
|
import com.iformall.service.WxSubsidyService; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@@ -32,8 +31,6 @@ import java.util.Map; |
|
|
|
public class WxSubsidyController extends BaseController { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxSubsidyService wxSubsidyService; |
|
|
|
|
|
|
|
// @ApiOperation("补贴扫码支付发起") |
|
|
|
// @GetMapping("prePay") |
|
|
@@ -59,52 +56,6 @@ public class WxSubsidyController extends BaseController { |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
@SystemControllerLog(description = "商城补贴-列表") |
|
|
|
public ResultData list(@ModelAttribute WxSubsidy wxSubsidy, Integer pageNum, Integer pageSize) { |
|
|
|
if (null == wxSubsidy) wxSubsidy = new WxSubsidy(); |
|
|
|
final PageInfo<WxSubsidy> page = wxSubsidyService.listAsPage(wxSubsidy, pageNum, pageSize); |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("新增接口") |
|
|
|
@PostMapping("add") |
|
|
|
@SystemControllerLog(description = "商城补贴-新增接口") |
|
|
|
public ResultData add(@RequestBody WxSubsidy wxSubsidy) { |
|
|
|
//Assert.notNull(wxSubsidy.getName(), "角色名不能为空"); |
|
|
|
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); |
|
|
|
wxSubsidyService.saveOrUpdate(wxSubsidy); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id更新接口") |
|
|
|
@PostMapping("update") |
|
|
|
@SystemControllerLog(description = "商城补贴-更新") |
|
|
|
public ResultData update(@RequestBody WxSubsidy wxSubsidy) { |
|
|
|
wxSubsidyService.saveOrUpdate(wxSubsidy); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id删除接口") |
|
|
|
@GetMapping("/del") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
@SystemControllerLog(description = "商城补贴-删除") |
|
|
|
public ResultData delete(Long id) { |
|
|
|
wxSubsidyService.deleteById(id); |
|
|
|
return new ResultData(Result.SUCCESS, "删除成功", null); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id查询接口") |
|
|
|
@GetMapping("/findById") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
@SystemControllerLog(description = "商城补贴-查询") |
|
|
|
public ResultData findById(Long id) { |
|
|
|
return new ResultData(Result.SUCCESS, "查询成功", wxSubsidyService.getById(id)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |