Commit 77111405 by zhiwj

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-store into developer

parents ee12f20c 8634b1cb
......@@ -152,7 +152,6 @@ public class StoreApiServiceImpl implements StoreApiService {
// 更新缓存
refreshCache(storeDTO.getEnterpriseId(), storeDTO.getStoreInfoId());
refreshIndex(storeDTO.getStoreId(), storeDTO.getEnterpriseId());
return ServiceResponse.success();
}
......
......@@ -122,17 +122,19 @@ public class StoreDictApiServiceImpl implements StoreDictApiService {
if(listStoreField.isSuccess()){
List<StoreFieldDTO> list = listStoreField.getResult();
List<String> listSelect = this.storeDictService.listStoreField(enterpriseId);
for(StoreFieldDTO tabStoreField : list){
StoreDictDTO storeDictDTO = new StoreDictDTO();
storeDictDTO.setKey(tabStoreField.getStoreFieldName());
storeDictDTO.setValue(tabStoreField.getStoreFieldId()+"");
storeDictDTO.setOwnType(tabStoreField.getOwnType());
for(String s : listSelect){
if(tabStoreField.getStoreFieldId().intValue() == Integer.valueOf(s).intValue()){
storeDictDTO.setChecked(1);
if(CollectionUtils.isNotEmpty(listSelect)){
for(StoreFieldDTO tabStoreField : list){
StoreDictDTO storeDictDTO = new StoreDictDTO();
storeDictDTO.setKey(tabStoreField.getStoreFieldName());
storeDictDTO.setValue(tabStoreField.getStoreFieldId()+"");
storeDictDTO.setOwnType(tabStoreField.getOwnType());
for(String s : listSelect){
if(tabStoreField.getStoreFieldId().intValue() == Integer.valueOf(s).intValue()){
storeDictDTO.setChecked(1);
}
}
result.add(storeDictDTO);
}
result.add(storeDictDTO);
}
}
return ServiceResponse.success(result);
......
......@@ -27,6 +27,11 @@
</resultMap>
<resultMap id="DTOResultMap" type="com.gic.store.dto.StoreDTO" extends="BaseResultMap">
<result column="own_type" jdbcType="INTEGER" property="ownType" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="is_edit_store_group" jdbcType="INTEGER" property="isEditStoreGroup" />
<result column="from_enterprise_id" jdbcType="INTEGER" property="fromEnterpriseId" />
</resultMap>
<sql id="Base_Column_List">
${alias}.store_info_id, ${alias}.store_name, ${alias}.store_code, ${alias}.region_id, ${alias}.conacts_phone, ${alias}.address,
......@@ -328,7 +333,7 @@
where
brand_ids REGEXP '^${brandId}$|^${brandId},.*$|^.*,${brandId},.*$|^.*,${brandId}$'
</select>
<select id="listStore" parameterType="com.gic.store.dto.StoreSearchDBDTO" resultType="com.gic.store.dto.StoreDTO">
<select id="listStore" parameterType="com.gic.store.dto.StoreSearchDBDTO" resultMap="DTOResultMap">
select
<include refid="Base_Column_List">
<property name="alias" value="t1"/>
......@@ -364,7 +369,7 @@
<if test="store.storeInfoId != null">
and t1.store_info_id = #{store.storeInfoId}
</if>
<if test="store.storeInfoId != null">
<if test="store.storeId != null">
and t2.store_id = #{store.storeId}
</if>
<if test="store.overflowStatus != null">
......
......@@ -2,6 +2,7 @@ package com.gic.store.web.controller;
import java.util.List;
import com.gic.enterprise.utils.UserDetailUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -38,8 +39,7 @@ public class StoreGroupController {
@RequestMapping("/list")
public RestResponse listStoreGroup(StoreGroupQO storeGroupQO) {
ServiceResponse<List<StoreGroupDTO>> result = storeGroupApiService
.listStoreGroup(transferQoToDTO(storeGroupQO));
ServiceResponse<List<StoreGroupDTO>> result = storeGroupApiService.listStoreGroup(transferQoToDTO(storeGroupQO));
if (result.isSuccess()) {
return RestResponse
.success(ChangeListToTree.changeListToTree(StoreGroupConstant.ALL_STORE_LEVEL, result.getResult()));
......@@ -88,7 +88,8 @@ public class StoreGroupController {
private StoreGroupDTO transferQoToDTO(StoreGroupQO storeGroupQO) {
StoreGroupDTO storeGroupDTO = EntityUtil.changeEntityNew(StoreGroupDTO.class, storeGroupQO);
storeGroupDTO.setEnterpriseId(StoreGroupConstant.TEST_ENTERPRISE_ID);
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
storeGroupDTO.setEnterpriseId(enterpriseId);
return storeGroupDTO;
}
}
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