用户管理完成, 作品审核剩下审核部分。
This commit is contained in:
parent
75b9c8187d
commit
786a0589de
@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.domain.UserInfo;
|
||||
import com.ruoyi.system.domain.dto.BackstageUserDto;
|
||||
import com.ruoyi.system.domain.vo.UserManagerVo;
|
||||
@ -42,7 +43,7 @@ import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/system/user")
|
||||
public class SysBackUserController {
|
||||
public class SysBackUserController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
@ -67,7 +68,7 @@ public class SysBackUserController {
|
||||
public TableDataInfo backlist(SysUser user)
|
||||
{
|
||||
startPage();
|
||||
List<UserManagerVo> list = userService.getBackstageUserList();
|
||||
List<UserManagerVo> list = userService.getBackstageUserList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -192,6 +193,7 @@ public class SysBackUserController {
|
||||
* */
|
||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Transactional
|
||||
@PutMapping("/updateBackstageUser")
|
||||
public AjaxResult updateBackstageUser(@RequestBody BackstageUserDto backstageUserDto){
|
||||
|
||||
@ -202,21 +204,44 @@ public class SysBackUserController {
|
||||
//---------------------------------------修改用户角色-------------------------------------------------
|
||||
// 根据角色名查角色id
|
||||
Long roleId = roleService.selectRoleIdByRoleName(userRole);
|
||||
int roleFlag = roleService.updateUserRole(userId, roleId);
|
||||
|
||||
if(roleFlag == 0){
|
||||
return AjaxResult.error("修改用户角色失败,请联系管理员");
|
||||
System.out.println("角色id: "+ roleId);
|
||||
|
||||
// 先查一下该用户是否已经有角色
|
||||
SysUserRole sysUserRole = roleService.getSysUserRole(userId);
|
||||
|
||||
if (sysUserRole == null){
|
||||
|
||||
System.out.println("该用户没有角色, 在修改时添加角色");
|
||||
// 新增用户角色
|
||||
int roleFlag = roleService.insertSysUserRole(userId, roleId);
|
||||
if (roleFlag == 0){
|
||||
return AjaxResult.error("修改用户角色失败,请联系管理员1");
|
||||
}
|
||||
}
|
||||
else{
|
||||
System.out.println("该用户已经有角色, 在修改时修改角色");
|
||||
roleService.updateUserRole(userId, roleId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 貌似角色不修改默认返回的就是0??
|
||||
// if(roleFlag == 0){
|
||||
// return AjaxResult.error("修改用户角色失败,请联系管理员0");
|
||||
// }
|
||||
//--------------------------------------修改用户角色结束----------------------------------------------
|
||||
|
||||
//修改用户状态
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserId(userId);
|
||||
sysUser.setStatus(userStatus);
|
||||
int statusFlag = userService.updateUserStatus(sysUser);
|
||||
if (statusFlag == 0){
|
||||
return AjaxResult.error("修改用户状态失败,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
// 若是不修改返回也是0啊
|
||||
// if (statusFlag == 0){
|
||||
// return AjaxResult.error("修改用户状态失败,请联系管理员1");
|
||||
// }
|
||||
|
||||
return AjaxResult.success("修改用户账号信息成功");
|
||||
}
|
||||
@ -228,24 +253,38 @@ public class SysBackUserController {
|
||||
@Log(title = "系统管理--人员管理--删除后台用户", businessType = BusinessType.DELETE)
|
||||
// 删除后台用户
|
||||
@DeleteMapping("/deleteUser/{userId}")
|
||||
public AjaxResult deleteBackstageUser(@PathVariable Long userId){
|
||||
public AjaxResult deleteBackstageUser(@PathVariable Long[] userId){
|
||||
|
||||
int back = userService.deleteUserById(userId);
|
||||
if(back > 0){
|
||||
return AjaxResult.success("删除用户成功");
|
||||
//删除多个用户
|
||||
Long authId = SecurityUtils.getUserId();
|
||||
if (ArrayUtils.contains(userId, authId))
|
||||
{
|
||||
return AjaxResult.error("当前用户不能删除");
|
||||
}
|
||||
return AjaxResult.error("删除用户失败");
|
||||
|
||||
return toAjax(userService.deleteUserByIds(userId));
|
||||
|
||||
|
||||
|
||||
//删除单个用户
|
||||
// int back = userService.deleteUserById(userId);
|
||||
// if(back > 0){
|
||||
// return AjaxResult.success("删除用户成功");
|
||||
// }
|
||||
// return AjaxResult.error("删除用户失败");
|
||||
|
||||
}
|
||||
|
||||
private TableDataInfo getDataTable(List<?> list)
|
||||
{
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
|
||||
|
||||
// private TableDataInfo getDataTable(List<?> list)
|
||||
// {
|
||||
// TableDataInfo rspData = new TableDataInfo();
|
||||
// rspData.setCode(HttpStatus.SUCCESS);
|
||||
// rspData.setMsg("查询成功");
|
||||
// rspData.setRows(list);
|
||||
// rspData.setTotal(new PageInfo(list).getTotal());
|
||||
// return rspData;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,160 @@
|
||||
package com.ruoyi.web.controller.backstage;
|
||||
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.UserWork;
|
||||
import com.ruoyi.system.domain.dto.SeOnlineTimeDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserWorkCountDto;
|
||||
import com.ruoyi.system.domain.dto.UserWorkReviewDto;
|
||||
import com.ruoyi.system.service.IDailySysService;
|
||||
import com.ruoyi.system.service.ISysUserStService;
|
||||
import com.ruoyi.system.service.IUserWorkService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
//import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||
//import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
|
||||
// 内容审核后台管理
|
||||
@RestController
|
||||
@RequestMapping("/system/work")
|
||||
public class SysWorkReviewController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IUserWorkService userWorkService;
|
||||
|
||||
// 系统每天统计数据
|
||||
@Autowired
|
||||
private IDailySysService dailySysService;
|
||||
|
||||
|
||||
/*
|
||||
* 获取过审总数--workStatus=3
|
||||
获取未审总数--workStatus=2
|
||||
* */
|
||||
//未申总数
|
||||
//过审总数
|
||||
//退回总数 workStatus=5
|
||||
//所有总数 workStatus=null
|
||||
|
||||
// 获取所有作品数量统计数据
|
||||
@GetMapping("/getStWorkCount")
|
||||
public AjaxResult getStWorkCount(){
|
||||
//作品总数
|
||||
Long tCount = userWorkService.getUserWorkCount(null);
|
||||
|
||||
//过审总数
|
||||
Long passCount = userWorkService.getUserWorkCount("3");
|
||||
|
||||
// 未审总数
|
||||
Long waitCount = userWorkService.getUserWorkCount("2");
|
||||
|
||||
// 退回总数
|
||||
Long unPassCount = userWorkService.getUserWorkCount("5");
|
||||
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("tCount", tCount);
|
||||
ajax.put("passCount", passCount);
|
||||
ajax.put("waitCount", waitCount);
|
||||
ajax.put("unPassCount", unPassCount);
|
||||
|
||||
return ajax;
|
||||
}
|
||||
|
||||
// //----------------------------------------------------废弃---------------------------------------------------------
|
||||
// @GetMapping("/getAllWorkCount")
|
||||
// public AjaxResult getAllWorkCount(){
|
||||
// Long count = userWorkService.getUserWorkCount(null);
|
||||
//
|
||||
// return success(count);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/getAllWorkCount/{workStatus}")
|
||||
// public AjaxResult getWorkCount(@PathVariable String workStatus){
|
||||
// System.out.println("作品状态: "+ workStatus);
|
||||
// Long count = userWorkService.getUserWorkCount(workStatus);
|
||||
//
|
||||
// return success(count);
|
||||
// }
|
||||
// //----------------------------------------------------废弃结束----------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
//获取指定天数的用户作品总量
|
||||
@GetMapping("/getDayWorkCount/{day}")
|
||||
public AjaxResult getDayWorkCount(@PathVariable int day){
|
||||
LocalDate now = LocalDate.now();
|
||||
LocalDate startDate = now.minusDays(day+1);
|
||||
LocalDate endDate = now.minusDays(1);
|
||||
|
||||
// // 实际要返回的方法
|
||||
// List<SeUserWorkCountDto> seUserWorkCount = dailySysService.getSeUserWorkCount(startDate, endDate);
|
||||
|
||||
//-----------------------测试保证返回数组的长度为day-----------------------
|
||||
List<SeUserWorkCountDto> seUserWorkCount = new ArrayList<>();
|
||||
for(int i=0;i<day;i++){
|
||||
SeUserWorkCountDto seUserWorkCountDto = new SeUserWorkCountDto();
|
||||
seUserWorkCountDto.setDate(startDate.plusDays(i+1));
|
||||
|
||||
Random random = new Random();
|
||||
long minValue = 1000L;
|
||||
long maxValue = 99999999L;
|
||||
long range = maxValue - minValue + 1;
|
||||
long randomLong = minValue + (long) (random.nextDouble() * range);
|
||||
|
||||
seUserWorkCountDto.settWork(randomLong);
|
||||
seUserWorkCount.add(seUserWorkCountDto);
|
||||
}
|
||||
|
||||
//-------------------------测试end---------------------------------------
|
||||
return AjaxResult.success(seUserWorkCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取所有作品列表-----作品图片 名称 内容 创建时间 作者 资源位 审核状态 审核记录
|
||||
// 后续要加搜索功能------没添加搜索功能
|
||||
@GetMapping("/getAllUserWork")
|
||||
public TableDataInfo getAllUserWork(UserWork userWork){
|
||||
|
||||
|
||||
startPage();
|
||||
List<UserWorkReviewDto> userWorkList = userWorkService.getAllUserWork(userWork);
|
||||
for(UserWorkReviewDto userWorkReviewDto:userWorkList){
|
||||
userWorkReviewDto.setSource(userWorkReviewDto.getCity()+userWorkReviewDto.getScenic()+userWorkReviewDto.getPart());
|
||||
}
|
||||
return getDataTable(userWorkList);
|
||||
|
||||
}
|
||||
|
||||
// 根据作品id获取作品详情
|
||||
@GetMapping("/getUserWork/{workId}")
|
||||
public AjaxResult getUserWork(@PathVariable Long workId){
|
||||
UserWork userWork = userWorkService.selectUserWorkByWorkId(workId);
|
||||
return success(userWork);
|
||||
}
|
||||
|
||||
// 审核
|
||||
// 查看作品详情
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.WorkReview;
|
||||
import com.ruoyi.system.service.IWorkReviewService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 作品评审意见Controller
|
||||
*
|
||||
* @author haotian
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/review")
|
||||
public class WorkReviewController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWorkReviewService workReviewService;
|
||||
|
||||
/**
|
||||
* 查询作品评审意见列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WorkReview workReview)
|
||||
{
|
||||
startPage();
|
||||
List<WorkReview> list = workReviewService.selectWorkReviewList(workReview);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出作品评审意见列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:export')")
|
||||
@Log(title = "作品评审意见", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WorkReview workReview)
|
||||
{
|
||||
List<WorkReview> list = workReviewService.selectWorkReviewList(workReview);
|
||||
ExcelUtil<WorkReview> util = new ExcelUtil<WorkReview>(WorkReview.class);
|
||||
util.exportExcel(response, list, "作品评审意见数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取作品评审意见详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:query')")
|
||||
@GetMapping(value = "/{reviewId}")
|
||||
public AjaxResult getInfo(@PathVariable("reviewId") Long reviewId)
|
||||
{
|
||||
return success(workReviewService.selectWorkReviewByReviewId(reviewId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作品评审意见
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:add')")
|
||||
@Log(title = "作品评审意见", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WorkReview workReview)
|
||||
{
|
||||
return toAjax(workReviewService.insertWorkReview(workReview));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作品评审意见
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:edit')")
|
||||
@Log(title = "作品评审意见", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WorkReview workReview)
|
||||
{
|
||||
return toAjax(workReviewService.updateWorkReview(workReview));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作品评审意见
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:review:remove')")
|
||||
@Log(title = "作品评审意见", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reviewIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] reviewIds)
|
||||
{
|
||||
return toAjax(workReviewService.deleteWorkReviewByReviewIds(reviewIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 作品评审意见对象 work_review
|
||||
*
|
||||
* @author haotian
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
public class WorkReview extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 评审意见id */
|
||||
private Long reviewId;
|
||||
|
||||
/** 作品id */
|
||||
@Excel(name = "作品id")
|
||||
private Long workId;
|
||||
|
||||
/** 评审人id */
|
||||
@Excel(name = "评审人id")
|
||||
private Long reviewerId;
|
||||
|
||||
/** 评审人昵称 */
|
||||
@Excel(name = "评审人昵称")
|
||||
private String reviewerName;
|
||||
|
||||
/** 评审结果 */
|
||||
@Excel(name = "评审结果")
|
||||
private String workStatus;
|
||||
|
||||
/** 反馈详情 */
|
||||
@Excel(name = "反馈详情")
|
||||
private String detail;
|
||||
|
||||
/** a.0 */
|
||||
@Excel(name = "a.0")
|
||||
private String deleteFlag;
|
||||
|
||||
public void setReviewId(Long reviewId)
|
||||
{
|
||||
this.reviewId = reviewId;
|
||||
}
|
||||
|
||||
public Long getReviewId()
|
||||
{
|
||||
return reviewId;
|
||||
}
|
||||
public void setWorkId(Long workId)
|
||||
{
|
||||
this.workId = workId;
|
||||
}
|
||||
|
||||
public Long getWorkId()
|
||||
{
|
||||
return workId;
|
||||
}
|
||||
public void setReviewerId(Long reviewerId)
|
||||
{
|
||||
this.reviewerId = reviewerId;
|
||||
}
|
||||
|
||||
public Long getReviewerId()
|
||||
{
|
||||
return reviewerId;
|
||||
}
|
||||
public void setReviewerName(String reviewerName)
|
||||
{
|
||||
this.reviewerName = reviewerName;
|
||||
}
|
||||
|
||||
public String getReviewerName()
|
||||
{
|
||||
return reviewerName;
|
||||
}
|
||||
public void setWorkStatus(String workStatus)
|
||||
{
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
public String getWorkStatus()
|
||||
{
|
||||
return workStatus;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
public void setDeleteFlag(String deleteFlag)
|
||||
{
|
||||
this.deleteFlag = deleteFlag;
|
||||
}
|
||||
|
||||
public String getDeleteFlag()
|
||||
{
|
||||
return deleteFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reviewId", getReviewId())
|
||||
.append("workId", getWorkId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("reviewerId", getReviewerId())
|
||||
.append("reviewerName", getReviewerName())
|
||||
.append("workStatus", getWorkStatus())
|
||||
.append("detail", getDetail())
|
||||
.append("deleteFlag", getDeleteFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.system.domain.dto;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class SysIncomeDto {
|
||||
|
||||
private Long tIncome;
|
||||
private LocalDate date;
|
||||
|
||||
public Long gettIncome() {
|
||||
return tIncome;
|
||||
}
|
||||
|
||||
public void settIncome(Long tIncome) {
|
||||
this.tIncome = tIncome;
|
||||
}
|
||||
|
||||
public LocalDate getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(LocalDate date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.ruoyi.system.domain.dto;
|
||||
|
||||
import java.time.LocalDate;
|
||||
//import java.util.Date;
|
||||
|
||||
public class UserWorkCountDto {
|
||||
|
||||
private Long workCount;
|
||||
private LocalDate date;
|
||||
|
||||
public Long getWorkCount() {
|
||||
return workCount;
|
||||
}
|
||||
|
||||
public void settWork(Long tWork) {
|
||||
this.workCount = tWork;
|
||||
}
|
||||
|
||||
public LocalDate getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(LocalDate date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,142 @@
|
||||
package com.ruoyi.system.domain.dto;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
// 内容审核中获取作品列表的参数
|
||||
public class UserWorkReviewDto {
|
||||
|
||||
private Long workId;
|
||||
private String workAddress;
|
||||
private String workName;
|
||||
private String detail;
|
||||
|
||||
// 作品所有者的用户名
|
||||
private String nickName;
|
||||
|
||||
// 资源位
|
||||
private Long sourceId;
|
||||
|
||||
private String city;
|
||||
|
||||
private String scenic;
|
||||
|
||||
private String part;
|
||||
|
||||
private String source;
|
||||
|
||||
// 作品审核状态
|
||||
private String workStatus;
|
||||
|
||||
// 审核记录
|
||||
private String auditOpinion;
|
||||
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
|
||||
public Long getWorkId() {
|
||||
return workId;
|
||||
}
|
||||
|
||||
public void setWorkId(Long workId) {
|
||||
this.workId = workId;
|
||||
}
|
||||
|
||||
public String getWorkAddress() {
|
||||
return workAddress;
|
||||
}
|
||||
|
||||
public void setWorkAddress(String workAddress) {
|
||||
this.workAddress = workAddress;
|
||||
}
|
||||
|
||||
public String getWorkName() {
|
||||
return workName;
|
||||
}
|
||||
|
||||
public void setWorkName(String workName) {
|
||||
this.workName = workName;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public Long getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceId(Long sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getScenic() {
|
||||
return scenic;
|
||||
}
|
||||
|
||||
public void setScenic(String scenic) {
|
||||
this.scenic = scenic;
|
||||
}
|
||||
|
||||
public String getPart() {
|
||||
return part;
|
||||
}
|
||||
|
||||
public void setPart(String part) {
|
||||
this.part = part;
|
||||
}
|
||||
|
||||
public String getWorkStatus() {
|
||||
return workStatus;
|
||||
}
|
||||
|
||||
public void setWorkStatus(String workStatus) {
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
public String getAuditOpinion() {
|
||||
return auditOpinion;
|
||||
}
|
||||
|
||||
public void setAuditOpinion(String auditOpinion) {
|
||||
this.auditOpinion = auditOpinion;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.ruoyi.system.domain.DailySys;
|
||||
import com.ruoyi.system.domain.dto.SeOnlineTimeDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserCountDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserWorkCountDto;
|
||||
import com.ruoyi.system.domain.dto.SysIncomeDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -40,6 +41,8 @@ public interface DailySysMapper
|
||||
|
||||
public List<SeOnlineTimeDto> gettOnlineTime(@Param("startDate")LocalDate startDate, @Param("endDate") LocalDate endDate);
|
||||
|
||||
public List<SysIncomeDto> getSysIncome(@Param("startDate")LocalDate startDate, @Param("endDate") LocalDate endDate);
|
||||
|
||||
/**
|
||||
* 新增记录系统每天需要统计的任务
|
||||
*
|
||||
|
||||
@ -142,7 +142,7 @@ public interface SysUserMapper
|
||||
|
||||
public Long getUserCount();
|
||||
|
||||
public List<UserManagerVo> getBackstageUserList();
|
||||
public List<UserManagerVo> getBackstageUserList(SysUser user);
|
||||
|
||||
public UserManagerVo getBackstageUserById(@Param("userId")Long userId);
|
||||
|
||||
|
||||
@ -66,4 +66,6 @@ public interface SysUserRoleMapper
|
||||
* 更新用户角色
|
||||
* */
|
||||
public int updateUserRole(@Param("userId")Long userId, @Param("roleId") Long roleId);
|
||||
|
||||
public SysUserRole getSysUserRole(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.domain.UserInfo;
|
||||
import com.ruoyi.system.domain.vo.AppUserInfoVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -69,7 +71,7 @@ public interface UserInfoMapper
|
||||
|
||||
public int updateBackground(@Param("phonenumber") String phonenumber, @Param("background") String background);
|
||||
|
||||
public List<AppUserInfoVo> getAllAppUserInfo();
|
||||
public List<AppUserInfoVo> getAllAppUserInfo(SysUser user);
|
||||
|
||||
public AppUserInfoVo getAppUserInfo(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.UserWork;
|
||||
import com.ruoyi.system.domain.dto.UserWorkReviewDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 用户作品Mapper接口
|
||||
@ -59,5 +62,10 @@ public interface UserWorkMapper
|
||||
*/
|
||||
public int deleteUserWorkByWorkIds(Long[] workIds);
|
||||
|
||||
public Long getUserWorkCount();
|
||||
public Long getUserWorkCount(@Param("workStatus") String workStatus);
|
||||
|
||||
/*
|
||||
* 内容审核获取用户作品列表
|
||||
* */
|
||||
public List<UserWorkReviewDto> getAllUserWork(UserWork userWork);
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.WorkReview;
|
||||
|
||||
/**
|
||||
* 作品评审意见Mapper接口
|
||||
*
|
||||
* @author haotian
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
public interface WorkReviewMapper
|
||||
{
|
||||
/**
|
||||
* 查询作品评审意见
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 作品评审意见
|
||||
*/
|
||||
public WorkReview selectWorkReviewByReviewId(Long reviewId);
|
||||
|
||||
/**
|
||||
* 查询作品评审意见列表
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 作品评审意见集合
|
||||
*/
|
||||
public List<WorkReview> selectWorkReviewList(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 新增作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWorkReview(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 修改作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWorkReview(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 删除作品评审意见
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWorkReviewByReviewId(Long reviewId);
|
||||
|
||||
/**
|
||||
* 批量删除作品评审意见
|
||||
*
|
||||
* @param reviewIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWorkReviewByReviewIds(Long[] reviewIds);
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.ruoyi.system.domain.DailySys;
|
||||
import com.ruoyi.system.domain.dto.SeOnlineTimeDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserCountDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserWorkCountDto;
|
||||
import com.ruoyi.system.domain.dto.SysIncomeDto;
|
||||
|
||||
/**
|
||||
* 记录系统每天需要统计的任务Service接口
|
||||
@ -44,8 +45,13 @@ public interface IDailySysService
|
||||
//获取指定起止时间内的每天作品总数
|
||||
public List<SeUserWorkCountDto> getSeUserWorkCount(LocalDate startDate, LocalDate endDate);
|
||||
|
||||
//获取指定起止时间内的每天在线时长
|
||||
public List<SeOnlineTimeDto> gettOnlineTime(LocalDate startDate, LocalDate endDate);
|
||||
|
||||
//获取指定起止时间内的每天收入总额
|
||||
public List<SysIncomeDto> getSysIncome(LocalDate startDate, LocalDate endDate);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -186,4 +186,10 @@ public interface ISysRoleService
|
||||
* 更新用户角色
|
||||
* */
|
||||
public int updateUserRole(Long userId, Long roleId);
|
||||
|
||||
/*
|
||||
* 查询sys_user_role 中是否存在相应的数据
|
||||
* */
|
||||
|
||||
public SysUserRole getSysUserRole(Long userId);
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ public interface ISysUserService
|
||||
* 人员管理----获取系统后台用户
|
||||
* */
|
||||
|
||||
public List<UserManagerVo> getBackstageUserList();
|
||||
public List<UserManagerVo> getBackstageUserList(SysUser user);
|
||||
|
||||
/*
|
||||
* 人员管理---根据user_id获取后台用户信息
|
||||
|
||||
@ -19,4 +19,6 @@ public interface ISysUserStService {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.domain.UserInfo;
|
||||
import com.ruoyi.system.domain.vo.AppUserInfoVo;
|
||||
|
||||
@ -82,7 +84,7 @@ public interface IUserInfoService
|
||||
|
||||
/*获取所用App用户的信息*/
|
||||
|
||||
public List<AppUserInfoVo> getAllAppUserInfo();
|
||||
public List<AppUserInfoVo> getAllAppUserInfo(SysUser user);
|
||||
|
||||
/*
|
||||
* 根据用户id获取指定App用户的信息
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.UserWork;
|
||||
import com.ruoyi.system.domain.dto.UserWorkReviewDto;
|
||||
|
||||
/**
|
||||
* 用户作品Service接口
|
||||
@ -59,5 +61,10 @@ public interface IUserWorkService
|
||||
*/
|
||||
public int deleteUserWorkByWorkId(Long workId);
|
||||
|
||||
public Long getUserWorkCount();
|
||||
public Long getUserWorkCount(String workStatus);
|
||||
|
||||
/*
|
||||
* 内容审核获取用户作品列表
|
||||
* */
|
||||
public List<UserWorkReviewDto> getAllUserWork(UserWork userWork);
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.WorkReview;
|
||||
|
||||
/**
|
||||
* 作品评审意见Service接口
|
||||
*
|
||||
* @author haotian
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
public interface IWorkReviewService
|
||||
{
|
||||
/**
|
||||
* 查询作品评审意见
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 作品评审意见
|
||||
*/
|
||||
public WorkReview selectWorkReviewByReviewId(Long reviewId);
|
||||
|
||||
/**
|
||||
* 查询作品评审意见列表
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 作品评审意见集合
|
||||
*/
|
||||
public List<WorkReview> selectWorkReviewList(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 新增作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWorkReview(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 修改作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWorkReview(WorkReview workReview);
|
||||
|
||||
/**
|
||||
* 批量删除作品评审意见
|
||||
*
|
||||
* @param reviewIds 需要删除的作品评审意见主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWorkReviewByReviewIds(Long[] reviewIds);
|
||||
|
||||
/**
|
||||
* 删除作品评审意见信息
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWorkReviewByReviewId(Long reviewId);
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.ruoyi.system.domain.dto.SeOnlineTimeDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserCountDto;
|
||||
import com.ruoyi.system.domain.dto.SeUserWorkCountDto;
|
||||
import com.ruoyi.system.domain.dto.SysIncomeDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.DailySysMapper;
|
||||
@ -72,6 +73,11 @@ public class DailySysServiceImpl implements IDailySysService
|
||||
return dailySysMapper.gettOnlineTime(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysIncomeDto> getSysIncome(LocalDate startDate, LocalDate endDate){
|
||||
return dailySysMapper.getSysIncome(startDate, endDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增记录系统每天需要统计的任务
|
||||
*
|
||||
|
||||
@ -444,4 +444,13 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
public int updateUserRole(Long userId, Long roleId){
|
||||
return userRoleMapper.updateUserRole(userId, roleId);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 查询sys_user_role 中是否存在相应的数据
|
||||
* */
|
||||
@Override
|
||||
public SysUserRole getSysUserRole(Long userId){
|
||||
return userRoleMapper.getSysUserRole(userId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ public class SysUserOnlineTimeServiceImpl implements ISysUserOnlineTimeService {
|
||||
// System.out.println("定时任务输出"+date);
|
||||
// }
|
||||
// 每天凌晨 1 点计算近7/30天的在线时长
|
||||
@Scheduled(cron="0 0 1 * * ?")
|
||||
// @Scheduled(cron="0 0 1 * * ?")
|
||||
// @Scheduled(cron="0 * * * * ?")
|
||||
@Override
|
||||
public void calculateUserOnlineStats() {
|
||||
|
||||
@ -583,8 +583,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserManagerVo> getBackstageUserList(){
|
||||
return userMapper.getBackstageUserList();
|
||||
public List<UserManagerVo> getBackstageUserList(SysUser user){
|
||||
return userMapper.getBackstageUserList(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -24,7 +24,7 @@ public class SysUserWorkCountServiceImpl implements ISysUserWorkCountService {
|
||||
|
||||
@Override
|
||||
public Long getUserWorkCount() {
|
||||
Long userWorkCount = userWorkService.getUserWorkCount();
|
||||
Long userWorkCount = userWorkService.getUserWorkCount(null);
|
||||
return userWorkCount;
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.domain.vo.AppUserInfoVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -122,8 +123,9 @@ public class UserInfoServiceImpl implements IUserInfoService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUserInfoVo> getAllAppUserInfo(){
|
||||
return userInfoMapper.getAllAppUserInfo();
|
||||
public List<AppUserInfoVo> getAllAppUserInfo(SysUser user){
|
||||
|
||||
return userInfoMapper.getAllAppUserInfo(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.dto.UserWorkReviewDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.UserWorkMapper;
|
||||
@ -94,8 +96,13 @@ public class UserWorkServiceImpl implements IUserWorkService
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getUserWorkCount()
|
||||
public Long getUserWorkCount(String workStatus)
|
||||
{
|
||||
return userWorkMapper.getUserWorkCount();
|
||||
return userWorkMapper.getUserWorkCount(workStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserWorkReviewDto> getAllUserWork(UserWork userWork ){
|
||||
return userWorkMapper.getAllUserWork(userWork);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.WorkReviewMapper;
|
||||
import com.ruoyi.system.domain.WorkReview;
|
||||
import com.ruoyi.system.service.IWorkReviewService;
|
||||
|
||||
/**
|
||||
* 作品评审意见Service业务层处理
|
||||
*
|
||||
* @author haotian
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
@Service
|
||||
public class WorkReviewServiceImpl implements IWorkReviewService
|
||||
{
|
||||
@Autowired
|
||||
private WorkReviewMapper workReviewMapper;
|
||||
|
||||
/**
|
||||
* 查询作品评审意见
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 作品评审意见
|
||||
*/
|
||||
@Override
|
||||
public WorkReview selectWorkReviewByReviewId(Long reviewId)
|
||||
{
|
||||
return workReviewMapper.selectWorkReviewByReviewId(reviewId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询作品评审意见列表
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 作品评审意见
|
||||
*/
|
||||
@Override
|
||||
public List<WorkReview> selectWorkReviewList(WorkReview workReview)
|
||||
{
|
||||
return workReviewMapper.selectWorkReviewList(workReview);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWorkReview(WorkReview workReview)
|
||||
{
|
||||
workReview.setCreateTime(DateUtils.getNowDate());
|
||||
return workReviewMapper.insertWorkReview(workReview);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作品评审意见
|
||||
*
|
||||
* @param workReview 作品评审意见
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWorkReview(WorkReview workReview)
|
||||
{
|
||||
return workReviewMapper.updateWorkReview(workReview);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除作品评审意见
|
||||
*
|
||||
* @param reviewIds 需要删除的作品评审意见主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWorkReviewByReviewIds(Long[] reviewIds)
|
||||
{
|
||||
return workReviewMapper.deleteWorkReviewByReviewIds(reviewIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作品评审意见信息
|
||||
*
|
||||
* @param reviewId 作品评审意见主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWorkReviewByReviewId(Long reviewId)
|
||||
{
|
||||
return workReviewMapper.deleteWorkReviewByReviewId(reviewId);
|
||||
}
|
||||
}
|
||||
@ -35,6 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="tOnlineTime" column="t_online_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SysIncomeDtoResult" type="SysIncomeDto">
|
||||
<result property="date" column="data"/>
|
||||
<!--还要改进-->
|
||||
<result property="tIncome" column="t_income"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDailySysVo">
|
||||
select daily_sys_id, t_user, t_online_time, t_mr_time, t_bought, t_interactions, t_shares, t_work, t_pass_work, t_back_work, t_income, t_refund, data from daily_sys
|
||||
</sql>
|
||||
@ -80,7 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select t_online_time, data from daily_sys where data between #{startDate} and #{endDate}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getSysIncome" resultMap="SysIncomeDtoResult">
|
||||
select t_income, data from daily_sys where data between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertDailySys" parameterType="DailySys" useGeneratedKeys="true" keyProperty="dailySysId">
|
||||
|
||||
@ -188,13 +188,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join user_info on sys_user.user_id = user_info.user_id
|
||||
where sys_user.user_type != '0000000000'
|
||||
</select>
|
||||
<select id="getBackstageUserList" resultMap="UserManagerResult">
|
||||
<select id="getBackstageUserList" resultMap="UserManagerResult" parameterType="SysUser">
|
||||
select u.user_id, u.nick_name, u.phonenumber, u.create_time ,i.real_name, sr.role_name, u.status
|
||||
from sys_user u
|
||||
left join user_info i on u.user_id = i.user_id
|
||||
left join sys_user_role r on u.user_id = r.user_id
|
||||
left join sys_role sr on r.role_id = sr.role_id
|
||||
where u.user_type != '0000000000'
|
||||
<if test="nickName != null and nickName != ''">
|
||||
AND u.nick_name like concat('%', #{nickName}, '%')
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getBackstageUserById" resultMap="UserManagerResult">
|
||||
|
||||
@ -21,7 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="countUserRoleByRoleId" resultType="Integer">
|
||||
select count(1) from sys_user_role where role_id=#{roleId}
|
||||
</select>
|
||||
|
||||
<select id="getSysUserRole" resultMap="SysUserRoleResult">
|
||||
select *
|
||||
from sys_user_role
|
||||
where user_id=#{userId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserRole" parameterType="Long">
|
||||
delete from sys_user_role where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
|
||||
@ -97,12 +97,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectAllUserInfo" resultMap="UserInfoResult">
|
||||
select user_id, authentication_status, real_name, id_card, sex, signature, avatar, card_front, card_back, email, receive_rockets, send_rockets, shares, followers, s_online_time, s_mr_time, s_consumption, th_consumption, phonenumber, t_mr_time, t_online_time, t_consumption, update_time, date_of_birth, back_ground, calculation_time from user_info
|
||||
</select>
|
||||
<select id="getAllAppUserInfo" resultMap="AppUserInfoVoResult">
|
||||
<select id="getAllAppUserInfo" resultMap="AppUserInfoVoResult" parameterType="SysUser">
|
||||
select s.user_id, s.nick_name, s.status, s.create_time, u.receive_rockets, u.send_rockets, u.followers, u.s_online_time, u.s_mr_time, u.s_consumption, u.th_consumption, u.phonenumber, u.t_mr_time, u.t_online_time, u.t_consumption
|
||||
from sys_user s
|
||||
left join user_info u
|
||||
on s.user_id = u.user_id
|
||||
where s.user_type = '0000000000'
|
||||
|
||||
<if test="status != null and status != ''"> AND s.status = #{status} </if>
|
||||
<if test="nickName != null and nickName != ''">AND s.nick_name like concat('%', #{nickName}, '%')</if>
|
||||
|
||||
</select>
|
||||
<select id="getAppUserInfo" resultMap="AppUserInfoVoResult">
|
||||
select s.user_id, s.nick_name, s.status, s.create_time, u.receive_rockets, u.send_rockets, u.followers, u.s_online_time, u.s_mr_time, u.s_consumption, u.th_consumption, u.phonenumber, u.t_mr_time, u.t_online_time, u.t_consumption
|
||||
|
||||
@ -24,6 +24,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="city" column="city" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="UserWorkReviewDtoResult" type="UserWorkReviewDto">
|
||||
<result property="workId" column="work_id" />
|
||||
<result property="workName" column="work_name" />
|
||||
<result property="workAddress" column="work_address" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="auditOpinion" column="audit_opinion" />
|
||||
<result property="sourceId" column="source_id" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="scenic" column="scenic" />
|
||||
<result property="part" column="part" />
|
||||
<result property="city" column="city" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserWorkVo">
|
||||
select work_id, user_id, work_name, work_address, coordinate, create_time, post_time, work_status, audit_opinion, source_id, price, receive_rockets, detail, delete_flag, scenic, part, city from user_work
|
||||
</sql>
|
||||
@ -129,5 +144,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
<select id="getUserWorkCount" resultType="Long">
|
||||
select count(*) from user_work
|
||||
<where>
|
||||
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getAllUserWork" resultMap="UserWorkReviewDtoResult">
|
||||
|
||||
select w.work_id, w.work_name, w.work_address, w.create_time, w.work_status, w.audit_opinion, w.source_id, w.city, w.scenic, w.part ,w.detail, u.nick_name
|
||||
from user_work w
|
||||
left join sys_user u
|
||||
on w.user_id = u.user_id
|
||||
<where>
|
||||
<if test="userId != null "> and w.user_id = #{userId}</if>
|
||||
<if test="workName != null and workName != ''"> and work_name like concat('%', #{workName}, '%')</if>
|
||||
<if test="workAddress != null and workAddress != ''"> and work_address = #{workAddress}</if>
|
||||
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate}</if>
|
||||
<if test="postTime != null "> and post_time = #{postTime}</if>
|
||||
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''"> and audit_opinion = #{auditOpinion}</if>
|
||||
<if test="sourceId != null and sourceId != ''"> and source_id = #{sourceId}</if>
|
||||
<!---- <if test="price != null "> and price = #{price}</if>-->
|
||||
<if test="receiveRockets != null "> and receive_rockets = #{receiveRockets}</if>
|
||||
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
|
||||
<if test="deleteFlag != null and deleteFlag != ''"> and delete_flag = #{deleteFlag}</if>
|
||||
<if test="scenic != null and scenic != ''"> and scenic = #{scenic}</if>
|
||||
<if test="part != null and part != ''"> and part = #{part}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
and work_status in ('2','3', '4', '5')
|
||||
|
||||
</where>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.WorkReviewMapper">
|
||||
|
||||
<resultMap type="WorkReview" id="WorkReviewResult">
|
||||
<result property="reviewId" column="review_id" />
|
||||
<result property="workId" column="work_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="reviewerId" column="reviewer_id" />
|
||||
<result property="reviewerName" column="reviewer_name" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWorkReviewVo">
|
||||
select review_id, work_id, create_time, reviewer_id, reviewer_name, work_status, detail, delete_flag from work_review
|
||||
</sql>
|
||||
|
||||
<select id="selectWorkReviewList" parameterType="WorkReview" resultMap="WorkReviewResult">
|
||||
<include refid="selectWorkReviewVo"/>
|
||||
<where>
|
||||
<if test="workId != null "> and work_id = #{workId}</if>
|
||||
<if test="reviewerId != null "> and reviewer_id = #{reviewerId}</if>
|
||||
<if test="reviewerName != null and reviewerName != ''"> and reviewer_name like concat('%', #{reviewerName}, '%')</if>
|
||||
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
|
||||
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
|
||||
<if test="deleteFlag != null and deleteFlag != ''"> and delete_flag = #{deleteFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWorkReviewByReviewId" parameterType="Long" resultMap="WorkReviewResult">
|
||||
<include refid="selectWorkReviewVo"/>
|
||||
where review_id = #{reviewId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWorkReview" parameterType="WorkReview" useGeneratedKeys="true" keyProperty="reviewId">
|
||||
insert into work_review
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">work_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="reviewerId != null">reviewer_id,</if>
|
||||
<if test="reviewerName != null and reviewerName != ''">reviewer_name,</if>
|
||||
<if test="workStatus != null and workStatus != ''">work_status,</if>
|
||||
<if test="detail != null and detail != ''">detail,</if>
|
||||
<if test="deleteFlag != null">delete_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">#{workId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="reviewerId != null">#{reviewerId},</if>
|
||||
<if test="reviewerName != null and reviewerName != ''">#{reviewerName},</if>
|
||||
<if test="workStatus != null and workStatus != ''">#{workStatus},</if>
|
||||
<if test="detail != null and detail != ''">#{detail},</if>
|
||||
<if test="deleteFlag != null">#{deleteFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWorkReview" parameterType="WorkReview">
|
||||
update work_review
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="workId != null">work_id = #{workId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="reviewerId != null">reviewer_id = #{reviewerId},</if>
|
||||
<if test="reviewerName != null and reviewerName != ''">reviewer_name = #{reviewerName},</if>
|
||||
<if test="workStatus != null and workStatus != ''">work_status = #{workStatus},</if>
|
||||
<if test="detail != null and detail != ''">detail = #{detail},</if>
|
||||
<if test="deleteFlag != null">delete_flag = #{deleteFlag},</if>
|
||||
</trim>
|
||||
where review_id = #{reviewId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWorkReviewByReviewId" parameterType="Long">
|
||||
delete from work_review where review_id = #{reviewId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWorkReviewByReviewIds" parameterType="String">
|
||||
delete from work_review where review_id in
|
||||
<foreach item="reviewId" collection="array" open="(" separator="," close=")">
|
||||
#{reviewId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user