|
|
|
@@ -5,7 +5,9 @@ import com.iformall.annotation.SystemControllerLog; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxBusiness; |
|
|
|
import com.iformall.domain.po.WxSubBusiness; |
|
|
|
import com.iformall.service.WxBusinessService; |
|
|
|
import com.iformall.service.WxSubBusinessService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
@@ -27,6 +29,9 @@ public class WxBusinessController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxBusinessService wxBusinessService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxSubBusinessService wxSubBusinessService; |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -49,41 +54,13 @@ public class WxBusinessController extends BaseController { |
|
|
|
return new ResultData(busList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("新增接口") |
|
|
|
@PostMapping("add") |
|
|
|
@SystemControllerLog(description = "业态-新增") |
|
|
|
public ResultData add(@RequestBody WxBusiness wxBusiness) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxBusinessController::add"); |
|
|
|
//Assert.notNull(wxBusiness.getName(), "角色名不能为空"); |
|
|
|
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id更新接口") |
|
|
|
@PostMapping("update") |
|
|
|
@SystemControllerLog(description = "业态-更新") |
|
|
|
public ResultData update(@RequestBody WxBusiness wxBusiness) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxBusinessController::update"); |
|
|
|
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) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxBusinessController::delete"); |
|
|
|
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(Integer id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxBusinessController::findById"); |
|
|
|
return new ResultData(Result.SUCCESS, "查询成功", wxBusinessService.getById(id)); |
|
|
|
@ApiOperation("子业态表接口") |
|
|
|
@GetMapping("listSub") |
|
|
|
@SystemControllerLog(description = "子业态") |
|
|
|
public ResultData listSub(@ModelAttribute WxSubBusiness wxSubBusiness) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxBusinessController::getList"); |
|
|
|
final List<WxSubBusiness> busList = wxSubBusinessService.findList(wxSubBusiness); |
|
|
|
return new ResultData(busList); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |