Add PhoneList by ConnID
This commit is contained in:
parent
ff014be96e
commit
5aa94b9dd6
@ -1,14 +1,12 @@
|
|||||||
package com.pudonghot.yo.cms.annotation;
|
package com.pudonghot.yo.cms.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.*;
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Nov 17, 2019 16:51:56
|
* Nov 17, 2019 16:51:56
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Taggable {
|
public @interface Taggable {
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
package com.pudonghot.yo.cms.annotation;
|
package com.pudonghot.yo.cms.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.*;
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark resource is part of tenant
|
* Mark resource is part of tenant
|
||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Nov 04, 2019 23:06:46
|
* Nov 04, 2019 23:06:46
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface TenantResource {
|
public @interface TenantResource {
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
package com.pudonghot.yo.cms.controller;
|
package com.pudonghot.yo.cms.controller;
|
||||||
|
|
||||||
import com.pudonghot.yo.cms.annotation.TenantResource;
|
|
||||||
import com.pudonghot.yo.model.domain.IvrMenu;
|
|
||||||
import com.wacai.tigon.form.FormList;
|
|
||||||
import com.wacai.tigon.web.annotation.FilterCol;
|
|
||||||
import com.wacai.tigon.web.annotation.ListApi;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
||||||
import com.wacai.tigon.web.controller.BaseCrudController;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
||||||
@ -17,16 +11,9 @@ import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
|||||||
* @date Sep 22, 2020 20:06:35
|
* @date Sep 22, 2020 20:06:35
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@ListApi(searchCols = {
|
|
||||||
PhoneBlacklist.PHONE,
|
|
||||||
PhoneBlacklist.NOTE
|
|
||||||
})
|
|
||||||
@TenantResource
|
|
||||||
@RequestMapping("/phone-blacklist")
|
@RequestMapping("/phone-blacklist")
|
||||||
public class PhoneBlacklistController
|
public class PhoneBlacklistController
|
||||||
extends BaseCrudController<Integer,
|
extends PhoneListController<PhoneBlacklist,
|
||||||
PhoneBlacklist,
|
|
||||||
FormList,
|
|
||||||
FormCreatePhoneBlacklist,
|
FormCreatePhoneBlacklist,
|
||||||
FormUpdatePhoneBlacklist> {
|
FormUpdatePhoneBlacklist> {
|
||||||
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
package com.pudonghot.yo.cms.controller;
|
package com.pudonghot.yo.cms.controller;
|
||||||
|
|
||||||
import com.wacai.tigon.form.FormList;
|
|
||||||
import com.wacai.tigon.web.annotation.ListApi;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.annotation.TenantResource;
|
|
||||||
import com.wacai.tigon.web.controller.BaseCrudController;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
||||||
@ -15,17 +11,10 @@ import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
|||||||
* @date Sep 23, 2020 22:17:01
|
* @date Sep 23, 2020 22:17:01
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@ListApi(searchCols = {
|
|
||||||
PhoneGreylist.PHONE,
|
|
||||||
PhoneGreylist.NOTE
|
|
||||||
})
|
|
||||||
@TenantResource
|
|
||||||
@RequestMapping("/phone-greylist")
|
@RequestMapping("/phone-greylist")
|
||||||
public class PhoneGreylistController
|
public class PhoneGreylistController
|
||||||
extends BaseCrudController<Integer,
|
extends PhoneListController<
|
||||||
PhoneGreylist,
|
PhoneGreylist,
|
||||||
FormList,
|
|
||||||
FormCreatePhoneGreylist,
|
FormCreatePhoneGreylist,
|
||||||
FormUpdatePhoneGreylist> {
|
FormUpdatePhoneGreylist> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.pudonghot.yo.cms.controller;
|
||||||
|
|
||||||
|
import lombok.val;
|
||||||
|
import java.util.List;
|
||||||
|
import com.wacai.tigon.form.FormList;
|
||||||
|
import com.wacai.tigon.model.ViewModel;
|
||||||
|
import com.wacai.tigon.web.annotation.ListApi;
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneList;
|
||||||
|
import com.wacai.tigon.web.controller.ArgQuery;
|
||||||
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
import com.pudonghot.yo.cms.annotation.TenantResource;
|
||||||
|
import com.wacai.tigon.web.controller.BaseCrudController;
|
||||||
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneList;
|
||||||
|
import com.pudonghot.yo.cellphone.privacy.NumberPrivacyUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Sep 22, 2020 20:06:35
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Nov 28, 2020 23:24:17
|
||||||
|
*/
|
||||||
|
@ListApi(searchCols = {
|
||||||
|
PhoneList.PHONE,
|
||||||
|
PhoneList.NOTE
|
||||||
|
})
|
||||||
|
@TenantResource
|
||||||
|
public class PhoneListController<M extends PhoneList,
|
||||||
|
FC extends FormCreatePhoneList,
|
||||||
|
FU extends BaseUpdateForm>
|
||||||
|
extends BaseCrudController<Integer,
|
||||||
|
M, FormList, FC, FU> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void after(final ArgQuery<?> arg) {
|
||||||
|
super.after(arg);
|
||||||
|
val type = arg.getType();
|
||||||
|
|
||||||
|
if (type == ArgQuery.Type.FIND) {
|
||||||
|
val data = (PhoneList) arg.getResult().getData();
|
||||||
|
data.setPhone(NumberPrivacyUtils.mask(data.getPhone()));
|
||||||
|
}
|
||||||
|
else if (type == ArgQuery.Type.LIST) {
|
||||||
|
for (val vm : (List<ViewModel<PhoneList>>) arg.getResult().getData()) {
|
||||||
|
val data = vm.getData();
|
||||||
|
data.setPhone(NumberPrivacyUtils.mask(data.getPhone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,7 @@
|
|||||||
package com.pudonghot.yo.cms.controller;
|
package com.pudonghot.yo.cms.controller;
|
||||||
|
|
||||||
import com.wacai.tigon.form.FormList;
|
|
||||||
import com.wacai.tigon.web.annotation.ListApi;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.annotation.TenantResource;
|
|
||||||
import com.wacai.tigon.web.controller.BaseCrudController;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
||||||
@ -15,17 +11,9 @@ import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
|||||||
* @date Sep 22, 2020 20:06:30
|
* @date Sep 22, 2020 20:06:30
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@ListApi(searchCols = {
|
|
||||||
PhoneWhitelist.PHONE,
|
|
||||||
PhoneWhitelist.NOTE
|
|
||||||
})
|
|
||||||
@TenantResource
|
|
||||||
@RequestMapping("/phone-whitelist")
|
@RequestMapping("/phone-whitelist")
|
||||||
public class PhoneWhitelistController
|
public class PhoneWhitelistController
|
||||||
extends BaseCrudController<Integer,
|
extends PhoneListController<PhoneWhitelist,
|
||||||
PhoneWhitelist,
|
|
||||||
FormList,
|
|
||||||
FormCreatePhoneWhitelist,
|
FormCreatePhoneWhitelist,
|
||||||
FormUpdatePhoneWhitelist> {
|
FormUpdatePhoneWhitelist> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
package com.pudonghot.yo.cms.controller;
|
package com.pudonghot.yo.cms.controller;
|
||||||
|
|
||||||
import com.pudonghot.yo.cms.auth.SessionAbility;
|
import lombok.val;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import me.chyxion.tigon.mybatis.Search;
|
import me.chyxion.tigon.mybatis.Search;
|
||||||
import com.wacai.tigon.model.ViewModel;
|
import com.wacai.tigon.model.ViewModel;
|
||||||
import com.wacai.tigon.web.controller.ArgQuery;
|
|
||||||
import com.pudonghot.yo.model.domain.Agent;
|
import com.pudonghot.yo.model.domain.Agent;
|
||||||
import org.springframework.stereotype.Component;
|
import com.wacai.tigon.web.controller.ArgQuery;
|
||||||
import com.pudonghot.yo.model.domain.ObjectTag;
|
import com.pudonghot.yo.model.domain.ObjectTag;
|
||||||
import com.pudonghot.yo.cms.service.TagService;
|
import com.pudonghot.yo.cms.service.TagService;
|
||||||
import com.pudonghot.yo.cms.annotation.Taggable;
|
import com.pudonghot.yo.cms.annotation.Taggable;
|
||||||
import org.springframework.core.annotation.AnnotationUtils;
|
import org.springframework.stereotype.Component;
|
||||||
|
import com.pudonghot.yo.cms.auth.SessionAbility;
|
||||||
import com.pudonghot.yo.cms.annotation.TenantResource;
|
import com.pudonghot.yo.cms.annotation.TenantResource;
|
||||||
|
import org.springframework.core.annotation.AnnotationUtils;
|
||||||
import com.wacai.tigon.web.controller.BaseQueryControllerHook;
|
import com.wacai.tigon.web.controller.BaseQueryControllerHook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
@ -38,10 +39,10 @@ public class TenantQueryHook implements BaseQueryControllerHook, SessionAbility
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void before(final ArgQuery<?> arg) {
|
public void before(final ArgQuery<?> arg) {
|
||||||
final TenantResource tr = AnnotationUtils.findAnnotation(
|
val tr = AnnotationUtils.findAnnotation(
|
||||||
arg.getController(), TenantResource.class);
|
arg.getController(), TenantResource.class);
|
||||||
if (tr != null) {
|
if (tr != null) {
|
||||||
final Integer tenantId = getTenantId();
|
val tenantId = getTenantId();
|
||||||
if (tr.searchAttr()) {
|
if (tr.searchAttr()) {
|
||||||
log.debug("Query before: @TenantResource found, add search attr [{}].", tenantId);
|
log.debug("Query before: @TenantResource found, add search attr [{}].", tenantId);
|
||||||
arg.getSearch().setAttr(
|
arg.getSearch().setAttr(
|
||||||
@ -54,7 +55,7 @@ public class TenantQueryHook implements BaseQueryControllerHook, SessionAbility
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Taggable
|
// Taggable
|
||||||
final Taggable taggable = AnnotationUtils.findAnnotation(
|
val taggable = AnnotationUtils.findAnnotation(
|
||||||
arg.getController(), Taggable.class);
|
arg.getController(), Taggable.class);
|
||||||
if (taggable != null) {
|
if (taggable != null) {
|
||||||
log.debug("Query before: @Taggable found, add search attr 'withTags'");
|
log.debug("Query before: @Taggable found, add search attr 'withTags'");
|
||||||
@ -67,7 +68,7 @@ public class TenantQueryHook implements BaseQueryControllerHook, SessionAbility
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void after(final ArgQuery<?> arg) {
|
public void after(final ArgQuery<?> arg) {
|
||||||
final Taggable taggable = AnnotationUtils.findAnnotation(
|
val taggable = AnnotationUtils.findAnnotation(
|
||||||
arg.getController(), Taggable.class);
|
arg.getController(), Taggable.class);
|
||||||
if (taggable != null) {
|
if (taggable != null) {
|
||||||
final Integer tenantId = getTenantId();
|
final Integer tenantId = getTenantId();
|
||||||
|
@ -2,8 +2,7 @@ package com.pudonghot.yo.cms.form.create;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import javax.validation.constraints.NotBlank;
|
import lombok.ToString;
|
||||||
import com.pudonghot.yo.cms.form.BaseCreateForm;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -11,8 +10,7 @@ import com.pudonghot.yo.cms.form.BaseCreateForm;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class FormCreatePhoneBlacklist extends BaseCreateForm {
|
@ToString(callSuper = true)
|
||||||
|
public class FormCreatePhoneBlacklist extends FormCreatePhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@NotBlank
|
|
||||||
private String phone;
|
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,9 @@ package com.pudonghot.yo.cms.form.create;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import com.pudonghot.yo.cms.form.BaseCreateForm;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.ToString;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -14,11 +12,10 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class FormCreatePhoneGreylist extends BaseCreateForm {
|
@ToString(callSuper = true)
|
||||||
|
public class FormCreatePhoneGreylist extends FormCreatePhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String phone;
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private Date fromTime;
|
private Date fromTime;
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.pudonghot.yo.cms.form.create;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import com.pudonghot.yo.cms.form.BaseCreateForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Nov 28, 2020 22:58:33
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class FormCreatePhoneList extends BaseCreateForm {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@NotBlank
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -2,8 +2,7 @@ package com.pudonghot.yo.cms.form.create;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import javax.validation.constraints.NotBlank;
|
import lombok.ToString;
|
||||||
import com.pudonghot.yo.cms.form.BaseCreateForm;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -11,9 +10,7 @@ import com.pudonghot.yo.cms.form.BaseCreateForm;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class FormCreatePhoneWhitelist extends BaseCreateForm {
|
@ToString(callSuper = true)
|
||||||
|
public class FormCreatePhoneWhitelist extends FormCreatePhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@NotBlank
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.pudonghot.yo.cms.form.update;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import javax.validation.constraints.NotBlank;
|
import lombok.ToString;
|
||||||
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,9 +11,7 @@ import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
public class FormUpdatePhoneBlacklist extends BaseUpdateForm {
|
public class FormUpdatePhoneBlacklist extends BaseUpdateForm {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String phone;
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.pudonghot.yo.cms.form.update;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.ToString;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
public class FormUpdatePhoneGreylist extends BaseUpdateForm {
|
public class FormUpdatePhoneGreylist extends BaseUpdateForm {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@ -2,7 +2,7 @@ package com.pudonghot.yo.cms.form.update;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import javax.validation.constraints.NotBlank;
|
import lombok.ToString;
|
||||||
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,9 +11,7 @@ import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
public class FormUpdatePhoneWhitelist extends BaseUpdateForm {
|
public class FormUpdatePhoneWhitelist extends BaseUpdateForm {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String phone;
|
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,13 @@ package com.pudonghot.yo.cms.service;
|
|||||||
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
||||||
import com.wacai.tigon.service.BaseCrudByFormService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
* @date Sep 22, 2020 20:06:35
|
* @date Sep 22, 2020 20:06:35
|
||||||
*/
|
*/
|
||||||
public interface PhoneBlacklistService
|
public interface PhoneBlacklistService
|
||||||
extends BaseCrudByFormService<Integer,
|
extends PhoneListService<PhoneBlacklist,
|
||||||
PhoneBlacklist,
|
|
||||||
FormCreatePhoneBlacklist,
|
FormCreatePhoneBlacklist,
|
||||||
FormUpdatePhoneBlacklist> {
|
FormUpdatePhoneBlacklist> {
|
||||||
|
|
||||||
|
@ -3,15 +3,13 @@ package com.pudonghot.yo.cms.service;
|
|||||||
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
||||||
import com.wacai.tigon.service.BaseCrudByFormService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
* @date Sep 23, 2020 22:17:01
|
* @date Sep 23, 2020 22:17:01
|
||||||
*/
|
*/
|
||||||
public interface PhoneGreylistService
|
public interface PhoneGreylistService
|
||||||
extends BaseCrudByFormService<Integer,
|
extends PhoneListService<PhoneGreylist,
|
||||||
PhoneGreylist,
|
|
||||||
FormCreatePhoneGreylist,
|
FormCreatePhoneGreylist,
|
||||||
FormUpdatePhoneGreylist> {
|
FormUpdatePhoneGreylist> {
|
||||||
|
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.pudonghot.yo.cms.service;
|
||||||
|
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneList;
|
||||||
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
import com.wacai.tigon.service.BaseCrudByFormService;
|
||||||
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Nov 28, 2020 23:05:49
|
||||||
|
*/
|
||||||
|
public interface PhoneListService<M extends PhoneList,
|
||||||
|
FC extends FormCreatePhoneList,
|
||||||
|
FU extends BaseUpdateForm>
|
||||||
|
extends BaseCrudByFormService<Integer, M, FC, FU> {
|
||||||
|
}
|
@ -3,15 +3,13 @@ package com.pudonghot.yo.cms.service;
|
|||||||
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
||||||
import com.wacai.tigon.service.BaseCrudByFormService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
* @date Sep 22, 2020 20:06:30
|
* @date Sep 22, 2020 20:06:30
|
||||||
*/
|
*/
|
||||||
public interface PhoneWhitelistService
|
public interface PhoneWhitelistService
|
||||||
extends BaseCrudByFormService<Integer,
|
extends PhoneListService<PhoneWhitelist,
|
||||||
PhoneWhitelist,
|
|
||||||
FormCreatePhoneWhitelist,
|
FormCreatePhoneWhitelist,
|
||||||
FormUpdatePhoneWhitelist> {
|
FormUpdatePhoneWhitelist> {
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package com.pudonghot.yo.cms.service.impl;
|
package com.pudonghot.yo.cms.service.impl;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
|
||||||
import com.pudonghot.yo.mapper.PhoneBlacklistMapper;
|
import com.pudonghot.yo.mapper.PhoneBlacklistMapper;
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneBlacklist;
|
||||||
import com.pudonghot.yo.cms.service.PhoneBlacklistService;
|
import com.pudonghot.yo.cms.service.PhoneBlacklistService;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneBlacklist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneBlacklist;
|
||||||
import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -14,11 +13,10 @@ import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PhoneBlacklistServiceImpl
|
public class PhoneBlacklistServiceImpl
|
||||||
extends BaseCrudByFormServiceSupport<Integer,
|
extends PhoneListServiceImpl<
|
||||||
PhoneBlacklist,
|
PhoneBlacklist,
|
||||||
FormCreatePhoneBlacklist,
|
FormCreatePhoneBlacklist,
|
||||||
FormUpdatePhoneBlacklist,
|
FormUpdatePhoneBlacklist,
|
||||||
PhoneBlacklistMapper>
|
PhoneBlacklistMapper>
|
||||||
implements PhoneBlacklistService {
|
implements PhoneBlacklistService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package com.pudonghot.yo.cms.service.impl;
|
package com.pudonghot.yo.cms.service.impl;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
|
||||||
import com.pudonghot.yo.mapper.PhoneGreylistMapper;
|
import com.pudonghot.yo.mapper.PhoneGreylistMapper;
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.service.PhoneGreylistService;
|
import com.pudonghot.yo.cms.service.PhoneGreylistService;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneGreylist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneGreylist;
|
||||||
import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -14,11 +13,10 @@ import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PhoneGreylistServiceImpl
|
public class PhoneGreylistServiceImpl
|
||||||
extends BaseCrudByFormServiceSupport<Integer,
|
extends PhoneListServiceImpl<
|
||||||
PhoneGreylist,
|
PhoneGreylist,
|
||||||
FormCreatePhoneGreylist,
|
FormCreatePhoneGreylist,
|
||||||
FormUpdatePhoneGreylist,
|
FormUpdatePhoneGreylist,
|
||||||
PhoneGreylistMapper>
|
PhoneGreylistMapper>
|
||||||
implements PhoneGreylistService {
|
implements PhoneGreylistService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.pudonghot.yo.cms.service.impl;
|
||||||
|
|
||||||
|
import lombok.val;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.chyxion.tigon.mybatis.Search;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
import com.wacai.tigon.model.ViewModel;
|
||||||
|
import me.chyxion.tigon.mybatis.BaseMapper;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneList;
|
||||||
|
import com.pudonghot.yo.cms.form.BaseUpdateForm;
|
||||||
|
import com.pudonghot.yo.cms.service.PhoneListService;
|
||||||
|
import com.pudonghot.yo.mapper.CallDetailRecordMapper;
|
||||||
|
import com.pudonghot.yo.model.domain.CallDetailRecord;
|
||||||
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Sep 22, 2020 20:06:35
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class PhoneListServiceImpl<M extends PhoneList,
|
||||||
|
FC extends FormCreatePhoneList,
|
||||||
|
FU extends BaseUpdateForm,
|
||||||
|
Mapper extends BaseMapper<Integer, M>>
|
||||||
|
extends BaseCrudByFormServiceSupport<Integer, M, FC, FU, Mapper>
|
||||||
|
implements PhoneListService<M, FC, FU> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CallDetailRecordMapper callDetailRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(transactionManager = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public ViewModel<M> create(final FormCreatePhoneList form) {
|
||||||
|
log.debug("Create form [{}].", form);
|
||||||
|
val phoneLists = validateNumber(form);
|
||||||
|
for (val phoneList : phoneLists) {
|
||||||
|
val phone = phoneList.getPhone();
|
||||||
|
val modelExisted = mapper.find(
|
||||||
|
new Search(PhoneList.TENANT_ID, form.getTenantId())
|
||||||
|
.eq(PhoneList.PHONE, phone));
|
||||||
|
if (modelExisted != null) {
|
||||||
|
form.copy(modelExisted);
|
||||||
|
modelExisted.setPhone(phone);
|
||||||
|
log.info("Update phone list existed [{}].", modelExisted);
|
||||||
|
update(modelExisted);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
create(phoneList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ViewModel<>(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
String findByConnId(final String connId) {
|
||||||
|
val callDetailRecord = callDetailRecordMapper.find(
|
||||||
|
new Search(CallDetailRecord.CONN_ID, connId).limit(1));
|
||||||
|
return callDetailRecord != null ? callDetailRecord.getCalledNumber() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<M> validateNumber(final FormCreatePhoneList form) {
|
||||||
|
val phones = form.getPhone().split("[^\\w]+");
|
||||||
|
val phoneListList = new ArrayList<M>(phones.length);
|
||||||
|
|
||||||
|
for (val phone : phones) {
|
||||||
|
if (!StringUtils.isNumeric(phone)) {
|
||||||
|
val phone2 = findByConnId(phone);
|
||||||
|
Assert.state(StringUtils.isNotBlank(phone2),
|
||||||
|
() -> "通话ID[" + phone + "]未找到拨打记录");
|
||||||
|
phoneListList.add(createModel(form, phone2));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
phoneListList.add(createModel(form, phone));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return phoneListList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private M createModel(final FormCreatePhoneList form, final String phone) {
|
||||||
|
val model = form.copy(modelType);
|
||||||
|
model.setPhone(phone);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,11 @@
|
|||||||
package com.pudonghot.yo.cms.service.impl;
|
package com.pudonghot.yo.cms.service.impl;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
|
||||||
import com.pudonghot.yo.mapper.PhoneWhitelistMapper;
|
import com.pudonghot.yo.mapper.PhoneWhitelistMapper;
|
||||||
|
import com.pudonghot.yo.model.domain.PhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.service.PhoneWhitelistService;
|
import com.pudonghot.yo.cms.service.PhoneWhitelistService;
|
||||||
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.create.FormCreatePhoneWhitelist;
|
||||||
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
import com.pudonghot.yo.cms.form.update.FormUpdatePhoneWhitelist;
|
||||||
import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang
|
* @author Donghuang
|
||||||
@ -14,11 +13,10 @@ import com.wacai.tigon.service.support.BaseCrudByFormServiceSupport;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PhoneWhitelistServiceImpl
|
public class PhoneWhitelistServiceImpl
|
||||||
extends BaseCrudByFormServiceSupport<Integer,
|
extends PhoneListServiceImpl<
|
||||||
PhoneWhitelist,
|
PhoneWhitelist,
|
||||||
FormCreatePhoneWhitelist,
|
FormCreatePhoneWhitelist,
|
||||||
FormUpdatePhoneWhitelist,
|
FormUpdatePhoneWhitelist,
|
||||||
PhoneWhitelistMapper>
|
PhoneWhitelistMapper>
|
||||||
implements PhoneWhitelistService {
|
implements PhoneWhitelistService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,10 @@ public class NumberPrivacyUtils {
|
|||||||
private static final Pattern HEAVY_PRIVACY_PATTERN =
|
private static final Pattern HEAVY_PRIVACY_PATTERN =
|
||||||
Pattern.compile("(\\w{0,7})\\w{4}$");
|
Pattern.compile("(\\w{0,7})\\w{4}$");
|
||||||
|
|
||||||
|
public static String mask(final String number) {
|
||||||
|
return mask(number, PrivacyLevel.HEAVY);
|
||||||
|
}
|
||||||
|
|
||||||
public static String mask(final String number, final PrivacyLevel level) {
|
public static String mask(final String number, final PrivacyLevel level) {
|
||||||
if (level == PrivacyLevel.NONE) {
|
if (level == PrivacyLevel.NONE) {
|
||||||
return number;
|
return number;
|
||||||
|
@ -2,8 +2,8 @@ package com.pudonghot.yo.model.domain;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
import me.chyxion.tigon.mybatis.Table;
|
import me.chyxion.tigon.mybatis.Table;
|
||||||
import me.chyxion.tigon.mybatis.NotUpdate;
|
|
||||||
import lombok.experimental.FieldNameConstants;
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,11 +12,9 @@ import lombok.experimental.FieldNameConstants;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
@Table("br_phone_blacklist")
|
@Table("br_phone_blacklist")
|
||||||
@FieldNameConstants(prefix = "")
|
@FieldNameConstants(prefix = "")
|
||||||
public class PhoneBlacklist extends TenantDomain {
|
public class PhoneBlacklist extends PhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotUpdate
|
|
||||||
private String phone;
|
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ package com.pudonghot.yo.model.domain;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.ToString;
|
||||||
import me.chyxion.tigon.mybatis.Table;
|
import me.chyxion.tigon.mybatis.Table;
|
||||||
import me.chyxion.tigon.mybatis.NotUpdate;
|
|
||||||
import lombok.experimental.FieldNameConstants;
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,13 +13,12 @@ import lombok.experimental.FieldNameConstants;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
@Table("br_phone_greylist")
|
@Table("br_phone_greylist")
|
||||||
@FieldNameConstants(prefix = "")
|
@FieldNameConstants(prefix = "")
|
||||||
public class PhoneGreylist extends TenantDomain {
|
public class PhoneGreylist extends PhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotUpdate
|
|
||||||
private String phone;
|
|
||||||
private Date fromTime;
|
private Date fromTime;
|
||||||
private Date toTime;
|
private Date toTime;
|
||||||
private Integer credit;
|
private Integer credit;
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.pudonghot.yo.model.domain;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import me.chyxion.tigon.mybatis.Table;
|
||||||
|
import me.chyxion.tigon.mybatis.NotUpdate;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Donghuang
|
||||||
|
* @date Nov 28, 2020 22:55:27
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@FieldNameConstants(prefix = "")
|
||||||
|
public class PhoneList extends TenantDomain {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@NotUpdate
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -2,8 +2,8 @@ package com.pudonghot.yo.model.domain;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
import me.chyxion.tigon.mybatis.Table;
|
import me.chyxion.tigon.mybatis.Table;
|
||||||
import me.chyxion.tigon.mybatis.NotUpdate;
|
|
||||||
import lombok.experimental.FieldNameConstants;
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,11 +12,9 @@ import lombok.experimental.FieldNameConstants;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
@Table("br_phone_whitelist")
|
@Table("br_phone_whitelist")
|
||||||
@FieldNameConstants(prefix = "")
|
@FieldNameConstants(prefix = "")
|
||||||
public class PhoneWhitelist extends TenantDomain {
|
public class PhoneWhitelist extends PhoneList {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotUpdate
|
|
||||||
private String phone;
|
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
<jackson.version>2.9.9.20190807</jackson.version>
|
<jackson.version>2.9.9.20190807</jackson.version>
|
||||||
<spring.version>5.2.5.RELEASE</spring.version>
|
<spring.version>5.2.5.RELEASE</spring.version>
|
||||||
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
|
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
|
||||||
|
<tigon-mybatis.version>0.0.3</tigon-mybatis.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@ -79,12 +80,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.chyxion.tigon</groupId>
|
<groupId>me.chyxion.tigon</groupId>
|
||||||
<artifactId>tigon-mybatis-common</artifactId>
|
<artifactId>tigon-mybatis-common</artifactId>
|
||||||
<version>0.0.3</version>
|
<version>${tigon-mybatis.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.chyxion.tigon</groupId>
|
<groupId>me.chyxion.tigon</groupId>
|
||||||
<artifactId>tigon-mybatis</artifactId>
|
<artifactId>tigon-mybatis</artifactId>
|
||||||
<version>0.0.3</version>
|
<version>${tigon-mybatis.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.wacai.tigon</groupId>
|
<groupId>com.wacai.tigon</groupId>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.wacai.tigon.web.annotation;
|
package com.wacai.tigon.web.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Sep 12, 2019 17:53:24
|
* Sep 12, 2019 17:53:24
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Filter {
|
public @interface Filter {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.wacai.tigon.web.annotation;
|
package com.wacai.tigon.web.annotation;
|
||||||
|
|
||||||
import me.chyxion.tigon.mybatis.Search;
|
import me.chyxion.tigon.mybatis.Search;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
@ -10,6 +10,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Sep 11, 2019 09:59:32
|
* Sep 11, 2019 09:59:32
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface FilterCol {
|
public @interface FilterCol {
|
||||||
|
@ -6,6 +6,7 @@ import java.lang.annotation.*;
|
|||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Sep 11, 2019 09:59:47
|
* Sep 11, 2019 09:59:47
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.wacai.tigon.web.annotation;
|
package com.wacai.tigon.web.annotation;
|
||||||
|
|
||||||
import me.chyxion.tigon.mybatis.Search;
|
import me.chyxion.tigon.mybatis.Search;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
@ -10,6 +11,7 @@ import org.springframework.core.annotation.AliasFor;
|
|||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Sep 12, 2019 17:48:22
|
* Sep 12, 2019 17:48:22
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Order {
|
public @interface Order {
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
package com.wacai.tigon.web.annotation;
|
package com.wacai.tigon.web.annotation;
|
||||||
|
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import java.lang.annotation.Inherited;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import org.springframework.core.annotation.AliasFor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Donghuang <br>
|
* @author Donghuang <br>
|
||||||
* Sep 11, 2019 10:00:28
|
* Sep 11, 2019 10:00:28
|
||||||
*/
|
*/
|
||||||
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface OrderCol {
|
public @interface OrderCol {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#form-content}}
|
{{#form-content}}
|
||||||
<hr />
|
<hr />
|
||||||
{{form-input name='phone' label='号码'}}
|
{{form-input type='textarea' name='phone' label='号码' placeholder='手机号/通话ID'}}
|
||||||
|
|
||||||
{{form-input name='note' label='备注'}}
|
{{form-input name='note' label='备注'}}
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{#form-content}}
|
{{#form-content}}
|
||||||
<hr />
|
<hr />
|
||||||
{{form-input name='phone' label='号码'}}
|
{{form-input type='textarea' name='phone' label='号码' placeholder='手机号/通话ID'}}
|
||||||
|
|
||||||
{{form-input-datetimepicker
|
{{form-input-datetimepicker
|
||||||
name='fromTime'
|
name='fromTime'
|
||||||
label='开始时间'}}
|
label='开始时间'}}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#form-content}}
|
{{#form-content}}
|
||||||
<hr />
|
<hr />
|
||||||
{{form-input name='phone' label='号码'}}
|
{{form-input type='textarea' name='phone' label='号码' placeholder='手机号/通话ID'}}
|
||||||
|
|
||||||
{{form-input name='note' label='备注'}}
|
{{form-input name='note' label='备注'}}
|
||||||
<hr />
|
<hr />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user