Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
6ea480e8
Commit
6ea480e8
authored
Nov 11, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加日志
parent
368bd1c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
270 additions
and
0 deletions
+270
-0
TabAuthStoreLogMapper.java
.../java/com/gic/store/dao/mapper/TabAuthStoreLogMapper.java
+60
-0
TabAuthStoreLog.java
...e/src/main/java/com/gic/store/entity/TabAuthStoreLog.java
+85
-0
TabAuthStoreLogMapper.xml
...rvice/src/main/resources/mapper/TabAuthStoreLogMapper.xml
+120
-0
StoreDictController.java
...ava/com/gic/store/web/controller/StoreDictController.java
+5
-0
No files found.
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabAuthStoreLogMapper.java
0 → 100644
View file @
6ea480e8
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabAuthStoreLog
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabAuthStoreLogMapper
{
/**
* 根据主键删除
*
* @param id 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
id
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabAuthStoreLog
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabAuthStoreLog
record
);
/**
* 根据主键查询
*
* @param id 主键
* @return 实体对象
*/
TabAuthStoreLog
selectByPrimaryKey
(
Integer
id
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabAuthStoreLog
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabAuthStoreLog
record
);
List
<
TabAuthStoreLog
>
listLogByKey
(
@Param
(
"key"
)
String
key
,
@Param
(
"status"
)
int
status
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabAuthStoreLog.java
0 → 100644
View file @
6ea480e8
package
com
.
gic
.
store
.
entity
;
/**
* tab_auth_store_log
*/
public
class
TabAuthStoreLog
{
/**
*
*/
private
Integer
id
;
/**
*
*/
private
Integer
storeInfoId
;
/**
*
*/
private
Integer
fromEnterpriseId
;
/**
*
*/
private
Integer
toEnterpriseId
;
/**
*
*/
private
String
key
;
/**
* 1 授权成功 2 授权失败
*/
private
Integer
status
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getStoreInfoId
()
{
return
storeInfoId
;
}
public
void
setStoreInfoId
(
Integer
storeInfoId
)
{
this
.
storeInfoId
=
storeInfoId
;
}
public
Integer
getFromEnterpriseId
()
{
return
fromEnterpriseId
;
}
public
void
setFromEnterpriseId
(
Integer
fromEnterpriseId
)
{
this
.
fromEnterpriseId
=
fromEnterpriseId
;
}
public
Integer
getToEnterpriseId
()
{
return
toEnterpriseId
;
}
public
void
setToEnterpriseId
(
Integer
toEnterpriseId
)
{
this
.
toEnterpriseId
=
toEnterpriseId
;
}
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
}
\ No newline at end of file
gic-store-service/src/main/resources/mapper/TabAuthStoreLogMapper.xml
0 → 100644
View file @
6ea480e8
<?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.store.dao.mapper.TabAuthStoreLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabAuthStoreLog"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"store_info_id"
jdbcType=
"INTEGER"
property=
"storeInfoId"
/>
<result
column=
"from_enterprise_id"
jdbcType=
"INTEGER"
property=
"fromEnterpriseId"
/>
<result
column=
"to_enterprise_id"
jdbcType=
"INTEGER"
property=
"toEnterpriseId"
/>
<result
column=
"key"
jdbcType=
"VARCHAR"
property=
"key"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, store_info_id, from_enterprise_id, to_enterprise_id, key, status
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_auth_store_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_auth_store_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabAuthStoreLog"
>
<selectKey
keyProperty=
"storeInfoId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_auth_store_log (id, store_info_id, from_enterprise_id,
to_enterprise_id, key, status
)
values (#{id,jdbcType=INTEGER}, #{storeInfoId,jdbcType=INTEGER}, #{fromEnterpriseId,jdbcType=INTEGER},
#{toEnterpriseId,jdbcType=INTEGER}, #{key,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabAuthStoreLog"
>
<selectKey
keyProperty=
"storeInfoId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_auth_store_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"storeInfoId != null"
>
store_info_id,
</if>
<if
test=
"fromEnterpriseId != null"
>
from_enterprise_id,
</if>
<if
test=
"toEnterpriseId != null"
>
to_enterprise_id,
</if>
<if
test=
"key != null"
>
key,
</if>
<if
test=
"status != null"
>
status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"storeInfoId != null"
>
#{storeInfoId,jdbcType=INTEGER},
</if>
<if
test=
"fromEnterpriseId != null"
>
#{fromEnterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"toEnterpriseId != null"
>
#{toEnterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"key != null"
>
#{key,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabAuthStoreLog"
>
update tab_auth_store_log
<set>
<if
test=
"storeInfoId != null"
>
store_info_id = #{storeInfoId,jdbcType=INTEGER},
</if>
<if
test=
"fromEnterpriseId != null"
>
from_enterprise_id = #{fromEnterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"toEnterpriseId != null"
>
to_enterprise_id = #{toEnterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"key != null"
>
key = #{key,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabAuthStoreLog"
>
update tab_auth_store_log
set store_info_id = #{storeInfoId,jdbcType=INTEGER},
from_enterprise_id = #{fromEnterpriseId,jdbcType=INTEGER},
to_enterprise_id = #{toEnterpriseId,jdbcType=INTEGER},
key = #{key,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"listLogByKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_auth_store_log
where key = #{key}
and status = #{status}
</select>
</mapper>
\ No newline at end of file
gic-store-web/src/main/java/com/gic/store/web/controller/StoreDictController.java
View file @
6ea480e8
...
...
@@ -3,6 +3,7 @@ package com.gic.store.web.controller;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.utils.UserDetailUtils
;
...
...
@@ -94,6 +95,7 @@ public class StoreDictController {
}
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreType
(
enterpriseId
,
storeTypes
.
split
(
","
));
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"配置商户门店类型"
,
"门店类型"
);
return
RestResponse
.
success
();
}
else
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -109,6 +111,7 @@ public class StoreDictController {
}
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreStatus
(
enterpriseId
,
storeStatus
.
split
(
","
));
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"配置商户门店状态"
,
"门店状态"
);
return
RestResponse
.
success
();
}
else
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -121,6 +124,7 @@ public class StoreDictController {
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreStatusAndStoreType
(
enterpriseId
,
storeStatus
.
split
(
","
),
storeType
.
split
(
","
));
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"配置商户门店类型和门店状态"
,
"门店状态和门店类型"
);
return
RestResponse
.
success
();
}
else
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -137,6 +141,7 @@ public class StoreDictController {
}
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreField
(
enterpriseId
,
value
,
type
,
userId
);
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"自定义字段列表支持筛选配置"
,
"自定义字段"
);
return
RestResponse
.
success
();
}
return
EnterpriseRestResponse
.
failure
(
serviceResponse
);
...
...
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