随意写点
??? /** 记录日志信息 */
??? private static final Logger logger = Logger.getLogger(AccTabService.class);
?
??? /**
??? ?* 用户信息更改比较
??? ?*
??? ?* @param o1
??? ?*??????????? new
??? ?* @param o2
??? ?*??????????? old
??? ?* @return 值相同true,不同false
??? ?*/
??? private boolean compareBaseAttribute(UBaseUserDO o1, UBaseUserDO o2) {
??? ??? for (int i = 0; i < baseModifyAttributeFields.length; i++) {
??? ??? ??? String attribute = baseModifyAttributeFields[i];
??? ??? ??? Object value1 = BeanUtil.getProperty(o1, attribute);
??? ??? ??? Object value2 = BeanUtil.getProperty(o2, attribute);
??? ??? ??? if ("".equals(value1)) {
??? ??? ??? ??? value1 = null;
??? ??? ??? }
??? ??? ??? if ("".equals(value2)) {
??? ??? ??? ??? value2 = null;
??? ??? ??? }
??? ??? ??? if (value1 == null || value2 == null) {
??? ??? ??? ??? if (value2 != null) {
??? ??? ??? ??? ??? return false;
??? ??? ??? ??? }
??? ??? ??? ??? if (value1 != null) {
??? ??? ??? ??? ??? return false;
??? ??? ??? ??? }
??? ??? ??? ??? if (value2 == null && value1 == null)
??? ??? ??? ??? ??? continue;
??? ??? ??? }
??? ??? ??? if (!value1.equals(value2)) {
??? ??? ??? ??? return false;
??? ??? ??? }
??? ??? }
??? ??? return true;
??? }