parent
c2a4f9880a
commit
220198a371
@ -0,0 +1,35 @@ |
|||||||
|
package com.jianshui.invoiceall.domain.dto; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/13 |
||||||
|
* 全电登录dto |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ApiModel("全电登录dto") |
||||||
|
public class InoviceAllQdLoginDTO { |
||||||
|
@ApiModelProperty(value = "纳税人识别号") |
||||||
|
@NotEmpty |
||||||
|
private String nsrsbh; |
||||||
|
@ApiModelProperty(value = "登录类型,1账密(短信验证码)登录,2扫码登录") |
||||||
|
@NotEmpty |
||||||
|
private String loginType; |
||||||
|
@ApiModelProperty(value = "纳税人地区,省份全拼,陕西为shaanxi") |
||||||
|
@NotEmpty |
||||||
|
private String nsrdq; |
||||||
|
@ApiModelProperty(value = "流水号,调用回调地址时必填,保持唯一性,建议nsrsbh+gsnsyhm+timestamp") |
||||||
|
private String traceno; |
||||||
|
@ApiModelProperty(value = "回调函数,post请求,回调报文格式:{“code”:”S000”,”data”:{},”msg”:”登录成功”,”success”:true,”trace”:””}" + |
||||||
|
"接收短信、二维码、结果通知,post请求。自主授权必填,托管中间号非必填") |
||||||
|
private String callback; |
||||||
|
@ApiModelProperty(value = "是否全电登录,默认true") |
||||||
|
private String qd; |
||||||
|
@ApiModelProperty(value = "纳税人登录信息") |
||||||
|
private InvoiceAllNsrInfoDTO nsrInfo; |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
package com.jianshui.invoiceall.domain.dto; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/13 |
||||||
|
* 纳税人信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class InvoiceAllNsrInfoDTO { |
||||||
|
@ApiModelProperty(value = "登录身份,参考身份字典") |
||||||
|
private String dlsf; |
||||||
|
@ApiModelProperty(value = "登录身份密码") |
||||||
|
@NotEmpty |
||||||
|
private String dlsfmm; |
||||||
|
@ApiModelProperty(value = "中间号或接收短信的手机号,涉及到短信验证码的省份必填") |
||||||
|
private String zjh; |
||||||
|
@ApiModelProperty(value = "登录密码") |
||||||
|
@NotEmpty |
||||||
|
private String gsnsmm; |
||||||
|
@ApiModelProperty(value = "身份证件号码") |
||||||
|
private String sfzjhm; |
||||||
|
@ApiModelProperty(value = "登录账号") |
||||||
|
@NotEmpty |
||||||
|
private String gsnsyhm; |
||||||
|
@ApiModelProperty(value = "办税人姓名") |
||||||
|
private String bsryxz; |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
package com.jianshui.invoiceall.domain.dto.jcsk; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/14 |
||||||
|
* 自主授权回调参数 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class AutonomousAuthorizationDTO { |
||||||
|
// 响应码
|
||||||
|
private String code; |
||||||
|
// 响应数据
|
||||||
|
private Object data; |
||||||
|
// 返回信息
|
||||||
|
private String msg; |
||||||
|
// 响应结果
|
||||||
|
private Boolean success; |
||||||
|
// 流水号
|
||||||
|
private String trace; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.jianshui.invoiceall.domain.dto.jcsk; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/13 |
||||||
|
* 短信验证码dto |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class InvoiceAllSubmitNoteDTO { |
||||||
|
@ApiModelProperty(value = "流水号,调用回调地址时必填,保持唯一性,建议nsrsbh+gsnsyhm+timestamp") |
||||||
|
private String traceno; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "纳税人识别号") |
||||||
|
@NotEmpty |
||||||
|
private String nsrsbh; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "短信验证码") |
||||||
|
@NotEmpty |
||||||
|
private String smsCode; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "中间号/手机号") |
||||||
|
@NotEmpty |
||||||
|
private String zjh; |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
package com.jianshui.invoiceall.service; |
||||||
|
|
||||||
|
import com.jianshui.common.core.domain.AjaxResult; |
||||||
|
import com.jianshui.invoiceall.domain.dto.InoviceAllQdLoginDTO; |
||||||
|
import com.jianshui.invoiceall.domain.dto.jcsk.AutonomousAuthorizationDTO; |
||||||
|
import com.jianshui.invoiceall.domain.dto.jcsk.InvoiceAllSubmitNoteDTO; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/13 |
||||||
|
* 自主授权service |
||||||
|
*/ |
||||||
|
public interface AutonomousSqService { |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 全电登录 |
||||||
|
* @param inoviceAllQdLoginDTO |
||||||
|
* @return : com.jianshui.common.core.domain.AjaxResult |
||||||
|
*/ |
||||||
|
AjaxResult qdLogin(InoviceAllQdLoginDTO inoviceAllQdLoginDTO); |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 提交短信验证码 |
||||||
|
* @param invoiceAllSubmitNoteDTO |
||||||
|
* @return : com.jianshui.common.core.domain.AjaxResult |
||||||
|
*/ |
||||||
|
|
||||||
|
AjaxResult submitNote(InvoiceAllSubmitNoteDTO invoiceAllSubmitNoteDTO); |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 自主授权 |
||||||
|
* @param autonomousAuthorization |
||||||
|
* @return : java.lang.Object |
||||||
|
*/ |
||||||
|
Object autonomousAuthorization(AutonomousAuthorizationDTO autonomousAuthorization); |
||||||
|
} |
@ -0,0 +1,181 @@ |
|||||||
|
package com.jianshui.invoiceall.service.impl; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import cn.hutool.core.bean.copier.CopyOptions; |
||||||
|
import cn.hutool.json.JSONObject; |
||||||
|
import cn.hutool.json.JSONUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.jianshui.common.core.domain.AjaxResult; |
||||||
|
import com.jianshui.common.core.domain.entity.Companyservice; |
||||||
|
import com.jianshui.common.enums.ErrorCode; |
||||||
|
import com.jianshui.common.utils.ValidateUtils; |
||||||
|
import com.jianshui.common.utils.http.HttpUtils; |
||||||
|
import com.jianshui.invoiceall.domain.dto.InoviceAllQdLoginDTO; |
||||||
|
import com.jianshui.invoiceall.domain.dto.jcsk.AutonomousAuthorizationDTO; |
||||||
|
import com.jianshui.invoiceall.domain.dto.jcsk.InvoiceAllSubmitNoteDTO; |
||||||
|
import com.jianshui.invoiceall.service.AutonomousSqService; |
||||||
|
import com.jianshui.system.domain.InvoiceAllApiLog; |
||||||
|
import com.jianshui.system.domain.InvoiceAllLoginResult; |
||||||
|
import com.jianshui.system.domain.InvoiceAllYhdj; |
||||||
|
import com.jianshui.system.mapper.CompanyserviceMapper; |
||||||
|
import com.jianshui.system.mapper.InvoiceAllApiLogMapper; |
||||||
|
import com.jianshui.system.mapper.InvoiceAllLoginResultMapper; |
||||||
|
import com.jianshui.system.mapper.InvoiceAllYhdjMapper; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author xingze |
||||||
|
* @date 2023/8/13 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@Slf4j |
||||||
|
public class AutonomousSqServiceImpl implements AutonomousSqService { |
||||||
|
@Autowired |
||||||
|
private InvoiceAllApiLogMapper allApiLogMapper; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private InvoiceAllYhdjMapper yhdjMapper; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private InvoiceAllLoginResultMapper invoiceAllLoginResultMapper; |
||||||
|
@Autowired |
||||||
|
private CompanyserviceMapper companyserviceMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 自主授权回调接口 |
||||||
|
* |
||||||
|
* @param autonomousAuthorization |
||||||
|
* @return : java.lang.Object |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object autonomousAuthorization(AutonomousAuthorizationDTO autonomousAuthorization) { |
||||||
|
// 存流水号
|
||||||
|
InvoiceAllLoginResult invoiceAllLoginResult = new InvoiceAllLoginResult(); |
||||||
|
BeanUtil.copyProperties(autonomousAuthorization,invoiceAllLoginResult); |
||||||
|
int count = invoiceAllLoginResultMapper.insertInvoiceAllLoginResult(invoiceAllLoginResult); |
||||||
|
if (count > 0){ |
||||||
|
log.info("全电登录接口,登录返回信息保存成功,信息为:{}",JSONUtil.toJsonStr(invoiceAllLoginResult)); |
||||||
|
}else { |
||||||
|
log.error("全电登录接口,登录返回信息失败,信息为:{}",JSONUtil.toJsonStr(invoiceAllLoginResult)); |
||||||
|
} |
||||||
|
return AjaxResult.success(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 全电登录 |
||||||
|
* |
||||||
|
* @param inoviceAllQdLoginDTO |
||||||
|
* @return : com.jianshui.common.core.domain.AjaxResult |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public AjaxResult qdLogin(InoviceAllQdLoginDTO inoviceAllQdLoginDTO) { |
||||||
|
// 全电登录
|
||||||
|
ValidateUtils.validate(inoviceAllQdLoginDTO); |
||||||
|
Companyservice companyservice = companyserviceMapper.selectCompanyserviceByTaxcode(inoviceAllQdLoginDTO.getNsrsbh()); |
||||||
|
if (BeanUtil.isEmpty(inoviceAllQdLoginDTO.getNsrInfo())) { |
||||||
|
return AjaxResult.error("传入报文错误,请检查,纳税人信息为空!"); |
||||||
|
} |
||||||
|
ValidateUtils.validate(inoviceAllQdLoginDTO.getNsrInfo()); |
||||||
|
// 流水号(唯一)
|
||||||
|
String qqlsh = inoviceAllQdLoginDTO.getNsrsbh() + inoviceAllQdLoginDTO.getNsrInfo().getGsnsyhm() + System.currentTimeMillis(); |
||||||
|
inoviceAllQdLoginDTO.setTraceno(qqlsh); |
||||||
|
try { |
||||||
|
// 回调地址
|
||||||
|
inoviceAllQdLoginDTO.setCallback("http://dev.goldentaxcloud.com:8081/api/invoice_all/v1/autonomousAuthorization"); |
||||||
|
String result = HttpUtils.sendJsonPost("http://221.222.184.98:8880/login/getLogin2", inoviceAllQdLoginDTO); |
||||||
|
// 用户信息封装
|
||||||
|
InvoiceAllYhdj yhdj = BeanUtil.copyProperties(inoviceAllQdLoginDTO, InvoiceAllYhdj.class); |
||||||
|
yhdj.setDlsfmm(inoviceAllQdLoginDTO.getNsrInfo().getGsnsmm()); |
||||||
|
yhdj.setBsrysfzjhm(inoviceAllQdLoginDTO.getNsrInfo().getSfzjhm()); |
||||||
|
yhdj.setDlzh(inoviceAllQdLoginDTO.getNsrInfo().getGsnsyhm()); |
||||||
|
yhdj.setBsryxm(inoviceAllQdLoginDTO.getNsrInfo().getBsryxz()); |
||||||
|
QueryWrapper<InvoiceAllYhdj> yhdjQueryWrapper = new QueryWrapper<>(); |
||||||
|
yhdjQueryWrapper.eq("nsrsbh", yhdj.getNsrsbh()); |
||||||
|
yhdjQueryWrapper.eq("identity", companyservice.getIdentity()); |
||||||
|
InvoiceAllYhdj yhdjTemp = yhdjMapper.selectOne(yhdjQueryWrapper); |
||||||
|
// 日志信息
|
||||||
|
InvoiceAllApiLog invoiceAllApiLog = new InvoiceAllApiLog(); |
||||||
|
invoiceAllApiLog.setCreateTime(new Date()); |
||||||
|
invoiceAllApiLog.setCompany(companyservice.getSellertax()); |
||||||
|
invoiceAllApiLog.setIdentityId(companyservice.getIdentity()); |
||||||
|
invoiceAllApiLog.setUrl("http://221.222.184.98:8880/login/getLogin2"); |
||||||
|
invoiceAllApiLog.setSendMsg(JSONUtil.toJsonStr(inoviceAllQdLoginDTO)); |
||||||
|
invoiceAllApiLog.setRequestId(qqlsh); |
||||||
|
allApiLogMapper.insert(invoiceAllApiLog); |
||||||
|
// 更新记录表
|
||||||
|
if (BeanUtil.isNotEmpty(yhdjTemp)) { |
||||||
|
BeanUtil.copyProperties(yhdj, yhdjTemp, CopyOptions.create().setIgnoreNullValue(true)); |
||||||
|
yhdjTemp.setUpdateTime(new Date()); |
||||||
|
yhdjMapper.updateInvoiceAllYhdj(yhdjTemp); |
||||||
|
} else { |
||||||
|
yhdj.setCreateTime(new Date()); |
||||||
|
yhdj.setIdentity(companyservice.getIdentity()); |
||||||
|
yhdjMapper.insertInvoiceAllYhdj(yhdj); |
||||||
|
} |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
log.error("【金四服务类】【金财数科】【全电登录】API请求异常,外部报文返回code非S000。错误信息:{}", e.getMessage()); |
||||||
|
return AjaxResult.error(ErrorCode.INCOME_ERROR); |
||||||
|
} |
||||||
|
return AjaxResult.success(qqlsh); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: 提交短信验证码 |
||||||
|
* |
||||||
|
* @param invoiceAllSubmitNoteDTO |
||||||
|
* @return : com.jianshui.common.core.domain.AjaxResult |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public AjaxResult submitNote(InvoiceAllSubmitNoteDTO invoiceAllSubmitNoteDTO) { |
||||||
|
// 全电登录
|
||||||
|
ValidateUtils.validate(invoiceAllSubmitNoteDTO); |
||||||
|
Companyservice companyservice = companyserviceMapper.selectCompanyserviceByTaxcode(invoiceAllSubmitNoteDTO.getNsrsbh()); |
||||||
|
// 根据流水号获取登录结果
|
||||||
|
InvoiceAllLoginResult invoiceAllLogin = invoiceAllLoginResultMapper.findByQqlsh(invoiceAllSubmitNoteDTO.getTraceno()); |
||||||
|
if (invoiceAllLogin == null){ |
||||||
|
return AjaxResult.error("未查询到相关信息,请确认后输入"); |
||||||
|
} |
||||||
|
if ("S000".equals(invoiceAllLogin.getCode())){ |
||||||
|
JSONObject result = new JSONObject(); |
||||||
|
try { |
||||||
|
// 请求封装
|
||||||
|
String sendFormPost = HttpUtils.sendJsonPost("http://221.222.184.98:8880/login/submitSms", invoiceAllSubmitNoteDTO); |
||||||
|
result = JSONUtil.parseObj(sendFormPost); |
||||||
|
String code = result.get("code") != null ? result.get("code").toString() : ""; |
||||||
|
String msg = result.get("msg") != null ? result.get("msg").toString() : ""; |
||||||
|
String data = result.get("data") != null ? result.get("data").toString() : ""; |
||||||
|
|
||||||
|
if ("S000".equals(code)) { |
||||||
|
// 调用日志封装
|
||||||
|
InvoiceAllApiLog invoiceAllApiLog = new InvoiceAllApiLog(); |
||||||
|
invoiceAllApiLog.setCreateTime(new Date()); |
||||||
|
invoiceAllApiLog.setCompany(companyservice.getSellertax()); |
||||||
|
invoiceAllApiLog.setIdentityId(companyservice.getIdentity()); |
||||||
|
invoiceAllApiLog.setUrl("http://221.222.184.98:8880/login/submitSms"); |
||||||
|
invoiceAllApiLog.setSendMsg(JSONUtil.toJsonStr(invoiceAllSubmitNoteDTO)); |
||||||
|
invoiceAllApiLog.setResultMsg(data); |
||||||
|
JSONObject dataObject = JSONUtil.parseObj(data); |
||||||
|
String tokenId = dataObject.get("dzfp-ssotoken") != null ? dataObject.get("dzfp-ssotoken").toString() : ""; |
||||||
|
invoiceAllApiLog.setRequestId(tokenId); |
||||||
|
allApiLogMapper.insert(invoiceAllApiLog); |
||||||
|
} else { |
||||||
|
return AjaxResult.error(msg); |
||||||
|
} |
||||||
|
|
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
log.error("【金四服务类】【金财数科】【全电登录】API请求异常,外部报文返回code非S000。错误信息:{}", e.getMessage()); |
||||||
|
return AjaxResult.error(ErrorCode.INCOME_ERROR); |
||||||
|
} |
||||||
|
return AjaxResult.success(result); |
||||||
|
}else { |
||||||
|
return AjaxResult.error("登录失败,请重新登录"); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,109 @@ |
|||||||
|
package com.jianshui.system.domain; |
||||||
|
|
||||||
|
import com.jianshui.common.annotation.Excel; |
||||||
|
import com.jianshui.common.core.domain.BaseEntity; |
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* 全电登录结果信息对象 invoice_all_login_result |
||||||
|
* |
||||||
|
* @author jianshui |
||||||
|
* @date 2023-08-14 |
||||||
|
*/ |
||||||
|
public class InvoiceAllLoginResult extends BaseEntity |
||||||
|
{ |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** 主键 */ |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** 响应码 */ |
||||||
|
@Excel(name = "响应码") |
||||||
|
private String code; |
||||||
|
|
||||||
|
/** 响应数据 */ |
||||||
|
@Excel(name = "响应数据") |
||||||
|
private String data; |
||||||
|
|
||||||
|
/** 返回信息 */ |
||||||
|
@Excel(name = "返回信息") |
||||||
|
private String msg; |
||||||
|
|
||||||
|
/** 响应结果 true成功 false失败 */ |
||||||
|
@Excel(name = "响应结果 true成功 false失败") |
||||||
|
private Integer success; |
||||||
|
|
||||||
|
/** 流水号 */ |
||||||
|
@Excel(name = "流水号") |
||||||
|
private String trace; |
||||||
|
|
||||||
|
public void setId(Long id) |
||||||
|
{ |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getId() |
||||||
|
{ |
||||||
|
return id; |
||||||
|
} |
||||||
|
public void setCode(String code) |
||||||
|
{ |
||||||
|
this.code = code; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCode() |
||||||
|
{ |
||||||
|
return code; |
||||||
|
} |
||||||
|
public void setData(String data) |
||||||
|
{ |
||||||
|
this.data = data; |
||||||
|
} |
||||||
|
|
||||||
|
public String getData() |
||||||
|
{ |
||||||
|
return data; |
||||||
|
} |
||||||
|
public void setMsg(String msg) |
||||||
|
{ |
||||||
|
this.msg = msg; |
||||||
|
} |
||||||
|
|
||||||
|
public String getMsg() |
||||||
|
{ |
||||||
|
return msg; |
||||||
|
} |
||||||
|
public void setSuccess(Integer success) |
||||||
|
{ |
||||||
|
this.success = success; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getSuccess() |
||||||
|
{ |
||||||
|
return success; |
||||||
|
} |
||||||
|
public void setTrace(String trace) |
||||||
|
{ |
||||||
|
this.trace = trace; |
||||||
|
} |
||||||
|
|
||||||
|
public String getTrace() |
||||||
|
{ |
||||||
|
return trace; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||||
|
.append("id", getId()) |
||||||
|
.append("code", getCode()) |
||||||
|
.append("data", getData()) |
||||||
|
.append("msg", getMsg()) |
||||||
|
.append("success", getSuccess()) |
||||||
|
.append("trace", getTrace()) |
||||||
|
.append("createTime", getCreateTime()) |
||||||
|
.append("updateTime", getUpdateTime()) |
||||||
|
.toString(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,69 @@ |
|||||||
|
package com.jianshui.system.mapper; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import com.jianshui.system.domain.InvoiceAllLoginResult; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
/** |
||||||
|
* 全电登录结果信息Mapper接口 |
||||||
|
* |
||||||
|
* @author jianshui |
||||||
|
* @date 2023-08-14 |
||||||
|
*/ |
||||||
|
public interface InvoiceAllLoginResultMapper |
||||||
|
{ |
||||||
|
/** |
||||||
|
* 查询全电登录结果信息 |
||||||
|
* |
||||||
|
* @param id 全电登录结果信息主键 |
||||||
|
* @return 全电登录结果信息 |
||||||
|
*/ |
||||||
|
public InvoiceAllLoginResult selectInvoiceAllLoginResultById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询全电登录结果信息列表 |
||||||
|
* |
||||||
|
* @param invoiceAllLoginResult 全电登录结果信息 |
||||||
|
* @return 全电登录结果信息集合 |
||||||
|
*/ |
||||||
|
public List<InvoiceAllLoginResult> selectInvoiceAllLoginResultList(InvoiceAllLoginResult invoiceAllLoginResult); |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增全电登录结果信息 |
||||||
|
* |
||||||
|
* @param invoiceAllLoginResult 全电登录结果信息 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int insertInvoiceAllLoginResult(InvoiceAllLoginResult invoiceAllLoginResult); |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改全电登录结果信息 |
||||||
|
* |
||||||
|
* @param invoiceAllLoginResult 全电登录结果信息 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int updateInvoiceAllLoginResult(InvoiceAllLoginResult invoiceAllLoginResult); |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除全电登录结果信息 |
||||||
|
* |
||||||
|
* @param id 全电登录结果信息主键 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceAllLoginResultById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除全电登录结果信息 |
||||||
|
* |
||||||
|
* @param ids 需要删除的数据主键集合 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceAllLoginResultByIds(Long[] ids); |
||||||
|
|
||||||
|
/** |
||||||
|
* 功能描述: |
||||||
|
* @param qqlsh |
||||||
|
* @return : com.jianshui.system.domain.InvoiceAllLoginResult |
||||||
|
*/ |
||||||
|
InvoiceAllLoginResult findByQqlsh(@Param("qqlsh") String qqlsh); |
||||||
|
} |
@ -0,0 +1,87 @@ |
|||||||
|
<?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.jianshui.system.mapper.InvoiceAllLoginResultMapper"> |
||||||
|
|
||||||
|
<resultMap type="InvoiceAllLoginResult" id="InvoiceAllLoginResultResult"> |
||||||
|
<result property="id" column="id" /> |
||||||
|
<result property="code" column="code" /> |
||||||
|
<result property="data" column="data" /> |
||||||
|
<result property="msg" column="msg" /> |
||||||
|
<result property="success" column="success" /> |
||||||
|
<result property="trace" column="trace" /> |
||||||
|
<result property="createTime" column="create_time" /> |
||||||
|
<result property="updateTime" column="update_time" /> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<sql id="selectInvoiceAllLoginResultVo"> |
||||||
|
select id, code, data, msg, success, trace, create_time, update_time from invoice_all_login_result |
||||||
|
</sql> |
||||||
|
|
||||||
|
<select id="selectInvoiceAllLoginResultList" parameterType="InvoiceAllLoginResult" resultMap="InvoiceAllLoginResultResult"> |
||||||
|
<include refid="selectInvoiceAllLoginResultVo"/> |
||||||
|
<where> |
||||||
|
<if test="code != null and code != ''"> and code = #{code}</if> |
||||||
|
<if test="data != null and data != ''"> and data = #{data}</if> |
||||||
|
<if test="msg != null and msg != ''"> and msg = #{msg}</if> |
||||||
|
<if test="success != null "> and success = #{success}</if> |
||||||
|
<if test="trace != null and trace != ''"> and trace = #{trace}</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectInvoiceAllLoginResultById" parameterType="Long" resultMap="InvoiceAllLoginResultResult"> |
||||||
|
<include refid="selectInvoiceAllLoginResultVo"/> |
||||||
|
where id = #{id} |
||||||
|
</select> |
||||||
|
<select id="findByQqlsh" resultMap="InvoiceAllLoginResultResult"> |
||||||
|
select * from invoice_all_login_result where trace = #{qqlsh} |
||||||
|
</select> |
||||||
|
|
||||||
|
<insert id="insertInvoiceAllLoginResult" parameterType="InvoiceAllLoginResult" useGeneratedKeys="true" keyProperty="id"> |
||||||
|
insert into invoice_all_login_result |
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||||
|
<if test="code != null">code,</if> |
||||||
|
<if test="data != null">data,</if> |
||||||
|
<if test="msg != null">msg,</if> |
||||||
|
<if test="success != null">success,</if> |
||||||
|
<if test="trace != null">trace,</if> |
||||||
|
<if test="createTime != null">create_time,</if> |
||||||
|
<if test="updateTime != null">update_time,</if> |
||||||
|
</trim> |
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||||
|
<if test="code != null">#{code},</if> |
||||||
|
<if test="data != null">#{data},</if> |
||||||
|
<if test="msg != null">#{msg},</if> |
||||||
|
<if test="success != null">#{success},</if> |
||||||
|
<if test="trace != null">#{trace},</if> |
||||||
|
<if test="createTime != null">#{createTime},</if> |
||||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||||
|
</trim> |
||||||
|
</insert> |
||||||
|
|
||||||
|
<update id="updateInvoiceAllLoginResult" parameterType="InvoiceAllLoginResult"> |
||||||
|
update invoice_all_login_result |
||||||
|
<trim prefix="SET" suffixOverrides=","> |
||||||
|
<if test="code != null">code = #{code},</if> |
||||||
|
<if test="data != null">data = #{data},</if> |
||||||
|
<if test="msg != null">msg = #{msg},</if> |
||||||
|
<if test="success != null">success = #{success},</if> |
||||||
|
<if test="trace != null">trace = #{trace},</if> |
||||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||||
|
</trim> |
||||||
|
where id = #{id} |
||||||
|
</update> |
||||||
|
|
||||||
|
<delete id="deleteInvoiceAllLoginResultById" parameterType="Long"> |
||||||
|
delete from invoice_all_login_result where id = #{id} |
||||||
|
</delete> |
||||||
|
|
||||||
|
<delete id="deleteInvoiceAllLoginResultByIds" parameterType="String"> |
||||||
|
delete from invoice_all_login_result where id in |
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</delete> |
||||||
|
</mapper> |
Reference in new issue