初始版本
parent
cb5ee9c8a1
commit
d18b4e53f9
|
|
@ -42,3 +42,4 @@ nbdist/
|
|||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
/logs/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
package com.ruoyi.web.controller.segchk;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.segchk.domain.SegchkCarouseMgt;
|
||||
import com.ruoyi.segchk.service.ISegchkCarouseMgtService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* seg首页轮播图管理Controller
|
||||
*
|
||||
* @author yinzhiying
|
||||
* @date 2021-08-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/segchk_carouse_mgt")
|
||||
public class SegchkCarouseMgtController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISegchkCarouseMgtService segchkCarouseMgtService;
|
||||
|
||||
/**
|
||||
* 查询seg首页轮播图管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
startPage();
|
||||
List<SegchkCarouseMgt> list = segchkCarouseMgtService.selectSegchkCarouseMgtList(segchkCarouseMgt);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出seg首页轮播图管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:export')")
|
||||
@Log(title = "seg首页轮播图管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
List<SegchkCarouseMgt> list = segchkCarouseMgtService.selectSegchkCarouseMgtList(segchkCarouseMgt);
|
||||
ExcelUtil<SegchkCarouseMgt> util = new ExcelUtil<SegchkCarouseMgt>(SegchkCarouseMgt.class);
|
||||
return util.exportExcel(list, "seg首页轮播图管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取seg首页轮播图管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:query')")
|
||||
@GetMapping(value = "/{carouseId}")
|
||||
public AjaxResult getInfo(@PathVariable("carouseId") Long carouseId)
|
||||
{
|
||||
return AjaxResult.success(segchkCarouseMgtService.selectSegchkCarouseMgtByCarouseId(carouseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增seg首页轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:add')")
|
||||
@Log(title = "seg首页轮播图管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
return toAjax(segchkCarouseMgtService.insertSegchkCarouseMgt(segchkCarouseMgt));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改seg首页轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:edit')")
|
||||
@Log(title = "seg首页轮播图管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
return toAjax(segchkCarouseMgtService.updateSegchkCarouseMgt(segchkCarouseMgt));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除seg首页轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:segchk_carouse_mgt:remove')")
|
||||
@Log(title = "seg首页轮播图管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{carouseIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] carouseIds)
|
||||
{
|
||||
return toAjax(segchkCarouseMgtService.deleteSegchkCarouseMgtByCarouseIds(carouseIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -6,9 +6,9 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
url: jdbc:mysql://10.1.192.113:13306/yzy_ruoyi_vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: yzyuser
|
||||
password: yzy123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ ruoyi:
|
|||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
port: 7070
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
|
@ -59,13 +59,13 @@ spring:
|
|||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
host: 10.1.192.113
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
port: 63795
|
||||
# 数据库索引
|
||||
database: 0
|
||||
database: 2
|
||||
# 密码
|
||||
password:
|
||||
password: retinabd@2020
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<property name="log.path" value="F:\ideaproj\RuoYi-Vue\logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,124 @@
|
|||
package com.ruoyi.segchk.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* seg首页轮播图管理对象 segchk_carouse_mgt
|
||||
*
|
||||
* @author yinzhiying
|
||||
* @date 2021-08-22
|
||||
*/
|
||||
public class SegchkCarouseMgt extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 轮播图id */
|
||||
private Long carouseId;
|
||||
|
||||
/** 运营商id,全局唯一 */
|
||||
@Excel(name = "运营商id,全局唯一")
|
||||
private Long providerId;
|
||||
|
||||
/** 商家id,全局唯一 */
|
||||
@Excel(name = "商家id,全局唯一")
|
||||
private Long storeId;
|
||||
|
||||
/** 商家轮播图1路径,默认用于首页推荐轮播图 */
|
||||
@Excel(name = "商家轮播图1路径,默认用于首页推荐轮播图")
|
||||
private String storeCarousel;
|
||||
|
||||
/** 管理状态,0有效,-1失效 */
|
||||
@Excel(name = "管理状态,0有效,-1失效")
|
||||
private Integer mgtState;
|
||||
|
||||
/** 排序id */
|
||||
@Excel(name = "排序id")
|
||||
private Integer sortId;
|
||||
|
||||
/** 修改时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date modTime;
|
||||
|
||||
public void setCarouseId(Long carouseId)
|
||||
{
|
||||
this.carouseId = carouseId;
|
||||
}
|
||||
|
||||
public Long getCarouseId()
|
||||
{
|
||||
return carouseId;
|
||||
}
|
||||
public void setProviderId(Long providerId)
|
||||
{
|
||||
this.providerId = providerId;
|
||||
}
|
||||
|
||||
public Long getProviderId()
|
||||
{
|
||||
return providerId;
|
||||
}
|
||||
public void setStoreId(Long storeId)
|
||||
{
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public Long getStoreId()
|
||||
{
|
||||
return storeId;
|
||||
}
|
||||
public void setStoreCarousel(String storeCarousel)
|
||||
{
|
||||
this.storeCarousel = storeCarousel;
|
||||
}
|
||||
|
||||
public String getStoreCarousel()
|
||||
{
|
||||
return storeCarousel;
|
||||
}
|
||||
public void setMgtState(Integer mgtState)
|
||||
{
|
||||
this.mgtState = mgtState;
|
||||
}
|
||||
|
||||
public Integer getMgtState()
|
||||
{
|
||||
return mgtState;
|
||||
}
|
||||
public void setSortId(Integer sortId)
|
||||
{
|
||||
this.sortId = sortId;
|
||||
}
|
||||
|
||||
public Integer getSortId()
|
||||
{
|
||||
return sortId;
|
||||
}
|
||||
public void setModTime(Date modTime)
|
||||
{
|
||||
this.modTime = modTime;
|
||||
}
|
||||
|
||||
public Date getModTime()
|
||||
{
|
||||
return modTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("carouseId", getCarouseId())
|
||||
.append("providerId", getProviderId())
|
||||
.append("storeId", getStoreId())
|
||||
.append("storeCarousel", getStoreCarousel())
|
||||
.append("mgtState", getMgtState())
|
||||
.append("sortId", getSortId())
|
||||
.append("modTime", getModTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.segchk.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.segchk.domain.SegchkCarouseMgt;
|
||||
|
||||
/**
|
||||
* seg首页轮播图管理Mapper接口
|
||||
*
|
||||
* @author yinzhiying
|
||||
* @date 2021-08-22
|
||||
*/
|
||||
public interface SegchkCarouseMgtMapper
|
||||
{
|
||||
/**
|
||||
* 查询seg首页轮播图管理
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return seg首页轮播图管理
|
||||
*/
|
||||
public SegchkCarouseMgt selectSegchkCarouseMgtByCarouseId(Long carouseId);
|
||||
|
||||
/**
|
||||
* 查询seg首页轮播图管理列表
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return seg首页轮播图管理集合
|
||||
*/
|
||||
public List<SegchkCarouseMgt> selectSegchkCarouseMgtList(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 新增seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 修改seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 删除seg首页轮播图管理
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSegchkCarouseMgtByCarouseId(Long carouseId);
|
||||
|
||||
/**
|
||||
* 批量删除seg首页轮播图管理
|
||||
*
|
||||
* @param carouseIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSegchkCarouseMgtByCarouseIds(Long[] carouseIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.segchk.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.segchk.domain.SegchkCarouseMgt;
|
||||
|
||||
/**
|
||||
* seg首页轮播图管理Service接口
|
||||
*
|
||||
* @author yinzhiying
|
||||
* @date 2021-08-22
|
||||
*/
|
||||
public interface ISegchkCarouseMgtService
|
||||
{
|
||||
/**
|
||||
* 查询seg首页轮播图管理
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return seg首页轮播图管理
|
||||
*/
|
||||
public SegchkCarouseMgt selectSegchkCarouseMgtByCarouseId(Long carouseId);
|
||||
|
||||
/**
|
||||
* 查询seg首页轮播图管理列表
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return seg首页轮播图管理集合
|
||||
*/
|
||||
public List<SegchkCarouseMgt> selectSegchkCarouseMgtList(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 新增seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 修改seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt);
|
||||
|
||||
/**
|
||||
* 批量删除seg首页轮播图管理
|
||||
*
|
||||
* @param carouseIds 需要删除的seg首页轮播图管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSegchkCarouseMgtByCarouseIds(Long[] carouseIds);
|
||||
|
||||
/**
|
||||
* 删除seg首页轮播图管理信息
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSegchkCarouseMgtByCarouseId(Long carouseId);
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.segchk.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.segchk.mapper.SegchkCarouseMgtMapper;
|
||||
import com.ruoyi.segchk.domain.SegchkCarouseMgt;
|
||||
import com.ruoyi.segchk.service.ISegchkCarouseMgtService;
|
||||
|
||||
/**
|
||||
* seg首页轮播图管理Service业务层处理
|
||||
*
|
||||
* @author yinzhiying
|
||||
* @date 2021-08-22
|
||||
*/
|
||||
@Service
|
||||
public class SegchkCarouseMgtServiceImpl implements ISegchkCarouseMgtService
|
||||
{
|
||||
@Autowired
|
||||
private SegchkCarouseMgtMapper segchkCarouseMgtMapper;
|
||||
|
||||
/**
|
||||
* 查询seg首页轮播图管理
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return seg首页轮播图管理
|
||||
*/
|
||||
@Override
|
||||
public SegchkCarouseMgt selectSegchkCarouseMgtByCarouseId(Long carouseId)
|
||||
{
|
||||
return segchkCarouseMgtMapper.selectSegchkCarouseMgtByCarouseId(carouseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询seg首页轮播图管理列表
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return seg首页轮播图管理
|
||||
*/
|
||||
@Override
|
||||
public List<SegchkCarouseMgt> selectSegchkCarouseMgtList(SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
return segchkCarouseMgtMapper.selectSegchkCarouseMgtList(segchkCarouseMgt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
return segchkCarouseMgtMapper.insertSegchkCarouseMgt(segchkCarouseMgt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改seg首页轮播图管理
|
||||
*
|
||||
* @param segchkCarouseMgt seg首页轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSegchkCarouseMgt(SegchkCarouseMgt segchkCarouseMgt)
|
||||
{
|
||||
return segchkCarouseMgtMapper.updateSegchkCarouseMgt(segchkCarouseMgt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除seg首页轮播图管理
|
||||
*
|
||||
* @param carouseIds 需要删除的seg首页轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSegchkCarouseMgtByCarouseIds(Long[] carouseIds)
|
||||
{
|
||||
return segchkCarouseMgtMapper.deleteSegchkCarouseMgtByCarouseIds(carouseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除seg首页轮播图管理信息
|
||||
*
|
||||
* @param carouseId seg首页轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSegchkCarouseMgtByCarouseId(Long carouseId)
|
||||
{
|
||||
return segchkCarouseMgtMapper.deleteSegchkCarouseMgtByCarouseId(carouseId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?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.ruoyi.segchk.mapper.SegchkCarouseMgtMapper">
|
||||
|
||||
<resultMap type="SegchkCarouseMgt" id="SegchkCarouseMgtResult">
|
||||
<result property="carouseId" column="carouse_id" />
|
||||
<result property="providerId" column="provider_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="storeCarousel" column="store_carousel" />
|
||||
<result property="mgtState" column="mgt_state" />
|
||||
<result property="sortId" column="sort_id" />
|
||||
<result property="modTime" column="mod_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSegchkCarouseMgtVo">
|
||||
select carouse_id, provider_id, store_id, store_carousel, mgt_state, sort_id, mod_time from segchk_carouse_mgt
|
||||
</sql>
|
||||
|
||||
<select id="selectSegchkCarouseMgtList" parameterType="SegchkCarouseMgt" resultMap="SegchkCarouseMgtResult">
|
||||
<include refid="selectSegchkCarouseMgtVo"/>
|
||||
<where>
|
||||
<if test="providerId != null "> and provider_id = #{providerId}</if>
|
||||
<if test="storeId != null "> and store_id = #{storeId}</if>
|
||||
<if test="storeCarousel != null and storeCarousel != ''"> and store_carousel = #{storeCarousel}</if>
|
||||
<if test="mgtState != null "> and mgt_state = #{mgtState}</if>
|
||||
<if test="sortId != null "> and sort_id = #{sortId}</if>
|
||||
<if test="modTime != null "> and mod_time = #{modTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSegchkCarouseMgtByCarouseId" parameterType="Long" resultMap="SegchkCarouseMgtResult">
|
||||
<include refid="selectSegchkCarouseMgtVo"/>
|
||||
where carouse_id = #{carouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSegchkCarouseMgt" parameterType="SegchkCarouseMgt" useGeneratedKeys="true" keyProperty="carouseId">
|
||||
insert into segchk_carouse_mgt
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="providerId != null">provider_id,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="storeCarousel != null">store_carousel,</if>
|
||||
<if test="mgtState != null">mgt_state,</if>
|
||||
<if test="sortId != null">sort_id,</if>
|
||||
<if test="modTime != null">mod_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="providerId != null">#{providerId},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="storeCarousel != null">#{storeCarousel},</if>
|
||||
<if test="mgtState != null">#{mgtState},</if>
|
||||
<if test="sortId != null">#{sortId},</if>
|
||||
<if test="modTime != null">#{modTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSegchkCarouseMgt" parameterType="SegchkCarouseMgt">
|
||||
update segchk_carouse_mgt
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="providerId != null">provider_id = #{providerId},</if>
|
||||
<if test="storeId != null">store_id = #{storeId},</if>
|
||||
<if test="storeCarousel != null">store_carousel = #{storeCarousel},</if>
|
||||
<if test="mgtState != null">mgt_state = #{mgtState},</if>
|
||||
<if test="sortId != null">sort_id = #{sortId},</if>
|
||||
<if test="modTime != null">mod_time = #{modTime},</if>
|
||||
</trim>
|
||||
where carouse_id = #{carouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSegchkCarouseMgtByCarouseId" parameterType="Long">
|
||||
delete from segchk_carouse_mgt where carouse_id = #{carouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSegchkCarouseMgtByCarouseIds" parameterType="String">
|
||||
delete from segchk_carouse_mgt where carouse_id in
|
||||
<foreach item="carouseId" collection="array" open="(" separator="," close=")">
|
||||
#{carouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,351 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="运营商id,全局唯一" prop="providerId">
|
||||
<el-input
|
||||
v-model="queryParams.providerId"
|
||||
placeholder="请输入运营商id,全局唯一"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家id,全局唯一" prop="storeId">
|
||||
<el-input
|
||||
v-model="queryParams.storeId"
|
||||
placeholder="请输入商家id,全局唯一"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理状态,0有效,-1失效" prop="mgtState">
|
||||
<el-input
|
||||
v-model="queryParams.mgtState"
|
||||
placeholder="请输入管理状态,0有效,-1失效"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序id" prop="sortId">
|
||||
<el-input
|
||||
v-model="queryParams.sortId"
|
||||
placeholder="请输入排序id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改时间" prop="modTime">
|
||||
<el-date-picker clearable size="small"
|
||||
v-model="queryParams.modTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择修改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:loading="exportLoading"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="segchk_carouse_mgtList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="轮播图id" align="center" prop="carouseId" />
|
||||
<el-table-column label="运营商id,全局唯一" align="center" prop="providerId" />
|
||||
<el-table-column label="商家id,全局唯一" align="center" prop="storeId" />
|
||||
<el-table-column label="商家轮播图1路径,默认用于首页推荐轮播图" align="center" prop="storeCarousel" />
|
||||
<el-table-column label="管理状态,0有效,-1失效" align="center" prop="mgtState" />
|
||||
<el-table-column label="排序id" align="center" prop="sortId" />
|
||||
<el-table-column label="修改时间" align="center" prop="modTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.modTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:segchk_carouse_mgt:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改seg首页轮播图管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="运营商id,全局唯一" prop="providerId">
|
||||
<el-input v-model="form.providerId" placeholder="请输入运营商id,全局唯一" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商家id,全局唯一" prop="storeId">
|
||||
<el-input v-model="form.storeId" placeholder="请输入商家id,全局唯一" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商家轮播图1路径,默认用于首页推荐轮播图">
|
||||
<imageUpload v-model="form.storeCarousel"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理状态,0有效,-1失效" prop="mgtState">
|
||||
<el-input v-model="form.mgtState" placeholder="请输入管理状态,0有效,-1失效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序id" prop="sortId">
|
||||
<el-input v-model="form.sortId" placeholder="请输入排序id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="修改时间" prop="modTime">
|
||||
<el-date-picker clearable size="small"
|
||||
v-model="form.modTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择修改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSegchk_carouse_mgt, getSegchk_carouse_mgt, delSegchk_carouse_mgt, addSegchk_carouse_mgt, updateSegchk_carouse_mgt, exportSegchk_carouse_mgt } from "@/api/system/segchk_carouse_mgt";
|
||||
|
||||
export default {
|
||||
name: "Segchk_carouse_mgt",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// seg首页轮播图管理表格数据
|
||||
segchk_carouse_mgtList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
providerId: null,
|
||||
storeId: null,
|
||||
storeCarousel: null,
|
||||
mgtState: null,
|
||||
sortId: null,
|
||||
modTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
providerId: [
|
||||
{ required: true, message: "运营商id,全局唯一不能为空", trigger: "blur" }
|
||||
],
|
||||
storeId: [
|
||||
{ required: true, message: "商家id,全局唯一不能为空", trigger: "blur" }
|
||||
],
|
||||
mgtState: [
|
||||
{ required: true, message: "管理状态,0有效,-1失效不能为空", trigger: "blur" }
|
||||
],
|
||||
sortId: [
|
||||
{ required: true, message: "排序id不能为空", trigger: "blur" }
|
||||
],
|
||||
modTime: [
|
||||
{ required: true, message: "修改时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询seg首页轮播图管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSegchk_carouse_mgt(this.queryParams).then(response => {
|
||||
this.segchk_carouse_mgtList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
carouseId: null,
|
||||
providerId: null,
|
||||
storeId: null,
|
||||
storeCarousel: null,
|
||||
mgtState: null,
|
||||
sortId: null,
|
||||
modTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.carouseId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加seg首页轮播图管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const carouseId = row.carouseId || this.ids
|
||||
getSegchk_carouse_mgt(carouseId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改seg首页轮播图管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.carouseId != null) {
|
||||
updateSegchk_carouse_mgt(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSegchk_carouse_mgt(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const carouseIds = row.carouseId || this.ids;
|
||||
this.$confirm('是否确认删除seg首页轮播图管理编号为"' + carouseIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delSegchk_carouse_mgt(carouseIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有seg首页轮播图管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportSegchk_carouse_mgt(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
|||
|
||||
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
const port = process.env.port || process.env.npm_config_port || 8099 // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
|
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:7070`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
|
|||
Loading…
Reference in New Issue