chentaisen 2024-09-22 09:40:53 +08:00 committed by 张毅大神
parent 8fe5fc4329
commit 42473f3425
26 changed files with 89 additions and 97 deletions

View File

@ -1,9 +1,8 @@
package com.muyu.platform.domain;
package com.muyu.warning.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

View File

@ -1,7 +1,6 @@
package com.muyu.platform.domain;
package com.muyu.warning.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

View File

@ -1,7 +1,6 @@
package com.muyu.platform.domain;
package com.muyu.warning.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

View File

@ -1,4 +1,4 @@
package com.muyu.platform.domain.wx;
package com.muyu.warning.wx;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.muyu.platform;
package com.muyu.warning;
import com.muyu.common.security.annotation.EnableCustomConfig;
import com.muyu.common.security.annotation.EnableMyFeignClients;

View File

@ -1,4 +1,4 @@
package com.muyu.platform.controller;
package com.muyu.warning.controller;
import java.util.Arrays;
import java.util.List;
@ -13,12 +13,11 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.platform.domain.WarnLogs;
import com.muyu.platform.service.IWarnLogsService;
import com.muyu.warning.domain.WarnLogs;
import com.muyu.warning.service.IWarnLogsService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.validation.annotation.Validated;
import com.muyu.common.core.web.page.TableDataInfo;
@ -38,7 +37,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:list")
@RequiresPermissions("warning:logs:list")
@GetMapping("/list")
public Result<TableDataInfo<WarnLogs>> list(WarnLogs warnLogs)
{
@ -50,7 +49,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:export")
@RequiresPermissions("warning:logs:export")
@PostMapping("/export")
public void export(HttpServletResponse response, WarnLogs warnLogs)
{
@ -62,7 +61,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:query")
@RequiresPermissions("warning:logs:query")
@GetMapping(value = "/{id}")
public Result<List<WarnLogs>> getInfo(@PathVariable("id") Long id)
{
@ -72,7 +71,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:add")
@RequiresPermissions("warning:logs:add")
@PostMapping
public Result<Integer> add(
@Validated @RequestBody WarnLogs warnLogs)
@ -86,7 +85,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:edit")
@RequiresPermissions("warning:logs:edit")
@PutMapping
public Result<Integer> edit(
@Validated @RequestBody WarnLogs warnLogs)
@ -100,7 +99,7 @@ public class WarnLogsController extends BaseController
/**
*
*/
@RequiresPermissions("platform:logs:remove")
@RequiresPermissions("warning:logs:remove")
@DeleteMapping("/{ids}")
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
{

View File

@ -1,4 +1,4 @@
package com.muyu.platform.controller;
package com.muyu.warning.controller;
import java.util.Arrays;
import java.util.List;
@ -13,12 +13,11 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.platform.domain.WarnRule;
import com.muyu.platform.service.IWarnRuleService;
import com.muyu.warning.domain.WarnRule;
import com.muyu.warning.service.IWarnRuleService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.validation.annotation.Validated;
import com.muyu.common.core.web.page.TableDataInfo;
@ -38,7 +37,7 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:list")
@RequiresPermissions("warning:list")
@GetMapping("/list")
public Result<TableDataInfo<WarnRule>> list(WarnRule warnRule)
{
@ -50,7 +49,7 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:export")
@RequiresPermissions("warning:export")
@PostMapping("/export")
public void export(HttpServletResponse response, WarnRule warnRule)
{
@ -62,7 +61,7 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:query")
@RequiresPermissions("warning:query")
@GetMapping(value = "/{id}")
public Result<List<WarnRule>> getInfo(@PathVariable("id") Long id)
{
@ -72,7 +71,7 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:add")
@RequiresPermissions("warning:add")
@PostMapping
public Result<Integer> add(
@Validated @RequestBody WarnRule warnRule)
@ -86,7 +85,7 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:edit")
@RequiresPermissions("warning:edit")
@PutMapping
public Result<Integer> edit(
@Validated @RequestBody WarnRule warnRule)
@ -100,11 +99,12 @@ public class WarnRuleController extends BaseController
/**
*
*/
@RequiresPermissions("platform:rule:remove")
@RequiresPermissions("warning:remove")
@DeleteMapping("/{ids}")
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
{
warnRuleService.removeBatchByIds(Arrays.asList(ids));
return success();
}
}

View File

@ -1,4 +1,4 @@
package com.muyu.platform.controller;
package com.muyu.warning.controller;
import java.util.Arrays;
import java.util.List;
@ -13,12 +13,11 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.platform.domain.WarnStrategy;
import com.muyu.platform.service.IWarnStrategyService;
import com.muyu.warning.domain.WarnStrategy;
import com.muyu.warning.service.IWarnStrategyService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.validation.annotation.Validated;
import com.muyu.common.core.web.page.TableDataInfo;
@ -38,7 +37,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:list")
@RequiresPermissions("warning:strategy:list")
@GetMapping("/list")
public Result<TableDataInfo<WarnStrategy>> list(WarnStrategy warnStrategy)
{
@ -50,7 +49,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:export")
@RequiresPermissions("warning:strategy:export")
@PostMapping("/export")
public void export(HttpServletResponse response, WarnStrategy warnStrategy)
{
@ -62,7 +61,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:query")
@RequiresPermissions("warning:strategy:query")
@GetMapping(value = "/{id}")
public Result<List<WarnStrategy>> getInfo(@PathVariable("id") Long id)
{
@ -72,7 +71,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:add")
@RequiresPermissions("warning:strategy:add")
@PostMapping
public Result<Integer> add(
@Validated @RequestBody WarnStrategy warnStrategy)
@ -86,7 +85,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:edit")
@RequiresPermissions("warning:strategy:edit")
@PutMapping
public Result<Integer> edit(
@Validated @RequestBody WarnStrategy warnStrategy)
@ -100,7 +99,7 @@ public class WarnStrategyController extends BaseController
/**
*
*/
@RequiresPermissions("platform:strategy:remove")
@RequiresPermissions("warning:strategy:remove")
@DeleteMapping("/{ids}")
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
{

View File

@ -1,10 +1,10 @@
package com.muyu.platform.controller;
package com.muyu.warning.controller;
import com.muyu.platform.domain.wx.Message;
import com.muyu.platform.message.Article;
import com.muyu.platform.message.NewMessage;
import com.muyu.platform.util.TokenUtil;
import com.muyu.warning.wx.Message;
import com.muyu.warning.message.Article;
import com.muyu.warning.message.NewMessage;
import com.muyu.warning.util.TokenUtil;
import com.thoughtworks.xstream.XStream;
import io.micrometer.common.util.StringUtils;
import jakarta.servlet.ServletInputStream;

View File

@ -1,7 +1,6 @@
package com.muyu.platform.mapper;
package com.muyu.warning.mapper;
import java.util.List;
import com.muyu.platform.domain.WarnLogs;
import com.muyu.warning.domain.WarnLogs;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,7 +1,6 @@
package com.muyu.platform.mapper;
package com.muyu.warning.mapper;
import java.util.List;
import com.muyu.platform.domain.WarnRule;
import com.muyu.warning.domain.WarnRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,7 +1,6 @@
package com.muyu.platform.mapper;
package com.muyu.warning.mapper;
import java.util.List;
import com.muyu.platform.domain.WarnStrategy;
import com.muyu.warning.domain.WarnStrategy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,4 +1,4 @@
package com.muyu.platform.message;
package com.muyu.warning.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.platform.message;
package com.muyu.warning.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.AllArgsConstructor;

View File

@ -1,7 +1,7 @@
package com.muyu.platform.service;
package com.muyu.warning.service;
import java.util.List;
import com.muyu.platform.domain.WarnLogs;
import com.muyu.warning.domain.WarnLogs;
import com.baomidou.mybatisplus.extension.service.IService;
/**

View File

@ -1,7 +1,7 @@
package com.muyu.platform.service;
package com.muyu.warning.service;
import java.util.List;
import com.muyu.platform.domain.WarnRule;
import com.muyu.warning.domain.WarnRule;
import com.baomidou.mybatisplus.extension.service.IService;
/**

View File

@ -1,7 +1,7 @@
package com.muyu.platform.service;
package com.muyu.warning.service;
import java.util.List;
import com.muyu.platform.domain.WarnStrategy;
import com.muyu.warning.domain.WarnStrategy;
import com.baomidou.mybatisplus.extension.service.IService;
/**

View File

@ -1,10 +1,10 @@
package com.muyu.platform.service.impl;
package com.muyu.warning.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import com.muyu.platform.mapper.WarnLogsMapper;
import com.muyu.platform.domain.WarnLogs;
import com.muyu.platform.service.IWarnLogsService;
import com.muyu.warning.mapper.WarnLogsMapper;
import com.muyu.warning.domain.WarnLogs;
import com.muyu.warning.service.IWarnLogsService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.utils.StringUtils;

View File

@ -1,11 +1,11 @@
package com.muyu.platform.service.impl;
package com.muyu.warning.service.impl;
import java.util.List;
import com.muyu.platform.mapper.WarnRuleMapper;
import com.muyu.warning.mapper.WarnRuleMapper;
import org.springframework.stereotype.Service;
import com.muyu.platform.domain.WarnRule;
import com.muyu.platform.service.IWarnRuleService;
import com.muyu.warning.domain.WarnRule;
import com.muyu.warning.service.IWarnRuleService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.utils.StringUtils;

View File

@ -1,10 +1,10 @@
package com.muyu.platform.service.impl;
package com.muyu.warning.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import com.muyu.platform.mapper.WarnStrategyMapper;
import com.muyu.platform.domain.WarnStrategy;
import com.muyu.platform.service.IWarnStrategyService;
import com.muyu.warning.mapper.WarnStrategyMapper;
import com.muyu.warning.domain.WarnStrategy;
import com.muyu.warning.service.IWarnStrategyService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.utils.StringUtils;

View File

@ -1,7 +1,7 @@
package com.muyu.platform.util;
package com.muyu.warning.util;
import com.alibaba.fastjson2.JSON;
import com.muyu.platform.domain.wx.AccessToken;
import com.muyu.warning.wx.AccessToken;
import org.springframework.stereotype.Component;
/**

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.platform.mapper.WarnLogsMapper">
<mapper namespace="com.muyu.warning.mapper.WarnLogsMapper">
<resultMap type="WarnLogs" id="WarnLogsResult">
<result property="id" column="id" />
<result property="vin" column="vin" />
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWarnLogsList" parameterType="WarnLogs" resultMap="WarnLogsResult">
<include refid="selectWarnLogsVo"/>
<where>
<where>
<if test="vin != null and vin != ''"> and vin = #{vin}</if>
<if test="warnRuleId != null "> and warn_rule_id = #{warnRuleId}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
@ -35,12 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectWarnLogsById" parameterType="Long" resultMap="WarnLogsResult">
<include refid="selectWarnLogsVo"/>
where id = #{id}
</select>
<insert id="insertWarnLogs" parameterType="WarnLogs" useGeneratedKeys="true" keyProperty="id">
insert into warn_logs
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -88,9 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWarnLogsByIds" parameterType="String">
delete from warn_logs where id in
delete from warn_logs where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.platform.mapper.WarnRuleMapper">
<mapper namespace="com.muyu.warning.mapper.WarnRuleMapper">
<resultMap type="WarnRule" id="WarnRuleResult">
<result property="id" column="id" />
<result property="ruleName" column="rule_name" />
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWarnRuleList" parameterType="WarnRule" resultMap="WarnRuleResult">
<include refid="selectWarnRuleVo"/>
<where>
<where>
<if test="ruleName != null and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if>
<if test="strategyId != null "> and strategy_id = #{strategyId}</if>
<if test="msgTypeId != null "> and msg_type_id = #{msgTypeId}</if>
@ -31,12 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="minValue != null "> and min_value = #{minValue}</if>
</where>
</select>
<select id="selectWarnRuleById" parameterType="Long" resultMap="WarnRuleResult">
<include refid="selectWarnRuleVo"/>
where id = #{id}
</select>
<insert id="insertWarnRule" parameterType="WarnRule" useGeneratedKeys="true" keyProperty="id">
insert into warn_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -78,9 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWarnRuleByIds" parameterType="String">
delete from warn_rule where id in
delete from warn_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.platform.mapper.WarnStrategyMapper">
<mapper namespace="com.muyu.warning.mapper.WarnStrategyMapper">
<resultMap type="WarnStrategy" id="WarnStrategyResult">
<result property="id" column="id" />
<result property="carTypeId" column="car_type_id" />
@ -17,18 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWarnStrategyList" parameterType="WarnStrategy" resultMap="WarnStrategyResult">
<include refid="selectWarnStrategyVo"/>
<where>
<where>
<if test="carTypeId != null "> and car_type_id = #{carTypeId}</if>
<if test="strategyName != null and strategyName != ''"> and strategy_name like concat('%', #{strategyName}, '%')</if>
<if test="msgId != null "> and msg_id = #{msgId}</if>
</where>
</select>
<select id="selectWarnStrategyById" parameterType="Long" resultMap="WarnStrategyResult">
<include refid="selectWarnStrategyVo"/>
where id = #{id}
</select>
<insert id="insertWarnStrategy" parameterType="WarnStrategy" useGeneratedKeys="true" keyProperty="id">
insert into warn_strategy
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -58,9 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWarnStrategyByIds" parameterType="String">
delete from warn_strategy where id in
delete from warn_strategy where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>