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