Commit f5e0c9ce by ilal Committed by chenzg

提交1

parent f58fff56
package cn.timer.api.controller.admin;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.timer.api.bean.admin.AdminAssoTxjlb;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dto.htzz.QueryNoReadingDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags = "消息记录")
@RestController
@Transactional
@RequestMapping(value = "/record")
public class AdminAssoTxjlbcontroller {
@PostMapping("/noreading")
@ApiOperation(value = "未读数量", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> noreading(@CurrentUser UserBean userBean, @RequestBody QueryNoReadingDto ws) {
ws.setOrgCode(userBean.getOrgCode());
List<AdminAssoTxjlb> wds = AdminAssoTxjlb.builder().build()
.selectList(new QueryWrapper<AdminAssoTxjlb>().lambda().eq(AdminAssoTxjlb::getEmpNum, ws.getEmpNum())
.eq(AdminAssoTxjlb::getOrgCode, ws.getOrgCode()).eq(AdminAssoTxjlb::getTxstate, 0));
return ResultUtil.data(wds.size(), "查询成功");
}
@PostMapping("/datanotread")
@ApiOperation(value = "未读数据", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> datanotread(@CurrentUser UserBean userBean, @RequestBody QueryNoReadingDto ws) {
List<AdminAssoTxjlb> wds = AdminAssoTxjlb.builder().build()
.selectList(new QueryWrapper<AdminAssoTxjlb>().lambda().eq(AdminAssoTxjlb::getEmpNum, ws.getEmpNum())
.eq(AdminAssoTxjlb::getOrgCode, ws.getOrgCode()).eq(AdminAssoTxjlb::getTxstate, 0));
return ResultUtil.data(wds, "查询成功");
}
@GetMapping("/recorddetails/{id}")
@ApiOperation(value = "记录详情", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> recorddetails(@CurrentUser UserBean userBean, @PathVariable Integer id) {
AdminAssoTxjlb jlxq = AdminAssoTxjlb.builder().id(id).build().selectById();
return ResultUtil.data(jlxq, "成功");
}
@GetMapping("/recordmodification/{id}")
@ApiOperation(value = "记录修改", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> recordmodification(@CurrentUser UserBean userBean, @PathVariable Integer id) {
AdminAssoTxjlb.builder().id(id).build().update(new QueryWrapper<AdminAssoTxjlb>().lambda().eq(AdminAssoTxjlb::getTxstate, 1));
return ResultUtil.success("修改成功");
}
}
......@@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
......@@ -22,11 +21,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.cron.CronUtil;
import cn.hutool.cron.task.Task;
import cn.timer.api.bean.admin.AdminAssoTxjlb;
import cn.timer.api.bean.htzz.HtzzAdminZzda;
import cn.timer.api.bean.htzz.HtzzAssoHtgx;
import cn.timer.api.bean.htzz.HtzzAssoZztx;
......@@ -37,8 +37,7 @@ import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.htzz.HtzzAdminZzdaMapper;
import cn.timer.api.dto.htzz.HtzzQueryDto;
import cn.timer.api.dto.htzz.NotifyPersonDto;
import cn.timer.api.dto.htzz.ReminderObjectDto;
import cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto;
import cn.timer.api.dto.htzz.QueryNoReadingDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
......@@ -267,6 +266,7 @@ public class HtzzController {
CronUtil.start();
return ResultUtil.success("操作成功");
}
@Value("${config-8timer.environmental-science}")
public String environmental_science;
......
package cn.timer.api.dto.htzz;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class QueryNoReadingDto {
private Integer empNum;
private Integer orgCode;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment