Unverified Commit 4b5f60d9 authored by Tboy's avatar Tboy Committed by GitHub
Browse files

Merge pull request #6 from apache/dev

merge
parents 1610f434 be5fc116
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -154,8 +154,13 @@ public class AccessTokenService extends BaseService {
     */
    public Map<String, Object> updateToken(int id,int userId, String expireTime, String token) {
        Map<String, Object> result = new HashMap<>(5);
        AccessToken accessToken = new AccessToken();
        accessToken.setId(id);

        AccessToken accessToken = accessTokenMapper.selectById(id);
        if (accessToken == null) {
            logger.error("access token not exist,  access token id {}", id);
            putMsg(result, Status.ACCESS_TOKEN_NOT_EXIST);
            return result;
        }
        accessToken.setUserId(userId);
        accessToken.setExpireTime(DateUtils.stringToDate(expireTime));
        accessToken.setToken(token);
+6 −0
Original line number Diff line number Diff line
@@ -193,6 +193,12 @@ public class AlertGroupService extends BaseService{
        if (checkAdmin(loginUser, result)){
            return result;
        }
        //check exist
        AlertGroup alertGroup = alertGroupMapper.selectById(id);
        if (alertGroup == null) {
            putMsg(result, Status.ALERT_GROUP_NOT_EXIST);
            return result;
        }

        userAlertGroupMapper.deleteByAlertgroupId(id);
        alertGroupMapper.deleteById(id);
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ public class ResourcesService extends BaseService {
        }

        Resource resource = resourcesMapper.selectById(resourceId);
        String originResourceName = resource.getAlias();
        if (resource == null) {
            putMsg(result, Status.RESOURCE_NOT_EXIST);
            return result;
@@ -236,6 +235,7 @@ public class ResourcesService extends BaseService {
        }

        //get the file suffix
        String originResourceName = resource.getAlias();
        String suffix = originResourceName.substring(originResourceName.lastIndexOf("."));

        //if the name without suffix then add it ,else use the origin name
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class CheckUtils {
   * @return true if phone regex valid, otherwise return false
   */
  public static boolean checkPhone(String phone) {
    return StringUtils.isEmpty(phone) || phone.length() <= 11;
    return StringUtils.isEmpty(phone) || phone.length() == 11;
  }


+5 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ public final class Constants {
     */
    public static final String HADOOP_PROPERTIES_PATH = "/common/hadoop/hadoop.properties";


    /**
     * common properties path
     */
@@ -1007,4 +1006,9 @@ public final class Constants {
    public static final String RECEIVERS = "receivers";
    public static final String RECEIVERS_CC = "receiversCc";


    /**
     * dataSource sensitive param
     */
    public static final String DATASOURCE_PASSWORD_REGEX = "(?<=(\"password\":\")).*?(?=(\"))";
}
Loading