Exemple #1
0
 @Override
 public Integer update(ModelUser t) {
   if (t == null || t.getUsername() == null || t.getPassword() == null) {
     throw new ServException("username 或 password 不能为空");
   }
   t.setPassword(MD5Utils.encodeHex(t.getPassword()));
   return mapperUser.update(t);
 }
Exemple #2
0
 @Override
 public Long countByCondition(Condition<ModelUser> condition) {
   if (condition == null) {
     condition = new Condition<ModelUser>();
   }
   ModelUser t = condition.getT();
   if (t != null && t.getPassword() != null) {
     t.setPassword(MD5Utils.encodeHex(t.getPassword()));
   }
   return mapperUser.countByCondition(condition);
 }
Exemple #3
0
 @Override
 public List<ModelUser> findByCondition(Condition<ModelUser> condition, boolean injected) {
   if (condition == null) {
     condition = new Condition<ModelUser>();
   }
   ModelUser t = condition.getT();
   if (t != null && t.getPassword() != null) {
     t.setPassword(MD5Utils.encodeHex(t.getPassword()));
   }
   return mapperUser.findByCondition(condition);
 }