Commit 8d9c11f9 by 陶湘宇

APP获取异常

parent 8f4153dd
package cn.timer.api.bean.qyzx;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.dto.login.QysDto;
import cn.timer.api.dto.qyzx.MenuStructureDto;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Columns;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author tao 2023-6-11
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "app_exception_erro")
@ApiModel("APP异常错误表")
public class AppExceptionErro {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value="编号",example="101")
private Integer id;
@ApiModelProperty(value="异常日志")
@Column(name ="errolog" ,columnDefinition="TEXT", nullable=true)
private String errolog;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getErrolog() {
return errolog;
}
public void setErrolog(String errolog) {
this.errolog = errolog;
}
}
\ No newline at end of file
...@@ -13,6 +13,8 @@ import javax.servlet.http.HttpServletRequest; ...@@ -13,6 +13,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import cn.timer.api.bean.qyzx.*;
import cn.timer.api.dao.qyzx.APPErroMapper;
import cn.timer.api.utils.redis.RedisUtil; import cn.timer.api.utils.redis.RedisUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -48,11 +50,6 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics; ...@@ -48,11 +50,6 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules; import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRulesM; import cn.timer.api.bean.kqmk.KqglAssoOvertimeRulesM;
import cn.timer.api.bean.qyxx.CmsContent; import cn.timer.api.bean.qyxx.CmsContent;
import cn.timer.api.bean.qyzx.QyzxAdminColour;
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz; import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth; import cn.timer.api.bean.zzgl.ZzglAuth;
...@@ -152,12 +149,14 @@ public class LoginController { ...@@ -152,12 +149,14 @@ public class LoginController {
@Value("${config-8timer.authentication-code}") @Value("${config-8timer.authentication-code}")
public String authentication_code; public String authentication_code;
//2020/0517 redis缓存taoxy //2020/0517 redis缓存taoxy
@Autowired @Autowired
private HttpSession session; private HttpSession session;
@Autowired @Autowired
private QyzxEmpLoginMapper qyzxEmpLoginMapper; private QyzxEmpLoginMapper qyzxEmpLoginMapper;
@Autowired
private APPErroMapper appErroMapper;
@Autowired @Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper; private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
...@@ -272,10 +271,18 @@ public class LoginController { ...@@ -272,10 +271,18 @@ public class LoginController {
return ResultUtil.error("发送验证码失败"); return ResultUtil.error("发送验证码失败");
} }
} }
@PostMapping(value = "/apperro")
@ApiOperation(value = "1.收集APP异常", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
@Log(title = "收集APP异常", businessType = BusinessType.SEND_CODE)
public Result<String> sendCode(@RequestBody String errolog) {
AppExceptionErro e=new AppExceptionErro();
e.setErrolog(errolog);
appErroMapper.insert(e);
return ResultUtil.success();
}
/** /**
* 发送验证码 * 发送验证码
*
* @param entRegisterDto * @param entRegisterDto
* @return * @return
*/ */
...@@ -1059,16 +1066,16 @@ public class LoginController { ...@@ -1059,16 +1066,16 @@ public class LoginController {
}else { }else {
return ResultUtil.error("登录失败"); return ResultUtil.error("登录失败");
} }
}else { }else {
return ResultUtil.error("登录有误"); return ResultUtil.error("登录有误");
} }
}else { }else {
return ResultUtil.error("验证失败"); return ResultUtil.error("验证失败");
} }
}else { }else {
// return ResultUtil.error("二维码已过期"); // return ResultUtil.error("二维码已过期");
return ResultUtil.success("4"); return ResultUtil.success("4");
} }
} }
...@@ -1138,14 +1145,14 @@ public class LoginController { ...@@ -1138,14 +1145,14 @@ public class LoginController {
// //
QyzxEmpLogin.builder().orgId(orgcodeid).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone())); QyzxEmpLogin.builder().orgId(orgcodeid).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()));
QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()).one(); .eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()).one();
if (qyzxEmpLogin1 != null) { if (qyzxEmpLogin1 != null) {
return loginhan(qyzxEmpLogin1, request); return loginhan(qyzxEmpLogin1, request);
}else { }else {
return ResultUtil.error("切换失败!!"); return ResultUtil.error("切换失败!!");
} }
} }
...@@ -1153,14 +1160,14 @@ public class LoginController { ...@@ -1153,14 +1160,14 @@ public class LoginController {
@ApiOperation(value = "刷新纪录", httpMethod = "GET", notes = "是否有账号") @ApiOperation(value = "刷新纪录", httpMethod = "GET", notes = "是否有账号")
public Result<QyzxEmpLogin> RecordBreaking(@CurrentUser UserBean userBean,HttpServletRequest request) { public Result<QyzxEmpLogin> RecordBreaking(@CurrentUser UserBean userBean,HttpServletRequest request) {
QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()).eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()).one(); .eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()).eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()).one();
if (qyzxEmpLogin1 != null) { if (qyzxEmpLogin1 != null) {
return loginhan(qyzxEmpLogin1, request); return loginhan(qyzxEmpLogin1, request);
}else { }else {
return ResultUtil.error("刷新失败!!"); return ResultUtil.error("刷新失败!!");
} }
} }
......
...@@ -158,6 +158,11 @@ public class ClockInController { ...@@ -158,6 +158,11 @@ public class ClockInController {
//putime: 根据日期 得到打卡所需的详细信息 //putime: 根据日期 得到打卡所需的详细信息
AttendanceCardListDto attdate = MethodCall(qyid,userid,ClockInTool.paraseStringToDate(sStdIoTime,"yyyy-MM-dd HH:mm:SS")); AttendanceCardListDto attdate = MethodCall(qyid,userid,ClockInTool.paraseStringToDate(sStdIoTime,"yyyy-MM-dd HH:mm:SS"));
// = new SimpleDateFormat("yyyy-MM-dd").format(sStdIoTime);//转换打卡时间格式 年月日 // = new SimpleDateFormat("yyyy-MM-dd").format(sStdIoTime);//转换打卡时间格式 年月日
Long puttimeTmp=0L;
if (attdate!=null&&attdate.getAttsch()!=null&&attdate.getAttsch().get(0)!=null)
puttimeTmp=attdate.getAttsch().get(0).getTime();
else
puttimeTmp=System.currentTimeMillis();
String putime= new SimpleDateFormat("yyyy-MM-dd").format(attdate.getAttsch().get(0).getTime());//转换打卡时间格式 年月日 String putime= new SimpleDateFormat("yyyy-MM-dd").format(attdate.getAttsch().get(0).getTime());//转换打卡时间格式 年月日
String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(attdate.getAttsch().get(0).getTime());//转换打卡时间格式 年月日 String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(attdate.getAttsch().get(0).getTime());//转换打卡时间格式 年月日
......
package cn.timer.api.dao.qyzx;
import cn.timer.api.bean.qyzx.AppExceptionErro;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.dto.login.QysDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 员工登录表
* @author Tang 2019-11-11
*/
@Repository
public interface APPErroMapper extends BaseMapper<AppExceptionErro> {
}
<?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="cn.timer.api.dao.qyzx.APPErroMapper">
<resultMap id="EntMap" type="cn.timer.api.bean.qyzx.AppExceptionErro" >
<result column="id" property="id" />
<result column="errolog" property="errolog" />
</resultMap>
</mapper>
\ No newline at end of file
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