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

duhanyu
dongdingding 1 year ago
parent 871cec0c80
commit 24090e99c5

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

@ -9,6 +9,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* tc_yqzs * tc_yqzs
@ -32,7 +33,7 @@ public class TcYqzs extends BaseEntity
private Long areaId; private Long areaId;
/** 日期 */ /** 日期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "日期") @ApiModelProperty(value = "日期")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dateTime; private Date dateTime;
@ -46,4 +47,23 @@ public class TcYqzs extends BaseEntity
@Excel(name = "敏感数量") @Excel(name = "敏感数量")
@ApiModelProperty(value = "敏感数量") @ApiModelProperty(value = "敏感数量")
private Long count2; 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 java.util.List;
import com.ruoyi.tcZz.domain.TcAqg; import com.ruoyi.tcZz.domain.TcAqg;
import org.apache.ibatis.annotations.Param;
/** /**
* Mapper * Mapper
@ -58,4 +59,13 @@ public interface TcAqgMapper
* @return * @return
*/ */
public int deleteTcAqgByIds(Long[] ids); 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 * @return
*/ */
public int deleteTcYqzsByIds(Long[] ids); public int deleteTcYqzsByIds(Long[] ids);
} }

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

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

@ -106,4 +106,10 @@ public class TcAqgServiceImpl implements ITcAqgService
} }
return successMsg.toString(); 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(); StringBuilder successMsg = new StringBuilder();
if (!tcBmtbList.isEmpty()) { if (!tcBmtbList.isEmpty()) {
for (TcBmtb tcBmtb : tcBmtbList) { for (TcBmtb tcBmtb : tcBmtbList) {
tcBmtb.setCreateTime(DateUtils.getNowDate());
tcBmtbMapper.insertTcBmtb(tcBmtb); tcBmtbMapper.insertTcBmtb(tcBmtb);
} }
successMsg.append("导入成功"); successMsg.append("导入成功");

@ -106,4 +106,6 @@ public class TcYqzsServiceImpl implements ITcYqzsService
} }
return successMsg.toString(); 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="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="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> <if test="remark != null and remark != ''"> and remark = #{remark}</if>
and isStatus = 1
</where> </where>
</select> </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="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="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="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="remark != null and remark != ''"> and remark = #{remark}</if>
<if test="count1 != null "> and count1 = #{count1}</if> <if test="count1 != null "> and count1 = #{count1}</if>
<if test="count2 != null "> and count2 = #{count2}</if> <if test="count2 != null "> and count2 = #{count2}</if>
</where> </where>
order by date_time asc
</select> </select>
<select id="selectTcYqzsById" parameterType="Long" resultMap="TcYqzsResult"> <select id="selectTcYqzsById" parameterType="Long" resultMap="TcYqzsResult">
@ -84,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteTcYqzsById" parameterType="Long"> <delete id="deleteTcYqzsById" parameterType="Long">
delete from tc_yqzs where id = #{id} delete from tc_yqzs where id = #{id}
</delete> </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="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> <if test="remark != null and remark != ''"> and remark = #{remark}</if>
</where> </where>
order by create_time desc
</select> </select>
<select id="selectTcAqgById" parameterType="Long" resultMap="TcAqgResult"> <select id="selectTcAqgById" parameterType="Long" resultMap="TcAqgResult">
@ -118,6 +119,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
where id = #{id} where id = #{id}
</update> </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 id="deleteTcAqgById" parameterType="Long">
delete from tc_aqg where id = #{id} delete from tc_aqg where id = #{id}
@ -129,4 +138,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
Loading…
Cancel
Save