| | |
| | | @RequestMapping(value = "/modifyShopWxtemplateMsg") |
| | | public @ResponseBody |
| | | AjaxResult modifyShopWxtemplateMsg(ShopWxtemplateMsg newShopWxtemplateMsg) { |
| | | ShopWxtemplateMsg oldShopWxtemplateMsg = WebUtil.getSessionAttribute(BEV); |
| | | int i = 0; |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldShopWxtemplateMsg, newShopWxtemplateMsg)) { |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldShopWxtemplateMsg, newShopWxtemplateMsg); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newShopWxtemplateMsg); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("id", oldShopWxtemplateMsg.getId()); |
| | | shopWxtemplateMsgDao.updateByMap(modifyMap); |
| | | } |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | |
| | | int i = shopWxtemplateMsgDao.updateByModel(newShopWxtemplateMsg); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "微信模板消息"); |