| @@ -63,7 +63,13 @@ public class WxMerchantController extends BaseController | |||||
| public ResultData findById(Long id) { | public ResultData findById(Long id) { | ||||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantService.getById(id)); | return new ResultData(Result.SUCCESS,"查询成功",wxMerchantService.getById(id)); | ||||
| } | } | ||||
| @ApiOperation("停用") | |||||
| @GetMapping("disable") | |||||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||||
| public ResultData disable(Long id) { | |||||
| wxMerchantService.disable(id); | |||||
| return new ResultData(Result.SUCCESS,"停用成功"); | |||||
| } | |||||
| } | } | ||||
| @@ -72,7 +72,7 @@ public class WxMsgController extends BaseController | |||||
| @RequestMapping("/excleupload") | @RequestMapping("/excleupload") | ||||
| public ResultData courseplanimport(@RequestParam("file") MultipartFile file) { | |||||
| public ResultData excleupload(@RequestParam("file") MultipartFile file) { | |||||
| if (file.isEmpty()) { | if (file.isEmpty()) { | ||||
| return new ResultData(Result.SUCCESS,"上传文件不能为空"); | return new ResultData(Result.SUCCESS,"上传文件不能为空"); | ||||
| } | } | ||||
| @@ -39,4 +39,6 @@ public interface WxMerchantService { | |||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| void disable(Long id); | |||||
| } | } | ||||
| @@ -51,6 +51,13 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| wxMerchantMapper.deleteByPrimaryKey(id); | wxMerchantMapper.deleteByPrimaryKey(id); | ||||
| } | } | ||||
| @Override | |||||
| public void disable(Long id) { | |||||
| WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | |||||
| wxMerchant.setStatus(0); | |||||
| wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | |||||
| } | |||||
| @Transactional | @Transactional | ||||
| @Override | @Override | ||||
| public void saveOrUpdate(WxMerchant wxMerchant) { | public void saveOrUpdate(WxMerchant wxMerchant) { | ||||