Commit eeffa0f6 authored by liqin's avatar liqin 💬

Merge branch 'master' of http://111.203.232.171:8888/lee/chnmuseum-party into master

parents 6f7d77a7 4ae217e7
......@@ -7,9 +7,9 @@ public enum AuditOperationEnum {
ADD(1, "新增"),
EDIT(2, "修改"),
REMOVE(3, "下架"),
DISABLE(4, "禁用"),
ENABLE(5, "启用");
REMOVE(3, "删除"),
DISABLE(4, "禁用/下架"),
ENABLE(5, "启用/上架");
// 错误编码
private Integer code;
......
......@@ -170,15 +170,22 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
//判断是哪个页面调的用户接口,返回不同日志操作对象
if (methodLog.operModule().getCode() == OperModule.USER.getCode()) {
TUser u = null;
String type = null;
if (methodLog.operType().getCode() == OperType.ADD.getCode() || methodLog.operType().getCode() == OperType.UPDATE.getCode()) {
u = (TUser) method_param[0];
type=u.getType();
} else if (methodLog.operType().getCode() == OperType.CHANGE_PASSWORD.getCode()) {
u = user;
} else {
type=u.getType();
} else if (methodLog.operType().getCode() == OperType.SELECT.getCode()) {
String s = (String) method_param[0];
type=s;
}else {
String s = (String) method_param[0];
u = userService.getById(s);
type=u.getType();
}
switch (u.getType()) {
switch (type) {
case "1":
// 设置标题
sysLog.setOperationObject(OperModule.USER.getMsg());
......
......@@ -2,6 +2,10 @@ package cn.wisenergy.chnmuseum.party.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <pre>
......@@ -13,4 +17,5 @@ import cn.wisenergy.chnmuseum.party.model.TInteraction;
*/
public interface TInteractionMapper extends BaseMapper<TInteraction> {
List<TInteraction> selectPageList(Page<TInteraction> page, @Param("orgId") String orgId);
}
......@@ -96,4 +96,9 @@ public class TInteraction implements Serializable {
@TableField(exist = false)
@NotNull(message = "密码不能为空", groups = {Add.class})
private String password;
@ApiModelProperty("展板名称")
@TableField(exist = false)
private String boardName;
}
package cn.wisenergy.chnmuseum.party.service;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......@@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface TInteractionService extends IService<TInteraction> {
Page<TInteraction> selectPageList(Page<TInteraction> page, String orgId);
}
......@@ -73,6 +73,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
//暂时注掉
// .eq("a.level", auditStatusLevel.name())
.eq("a.type", type.name())
.eq("a.is_deleted", 0)
// .eq("b.is_deleted", 0)
// .eq("c.is_deleted", 0)
.orderByDesc("a.create_time", "a.id");
//
if (status != null) {
......@@ -254,21 +257,14 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case ADD:
videoContent.setPublished(true);
break;
case ENABLE:
videoContent.setPublished(true);
videoContent.setDeleted(false);
break;
case EDIT:
videoContent.setPublished(true);
break;
case DISABLE:
videoContent.setPublished(false);
break;
case REMOVE:
videoContent.setPublished(false);
videoContent.setDeleted(true);
break;
default:
......@@ -296,21 +292,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case ADD:
exhibitionBoard.setPublished(true);
break;
case ENABLE:
exhibitionBoard.setPublished(true);
exhibitionBoard.setDeleted(false);
break;
case EDIT:
exhibitionBoard.setPublished(true);
break;
case DISABLE:
exhibitionBoard.setPublished(false);
break;
case REMOVE:
exhibitionBoard.setPublished(false);
exhibitionBoard.setDeleted(true);
break;
default:
......@@ -338,21 +328,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case ADD:
learningContent.setPublished(true);
break;
case ENABLE:
learningContent.setPublished(true);
learningContent.setDeleted(false);
break;
case EDIT:
learningContent.setPublished(true);
break;
case DISABLE:
learningContent.setPublished(false);
break;
case REMOVE:
learningContent.setPublished(false);
learningContent.setDeleted(true);
break;
default:
......
......@@ -3,6 +3,7 @@ package cn.wisenergy.chnmuseum.party.service.impl;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import cn.wisenergy.chnmuseum.party.mapper.TInteractionMapper;
import cn.wisenergy.chnmuseum.party.service.TInteractionService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
......@@ -27,4 +28,8 @@ public class TInteractionServiceImpl extends ServiceImpl<TInteractionMapper, TIn
@Resource
private TInteractionMapper tInteractionMapper;
@Override
public Page<TInteraction> selectPageList(Page<TInteraction> page, String orgId) {
return page.setRecords(tInteractionMapper.selectPageList(page,orgId));
}
}
......@@ -159,7 +159,7 @@ public class TInteractionController extends BaseController {
public Map<String, Object> getTInteractionPageList(String orgId) {
Page<TInteraction> list = null;
try {
list = tInteractionService.page(getPage(),new UpdateWrapper<TInteraction>().eq("organ_id", orgId).orderByDesc("create_time"));
list = tInteractionService.selectPageList(getPage(),orgId);
return getResult(list);
} catch (Exception e) {
e.printStackTrace();
......
......@@ -81,7 +81,7 @@ public class TUserController extends BaseController {
@RequestMapping(value = "/getPageList", method = RequestMethod.GET)
@RequiresPermissions("/user/getPageList")
@MethodLog(operModule = OperModule.USER, operType = OperType.SELECT)
public Map<String, Object> getPageList(String userName, String status, String type, String orgId, String areaId) {
public Map<String, Object> getPageList( String type,String userName,String status, String orgId, String areaId) {
TUser user1 = getcurUser();
TUser user = new TUser();
if (StringUtils.isNotBlank(userName)) {
......@@ -164,7 +164,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "获取用户详情", notes = "获取用户详情")
@GetMapping("/getById")
@RequiresPermissions("/user/getById")
@MethodLog(operModule = OperModule.USER, operType = OperType.SELECT)
@MethodLog(operModule = OperModule.USER, operType = OperType.DETAILS)
public Map<String, Object> getById(String id) {
try {
TUser tUser = userService.selectById(id);
......
......@@ -5,6 +5,7 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.TInteraction">
<id column="id" property="id"/>
<result column="board_name" property="boardName"/>
<result column="organ_id" property="organId"/>
<result column="username" property="username"/>
<result column="board_id" property="boardId"/>
......@@ -20,4 +21,11 @@
id, organ_id, username, board_id, study_time, num, content, images, create_time
</sql>
<select id="selectPageList" resultMap="BaseResultMap">
SELECT i.*,e.`name` board_name
FROM t_interaction i
left join exhibition_board e on e.id = i.board_id
where i.organ_id =#{orgId}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment