forked from Gitlink/microservices
Merge branch 'dev' of code.gitlink.org.cn:Gitlink/ruoyi-gitlink into member_operate
# Conflicts: # ruoyi-modules/ruoyi-zone/src/main/java/com/ruoyi/zone/detail/domain/ZoneDetail.java # ruoyi-modules/ruoyi-zone/src/main/java/com/ruoyi/zone/detail/domain/vo/ZoneDetailDataVo.java # ruoyi-modules/ruoyi-zone/src/main/java/com/ruoyi/zone/detail/domain/vo/ZoneDetailUpdateVo.java # ruoyi-modules/ruoyi-zone/src/main/java/com/ruoyi/zone/detail/service/impl/ZoneDetailServiceImpl.java # ruoyi-modules/ruoyi-zone/src/main/resources/mapper/zone/ZoneDetailMapper.xml
This commit is contained in:
commit
a42acce130
|
|
@ -331,7 +331,7 @@ public class CmsDocServiceImpl implements ICmsDocService {
|
|||
|
||||
private boolean isNoAuditRequired(Long deptId) {
|
||||
JSONObject zoneJson = this.getZoneJSONByDeptId(deptId);
|
||||
String needAudit = zoneJson.getString("needAudit");
|
||||
String needAudit = zoneJson.getString("docNeedAudit");
|
||||
return "0".equals(needAudit);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public class CmsProjectServiceImpl implements ICmsProjectService {
|
|||
//更新分支保护推动白名单设置
|
||||
JSONObject zoneJson = cmsDocService.getZoneJSONByDeptId(oldDeptId != null ? oldDeptId : newDeptId);
|
||||
if (zoneJson != null) {
|
||||
String needAudit = zoneJson.getString("needAudit");
|
||||
String needAudit = zoneJson.getString("docNeedAudit");
|
||||
if (StringUtils.isNotEmpty(needAudit) && needAudit.equals("1")) {
|
||||
String userName = null, identifier = null;
|
||||
Long deptId = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
package com.ruoyi.zone.detail.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.zone.detail.domain.ZoneApplication;
|
||||
import com.ruoyi.zone.detail.domain.vo.ZoneApplicationSearchVo;
|
||||
import com.ruoyi.zone.detail.service.IZoneApplicationService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 特色专区申请Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/application")
|
||||
@Api(tags = "特色专区申请接口")
|
||||
public class ZoneApplicationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IZoneApplicationService zoneApplicationService;
|
||||
|
||||
/**
|
||||
* 查询特色专区申请列表
|
||||
*/
|
||||
@RequiresPermissions("zone:application:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ZoneApplicationSearchVo zoneApplicationSearchVo)
|
||||
{
|
||||
startPage();
|
||||
List<ZoneApplication> list = zoneApplicationService.selectZoneApplicationListBySearchInput(zoneApplicationSearchVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出特色专区申请列表
|
||||
*/
|
||||
@RequiresPermissions("zone:application:export")
|
||||
@Log(title = "特色专区申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ZoneApplication zoneApplication)
|
||||
{
|
||||
List<ZoneApplication> list = zoneApplicationService.selectZoneApplicationList(zoneApplication);
|
||||
ExcelUtil<ZoneApplication> util = new ExcelUtil<ZoneApplication>(ZoneApplication.class);
|
||||
util.exportExcel(response, list, "特色专区申请数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特色专区申请详细信息
|
||||
*/
|
||||
@RequiresPermissions("zone:application:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(zoneApplicationService.selectZoneApplicationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区申请
|
||||
*/
|
||||
@Log(title = "特色专区申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ZoneApplication zoneApplication)
|
||||
{
|
||||
return toAjax(zoneApplicationService.insertZoneApplication(zoneApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区申请
|
||||
*/
|
||||
@RequiresPermissions("zone:application:edit")
|
||||
@Log(title = "特色专区申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ZoneApplication zoneApplication)
|
||||
{
|
||||
return toAjax(zoneApplicationService.updateZoneApplication(zoneApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区申请
|
||||
*/
|
||||
@RequiresPermissions("zone:application:remove")
|
||||
@Log(title = "特色专区申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(zoneApplicationService.deleteZoneApplicationByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.ruoyi.zone.detail.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 特色专区申请对象 zone_application
|
||||
*
|
||||
* @author wj
|
||||
* @date 2023-09-13
|
||||
*/
|
||||
@Data
|
||||
public class ZoneApplication extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 专区申请主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 特色专区名称
|
||||
*/
|
||||
@Excel(name = "特色专区名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 特色专区简介
|
||||
*/
|
||||
@Excel(name = "特色专区简介")
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 专区用途
|
||||
*/
|
||||
@Excel(name = "专区用途")
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系人微信
|
||||
*/
|
||||
@Excel(name = "联系人微信")
|
||||
private String contactWechat;
|
||||
|
||||
/**
|
||||
* 联系人手机
|
||||
*/
|
||||
@Excel(name = "联系人手机")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 专区标识
|
||||
*/
|
||||
@Excel(name = "专区标识")
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 期望提供的服务
|
||||
*/
|
||||
@Excel(name = "期望提供的服务")
|
||||
private String servicesProvided;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("introduction", getIntroduction())
|
||||
.append("purpose", getPurpose())
|
||||
.append("contactPerson", getContactPerson())
|
||||
.append("contactWechat", getContactWechat())
|
||||
.append("contactPhone", getContactPhone())
|
||||
.append("key", getKey())
|
||||
.append("servicesProvided", getServicesProvided())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -168,11 +168,9 @@ public class ZoneDetail extends BaseEntity {
|
|||
@ApiModelProperty(value = "专区模板")
|
||||
private String template;
|
||||
|
||||
/**
|
||||
* 是否需要审核(0:不需要,1:需要)
|
||||
*/
|
||||
/** 是否需要审核(0:不需要,1:需要) */
|
||||
@ApiModelProperty(value = "是否需要审核(0:不需要审核,1:需要审核)")
|
||||
private Integer needAudit;
|
||||
private Integer docNeedAudit;
|
||||
|
||||
/**
|
||||
* 是否需要审核(0:不需要,1:需要)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.ruoyi.zone.detail.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("专区申请搜索对象")
|
||||
public class ZoneApplicationSearchVo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "搜索输入,专区名称、联系人、联系电话")
|
||||
private String searchInput;
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ public class ZoneDetailDataVo extends BaseEntity {
|
|||
* 是否需要审核(0:不需要,1:需要)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否需要审核,(0:不需要审核,1:需要审核")
|
||||
private Integer needAudit;
|
||||
private Integer docNeedAudit;
|
||||
|
||||
/**
|
||||
* 是否需要审核(0:不需要,1:需要)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class ZoneDetailUpdateVo {
|
|||
* 是否需要审核(0:不需要,1:需要)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否需要审核,(0:不需要审核,1:需要审核")
|
||||
private Integer needAudit;
|
||||
private Integer docNeedAudit;
|
||||
|
||||
/**
|
||||
* 资源是否需要审核(0:不需要,1:需要)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
package com.ruoyi.zone.detail.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.zone.detail.domain.ZoneApplication;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 特色专区申请Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-13
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZoneApplicationMapper
|
||||
{
|
||||
/**
|
||||
* 查询特色专区申请
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 特色专区申请
|
||||
*/
|
||||
public ZoneApplication selectZoneApplicationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区申请列表
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 特色专区申请集合
|
||||
*/
|
||||
public List<ZoneApplication> selectZoneApplicationList(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 新增特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneApplication(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 修改特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneApplication(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 删除特色专区申请
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneApplicationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区申请
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneApplicationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据输入匹配专区名、联系人、联系电话
|
||||
*
|
||||
* @param searchInput
|
||||
* @return 特色专区申请集合
|
||||
*/
|
||||
List<ZoneApplication> selectZoneApplicationListBySearchInput(@Param("searchInput") String searchInput);
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.ruoyi.zone.detail.service;
|
||||
|
||||
import com.ruoyi.zone.detail.domain.ZoneApplication;
|
||||
import com.ruoyi.zone.detail.domain.vo.ZoneApplicationSearchVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区申请Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-13
|
||||
*/
|
||||
public interface IZoneApplicationService
|
||||
{
|
||||
/**
|
||||
* 查询特色专区申请
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 特色专区申请
|
||||
*/
|
||||
public ZoneApplication selectZoneApplicationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区申请列表
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 特色专区申请集合
|
||||
*/
|
||||
public List<ZoneApplication> selectZoneApplicationList(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 查询特色专区申请列表
|
||||
*
|
||||
* @param zoneApplicationSearchVo 特色专区申请搜索类
|
||||
* @return 特色专区申请集合
|
||||
*/
|
||||
List<ZoneApplication> selectZoneApplicationListBySearchInput(ZoneApplicationSearchVo zoneApplicationSearchVo);
|
||||
|
||||
/**
|
||||
* 新增特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneApplication(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 修改特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneApplication(ZoneApplication zoneApplication);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区申请
|
||||
*
|
||||
* @param ids 需要删除的特色专区申请主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneApplicationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除特色专区申请信息
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneApplicationById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package com.ruoyi.zone.detail.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.zone.detail.domain.ZoneApplication;
|
||||
import com.ruoyi.zone.detail.domain.ZoneDetail;
|
||||
import com.ruoyi.zone.detail.domain.vo.ZoneApplicationSearchVo;
|
||||
import com.ruoyi.zone.detail.mapper.ZoneApplicationMapper;
|
||||
import com.ruoyi.zone.detail.mapper.ZoneDetailMapper;
|
||||
import com.ruoyi.zone.detail.service.IZoneApplicationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 特色专区申请Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-13
|
||||
*/
|
||||
@Service
|
||||
public class ZoneApplicationServiceImpl implements IZoneApplicationService
|
||||
{
|
||||
@Autowired
|
||||
private ZoneApplicationMapper zoneApplicationMapper;
|
||||
|
||||
@Resource
|
||||
private ZoneDetailMapper zoneDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询特色专区申请
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 特色专区申请
|
||||
*/
|
||||
@Override
|
||||
public ZoneApplication selectZoneApplicationById(Long id)
|
||||
{
|
||||
return zoneApplicationMapper.selectZoneApplicationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特色专区申请列表
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 特色专区申请
|
||||
*/
|
||||
@Override
|
||||
public List<ZoneApplication> selectZoneApplicationList(ZoneApplication zoneApplication)
|
||||
{
|
||||
return zoneApplicationMapper.selectZoneApplicationList(zoneApplication);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZoneApplication> selectZoneApplicationListBySearchInput(ZoneApplicationSearchVo zoneApplicationSearchVo) {
|
||||
|
||||
return zoneApplicationMapper.selectZoneApplicationListBySearchInput(zoneApplicationSearchVo.getSearchInput());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZoneApplication(ZoneApplication zoneApplication)
|
||||
{
|
||||
ZoneDetail zoneDetail = zoneDetailMapper.selectZoneDetailByKey(zoneApplication.getKey());
|
||||
if (zoneDetail != null) {
|
||||
throw new ServiceException("专区标识:" + zoneApplication.getKey() + " 已存在");
|
||||
}
|
||||
zoneApplication.setCreateTime(DateUtils.getNowDate());
|
||||
zoneApplication.setCreateBy(SecurityUtils.getUsername());
|
||||
return zoneApplicationMapper.insertZoneApplication(zoneApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区申请
|
||||
*
|
||||
* @param zoneApplication 特色专区申请
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZoneApplication(ZoneApplication zoneApplication)
|
||||
{
|
||||
zoneApplication.setUpdateTime(DateUtils.getNowDate());
|
||||
zoneApplication.setUpdateBy(SecurityUtils.getUsername());
|
||||
return zoneApplicationMapper.updateZoneApplication(zoneApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除特色专区申请
|
||||
*
|
||||
* @param ids 需要删除的特色专区申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneApplicationByIds(Long[] ids)
|
||||
{
|
||||
return zoneApplicationMapper.deleteZoneApplicationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区申请信息
|
||||
*
|
||||
* @param id 特色专区申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneApplicationById(Long id)
|
||||
{
|
||||
return zoneApplicationMapper.deleteZoneApplicationById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -202,14 +202,14 @@ public class ZoneDetailServiceImpl implements IZoneDetailService {
|
|||
redisService.deleteObject(zoneJSONOfDeptIdKey);
|
||||
int updateCount = zoneDetailMapper.updateZoneDetail(zoneDetail);
|
||||
//专区审核设置发生变化时,自动更新分支保护设置
|
||||
if (zoneDetail.getNeedAudit() != null &&
|
||||
updateCount > 0 && (!oldZoneDetail.getNeedAudit().equals(zoneDetail.getNeedAudit()))) {
|
||||
if (zoneDetail.getDocNeedAudit() != null &&
|
||||
updateCount > 0 && (!oldZoneDetail.getDocNeedAudit().equals(zoneDetail.getDocNeedAudit()))) {
|
||||
String cmsProjectJson = FeginUtils.getReturnData(remoteCmsService.getProjectByDeptId(oldZoneDetail.getDeptId(), SecurityConstants.INNER));
|
||||
if (StringUtils.isNotEmpty(cmsProjectJson)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(cmsProjectJson);
|
||||
String userName = jsonObject.getString("username");
|
||||
String identifier = jsonObject.getString("identifier");
|
||||
String operationType = zoneDetail.getNeedAudit() == 1 ? "create" : "delete";
|
||||
String operationType = zoneDetail.getDocNeedAudit() == 1 ? "create" : "delete";
|
||||
FeginUtils.getReturnData(remoteCmsService.autoOperateZoneCmsProjectWhenAuditStatusChangedByDept(userName, identifier, oldZoneDetail.getDeptId(), operationType, SecurityConstants.INNER));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
<?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.zone.detail.mapper.ZoneApplicationMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.zone.detail.domain.ZoneApplication" id="ZoneApplicationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="introduction" column="introduction" />
|
||||
<result property="purpose" column="purpose" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactWechat" column="contact_wechat" />
|
||||
<result property="contactPhone" column="contact_phone" />
|
||||
<result property="key" column="key" />
|
||||
<result property="servicesProvided" column="services_provided" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneApplicationVo">
|
||||
select id, name, introduction, purpose, contact_person, contact_wechat, contact_phone, `key`, services_provided, create_by, create_time, update_by, update_time from zone_application
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneApplicationList" parameterType="ZoneApplication" resultMap="ZoneApplicationResult">
|
||||
<include refid="selectZoneApplicationVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
|
||||
<if test="purpose != null and purpose != ''"> and purpose = #{purpose}</if>
|
||||
<if test="contactPerson != null and contactPerson != ''"> and contact_person = #{contactPerson}</if>
|
||||
<if test="contactWechat != null and contactWechat != ''"> and contact_wechat = #{contactWechat}</if>
|
||||
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
|
||||
<if test="key != null and key != ''"> and `key` = #{key}</if>
|
||||
<if test="servicesProvided != null and servicesProvided != ''"> and services_provided = #{servicesProvided}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZoneApplicationById" parameterType="Long" resultMap="ZoneApplicationResult">
|
||||
<include refid="selectZoneApplicationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectZoneApplicationListBySearchInput"
|
||||
resultMap="ZoneApplicationResult">
|
||||
<include refid="selectZoneApplicationVo"/>
|
||||
<where>
|
||||
<if test="searchInput != null and searchInput != ''"> and CONCAT(`name`,`contact_person`,`contact_phone`) like concat('%', #{searchInput}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertZoneApplication" parameterType="ZoneApplication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zone_application
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="introduction != null and introduction != ''">introduction,</if>
|
||||
<if test="purpose != null">purpose,</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">contact_person,</if>
|
||||
<if test="contactWechat != null">contact_wechat,</if>
|
||||
<if test="contactPhone != null">contact_phone,</if>
|
||||
<if test="key != null">`key`,</if>
|
||||
<if test="servicesProvided != null">services_provided,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="introduction != null and introduction != ''">#{introduction},</if>
|
||||
<if test="purpose != null">#{purpose},</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">#{contactPerson},</if>
|
||||
<if test="contactWechat != null">#{contactWechat},</if>
|
||||
<if test="contactPhone != null">#{contactPhone},</if>
|
||||
<if test="key != null">#{key},</if>
|
||||
<if test="servicesProvided != null">#{servicesProvided},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZoneApplication" parameterType="ZoneApplication">
|
||||
update zone_application
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
|
||||
<if test="purpose != null">purpose = #{purpose},</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">contact_person = #{contactPerson},</if>
|
||||
<if test="contactWechat != null">contact_wechat = #{contactWechat},</if>
|
||||
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||
<if test="key != null">`key` = #{key},</if>
|
||||
<if test="servicesProvided != null">services_provided = #{servicesProvided},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneApplicationById" parameterType="Long">
|
||||
delete from zone_application where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneApplicationByIds" parameterType="String">
|
||||
delete from zone_application where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<result property="template" column="template"/>
|
||||
<result property="helperShow" column="helper_show"/>
|
||||
<result property="helperTitle" column="helper_title"/>
|
||||
<result property="needAudit" column="need_audit"/>
|
||||
<result property="docNeedAudit" column=" doc_need_audit"/>
|
||||
<result property="resourceNeedAudit" column="resource_need_audit"/>
|
||||
</resultMap>
|
||||
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
homepage_partners_title,
|
||||
template,
|
||||
resource_need_audit,
|
||||
need_audit
|
||||
doc_need_audit
|
||||
from zone_detail
|
||||
</sql>
|
||||
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
z.homepage_partners_title,
|
||||
z.template,
|
||||
z.resource_need_audit,
|
||||
z.need_audit
|
||||
z.doc_need_audit
|
||||
from zone_detail as z
|
||||
</sql>
|
||||
<sql id="selectWhere">
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
<if test="template != null">template,</if>
|
||||
<if test="helperTitle != null">helper_title,</if>
|
||||
<if test="helperShow != null">helper_show,</if>
|
||||
<if test="needAudit != null">need_audit,</if>
|
||||
<if test="docNeedAudit != null"> doc_need_audit,</if>
|
||||
<if test="resourceNeedAudit != null">resource_need_audit,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
<if test="template != null">#{template},</if>
|
||||
<if test="helperTitle != null">#{helperTitle},</if>
|
||||
<if test="helperShow != null">#{helperShow},</if>
|
||||
<if test="needAudit != null">#{needAudit},</if>
|
||||
<if test="docNeedAudit != null">#{docNeedAudit},</if>
|
||||
<if test="resourceNeedAudit != null">#{resourceNeedAudit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
<if test="template != null">template = #{template},</if>
|
||||
<if test="helperShow != null">helper_show = #{helperShow},</if>
|
||||
<if test="helperTitle != null">helper_title = #{helperTitle},</if>
|
||||
<if test="needAudit != null">need_audit = #{needAudit},</if>
|
||||
<if test="docNeedAudit != null"> doc_need_audit = #{docNeedAudit},</if>
|
||||
<if test="resourceNeedAudit != null">resource_need_audit = #{resourceNeedAudit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
-- cms文章表中添加审核驳回是否可编辑相关字段,并添加文章上下架字段
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
ALTER TABLE `zone_detail`
|
||||
CHANGE COLUMN `need_audit` `doc_need_audit` tinyint(1) DEFAULT 0 COMMENT '是否需要审核(0:不需要,1:需要)';
|
||||
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
-- 创建专区申请表
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
CREATE TABLE `zone_application` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '专区申请主键',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '特色专区名称',
|
||||
`introduction` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '特色专区简介',
|
||||
`purpose` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '专区用途',
|
||||
`contact_person` varchar(50) NOT NULL COMMENT '联系人',
|
||||
`contact_wechat` varchar(50) COMMENT '联系人微信',
|
||||
`contact_phone` varchar(50) COMMENT '联系人手机',
|
||||
`key` varchar(255) DEFAULT NULL COMMENT '特色专区标识',
|
||||
`services_provided` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '期望提供的服务',
|
||||
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '特色专区申请表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
-- 初始化专区申请表菜单及按钮
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请', '3', '1', 'application', 'zone/application/index', 1, 0, 'C', '0', '0', 'zone:application:list', '#', 'admin', sysdate(), '', null, '特色专区申请菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'zone:application:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'zone:application:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'zone:application:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'zone:application:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('特色专区申请导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'zone:application:export', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 1;
|
||||
Loading…
Reference in New Issue