ty
6 months ago
18 changed files with 315 additions and 307 deletions
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.operational.feedback.constants; |
||||
|
||||
/** |
||||
* 应急抢修常量 |
||||
* @Author: ysj |
||||
*/ |
||||
public interface FeedbackConstant { |
||||
|
||||
|
||||
/** |
||||
* 问题回复角色别名 |
||||
*/ |
||||
String REPLY_ROLE_ALIAS = "feedback_reply"; |
||||
|
||||
} |
@ -1,38 +1,56 @@
|
||||
package com.hnac.hzims.operational.main.entity; |
||||
package com.hnac.hzims.operational.feedback.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/24 11:03 |
||||
* @author ysj |
||||
*/ |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@Data |
||||
@TableName("hzims_user_feedback") |
||||
@ApiModel(value = "UserFeedbackEntity对象", description = "用户反馈表") |
||||
public class UserFeedbackEntity extends TenantEntity implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
@ApiModel(value = "用户反馈信息", description = "用户反馈记录表") |
||||
public class UserFeedbackEntity extends TenantEntity { |
||||
|
||||
@ApiModelProperty(value = "联系电话") |
||||
private String phone; |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "反馈内容") |
||||
private String content; |
||||
|
||||
@ApiModelProperty(value = "联系电话") |
||||
private String phone; |
||||
|
||||
@ApiModelProperty(value = "附件名称") |
||||
private String fileName; |
||||
|
||||
@ApiModelProperty(value = "附件地址") |
||||
private String fileUrl; |
||||
|
||||
@ApiModelProperty(value = "反馈人") |
||||
private Long feedbackUser; |
||||
|
||||
@ApiModelProperty(value = "反馈人姓名") |
||||
private String feedbackUserName; |
||||
|
||||
@ApiModelProperty(value = "反馈类型") |
||||
private String feedbackType; |
||||
|
||||
@ApiModelProperty(value = "回复内容") |
||||
private String replyContent; |
||||
|
||||
@ApiModelProperty(value = "回复人") |
||||
private Long replyUser; |
||||
|
||||
@ApiModelProperty(value = "回复时间") |
||||
private Date replyTime; |
||||
|
||||
@ApiModelProperty(value = "回复人姓名") |
||||
private String replyUserName; |
||||
} |
@ -0,0 +1,29 @@
|
||||
package com.hnac.hzims.operational.feedback.vo; |
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "用户反馈查询对象") |
||||
public class FeedbackQueryVo { |
||||
|
||||
@ApiModelProperty(value = "反馈开始时间") |
||||
private String startTime; |
||||
|
||||
@ApiModelProperty(value = "反馈结束时间") |
||||
private String endTime; |
||||
|
||||
@ApiModelProperty(value = "反馈信息") |
||||
private String content; |
||||
|
||||
@ApiModelProperty(value = "反馈类型") |
||||
private String feedbackType; |
||||
|
||||
@ApiModelProperty(value = "问题状态: 1-未回复 2-已回复") |
||||
private Integer status; |
||||
} |
@ -0,0 +1,72 @@
|
||||
package com.hnac.hzims.operational.feedback.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.operational.feedback.entity.UserFeedbackEntity; |
||||
import com.hnac.hzims.operational.feedback.service.IUserFeedbackService; |
||||
import com.hnac.hzims.operational.feedback.vo.FeedbackQueryVo; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/feedback") |
||||
@AllArgsConstructor |
||||
@Api(value = "用户反馈", tags = "用户反馈管理") |
||||
public class UserFeedbackController extends BladeController { |
||||
|
||||
private final IUserFeedbackService service; |
||||
|
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "保存反馈信息", notes = "传入用户反馈对象") |
||||
public R save(@RequestBody UserFeedbackEntity entity) { |
||||
BladeUser user = AuthUtil.getUser(); |
||||
entity.setFeedbackUser(user.getUserId()); |
||||
entity.setFeedbackUserName(user.getNickName()); |
||||
return R.status(service.save(entity)); |
||||
} |
||||
|
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "修改反馈信息", notes = "传入用户反馈对象") |
||||
public R update(@RequestBody UserFeedbackEntity entity) { |
||||
BladeUser user = AuthUtil.getUser(); |
||||
entity.setFeedbackUser(user.getUserId()); |
||||
entity.setFeedbackUserName(user.getNickName()); |
||||
return R.status(service.updateById(entity)); |
||||
} |
||||
|
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "删除反馈信息", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(service.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
@PostMapping("/reply") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "回复反馈信息", notes = "传入用户反馈对象") |
||||
public R reply(@RequestBody UserFeedbackEntity entity) { |
||||
return R.status(service.reply(entity)); |
||||
} |
||||
|
||||
@PostMapping("/page") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "反馈列表查询", notes = "传入ids") |
||||
public R<IPage<UserFeedbackEntity>> pageCondition(FeedbackQueryVo param, Query query) { |
||||
return R.data(service.pageCondition(param, Condition.getPage(query))); |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.operational.feedback.mapper; |
||||
|
||||
import com.hnac.hzims.operational.feedback.entity.UserFeedbackEntity; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface UserFeedbackMapper extends UserDataScopeBaseMapper<UserFeedbackEntity> { |
||||
|
||||
} |
@ -0,0 +1,5 @@
|
||||
<?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.hnac.hzims.operational.feedback.mapper.UserFeedbackMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,17 @@
|
||||
package com.hnac.hzims.operational.feedback.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.feedback.entity.UserFeedbackEntity; |
||||
import com.hnac.hzims.operational.feedback.vo.FeedbackQueryVo; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface IUserFeedbackService extends BaseService<UserFeedbackEntity> { |
||||
|
||||
IPage<UserFeedbackEntity> pageCondition(FeedbackQueryVo query,IPage<UserFeedbackEntity> page); |
||||
|
||||
boolean reply(UserFeedbackEntity entity); |
||||
} |
@ -0,0 +1,107 @@
|
||||
package com.hnac.hzims.operational.feedback.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.feedback.constants.FeedbackConstant; |
||||
import com.hnac.hzims.operational.feedback.mapper.UserFeedbackMapper; |
||||
import com.hnac.hzims.operational.feedback.service.IUserFeedbackService; |
||||
import com.hnac.hzims.operational.feedback.entity.UserFeedbackEntity; |
||||
import com.hnac.hzims.operational.feedback.vo.FeedbackQueryVo; |
||||
import com.hnac.hzims.operational.station.entity.StationEntity; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.CollectionUtil; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springblade.system.user.entity.User; |
||||
import org.springblade.system.user.feign.IUserClient; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@AllArgsConstructor |
||||
public class UserFeedbackServiceImpl extends BaseServiceImpl<UserFeedbackMapper, UserFeedbackEntity> implements IUserFeedbackService { |
||||
|
||||
private final IUserClient userClient; |
||||
|
||||
/** |
||||
* 用户反馈列表查询 |
||||
* @param query |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public IPage<UserFeedbackEntity> pageCondition(FeedbackQueryVo query,IPage<UserFeedbackEntity> page) { |
||||
// 用户角色查询
|
||||
boolean isHaveReplyRole = this.isHaveReplyRole(); |
||||
|
||||
// 定义查询表达式
|
||||
LambdaQueryWrapper<UserFeedbackEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
wrapper.orderByDesc(UserFeedbackEntity::getCreateTime); |
||||
if(ObjectUtil.isNotEmpty(query)){ |
||||
if(StringUtil.isNotBlank(query.getStartTime())){ |
||||
wrapper.ge(UserFeedbackEntity::getCreateTime,query.getStartTime()); |
||||
} |
||||
if(StringUtil.isNotBlank(query.getEndTime())){ |
||||
wrapper.le(UserFeedbackEntity::getCreateTime,query.getEndTime()); |
||||
} |
||||
if(StringUtil.isNotBlank(query.getFeedbackType())){ |
||||
wrapper.eq(UserFeedbackEntity::getFeedbackType,query.getFeedbackType()); |
||||
} |
||||
if(ObjectUtil.isNotEmpty(query.getStatus())){ |
||||
wrapper.eq(UserFeedbackEntity::getStatus,query.getStatus()); |
||||
} |
||||
if(ObjectUtil.isNotEmpty(query.getContent())){ |
||||
wrapper.like(UserFeedbackEntity::getContent,query.getContent()); |
||||
} |
||||
} |
||||
if(isHaveReplyRole){ |
||||
wrapper.eq(UserFeedbackEntity::getFeedbackUser,AuthUtil.getUserId()); |
||||
} |
||||
|
||||
return this.page(page,wrapper); |
||||
} |
||||
|
||||
/** |
||||
* 反馈回复 |
||||
* @param entity |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean reply(UserFeedbackEntity entity) { |
||||
// 更新保存回复内容
|
||||
BladeUser user = AuthUtil.getUser(); |
||||
entity.setReplyUser(user.getUserId()); |
||||
entity.setReplyUserName(user.getNickName()); |
||||
entity.setReplyTime(new Date()); |
||||
entity.setStatus(2); |
||||
this.updateById(entity); |
||||
// TODO 推送回复信息至提问人
|
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* 用户是否拥有问题回复角色 |
||||
* @return |
||||
*/ |
||||
private boolean isHaveReplyRole() { |
||||
// 当前用户
|
||||
BladeUser user = AuthUtil.getUser(); |
||||
// 查询用户回复角色用户
|
||||
R<List<User>> haveUsers = userClient.userListByRoleAlias(user.getTenantId(), FeedbackConstant.REPLY_ROLE_ALIAS); |
||||
if(!haveUsers.isSuccess() || CollectionUtil.isEmpty(haveUsers.getData())){ |
||||
return true; |
||||
} |
||||
return !haveUsers.getData().stream().map(User::getId).collect(Collectors.toList()).contains(user.getUserId()); |
||||
} |
||||
} |
@ -1,145 +0,0 @@
|
||||
package com.hnac.hzims.operational.main.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.operational.main.dto.UserFeedbackDTO; |
||||
import com.hnac.hzims.operational.main.entity.UserFeedbackEntity; |
||||
import com.hnac.hzims.operational.main.service.IUserFeedbackService; |
||||
import com.hnac.hzims.operational.main.vo.UserFeedbackVo; |
||||
import com.hnac.hzims.operational.main.wrapper.UserFeedbackWrapper; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.log.annotation.ApiLog; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springblade.system.user.feign.IUserClient; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/24 11:21 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/feedback") |
||||
@Api(value = "用户反馈", tags = "用户反馈管理") |
||||
@AllArgsConstructor |
||||
public class UserFeedbackController extends BladeController { |
||||
|
||||
private final IUserFeedbackService userFeedbackService; |
||||
|
||||
private final IUserClient userClient; |
||||
|
||||
/** |
||||
* 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 20) |
||||
@ApiOperation(value = "新增", notes = "传入UserFeedbackDTO") |
||||
public R save(@RequestBody UserFeedbackDTO req) { |
||||
/*R<User> userR = userClient.userInfoById(AuthUtil.getUserId()); |
||||
if (userR.isSuccess()) { |
||||
req.setPhone(Optional.ofNullable(userR.getData()).map(User::getPhone).orElse(null)); |
||||
}*/ |
||||
return R.status(userFeedbackService.save(req)); |
||||
} |
||||
|
||||
/** |
||||
* 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 30) |
||||
@ApiOperation(value = "修改", notes = "传入UserFeedbackDTO") |
||||
public R update(@RequestBody UserFeedbackDTO req) { |
||||
return R.status(userFeedbackService.updateById(req)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 回复 |
||||
*/ |
||||
@PostMapping("/reply") |
||||
@ApiOperationSupport(order = 30) |
||||
@ApiOperation(value = "回复", notes = "传入UserFeedbackDTO") |
||||
public R reply(@RequestBody UserFeedbackDTO req) { |
||||
req.setReplyUser(AuthUtil.getUserId()); |
||||
//已回复
|
||||
req.setStatus(2); |
||||
return R.status(userFeedbackService.updateById(req)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 10) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(userFeedbackService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 详情 |
||||
*/ |
||||
@ApiLog |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 40) |
||||
@ApiOperation(value = "详情", notes = "传入id") |
||||
public R<UserFeedbackVo> detail(@RequestParam Long id) { |
||||
UserFeedbackVo vo = UserFeedbackWrapper.build().entityVO(userFeedbackService.getById(id)); |
||||
return R.data(vo); |
||||
} |
||||
|
||||
/** |
||||
* 分页 |
||||
*/ |
||||
@ApiLog |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 50) |
||||
@ApiOperation(value = "分页", notes = "查询条件:startTime,endTime,content,createUser,status") |
||||
public R<IPage<UserFeedbackVo>> list(UserFeedbackDTO req, Query query) { |
||||
Wrapper<UserFeedbackEntity> queryWrapper = new LambdaQueryWrapper<UserFeedbackEntity>() {{ |
||||
orderByDesc(UserFeedbackEntity::getCreateTime); |
||||
if (ObjectUtil.isNotEmpty(req.getStartTime())) { |
||||
ge(UserFeedbackEntity::getCreateTime, req.getStartTime()); |
||||
} |
||||
if (StringUtil.isNotBlank(req.getEndTime())) { |
||||
le(UserFeedbackEntity::getCreateTime, req.getEndTime()); |
||||
} |
||||
if (ObjectUtil.isNotEmpty(req.getContent())) { |
||||
like(UserFeedbackEntity::getContent, req.getContent()); |
||||
} |
||||
if (ObjectUtil.isNotEmpty(req.getCreateUser())) { |
||||
eq(UserFeedbackEntity::getCreateUser, req.getCreateUser()); |
||||
} |
||||
if (ObjectUtil.isNotEmpty(req.getStatus())) { |
||||
eq(UserFeedbackEntity::getStatus, req.getStatus()); |
||||
} |
||||
}}; |
||||
IPage page = userFeedbackService.page(Condition.getPage(query), queryWrapper); |
||||
page.setRecords(UserFeedbackWrapper.build().listVO(page.getRecords())); |
||||
return R.data(page); |
||||
} |
||||
|
||||
/** |
||||
* 分页 - 无数据权限控制 |
||||
*/ |
||||
@GetMapping("/listNotDataScope") |
||||
@ApiOperationSupport(order = 50) |
||||
@ApiOperation(value = "分页-无数据权限控制", notes = "查询条件:startTime,endTime,content,createUser,status") |
||||
public R<IPage<UserFeedbackVo>> listNotDataScope(UserFeedbackDTO req, Query query) { |
||||
IPage iPage = userFeedbackService.pageNotDataScope(Condition.getPage(query), req); |
||||
iPage.setRecords(UserFeedbackWrapper.build().listVO(iPage.getRecords())); |
||||
return R.data(iPage); |
||||
} |
||||
|
||||
} |
@ -1,39 +0,0 @@
|
||||
package com.hnac.hzims.operational.main.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.hnac.hzims.operational.main.entity.UserFeedbackEntity; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/24 11:09 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class UserFeedbackDTO extends UserFeedbackEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@DateTimeFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@JsonFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@ApiModelProperty("查询开始时间") |
||||
private String startTime; |
||||
|
||||
|
||||
@DateTimeFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@JsonFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@ApiModelProperty("查询结束时间") |
||||
private String endTime; |
||||
|
||||
|
||||
} |
@ -1,13 +0,0 @@
|
||||
package com.hnac.hzims.operational.main.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.main.dto.UserFeedbackDTO; |
||||
import com.hnac.hzims.operational.main.entity.UserFeedbackEntity; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
public interface UserFeedbackMapper extends UserDataScopeBaseMapper<UserFeedbackEntity> { |
||||
|
||||
IPage<UserFeedbackEntity> pageNotDataScope(IPage page, @Param("req") UserFeedbackDTO req); |
||||
|
||||
} |
@ -1,26 +0,0 @@
|
||||
<?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.hnac.hzims.operational.main.mapper.UserFeedbackMapper"> |
||||
|
||||
|
||||
<select id="pageNotDataScope" resultType="com.hnac.hzims.operational.main.entity.UserFeedbackEntity"> |
||||
select * from hzims_user_feedback where IS_DELETED = 0 |
||||
<if test="req.content!=null and req.content!=''"> |
||||
AND CONTENT like concat('%',#{req.content},'%') |
||||
</if> |
||||
<if test="req.status!=null"> |
||||
AND STATUS = #{req.status} |
||||
</if> |
||||
<if test="req.startTime!=null"> |
||||
AND CREATE_TIME <![CDATA[ >= ]]> #{req.startTime} |
||||
</if> |
||||
<if test="req.endTime!=null"> |
||||
AND CREATE_TIME <![CDATA[ <= ]]> #{req.endTime} |
||||
</if> |
||||
<if test="req.createUser!=null"> |
||||
AND CREATE_USER = #{req.createUser} |
||||
</if> |
||||
order by CREATE_TIME desc |
||||
</select> |
||||
|
||||
</mapper> |
@ -1,15 +0,0 @@
|
||||
package com.hnac.hzims.operational.main.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.main.dto.UserFeedbackDTO; |
||||
import com.hnac.hzims.operational.main.entity.UserFeedbackEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/24 11:18 |
||||
*/ |
||||
public interface IUserFeedbackService extends BaseService<UserFeedbackEntity> { |
||||
|
||||
IPage<UserFeedbackEntity> pageNotDataScope(IPage page, UserFeedbackDTO req); |
||||
|
||||
} |
@ -1,28 +0,0 @@
|
||||
package com.hnac.hzims.operational.main.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.main.dto.UserFeedbackDTO; |
||||
import com.hnac.hzims.operational.main.entity.UserFeedbackEntity; |
||||
import com.hnac.hzims.operational.main.mapper.UserFeedbackMapper; |
||||
import com.hnac.hzims.operational.main.service.IUserFeedbackService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/24 11:19 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@AllArgsConstructor |
||||
public class UserFeedbackServiceImpl extends BaseServiceImpl<UserFeedbackMapper, UserFeedbackEntity> implements IUserFeedbackService { |
||||
|
||||
|
||||
private final UserFeedbackMapper userFeedbackMapper; |
||||
|
||||
@Override |
||||
public IPage<UserFeedbackEntity> pageNotDataScope(IPage page, UserFeedbackDTO req) { |
||||
return userFeedbackMapper.pageNotDataScope(page, req); |
||||
} |
||||
} |
Loading…
Reference in new issue