|
|
@@ -1,19 +1,16 @@ |
|
|
package com.simple.controller; |
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
|
import org.apache.log4j.Logger; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.simple.common.Result; |
|
|
import com.simple.common.Result; |
|
|
import com.simple.common.ResultData; |
|
|
import com.simple.common.ResultData; |
|
|
|
|
|
|
|
|
import com.simple.domain.po.WxMsgModel; |
|
|
import com.simple.domain.po.WxMsgModel; |
|
|
import com.simple.service.WxMsgModelService; |
|
|
import com.simple.service.WxMsgModelService; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import org.apache.log4j.Logger; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("wxMsgModel") |
|
|
@RequestMapping("wxMsgModel") |
|
|
@@ -40,15 +37,13 @@ public class WxMsgModelController extends BaseController |
|
|
public ResultData add(@RequestBody WxMsgModel wxMsgModel) { |
|
|
public ResultData add(@RequestBody WxMsgModel wxMsgModel) { |
|
|
//Assert.notNull(wxMsgModel.getName(), "角色名不能为空"); |
|
|
//Assert.notNull(wxMsgModel.getName(), "角色名不能为空"); |
|
|
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); |
|
|
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); |
|
|
wxMsgModelService.saveOrUpdate(wxMsgModel); |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
|
|
|
return wxMsgModelService.saveOrUpdate(wxMsgModel); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("根据id更新接口") |
|
|
@ApiOperation("根据id更新接口") |
|
|
@PostMapping("update") |
|
|
@PostMapping("update") |
|
|
public ResultData update(@RequestBody WxMsgModel wxMsgModel) { |
|
|
public ResultData update(@RequestBody WxMsgModel wxMsgModel) { |
|
|
wxMsgModelService.saveOrUpdate(wxMsgModel); |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
|
|
|
return wxMsgModelService.saveOrUpdate(wxMsgModel); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("根据id删除接口") |
|
|
@ApiOperation("根据id删除接口") |
|
|
@@ -65,7 +60,7 @@ public class WxMsgModelController extends BaseController |
|
|
public ResultData findById(Long id) { |
|
|
public ResultData findById(Long id) { |
|
|
return new ResultData(Result.SUCCESS,"查询成功",wxMsgModelService.getById(id)); |
|
|
return new ResultData(Result.SUCCESS,"查询成功",wxMsgModelService.getById(id)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |