Commit 528075fc authored by chenwj's avatar chenwj

修复bug

parent e765d29c
...@@ -3,11 +3,12 @@ package com.roo.dao; ...@@ -3,11 +3,12 @@ package com.roo.dao;
import com.roo.entity.DappsAudit; import com.roo.entity.DappsAudit;
import com.roo.entity.DappsAuditExample; import com.roo.entity.DappsAuditExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository @Mapper
public interface DappsAuditMapper { public interface DappsAuditDao {
int countByExample(DappsAuditExample example); int countByExample(DappsAuditExample example);
int deleteByExample(DappsAuditExample example); int deleteByExample(DappsAuditExample example);
......
...@@ -3,11 +3,13 @@ package com.roo.dao; ...@@ -3,11 +3,13 @@ package com.roo.dao;
import com.roo.entity.TokenAudit; import com.roo.entity.TokenAudit;
import com.roo.entity.TokenAuditExample; import com.roo.entity.TokenAuditExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Mapper
public interface TokenAuditMapper { public interface TokenAuditDao {
int countByExample(TokenAuditExample example); int countByExample(TokenAuditExample example);
int deleteByExample(TokenAuditExample example); int deleteByExample(TokenAuditExample example);
......
package com.roo.service.impl; package com.roo.service.impl;
import com.roo.dao.DappsAuditMapper; import com.roo.dao.DappsAuditDao;
import com.roo.dto.DappsAuditDTO; import com.roo.dto.DappsAuditDTO;
import com.roo.entity.DappsAudit; import com.roo.entity.DappsAudit;
import com.roo.enums.AuditStatusEnum; import com.roo.enums.AuditStatusEnum;
...@@ -14,11 +14,11 @@ import java.util.Date; ...@@ -14,11 +14,11 @@ import java.util.Date;
public class DappsAuditServiceImpl implements DappsAuditService { public class DappsAuditServiceImpl implements DappsAuditService {
@Autowired @Autowired
private DappsAuditMapper dappsAuditMapper; private DappsAuditDao dappsAuditDao;
@Override @Override
public void save(DappsAuditDTO dto) { public void save(DappsAuditDTO dto) {
dappsAuditMapper.insert(DappsAudit.builder() dappsAuditDao.insert(DappsAudit.builder()
.chainCode(dto.getChainCode()) .chainCode(dto.getChainCode())
.createTime(new Date()) .createTime(new Date())
.description(dto.getDescription()) .description(dto.getDescription())
......
package com.roo.service.impl; package com.roo.service.impl;
import com.roo.dao.TokenAuditMapper; import com.roo.dao.TokenAuditDao;
import com.roo.dto.TokenAuditDTO; import com.roo.dto.TokenAuditDTO;
import com.roo.entity.TokenAudit; import com.roo.entity.TokenAudit;
import com.roo.enums.AuditStatusEnum; import com.roo.enums.AuditStatusEnum;
...@@ -14,11 +14,11 @@ import java.util.Date; ...@@ -14,11 +14,11 @@ import java.util.Date;
public class TokenAuditServiceImpl implements TokenAuditService { public class TokenAuditServiceImpl implements TokenAuditService {
@Autowired @Autowired
private TokenAuditMapper tokenAuditMapper; private TokenAuditDao tokenAuditDao;
@Override @Override
public void save(TokenAuditDTO dto) { public void save(TokenAuditDTO dto) {
tokenAuditMapper.insert(TokenAudit.builder() tokenAuditDao.insert(TokenAudit.builder()
.chainCode(dto.getChainCode()) .chainCode(dto.getChainCode())
.contractId(dto.getContractId()) .contractId(dto.getContractId())
.createTime(new Date()) .createTime(new Date())
......
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.roo.dao.DappsAuditMapper" > <mapper namespace="com.roo.dao.DappsAuditDao" >
<resultMap id="BaseResultMap" type="com.roo.entity.DappsAudit" > <resultMap id="BaseResultMap" type="com.roo.entity.DappsAudit" >
<id column="id" property="id" jdbcType="BIGINT" /> <id column="id" property="id" jdbcType="BIGINT" />
<result column="chain_code" property="chainCode" jdbcType="VARCHAR" /> <result column="chain_code" property="chainCode" jdbcType="VARCHAR" />
......
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.roo.dao.TokenAuditMapper" > <mapper namespace="com.roo.dao.TokenAuditDao" >
<resultMap id="BaseResultMap" type="com.roo.entity.TokenAudit" > <resultMap id="BaseResultMap" type="com.roo.entity.TokenAudit" >
<id column="id" property="id" jdbcType="BIGINT" /> <id column="id" property="id" jdbcType="BIGINT" />
<result column="chain_code" property="chainCode" jdbcType="VARCHAR" /> <result column="chain_code" property="chainCode" jdbcType="VARCHAR" />
......
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