批量启用修改,舆情走势xml修改

duhanyu
dongdingding 1 year ago
parent 871cec0c80
commit 24090e99c5

@ -97,4 +97,20 @@ public class TcAqgController extends BaseController {
tcAqgService.importUser(tcAqgList);
return AjaxResult.success();
}
/**
*
*
* @param isStatus
* @return
*/
@ApiOperation("批量启用禁用")
@GetMapping("/isStatus")
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus,@RequestParam("ids") List<String> ids) {
tcAqgService.updateByisStatus(isStatus,ids);
return AjaxResult.success();
}
}

@ -1,31 +1,20 @@
package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.tcZz.domain.TcWljgtj;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tcZz.domain.TcYqzs;
import com.ruoyi.tcZz.service.ITcYqzsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
@ -40,7 +29,6 @@ public class TcYqzsController extends BaseController {
private ITcYqzsService tcYqzsService;
/**
*
*/
@ -111,4 +99,5 @@ public class TcYqzsController extends BaseController {
tcYqzsService.importUser(tcYqzsList);
return AjaxResult.success();
}
}

@ -9,6 +9,7 @@ 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;
import org.springframework.format.annotation.DateTimeFormat;
/**
* tc_yqzs
@ -32,7 +33,7 @@ public class TcYqzs extends BaseEntity
private Long areaId;
/** 日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "日期")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dateTime;
@ -46,4 +47,23 @@ public class TcYqzs extends BaseEntity
@Excel(name = "敏感数量")
@ApiModelProperty(value = "敏感数量")
private Long count2;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间")
private Date beginDateTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "结束时间")
private Date endDateTime;
}

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.mapper;
import java.util.List;
import com.ruoyi.tcZz.domain.TcAqg;
import org.apache.ibatis.annotations.Param;
/**
* Mapper
@ -58,4 +59,13 @@ public interface TcAqgMapper
* @return
*/
public int deleteTcAqgByIds(Long[] ids);
/**
*
*
*
*/
public void updateByisStatus(@Param("isStatus") Integer isStatus,@Param("ids") List<String> ids);
}

@ -58,4 +58,8 @@ public interface TcYqzsMapper
* @return
*/
public int deleteTcYqzsByIds(Long[] ids);
}

@ -68,4 +68,13 @@ public interface ITcAqgService
* @return
*/
public String importUser(List<TcAqg> tcAqgList);
/**
*
*
*
*/
public void updateByisStatus(Integer isStatus,List<String> ids);
}

@ -66,4 +66,7 @@ public interface ITcYqzsService {
* @return
*/
public String importUser(List<TcYqzs> tcYqzsList);
}

@ -106,4 +106,10 @@ public class TcAqgServiceImpl implements ITcAqgService
}
return successMsg.toString();
}
@Override
public void updateByisStatus(Integer isStatus,List<String> ids) {
tcAqgMapper.updateByisStatus(isStatus,ids);
}
}

@ -94,6 +94,7 @@ public class TcBmtbServiceImpl implements ITcBmtbService {
StringBuilder successMsg = new StringBuilder();
if (!tcBmtbList.isEmpty()) {
for (TcBmtb tcBmtb : tcBmtbList) {
tcBmtb.setCreateTime(DateUtils.getNowDate());
tcBmtbMapper.insertTcBmtb(tcBmtb);
}
successMsg.append("导入成功");

@ -106,4 +106,6 @@ public class TcYqzsServiceImpl implements ITcYqzsService
}
return successMsg.toString();
}
}

@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
and isStatus = 1
</where>
</select>

@ -31,10 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
<if test="beginDateTime != null and endDateTime != null "> and date_time between #{beginDateTime} and #{endDateTime}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
<if test="count1 != null "> and count1 = #{count1}</if>
<if test="count2 != null "> and count2 = #{count2}</if>
</where>
order by date_time asc
</select>
<select id="selectTcYqzsById" parameterType="Long" resultMap="TcYqzsResult">
@ -84,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteTcYqzsById" parameterType="Long">
delete from tc_yqzs where id = #{id}
</delete>

@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
</where>
order by create_time desc
</select>
<select id="selectTcAqgById" parameterType="Long" resultMap="TcAqgResult">
@ -118,15 +119,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateByisStatus">
UPDATE tc_aqg
SET isStatus = #{isStatus}
WHERE id IN
<foreach collection="ids" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</update>
<delete id="deleteTcAqgById" parameterType="Long">
delete from tc_aqg where id = #{id}
</delete>
<delete id="deleteTcAqgByIds" parameterType="String">
delete from tc_aqg where id in
delete from tc_aqg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save