完善订单功能

This commit is contained in:
huangdeliang
2020-09-26 22:28:17 +08:00
parent 58f276922f
commit 41fb244499
11 changed files with 462 additions and 297 deletions

View File

@ -0,0 +1,43 @@
package com.ruoyi.system.domain.custom;
public class UserPostOption {
private Long userId;
private String userName;
private String postCode;
public String getPostCode() {
return postCode;
}
public Long getUserId() {
return userId;
}
public String getUserName() {
return userName;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setUserName(String userName) {
this.userName = userName;
}
@Override
public String toString() {
return "UserPostOption{" +
"userId=" + userId +
", userName='" + userName + '\'' +
", postCode='" + postCode + '\'' +
'}';
}
}

View File

@ -1,18 +1,19 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost;
/**
* 岗位信息 数据层
*
*
* @author ruoyi
*/
public interface SysPostMapper
{
public interface SysPostMapper {
/**
* 查询岗位数据集合
*
*
* @param post 岗位信息
* @return 岗位数据集合
*/
@ -20,14 +21,16 @@ public interface SysPostMapper
/**
* 查询所有岗位
*
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
public List<SysUserPost> selectUserPostAll();
/**
* 通过岗位ID查询岗位信息
*
*
* @param postId 岗位ID
* @return 角色对象信息
*/
@ -35,7 +38,7 @@ public interface SysPostMapper
/**
* 根据用户ID获取岗位选择框列表
*
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
@ -43,7 +46,7 @@ public interface SysPostMapper
/**
* 查询用户所属岗位组
*
*
* @param userName 用户名
* @return 结果
*/
@ -51,7 +54,7 @@ public interface SysPostMapper
/**
* 删除岗位信息
*
*
* @param postId 岗位ID
* @return 结果
*/
@ -59,7 +62,7 @@ public interface SysPostMapper
/**
* 批量删除岗位信息
*
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
@ -67,7 +70,7 @@ public interface SysPostMapper
/**
* 修改岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
@ -75,7 +78,7 @@ public interface SysPostMapper
/**
* 新增岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
@ -83,7 +86,7 @@ public interface SysPostMapper
/**
* 校验岗位名称
*
*
* @param postName 岗位名称
* @return 结果
*/
@ -91,7 +94,7 @@ public interface SysPostMapper
/**
* 校验岗位编码
*
*
* @param postCode 岗位编码
* @return 结果
*/

View File

@ -1,18 +1,19 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysUserPost;
/**
* 用户与岗位关联表 数据层
*
*
* @author ruoyi
*/
public interface SysUserPostMapper
{
public interface SysUserPostMapper {
/**
* 通过用户ID删除用户和岗位关联
*
*
* @param userId 用户ID
* @return 结果
*/
@ -20,7 +21,7 @@ public interface SysUserPostMapper
/**
* 通过岗位ID查询岗位使用数量
*
*
* @param postId 岗位ID
* @return 结果
*/
@ -28,7 +29,7 @@ public interface SysUserPostMapper
/**
* 批量删除用户和岗位关联
*
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@ -36,7 +37,7 @@ public interface SysUserPostMapper
/**
* 批量新增用户岗位信息
*
*
* @param userPostList 用户角色列表
* @return 结果
*/

View File

@ -2,6 +2,7 @@ package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost;
/**
* 岗位信息 服务层
@ -18,6 +19,8 @@ public interface ISysPostService
*/
public List<SysPost> selectPostList(SysPost post);
public List<SysUserPost> selectUserPostAll();
/**
* 查询所有岗位
*

View File

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.system.domain.SysUserPost;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.constant.UserConstants;
@ -48,6 +50,11 @@ public class SysPostServiceImpl implements ISysPostService
return postMapper.selectPostAll();
}
@Override
public List<SysUserPost> selectUserPostAll() {
return postMapper.selectUserPostAll();
}
/**
* 通过岗位ID查询岗位信息
*