Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
7cfc5786
Commit
7cfc5786
authored
Jan 18, 2022
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
dee5824f
fd2620da
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
519 additions
and
0 deletions
+519
-0
ErrorLogDTO.java
.../main/java/com/gic/haoban/manage/api/dto/ErrorLogDTO.java
+90
-0
ErrorLogApiService.java
...gic/haoban/manage/api/service/out/ErrorLogApiService.java
+23
-0
TabHaobanErrorLogMapper.java
...an/manage/service/dao/mapper/TabHaobanErrorLogMapper.java
+18
-0
TabHaobanErrorLog.java
...m/gic/haoban/manage/service/entity/TabHaobanErrorLog.java
+130
-0
ErrorLogService.java
...om/gic/haoban/manage/service/service/ErrorLogService.java
+23
-0
ErrorLogServiceImpl.java
...oban/manage/service/service/impl/ErrorLogServiceImpl.java
+31
-0
ErrorLogApiServiceImpl.java
...nage/service/service/out/impl/ErrorLogApiServiceImpl.java
+28
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+0
-0
TabHaobanErrorLogMapper.xml
...ice/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
+141
-0
ErrorLogTest.java
haoban-manage3-service/src/test/java/ErrorLogTest.java
+35
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/ErrorLogDTO.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
/**
* tab_haoban_error_log
* @author
*/
public
class
ErrorLogDTO
implements
Serializable
{
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 模块描述 例:haoban-commission-service
*/
private
String
moduleDesc
;
/**
* 错误描述,系统错误、参数错误、调用错误
*/
private
String
errorDesc
;
/**
* 错误标识id
*/
private
String
errorFlagId
;
/**
* 错误参数
*/
private
String
errorParam
;
/**
* 备注
*/
private
String
remark
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getModuleDesc
()
{
return
moduleDesc
;
}
public
void
setModuleDesc
(
String
moduleDesc
)
{
this
.
moduleDesc
=
moduleDesc
;
}
public
String
getErrorDesc
()
{
return
errorDesc
;
}
public
void
setErrorDesc
(
String
errorDesc
)
{
this
.
errorDesc
=
errorDesc
;
}
public
String
getErrorFlagId
()
{
return
errorFlagId
;
}
public
void
setErrorFlagId
(
String
errorFlagId
)
{
this
.
errorFlagId
=
errorFlagId
;
}
public
String
getErrorParam
()
{
return
errorParam
;
}
public
void
setErrorParam
(
String
errorParam
)
{
this
.
errorParam
=
errorParam
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/out/ErrorLogApiService.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
out
;
import
com.gic.haoban.manage.api.dto.ErrorLogDTO
;
/**
* desc:好办错误日志服务接口
*
* @author: YongEn
* @date: 2022/1/18
**/
public
interface
ErrorLogApiService
{
/**
* desc: 保存
*
* @param dto
* @return :
* @author : YongEn
* @date : 2022/1/18
*/
void
save
(
ErrorLogDTO
dto
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanErrorLogMapper.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
public
interface
TabHaobanErrorLogMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
TabHaobanErrorLog
record
);
int
insertSelective
(
TabHaobanErrorLog
record
);
TabHaobanErrorLog
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
TabHaobanErrorLog
record
);
int
updateByPrimaryKey
(
TabHaobanErrorLog
record
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanErrorLog.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* tab_haoban_error_log
* @author
*/
public
class
TabHaobanErrorLog
implements
Serializable
{
/**
* 主键id
*/
private
Long
id
;
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 模块描述 例:haoban-commission-service
*/
private
String
moduleDesc
;
/**
* 错误描述,系统错误、参数错误、调用错误
*/
private
String
errorDesc
;
/**
* 错误标识id
*/
private
String
errorFlagId
;
/**
* 错误参数
*/
private
String
errorParam
;
/**
* 备注
*/
private
String
remark
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getModuleDesc
()
{
return
moduleDesc
;
}
public
void
setModuleDesc
(
String
moduleDesc
)
{
this
.
moduleDesc
=
moduleDesc
;
}
public
String
getErrorDesc
()
{
return
errorDesc
;
}
public
void
setErrorDesc
(
String
errorDesc
)
{
this
.
errorDesc
=
errorDesc
;
}
public
String
getErrorFlagId
()
{
return
errorFlagId
;
}
public
void
setErrorFlagId
(
String
errorFlagId
)
{
this
.
errorFlagId
=
errorFlagId
;
}
public
String
getErrorParam
()
{
return
errorParam
;
}
public
void
setErrorParam
(
String
errorParam
)
{
this
.
errorParam
=
errorParam
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/ErrorLogService.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
/**
* desc:好办错误日志服务
*
* @author: YongEn
* @date: 2022/1/18
**/
public
interface
ErrorLogService
{
/**
* desc: 保存错误日志
*
* @param errorLog
* @return :
* @author : YongEn
* @date : 2022/1/18
*/
void
save
(
TabHaobanErrorLog
errorLog
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ErrorLogServiceImpl.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* desc:
*
* @author: YongEn
* @date: 2022/1/18
**/
@Service
public
class
ErrorLogServiceImpl
implements
ErrorLogService
{
@Autowired
private
TabHaobanErrorLogMapper
tabHaobanErrorLogMapper
;
@Override
public
void
save
(
TabHaobanErrorLog
errorLog
)
{
errorLog
.
setId
(
UniqueIdUtils
.
uniqueLong
());
errorLog
.
setCreateTime
(
new
Date
());
errorLog
.
setUpdateTime
(
new
Date
());
tabHaobanErrorLogMapper
.
insert
(
errorLog
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ErrorLogApiServiceImpl.java
0 → 100644
View file @
7cfc5786
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.ErrorLogDTO
;
import
com.gic.haoban.manage.api.service.out.ErrorLogApiService
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* desc:好办错误日志服务实现
*
* @author: YongEn
* @date: 2022/1/18
**/
@Service
public
class
ErrorLogApiServiceImpl
implements
ErrorLogApiService
{
@Autowired
private
ErrorLogService
errorLogService
;
@Override
public
void
save
(
ErrorLogDTO
dto
)
{
TabHaobanErrorLog
errorLog
=
EntityUtil
.
changeEntityNew
(
TabHaobanErrorLog
.
class
,
dto
);
errorLogService
.
save
(
errorLog
);
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
7cfc5786
This diff is collapsed.
Click to expand it.
haoban-manage3-service/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
0 → 100644
View file @
7cfc5786
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"module_desc"
jdbcType=
"VARCHAR"
property=
"moduleDesc"
/>
<result
column=
"error_desc"
jdbcType=
"VARCHAR"
property=
"errorDesc"
/>
<result
column=
"error_flag_id"
jdbcType=
"VARCHAR"
property=
"errorFlagId"
/>
<result
column=
"error_param"
jdbcType=
"VARCHAR"
property=
"errorParam"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log (id,enterprise_id, module_desc, error_desc,
error_flag_id, error_param, remark,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"moduleDesc != null"
>
module_desc,
</if>
<if
test=
"errorDesc != null"
>
error_desc,
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id,
</if>
<if
test=
"errorParam != null"
>
error_param,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
#{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
#{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
#{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
#{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
error_desc = #{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
error_param = #{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/test/java/ErrorLogTest.java
0 → 100644
View file @
7cfc5786
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
/**
* desc:
*
* @author: YongEn
* @date: 2022/1/18
**/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
public
class
ErrorLogTest
{
@Autowired
private
ErrorLogService
errorLogService
;
@Test
public
void
testSave
()
{
TabHaobanErrorLog
errorLog
=
new
TabHaobanErrorLog
();
errorLog
.
setEnterpriseId
(
"123123"
);
errorLog
.
setModuleDesc
(
"haoban-manage3-service"
);
errorLog
.
setErrorDesc
(
"测试错误"
);
errorLog
.
setErrorFlagId
(
"123123"
);
errorLog
.
setErrorParam
(
"{123,123}"
);
errorLog
.
setRemark
(
"123123"
);
errorLogService
.
save
(
errorLog
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment