Commit 57ddaa58 by 陶光胜

门店类型门店状态

parent 363a099d
......@@ -72,7 +72,7 @@ public class StoreDictApiServiceImpl implements StoreDictApiService {
if(enterpriseId == null || storeStatusArr == null || (storeStatusArr != null && storeStatusArr.length==0)){
return ServiceResponse.failure(ErrorCode.ERR_2.getCode(), ErrorCode.ERR_2.getMsg());
}
List<String> listSelected = this.storeDictService.listStoreType(enterpriseId);
List<String> listSelected = this.storeDictService.listStoreStatus(enterpriseId);
for(String storeStatus : storeStatusArr){
boolean isExist = false;
for(String s : listSelected){
......@@ -95,7 +95,12 @@ public class StoreDictApiServiceImpl implements StoreDictApiService {
List<StoreDictDTO> result = new ArrayList<>();
List<BizdictDTO> list = this.bizdictService.treeByCategoryCode(type);
if(CollectionUtils.isNotEmpty(list)){
List<String> listSelected = this.storeDictService.listStoreType(enterpriseId);
List<String> listSelected = new ArrayList<>();
if("storeType".equals(type)){
listSelected = this.storeDictService.listStoreType(enterpriseId);
}else{
listSelected = this.storeDictService.listStoreStatus(enterpriseId);
}
for(BizdictDTO bizdictDTO : list){
StoreDictDTO dictDTO = new StoreDictDTO();
dictDTO.setEnterpriseId(enterpriseId);
......@@ -116,7 +121,12 @@ public class StoreDictApiServiceImpl implements StoreDictApiService {
List<StoreDictDTO> result = new ArrayList<>();
List<BizdictDTO> list = this.bizdictService.treeByCategoryCode(type);
if(CollectionUtils.isNotEmpty(list)){
List<String> listSelected = this.storeDictService.listStoreType(enterpriseId);
List<String> listSelected = new ArrayList<>();
if("storeType".equals(type)){
listSelected = this.storeDictService.listStoreType(enterpriseId);
}else{
listSelected = this.storeDictService.listStoreStatus(enterpriseId);
}
for(BizdictDTO bizdictDTO : list){
for(String s : listSelected){
if(s.equals(bizdictDTO.getValueContent())){
......
......@@ -8,6 +8,8 @@ import com.gic.store.service.StoreDictApiService;
import com.gic.store.utils.ErrorCode;
import com.gic.store.web.vo.StoreDictVO;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -17,6 +19,7 @@ import java.util.List;
@Controller
public class StoreDictController {
private Logger logger = LogManager.getLogger(StoreDictController.class);
@Autowired
private StoreDictApiService storeDictApiService;
......
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