Commit dd517567 by guojuxing

规范字典表名称

parent f849b6e8
......@@ -8,7 +8,7 @@ import java.util.Date;
* @Description:
* @date 2020-03-26 15:08
*/
public class GicDictDTO 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 "GicDictDTO{" +
return "DictDTO{" +
"dictId='" + dictId + '\'' +
", dictType='" + dictType + '\'' +
", dictCode='" + dictCode + '\'' +
......
package com.gic.store.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.store.dto.GicDictDTO;
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.GicDictDTO>
* @return com.gic.api.base.commons.ServiceResponse<com.gic.store.dto.DictDTO>
* @throws
*/
ServiceResponse<GicDictDTO> getDictByCode(String dictType, String dictCode);
ServiceResponse<DictDTO> getDictByCode(String dictType, String dictCode);
}
package com.gic.store.dao.mapper;
import com.gic.store.entity.TabGicDict;
import com.gic.store.entity.TabDict;
import org.apache.ibatis.annotations.Param;
/**
*
......@@ -16,7 +16,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabGicDict record);
int insert(TabDict record);
/**
* 动态插入一条记录
......@@ -24,7 +24,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabGicDict record);
int insertSelective(TabDict record);
/**
* 根据主键查询
......@@ -32,7 +32,7 @@ public interface DictMapper {
* @param dictId 主键
* @return 实体对象
*/
TabGicDict selectByPrimaryKey(String dictId);
TabDict selectByPrimaryKey(String dictId);
/**
* 根据主键动态更新记录
......@@ -40,7 +40,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabGicDict record);
int updateByPrimaryKeySelective(TabDict record);
/**
* 根据主键更新记录
......@@ -48,7 +48,7 @@ public interface DictMapper {
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabGicDict record);
int updateByPrimaryKey(TabDict record);
/**
* getDictByCode
......@@ -57,8 +57,8 @@ public interface DictMapper {
* @author zhiwj
* @param dictType
* @param dictCode
* @return com.gic.store.entity.TabGicDict
* @return com.gic.store.entity.TabDict
* @throws
*/
TabGicDict 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
......@@ -3,16 +3,13 @@ package com.gic.store.entity;
import java.util.Date;
/**
* tab_gic_dict
*/
/**
*
* @ClassName: TabGicDict
* @ClassName: TabDict
* @Description:
* @author zhiwj
* @date 2020-09-09 18:35
*/
public class TabGicDict {
public class TabDict {
/**
*
*/
......
package com.gic.store.service;
import com.gic.store.entity.TabGicDict;
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.TabGicDict
* @return com.gic.store.entity.TabDict
* @throws
*/
TabGicDict getDictByCode(String dictType, String dictValue);
TabDict getDictByCode(String dictType, String dictValue);
}
package com.gic.store.service.impl;
import com.gic.store.dao.mapper.DictMapper;
import com.gic.store.entity.TabGicDict;
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 TabGicDict getDictByCode(String dictType, String dictCode) {
public TabDict getDictByCode(String dictType, String dictCode) {
return dictMapper.getDictByCode(dictType, dictCode);
}
}
......@@ -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.GicDictDTO;
import com.gic.store.entity.TabGicDict;
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<GicDictDTO> getDictByCode(String dictType, String dictCode) {
TabGicDict dict = dictService.getDictByCode(dictType, dictCode);
GicDictDTO gicDictDTO = EntityUtil.changeEntityByJSON(GicDictDTO.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);
}
}
<?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.TabGicDict">
<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.TabGicDict">
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.TabGicDict">
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.TabGicDict">
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.TabGicDict">
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>
......
......@@ -468,7 +468,7 @@ public class ClerkImportController {
validate = false;
}
}
GicDictDTO 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;
......
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