Commit e54e61df by 宋珺琪

服务管理列表按申请时间降序,时空桌面bug字段添加、bug处理,添加统计第三方接口

parent 0757810b
......@@ -66,6 +66,12 @@ public class SkMenu {
@TableField("isFixedMenu")
private String isFixedMenu;
@ApiModelProperty(value = "菜单")
@TableField("menuTop")
private String menuTop;
}
......
......@@ -7,10 +7,13 @@ import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import com.founder.commonutils.util.DateUtil;
import com.founder.commonutils.util.StringUtil;
import com.founder.servicebase.logs.LogMoudleCount;
import com.founder.servicebase.logs.OperLog;
import com.founder.servicebase.logs.OperationType;
import com.founder.servicebase.logs.SkSysLog;
import com.founder.servicebase.logs.param.LogCountParam;
import com.founder.servicebase.logs.param.LogParam;
import com.founder.servicebase.logs.service.SkSysLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -39,6 +42,8 @@ public class SkSysLogController {
/**
* 查询日志列表
*/
@ApiOperation(value = "查询日志列表")
@OperLog(message = "查询日志列表", operation = OperationType.QUERY)
@PostMapping("query")
public MapRestResult query(@RequestBody LogParam logParam) throws ParseException, UnsupportedEncodingException {
QueryWrapper queryWrapper = new QueryWrapper();
......@@ -82,6 +87,8 @@ public class SkSysLogController {
}
@ApiOperation(value = "统计")
@OperLog(message = "统计", operation = OperationType.QUERY)
@PostMapping("countTotal")
public MapRestResult countTotal(@RequestBody LogCountParam param) throws ParseException {
return new MapRestResult(service.countTotal(param));
......@@ -93,6 +100,8 @@ public class SkSysLogController {
* @return
* @throws ParseException
*/
@ApiOperation(value = "各个模块接口的统计计数")
@OperLog(message = "各个模块接口的统计计数", operation = OperationType.QUERY)
@PostMapping("countMoudle")
public MapRestResult countMoudle(@RequestBody LogCountParam param) throws ParseException {
List<LogMoudleCount> logMoudleCounts = service.countMoudle(param);
......@@ -100,4 +109,13 @@ public class SkSysLogController {
return new MapRestResult(200,"ok",logMoudleCounts.size(),logMoudleCounts);
}
@ApiOperation(value = "只统计含第三方的userid")
@OperLog(message = "只统计含第三方的userid", operation = OperationType.QUERY)
@PostMapping("countThreeUserId")
public MapRestResult countThreeUserId(@RequestBody LogCountParam param) throws ParseException {
List<LogMoudleCount> logMoudleCounts = service.countThreeUserId(param);
return new MapRestResult(200,"ok",logMoudleCounts.size(),logMoudleCounts);
}
}
......@@ -39,6 +39,7 @@
<if test="applyurl!= null and applyurl!=''">
AND a.applyUrl like "%"#{ applyurl , jdbcType=VARCHAR }"%"
</if>
order by a.sqsj desc
limit #{page},#{pageSize}
</select>
</mapper>
......@@ -21,4 +21,5 @@ public interface SkSysLogMapper extends BaseMapper<SkSysLog> {
List<LogMoudleCount> countMoudle( LogCountParam param);
List<LogMoudleCount> countThreeUserId(LogCountParam param);
}
......@@ -40,4 +40,17 @@
and
message is not NULL group by SUBSTRING_INDEX(message,'_',1)
</select>
<select id="countThreeUserId" resultType="com.founder.servicebase.logs.LogMoudleCount" parameterType="com.founder.servicebase.logs.param.LogCountParam">
select COUNT(*) as count,userId as moudle from sk_sys_log
where userId like '%第三方%'
<if test="startTime!=null and startTime!='' ">
and str_to_date(#{startTime},'%Y-%m-%d') <![CDATA[ <= ]]> date_format(createDate,'%Y-%m-%d')
</if>
<if test="endTime!=null and endTime!='' ">
and str_to_date(#{endTime},'%Y-%m-%d') <![CDATA[ >= ]]> date_format(createDate,'%Y-%m-%d')
</if>
and
userId is not NULL group BY userId
</select>
</mapper>
......@@ -15,4 +15,6 @@ public interface SkSysLogService extends IService<SkSysLog> {
List<LogMoudleCount> countMoudle(LogCountParam param) throws ParseException;
List<LogMoudleCount> countThreeUserId(LogCountParam param) throws ParseException;
}
......@@ -45,6 +45,11 @@ public class SkSysLogServiceImpl extends ServiceImpl<SkSysLogMapper, SkSysLog> i
return baseMapper.countMoudle(param);
}
@Override
public List<LogMoudleCount> countThreeUserId(LogCountParam param) throws ParseException {
return baseMapper.countThreeUserId(param);
}
/**
* 计算两个日期得时间差
......
......@@ -41,15 +41,21 @@ public class SkypDesktopController {
@PostMapping("menuAdd")
@ApiOperation(value = "时空桌面菜单新增")
@OperLog(message = "时空桌面菜单新增", operation = OperationType.ADD)
public MapRestResult menuAdd( SkMenu skMenu , MultipartFile photoFile ) throws IOException {
public MapRestResult menuAdd( SkMenu skMenu , MultipartFile[] photoFile ) throws IOException {
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq(!StringUtil.isEmpty(skMenu.getMenu()),"menu", skMenu.getMenu());
wrapper.eq("isDeleted","0");
Integer count = skMenuMapper.selectCount(wrapper);
if (count!=0){
return new MapRestResult(200,"已经存在该菜单名称",null);
}else {
if(photoFile==null){
return new MapRestResult(200,"请上传菜单图片",null);
}
skMenu.setState("1");// 桌面
skMenu.setPhoto("data:image/jpg;base64,"+Base64Util.getBase64(photoFile));
for (MultipartFile file : photoFile) {
skMenu.setPhoto("data:image/jpg;base64,"+Base64Util.getBase64(file));
}
skMenu.setDjsj(nowTime());
skMenu.setGxsj(nowTime());
String xxzjbh = KeyUtilNaotu.getJzKey("me");
......@@ -97,9 +103,9 @@ public class SkypDesktopController {
skMenu.setGxsj(nowTime());
int i = skMenuMapper.updateById(skMenu);
if (i > 0 ){
return new MapRestResult();
return new MapRestResult(200,"修改成功",null);
}else {
return new MapRestResult().error();
return new MapRestResult(200,"不存在该菜单",null);
}
}
/**
......@@ -117,12 +123,12 @@ public class SkypDesktopController {
}
Map<Object, Object> map = new HashMap<>();
// 十个固定的
/* // 十个固定的
QueryWrapper wrapper2 = new QueryWrapper<>();
wrapper2.eq(!StringUtil.isEmpty(zjhm),"zjhm", zjhm);
wrapper2.eq("isDeleted","0");
wrapper2.eq("isFixedMenu","1");
List list2 = skMenuMapper.selectList(wrapper2);
List list2 = skMenuMapper.selectList(wrapper2);*/
// 新增的
QueryWrapper wrapper = new QueryWrapper<>();
......@@ -138,11 +144,11 @@ public class SkypDesktopController {
wrapper3.eq("state","2");
List list3 = skMenuMapper.selectList(wrapper3);*/
List<Object> collect = Stream.of(list2, list)
/* List<Object> collect = Stream.of(list2, list)
.flatMap(Collection::stream)
.distinct()
.collect(Collectors.toList());
map.put("桌面",collect);
.collect(Collectors.toList());*/
map.put("桌面",list);
//查询移入的
QueryWrapper wrapper1 = new QueryWrapper<>();
......@@ -275,6 +281,7 @@ public class SkypDesktopController {
wrapper.eq("state",state);
wrapper.eq("zjhm",zjhm);
wrapper.eq("isDeleted","0");
wrapper.orderByDesc("time");
List list = skScheduleMapper.selectList(wrapper);
return new MapRestResult(200,"ok",list.size(),list);
}
......
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