diff --git a/src/main/java/com/lq/cms/vo/WechatUserVo.java b/src/main/java/com/lq/cms/vo/WechatUserVo.java index cc87a13..d25b224 100755 --- a/src/main/java/com/lq/cms/vo/WechatUserVo.java +++ b/src/main/java/com/lq/cms/vo/WechatUserVo.java @@ -9,35 +9,65 @@ import java.util.Date; */ public class WechatUserVo extends AdminBaseVo{ - //用户openId + /** + * 用户openId + */ private String openId; - //昵称 + /** + * 昵称 + */ private String nickName; - //性别 + /** + * 性别 + */ private Integer sex; - //语言 + /** + * 语言 + */ private String language; - //城市 + /** + * 城市 + */ private String city; - //省份 + /** + * 省份 + */ private String province; - //国家 + /** + * 国家 + */ private String country; - //头像地址 + /** + * 头像地址 + */ private String headImgUrl; - //用户关注时间(多次关注,取最后一次时间) + /** + * 用户关注时间(多次关注,取最后一次时间) + */ private Date subscribeTime; - //用户对应微信开放平台账号(只有绑定了开放平台账号,才出现该字段) + /** + * 用户对应微信开放平台账号(只有绑定了开放平台账号,才出现该字段) + */ private String unionid; - //运营者对用户备注 + /** + * 运营者对用户备注 + */ private String remark; - //用户对应分组 + /** + * 用户对应分组 + */ private String groupid; - //用户对应的标签 + /** + * 用户对应的标签 + */ private String tagidId; - //用户关注渠道 + /** + * 用户关注渠道 + */ private String sybscribeScene; - //关联的微信ID + /** + * 关联的微信ID + */ private Long wechatInfoId; public String getOpenId() { diff --git a/src/main/java/com/lq/code/service/BaseService.java b/src/main/java/com/lq/code/service/BaseService.java index abe8904..42c389d 100755 --- a/src/main/java/com/lq/code/service/BaseService.java +++ b/src/main/java/com/lq/code/service/BaseService.java @@ -7,6 +7,7 @@ import java.util.List; /** * Created by qi_liang on 2018/6/21. + * @author qi */ public interface BaseService { diff --git a/src/main/java/com/lq/code/service/impl/BaseServiceImpl.java b/src/main/java/com/lq/code/service/impl/BaseServiceImpl.java index 534f880..576d7f2 100755 --- a/src/main/java/com/lq/code/service/impl/BaseServiceImpl.java +++ b/src/main/java/com/lq/code/service/impl/BaseServiceImpl.java @@ -7,6 +7,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; /** + * @author qi * Created by qi_liang on 2018/6/21. *  采用jdk8 默认方法,所以该实现类废弃 */ @@ -26,43 +27,43 @@ public abstract class BaseServiceImpl implements BaseService{ } @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public Long save(T entity) { return getBaseDao().save(entity); } @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void update(T entity) { getBaseDao().update(entity); } @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void delete(Long id) { getBaseDao().delete(id); } @Override - @Transactional - public void batchSave(List entitylist) { + @Transactional(rollbackFor = Exception.class) + public void batchSave(List entityList) { - getBaseDao().batchSave(entitylist); + getBaseDao().batchSave(entityList); } @Override - @Transactional - public void batchUpdate(List entitylist) { + @Transactional(rollbackFor = Exception.class) + public void batchUpdate(List entityList) { - getBaseDao().batchUpdate(entitylist); + getBaseDao().batchUpdate(entityList); } @Override - @Transactional - public void batchDelete(List entitylist) { + @Transactional(rollbackFor = Exception.class) + public void batchDelete(List entityList) { - getBaseDao().batchDelete(entitylist); + getBaseDao().batchDelete(entityList); } } diff --git a/src/main/java/com/lq/code/web/BaseController.java b/src/main/java/com/lq/code/web/BaseController.java index 520f9e7..e6e299e 100755 --- a/src/main/java/com/lq/code/web/BaseController.java +++ b/src/main/java/com/lq/code/web/BaseController.java @@ -15,16 +15,12 @@ public class BaseController { @ResponseBody public AjaxResult handleException(Exception e) { e.printStackTrace(); - AjaxResult ajaxResult= getAjaxResult(); + AjaxResult ajaxResult= AjaxResult.getSuccessInstance(); ajaxResult.setSuccess(false); ajaxResult.setMsg(e.getMessage()); return ajaxResult; } - //返回ajax数据结构 - public AjaxResult getAjaxResult(){ - return new AjaxResult(true,"操作成功",""); - } } diff --git a/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java b/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java index ce2724e..0bd6e46 100755 --- a/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java +++ b/src/main/java/com/lq/wechat/mode/template/WechatTemplateData.java @@ -3,11 +3,16 @@ package com.lq.wechat.mode.template; /** * 消息模版内容 * Created by qi_liang on 2018/6/27. + * @author qi */ public class WechatTemplateData { - //内容 + /** + * 内容 + */ private String value; - //字体样式 + /** + * 字体样式 + */ private String color; public String getValue() {