From 6851dc5ba24ab31e5fb0554051d08588b661d673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=9A=93=E9=9B=AF?= <18868469283@qq.com> Date: Sun, 13 Jan 2019 15:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sock/mall/service/UmsAdminService.java | 80 +++++++++++++++++++ .../mall/service/UmsMemberLevelService.java | 16 ++++ .../mall/service/UmsPermissionService.java | 36 +++++++++ .../com/sock/mall/service/UmsRoleService.java | 43 ++++++++++ 4 files changed, 175 insertions(+) create mode 100644 代码库/mall-admin/src/main/java/com/sock/mall/service/UmsAdminService.java create mode 100644 代码库/mall-admin/src/main/java/com/sock/mall/service/UmsMemberLevelService.java create mode 100644 代码库/mall-admin/src/main/java/com/sock/mall/service/UmsPermissionService.java create mode 100644 代码库/mall-admin/src/main/java/com/sock/mall/service/UmsRoleService.java diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsAdminService.java b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsAdminService.java new file mode 100644 index 0000000..a6a3ce9 --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsAdminService.java @@ -0,0 +1,80 @@ +package com.macro.mall.service; + +import com.macro.mall.dto.UmsAdminParam; +import com.macro.mall.model.UmsAdmin; +import com.macro.mall.model.UmsPermission; +import com.macro.mall.model.UmsRole; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * ̨ԱService + */ +public interface UmsAdminService { + /** + * ûȡ̨Ա + */ + UmsAdmin getAdminByUsername(String username); + + /** + * עṦ + */ + UmsAdmin register(UmsAdminParam umsAdminParam); + + /** + * ¼ + * @param username û + * @param password + * @return ɵJWTtoken + */ + String login(String username,String password); + + /** + * ˢtokenĹ + * @param oldToken ɵtoken + */ + String refreshToken(String oldToken); + + /** + * ûidȡû + */ + UmsAdmin getItem(Long id); + + /** + * ûdzƷҳѯû + */ + List list(String name, Integer pageSize, Integer pageNum); + + /** + * ޸ָûϢ + */ + int update(Long id, UmsAdmin admin); + + /** + * ɾָû + */ + int delete(Long id); + + /** + * ޸ûɫϵ + */ + @Transactional + int updateRole(Long adminId, List roleIds); + + /** + * ȡûڽɫ + */ + List getRoleList(Long adminId); + + /** + * ޸û+-Ȩ + */ + @Transactional + int updatePermission(Long adminId, List permissionIds); + + /** + * ȡûȨޣɫȨ޺+-Ȩޣ + */ + List getPermissionList(Long adminId); +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsMemberLevelService.java b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsMemberLevelService.java new file mode 100644 index 0000000..8dae505 --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsMemberLevelService.java @@ -0,0 +1,16 @@ +package com.macro.mall.service; + +import com.macro.mall.model.UmsMemberLevel; + +import java.util.List; + +/** + * ԱȼService + */ +public interface UmsMemberLevelService { + /** + * ȡлԱ¼ + * @param defaultStatus ǷΪĬϻԱ + */ + List list(Integer defaultStatus); +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsPermissionService.java b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsPermissionService.java new file mode 100644 index 0000000..febf64f --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsPermissionService.java @@ -0,0 +1,36 @@ +package com.macro.mall.service; + +import com.macro.mall.dto.UmsPermissionNode; +import com.macro.mall.model.UmsPermission; + +import java.util.List; + +/** + * ̨ûȨ޹Service + */ +public interface UmsPermissionService { + /** + * Ȩ + */ + int create(UmsPermission permission); + + /** + * ޸Ȩ + */ + int update(Long id,UmsPermission permission); + + /** + * ɾȨ + */ + int delete(List ids); + + /** + * Բ㼶ṹȨ + */ + List treeList(); + + /** + * ȡȨ + */ + List list(); +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsRoleService.java b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsRoleService.java new file mode 100644 index 0000000..77edd4c --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/service/UmsRoleService.java @@ -0,0 +1,43 @@ +package com.macro.mall.service; + +import com.macro.mall.model.UmsPermission; +import com.macro.mall.model.UmsRole; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * ̨ɫService + */ +public interface UmsRoleService { + /** + * ӽɫ + */ + int create(UmsRole role); + + /** + * ޸ĽɫϢ + */ + int update(Long id, UmsRole role); + + /** + * ɾɫ + */ + int delete(List ids); + + /** + * ȡָɫȨ + */ + List getPermissionList(Long roleId); + + /** + * ޸ָɫȨ + */ + @Transactional + int updatePermission(Long roleId, List permissionIds); + + /** + * ȡɫб + */ + List list(); +} \ No newline at end of file