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
dd517567
Commit
dd517567
authored
Jul 27, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规范字典表名称
parent
f849b6e8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
40 deletions
+38
-40
DictDTO.java
gic-store-api/src/main/java/com/gic/store/dto/DictDTO.java
+2
-2
DictApiService.java
...i/src/main/java/com/gic/store/service/DictApiService.java
+3
-3
DictMapper.java
...ce/src/main/java/com/gic/store/dao/mapper/DictMapper.java
+9
-8
TabDict.java
...e-service/src/main/java/com/gic/store/entity/TabDict.java
+2
-5
DictService.java
...vice/src/main/java/com/gic/store/service/DictService.java
+3
-3
DictServiceImpl.java
...main/java/com/gic/store/service/impl/DictServiceImpl.java
+2
-2
DictApiServiceImpl.java
.../com/gic/store/service/outer/impl/DictApiServiceImpl.java
+5
-5
DictMapper.xml
gic-store-service/src/main/resources/mapper/DictMapper.xml
+11
-11
ClerkImportController.java
...a/com/gic/store/web/controller/ClerkImportController.java
+1
-1
No files found.
gic-store-api/src/main/java/com/gic/store/dto/
Gic
DictDTO.java
→
gic-store-api/src/main/java/com/gic/store/dto/DictDTO.java
View file @
dd517567
...
...
@@ -8,7 +8,7 @@ import java.util.Date;
* @Description:
* @date 2020-03-26 15:08
*/
public
class
Gic
DictDTO
implements
Serializable
{
public
class
DictDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
573633208657720956L
;
/**
...
...
@@ -119,7 +119,7 @@ public class GicDictDTO implements Serializable {
@Override
public
String
toString
()
{
return
"
Gic
DictDTO{"
+
return
"DictDTO{"
+
"dictId='"
+
dictId
+
'\''
+
", dictType='"
+
dictType
+
'\''
+
", dictCode='"
+
dictCode
+
'\''
+
...
...
gic-store-api/src/main/java/com/gic/store/service/DictApiService.java
View file @
dd517567
package
com
.
gic
.
store
.
service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.
Gic
DictDTO
;
import
com.gic.store.dto.DictDTO
;
/**
* @author zhiwj
...
...
@@ -17,8 +17,8 @@ public interface DictApiService {
* @author zhiwj
* @param dictType
* @param dictCode
* @return com.gic.api.base.commons.ServiceResponse<com.gic.store.dto.
Gic
DictDTO>
* @return com.gic.api.base.commons.ServiceResponse<com.gic.store.dto.DictDTO>
* @throws
*/
ServiceResponse
<
Gic
DictDTO
>
getDictByCode
(
String
dictType
,
String
dictCode
);
ServiceResponse
<
DictDTO
>
getDictByCode
(
String
dictType
,
String
dictCode
);
}
gic-store-service/src/main/java/com/gic/store/dao/mapper/DictMapper.java
View file @
dd517567
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.Tab
Gic
Dict
;
import
com.gic.store.entity.TabDict
;
import
org.apache.ibatis.annotations.Param
;
/**
*
...
...
@@ -16,7 +16,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
Tab
Gic
Dict
record
);
int
insert
(
TabDict
record
);
/**
* 动态插入一条记录
...
...
@@ -24,7 +24,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
Tab
Gic
Dict
record
);
int
insertSelective
(
TabDict
record
);
/**
* 根据主键查询
...
...
@@ -32,7 +32,7 @@ public interface DictMapper {
* @param dictId 主键
* @return 实体对象
*/
Tab
Gic
Dict
selectByPrimaryKey
(
String
dictId
);
TabDict
selectByPrimaryKey
(
String
dictId
);
/**
* 根据主键动态更新记录
...
...
@@ -40,7 +40,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
Tab
Gic
Dict
record
);
int
updateByPrimaryKeySelective
(
TabDict
record
);
/**
* 根据主键更新记录
...
...
@@ -48,7 +48,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
Tab
Gic
Dict
record
);
int
updateByPrimaryKey
(
TabDict
record
);
/**
* getDictByCode
...
...
@@ -57,8 +57,8 @@ public interface DictMapper {
* @author zhiwj
* @param dictType
* @param dictCode
* @return com.gic.store.entity.Tab
Gic
Dict
* @return com.gic.store.entity.TabDict
* @throws
*/
Tab
Gic
Dict
getDictByCode
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dictCode"
)
String
dictCode
);
TabDict
getDictByCode
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dictCode"
)
String
dictCode
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/Tab
Gic
Dict.java
→
gic-store-service/src/main/java/com/gic/store/entity/TabDict.java
View file @
dd517567
...
...
@@ -3,16 +3,13 @@ package com.gic.store.entity;
import
java.util.Date
;
/**
* tab_gic_dict
*/
/**
*
* @ClassName: Tab
Gic
Dict
* @ClassName: TabDict
* @Description:
* @author zhiwj
* @date 2020-09-09 18:35
*/
public
class
Tab
Gic
Dict
{
public
class
TabDict
{
/**
*
*/
...
...
gic-store-service/src/main/java/com/gic/store/service/DictService.java
View file @
dd517567
package
com
.
gic
.
store
.
service
;
import
com.gic.store.entity.Tab
Gic
Dict
;
import
com.gic.store.entity.TabDict
;
/**
* @author zhiwj
...
...
@@ -16,9 +16,9 @@ public interface DictService {
* @author zhiwj
* @param dictType
* @param dictValue
* @return com.gic.store.entity.Tab
Gic
Dict
* @return com.gic.store.entity.TabDict
* @throws
*/
Tab
Gic
Dict
getDictByCode
(
String
dictType
,
String
dictValue
);
TabDict
getDictByCode
(
String
dictType
,
String
dictValue
);
}
gic-store-service/src/main/java/com/gic/store/service/impl/DictServiceImpl.java
View file @
dd517567
package
com
.
gic
.
store
.
service
.
impl
;
import
com.gic.store.dao.mapper.DictMapper
;
import
com.gic.store.entity.Tab
Gic
Dict
;
import
com.gic.store.entity.TabDict
;
import
com.gic.store.service.DictService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -19,7 +19,7 @@ public class DictServiceImpl implements DictService {
@Override
public
Tab
Gic
Dict
getDictByCode
(
String
dictType
,
String
dictCode
)
{
public
TabDict
getDictByCode
(
String
dictType
,
String
dictCode
)
{
return
dictMapper
.
getDictByCode
(
dictType
,
dictCode
);
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/DictApiServiceImpl.java
View file @
dd517567
...
...
@@ -3,8 +3,8 @@ package com.gic.store.service.outer.impl;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.store.dto.
Gic
DictDTO
;
import
com.gic.store.entity.Tab
Gic
Dict
;
import
com.gic.store.dto.DictDTO
;
import
com.gic.store.entity.TabDict
;
import
com.gic.store.service.DictApiService
;
import
com.gic.store.service.DictService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,9 +22,9 @@ public class DictApiServiceImpl implements DictApiService {
private
DictService
dictService
;
@Override
public
ServiceResponse
<
Gic
DictDTO
>
getDictByCode
(
String
dictType
,
String
dictCode
)
{
Tab
Gic
Dict
dict
=
dictService
.
getDictByCode
(
dictType
,
dictCode
);
GicDictDTO
gicDictDTO
=
EntityUtil
.
changeEntityByJSON
(
Gic
DictDTO
.
class
,
dict
);
public
ServiceResponse
<
DictDTO
>
getDictByCode
(
String
dictType
,
String
dictCode
)
{
TabDict
dict
=
dictService
.
getDictByCode
(
dictType
,
dictCode
);
DictDTO
gicDictDTO
=
EntityUtil
.
changeEntityByJSON
(
DictDTO
.
class
,
dict
);
return
EnterpriseServiceResponse
.
success
(
gicDictDTO
);
}
}
gic-store-service/src/main/resources/mapper/DictMapper.xml
View file @
dd517567
<?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.DictMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.Tab
Gic
Dict"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabDict"
>
<id
column=
"DICT_ID"
jdbcType=
"CHAR"
property=
"dictId"
/>
<result
column=
"DICT_TYPE"
jdbcType=
"VARCHAR"
property=
"dictType"
/>
<result
column=
"DICT_CODE"
jdbcType=
"VARCHAR"
property=
"dictCode"
/>
...
...
@@ -17,19 +17,19 @@
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_
gic_
dict
from tab_dict
where DICT_ID = #{dictId,jdbcType=CHAR}
</select>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.Tab
Gic
Dict"
>
insert into tab_
gic_dict (DICT_ID, DICT_TYPE, DICT_CODE,
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabDict"
>
insert into tab_
dict (DICT_ID, DICT_TYPE, DICT_CODE,
DICT_VALUE, DICT_NAME, DICT_STATUS,
CREATE_DATE, DICT_SORT)
values (#{dictId,jdbcType=CHAR}, #{dictType,jdbcType=VARCHAR}, #{dictCode,jdbcType=VARCHAR},
#{dictValue,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, #{dictStatus,jdbcType=INTEGER},
#{createDate,jdbcType=TIMESTAMP}, #{dictSort,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.Tab
Gic
Dict"
>
insert into tab_
gic_
dict
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabDict"
>
insert into tab_dict
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dictId != null"
>
DICT_ID,
...
...
@@ -83,8 +83,8 @@
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.Tab
Gic
Dict"
>
update tab_
gic_
dict
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabDict"
>
update tab_dict
<set>
<if
test=
"dictType != null"
>
DICT_TYPE = #{dictType,jdbcType=VARCHAR},
...
...
@@ -110,8 +110,8 @@
</set>
where DICT_ID = #{dictId,jdbcType=CHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.Tab
Gic
Dict"
>
update tab_
gic_
dict
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabDict"
>
update tab_dict
set DICT_TYPE = #{dictType,jdbcType=VARCHAR},
DICT_CODE = #{dictCode,jdbcType=VARCHAR},
DICT_VALUE = #{dictValue,jdbcType=VARCHAR},
...
...
@@ -124,7 +124,7 @@
<select
id=
"getDictByCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_
gic_
dict
from tab_dict
where
dict_type = #{dictType} and dict_code = #{dictCode}
</select>
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/ClerkImportController.java
View file @
dd517567
...
...
@@ -468,7 +468,7 @@ public class ClerkImportController {
validate
=
false
;
}
}
Gic
DictDTO
dict
=
this
.
dictApiService
.
getDictByCode
(
Constants
.
NATION_CODE_DICT
,
nationcode
).
getResult
();
DictDTO
dict
=
this
.
dictApiService
.
getDictByCode
(
Constants
.
NATION_CODE_DICT
,
nationcode
).
getResult
();
if
(
dict
==
null
)
{
bean
.
setErrorMessage
(
"区号错误"
);
validate
=
false
;
...
...
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