Merge branch 'feature-20240104' of https://gitee.com/yunqiang_technology/floatomcloud into feature-20240104
commit
644c645a72
@ -0,0 +1,64 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仪器与模式的关联Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
public interface WxInstrumentModeMapper {
|
||||
/**
|
||||
* 查询仪器与模式的关联
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 仪器与模式的关联
|
||||
*/
|
||||
public WxInstrumentMode selectWxInstrumentModeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器与模式的关联列表
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 仪器与模式的关联集合
|
||||
*/
|
||||
public List<WxInstrumentMode> selectWxInstrumentModeList(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 新增仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrumentMode(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 修改仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrumentMode(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 删除仪器与模式的关联
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentModeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除仪器与模式的关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentModeByIds(Long[] ids);
|
||||
|
||||
public int deleteByInstrumentId(Long instrumentId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模式列Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
public interface WxModeMapper
|
||||
{
|
||||
/**
|
||||
* 查询模式列
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 模式列
|
||||
*/
|
||||
public WxMode selectWxModeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模式列列表
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 模式列集合
|
||||
*/
|
||||
public List<WxMode> selectWxModeList(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 新增模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxMode(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 修改模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxMode(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 删除模式列
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除模式列
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
<?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.flossom.common.core.mapper.WxInstrumentModeMapper">
|
||||
|
||||
<resultMap type="WxInstrumentMode" id="WxInstrumentModeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="modeId" column="mode_id" />
|
||||
<result property="modeSort" column="mode_sort" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxInstrumentModeVo">
|
||||
select id, instrument_id, mode_id, mode_sort, status, create_by, create_time from wx_instrument_mode
|
||||
</sql>
|
||||
|
||||
<select id="selectWxInstrumentModeList" parameterType="WxInstrumentMode" resultMap="WxInstrumentModeResult">
|
||||
<include refid="selectWxInstrumentModeVo"/>
|
||||
<where>
|
||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||
<if test="modeId != null "> and mode_id = #{modeId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
order by mode_sort
|
||||
</select>
|
||||
|
||||
<select id="selectWxInstrumentModeById" parameterType="Long" resultMap="WxInstrumentModeResult">
|
||||
<include refid="selectWxInstrumentModeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxInstrumentMode" parameterType="WxInstrumentMode" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_instrument_mode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="modeId != null">mode_id,</if>
|
||||
<if test="modeSort != null">mode_sort,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="modeId != null">#{modeId},</if>
|
||||
<if test="modeSort != null">#{modeSort},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxInstrumentMode" parameterType="WxInstrumentMode">
|
||||
update wx_instrument_mode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="modeId != null">mode_id = #{modeId},</if>
|
||||
<if test="modeSort != null">mode_sort = #{modeSort},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxInstrumentModeById" parameterType="Long">
|
||||
delete from wx_instrument_mode where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxInstrumentModeByIds" parameterType="String">
|
||||
delete from wx_instrument_mode where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByInstrumentId" parameterType="Long">
|
||||
delete from wx_instrument_mode where instrument_id = #{instrumentId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,141 @@
|
||||
<?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.flossom.common.core.mapper.WxModeMapper">
|
||||
|
||||
<resultMap type="WxMode" id="WxModeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="instrumentType" column="instrument_type" />
|
||||
<result property="instrumentModel" column="instrument_model" />
|
||||
<result property="modeName" column="mode_name" />
|
||||
<result property="modeDesc" column="mode_desc" />
|
||||
<result property="modeBanner" column="mode_banner" />
|
||||
<result property="modeVideo" column="mode_video" />
|
||||
<result property="modeType" column="mode_type" />
|
||||
<result property="modeClass" column="mode_class" />
|
||||
<result property="isCabinMode" column="is_cabin_mode" />
|
||||
<result property="modeTime" column="mode_time" />
|
||||
<result property="preparationVideo" column="preparation_video" />
|
||||
<result property="beganVideo" column="began_video" />
|
||||
<result property="pauseVideo" column="pause_video" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxModeVo">
|
||||
select id, instrument_type, instrument_model, mode_name, mode_desc, mode_banner, mode_video, mode_type, mode_class, is_cabin_mode, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark from wx_mode
|
||||
</sql>
|
||||
|
||||
<select id="selectWxModeList" parameterType="WxMode" resultMap="WxModeResult">
|
||||
<include refid="selectWxModeVo"/>
|
||||
<where>
|
||||
<if test="instrumentType != null "> and instrument_type = #{instrumentType}</if>
|
||||
<if test="instrumentModel != null and instrumentModel != ''"> and instrument_model = #{instrumentModel}</if>
|
||||
<if test="modeName != null and modeName != ''"> and mode_name like concat('%', #{modeName}, '%')</if>
|
||||
<if test="modeDesc != null and modeDesc != ''"> and mode_desc = #{modeDesc}</if>
|
||||
<if test="modeBanner != null and modeBanner != ''"> and mode_banner = #{modeBanner}</if>
|
||||
<if test="modeVideo != null and modeVideo != ''"> and mode_video = #{modeVideo}</if>
|
||||
<if test="modeType != null "> and mode_type = #{modeType}</if>
|
||||
<if test="modeClass != null "> and mode_class = #{modeClass}</if>
|
||||
<if test="isCabinMode != null "> and is_cabin_mode = #{isCabinMode}</if>
|
||||
<if test="modeTime != null "> and mode_time = #{modeTime}</if>
|
||||
<if test="preparationVideo != null and preparationVideo != ''"> and preparation_video = #{preparationVideo}</if>
|
||||
<if test="beganVideo != null and beganVideo != ''"> and began_video = #{beganVideo}</if>
|
||||
<if test="pauseVideo != null and pauseVideo != ''"> and pause_video = #{pauseVideo}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxModeById" parameterType="Long" resultMap="WxModeResult">
|
||||
<include refid="selectWxModeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxMode" parameterType="WxMode" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_mode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentType != null">instrument_type,</if>
|
||||
<if test="instrumentModel != null">instrument_model,</if>
|
||||
<if test="modeName != null">mode_name,</if>
|
||||
<if test="modeDesc != null">mode_desc,</if>
|
||||
<if test="modeBanner != null">mode_banner,</if>
|
||||
<if test="modeVideo != null">mode_video,</if>
|
||||
<if test="modeType != null">mode_type,</if>
|
||||
<if test="modeClass != null">mode_class,</if>
|
||||
<if test="isCabinMode != null">is_cabin_mode,</if>
|
||||
<if test="modeTime != null">mode_time,</if>
|
||||
<if test="preparationVideo != null">preparation_video,</if>
|
||||
<if test="beganVideo != null">began_video,</if>
|
||||
<if test="pauseVideo != null">pause_video,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentType != null">#{instrumentType},</if>
|
||||
<if test="instrumentModel != null">#{instrumentModel},</if>
|
||||
<if test="modeName != null">#{modeName},</if>
|
||||
<if test="modeDesc != null">#{modeDesc},</if>
|
||||
<if test="modeBanner != null">#{modeBanner},</if>
|
||||
<if test="modeVideo != null">#{modeVideo},</if>
|
||||
<if test="modeType != null">#{modeType},</if>
|
||||
<if test="modeClass != null">#{modeClass},</if>
|
||||
<if test="isCabinMode != null">#{isCabinMode},</if>
|
||||
<if test="modeTime != null">#{modeTime},</if>
|
||||
<if test="preparationVideo != null">#{preparationVideo},</if>
|
||||
<if test="beganVideo != null">#{beganVideo},</if>
|
||||
<if test="pauseVideo != null">#{pauseVideo},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxMode" parameterType="WxMode">
|
||||
update wx_mode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="instrumentType != null">instrument_type = #{instrumentType},</if>
|
||||
<if test="instrumentModel != null">instrument_model = #{instrumentModel},</if>
|
||||
<if test="modeName != null">mode_name = #{modeName},</if>
|
||||
<if test="modeDesc != null">mode_desc = #{modeDesc},</if>
|
||||
<if test="modeBanner != null">mode_banner = #{modeBanner},</if>
|
||||
<if test="modeVideo != null">mode_video = #{modeVideo},</if>
|
||||
<if test="modeType != null">mode_type = #{modeType},</if>
|
||||
<if test="modeClass != null">mode_class = #{modeClass},</if>
|
||||
<if test="isCabinMode != null">is_cabin_mode = #{isCabinMode},</if>
|
||||
<if test="modeTime != null">mode_time = #{modeTime},</if>
|
||||
<if test="preparationVideo != null">preparation_video = #{preparationVideo},</if>
|
||||
<if test="beganVideo != null">began_video = #{beganVideo},</if>
|
||||
<if test="pauseVideo != null">pause_video = #{pauseVideo},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxModeById" parameterType="Long">
|
||||
delete from wx_mode where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxModeByIds" parameterType="String">
|
||||
delete from wx_mode where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,117 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.flossom.common.core.domain.R;
|
||||
import com.flossom.common.core.domain.entity.WxMode;
|
||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
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.flossom.system.service.IWxModeService;
|
||||
|
||||
/**
|
||||
* 模式列Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mode")
|
||||
public class WxModeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWxModeService wxModeService;
|
||||
|
||||
/**
|
||||
* 查询模式列列表
|
||||
*/
|
||||
@RequiresPermissions("system:mode:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxMode wxMode)
|
||||
{
|
||||
startPage();
|
||||
List<WxMode> list = wxModeService.selectWxModeList(wxMode);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询模式列列表
|
||||
*/
|
||||
@RequiresPermissions("system:mode:list")
|
||||
@GetMapping("/listAll")
|
||||
public R listAll(WxMode wxMode)
|
||||
{
|
||||
return R.ok(wxModeService.selectWxModeList(wxMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出模式列列表
|
||||
*/
|
||||
@RequiresPermissions("system:mode:export")
|
||||
@Log(title = "模式列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WxMode wxMode)
|
||||
{
|
||||
List<WxMode> list = wxModeService.selectWxModeList(wxMode);
|
||||
ExcelUtil<WxMode> util = new ExcelUtil<WxMode>(WxMode.class);
|
||||
util.exportExcel(response, list, "模式列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模式列详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:mode:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(wxModeService.selectWxModeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增模式列
|
||||
*/
|
||||
@RequiresPermissions("system:mode:add")
|
||||
@Log(title = "模式列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxMode wxMode)
|
||||
{
|
||||
return toAjax(wxModeService.insertWxMode(wxMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模式列
|
||||
*/
|
||||
@RequiresPermissions("system:mode:edit")
|
||||
@Log(title = "模式列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxMode wxMode)
|
||||
{
|
||||
return toAjax(wxModeService.updateWxMode(wxMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模式列
|
||||
*/
|
||||
@RequiresPermissions("system:mode:remove")
|
||||
@Log(title = "模式列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(wxModeService.deleteWxModeByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 仪器与模式的关联Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
public interface IWxInstrumentModeService {
|
||||
/**
|
||||
* 查询仪器与模式的关联
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 仪器与模式的关联
|
||||
*/
|
||||
public WxInstrumentMode selectWxInstrumentModeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器与模式的关联列表
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 仪器与模式的关联集合
|
||||
*/
|
||||
public List<WxInstrumentMode> selectWxInstrumentModeList(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 新增仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrumentMode(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 修改仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrumentMode(WxInstrumentMode wxInstrumentMode);
|
||||
|
||||
/**
|
||||
* 批量删除仪器与模式的关联
|
||||
*
|
||||
* @param ids 需要删除的仪器与模式的关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentModeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除仪器与模式的关联信息
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentModeById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模式列Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
public interface IWxModeService
|
||||
{
|
||||
/**
|
||||
* 查询模式列
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 模式列
|
||||
*/
|
||||
public WxMode selectWxModeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模式列列表
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 模式列集合
|
||||
*/
|
||||
public List<WxMode> selectWxModeList(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 新增模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxMode(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 修改模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxMode(WxMode wxMode);
|
||||
|
||||
/**
|
||||
* 批量删除模式列
|
||||
*
|
||||
* @param ids 需要删除的模式列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除模式列信息
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeById(Long id);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentMode;
|
||||
import com.flossom.common.core.mapper.WxInstrumentModeMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxInstrumentModeService;
|
||||
|
||||
/**
|
||||
* 仪器与模式的关联Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
@Service
|
||||
public class WxInstrumentModeServiceImpl implements IWxInstrumentModeService {
|
||||
|
||||
@Autowired
|
||||
private WxInstrumentModeMapper wxInstrumentModeMapper;
|
||||
|
||||
/**
|
||||
* 查询仪器与模式的关联
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 仪器与模式的关联
|
||||
*/
|
||||
@Override
|
||||
public WxInstrumentMode selectWxInstrumentModeById(Long id) {
|
||||
return wxInstrumentModeMapper.selectWxInstrumentModeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仪器与模式的关联列表
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 仪器与模式的关联
|
||||
*/
|
||||
@Override
|
||||
public List<WxInstrumentMode> selectWxInstrumentModeList(WxInstrumentMode wxInstrumentMode) {
|
||||
return wxInstrumentModeMapper.selectWxInstrumentModeList(wxInstrumentMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxInstrumentMode(WxInstrumentMode wxInstrumentMode) {
|
||||
wxInstrumentMode.setCreateTime(DateUtils.getNowDate());
|
||||
return wxInstrumentModeMapper.insertWxInstrumentMode(wxInstrumentMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仪器与模式的关联
|
||||
*
|
||||
* @param wxInstrumentMode 仪器与模式的关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxInstrumentMode(WxInstrumentMode wxInstrumentMode) {
|
||||
return wxInstrumentModeMapper.updateWxInstrumentMode(wxInstrumentMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仪器与模式的关联
|
||||
*
|
||||
* @param ids 需要删除的仪器与模式的关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentModeByIds(Long[] ids) {
|
||||
return wxInstrumentModeMapper.deleteWxInstrumentModeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仪器与模式的关联信息
|
||||
*
|
||||
* @param id 仪器与模式的关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentModeById(Long id) {
|
||||
return wxInstrumentModeMapper.deleteWxInstrumentModeById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxMode;
|
||||
import com.flossom.common.core.mapper.WxModeMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxModeService;
|
||||
|
||||
/**
|
||||
* 模式列Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-17
|
||||
*/
|
||||
@Service
|
||||
public class WxModeServiceImpl implements IWxModeService
|
||||
{
|
||||
@Autowired
|
||||
private WxModeMapper wxModeMapper;
|
||||
|
||||
/**
|
||||
* 查询模式列
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 模式列
|
||||
*/
|
||||
@Override
|
||||
public WxMode selectWxModeById(Long id)
|
||||
{
|
||||
return wxModeMapper.selectWxModeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询模式列列表
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 模式列
|
||||
*/
|
||||
@Override
|
||||
public List<WxMode> selectWxModeList(WxMode wxMode)
|
||||
{
|
||||
return wxModeMapper.selectWxModeList(wxMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxMode(WxMode wxMode)
|
||||
{
|
||||
wxMode.setCreateTime(DateUtils.getNowDate());
|
||||
return wxModeMapper.insertWxMode(wxMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模式列
|
||||
*
|
||||
* @param wxMode 模式列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxMode(WxMode wxMode)
|
||||
{
|
||||
wxMode.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxModeMapper.updateWxMode(wxMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除模式列
|
||||
*
|
||||
* @param ids 需要删除的模式列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxModeByIds(Long[] ids)
|
||||
{
|
||||
return wxModeMapper.deleteWxModeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模式列信息
|
||||
*
|
||||
* @param id 模式列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxModeById(Long id)
|
||||
{
|
||||
return wxModeMapper.deleteWxModeById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询模式列列表
|
||||
export function listMode(query) {
|
||||
return request({
|
||||
url: '/system/mode/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询模式列详细
|
||||
export function getMode(id) {
|
||||
return request({
|
||||
url: '/system/mode/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增模式列
|
||||
export function addMode(data) {
|
||||
return request({
|
||||
url: '/system/mode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改模式列
|
||||
export function updateMode(data) {
|
||||
return request({
|
||||
url: '/system/mode',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除模式列
|
||||
export function delMode(id) {
|
||||
return request({
|
||||
url: '/system/mode/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue