Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+2
-2
@@ -194,8 +194,8 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布-获取适用市场下拉选", notes="问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||
@GetMapping(value = "/getApplyMarketList")
|
||||
public Result<List<DictModel>> getApplyMarketList() {
|
||||
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList();
|
||||
public Result<List<DictModel>> getApplyMarketList(@RequestParam("queryFlag") String queryFlag) {
|
||||
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList(queryFlag);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
|
||||
* 获取适用市场
|
||||
* @return
|
||||
*/
|
||||
Result<List<DictModel>> getApplyMarketList();
|
||||
Result<List<DictModel>> getApplyMarketList(String queryFlag);
|
||||
|
||||
List<CountryCardManageReleaseEO> queryCountryCardManageReleaseByApplyMarkets(JSONObject params);
|
||||
}
|
||||
|
||||
+35
-12
@@ -169,7 +169,7 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<DictModel>> getApplyMarketList() {
|
||||
public Result<List<DictModel>> getApplyMarketList(String queryFlag) {
|
||||
List<DictModel> result = new ArrayList<>();
|
||||
|
||||
//获取所有的适用地区
|
||||
@@ -177,20 +177,43 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
|
||||
//获取已经创建了country Card的适用地区,该接口只返回,在country Card里面没有的适用地区。
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list();
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = dictModelList;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = true;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = false;
|
||||
break;
|
||||
|
||||
//如果查询标识是空,则是在countryCard管理发布页面新增数据时使用:管理发布页新增查询的是,所有未创建countryCard的适用市场。
|
||||
//如果查询标识不是空,则是在CountryCard的首页使用:首页查询的是 所有已创建了countryCard的适用市场。
|
||||
if (StringUtils.isEmpty(queryFlag)) {
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = dictModelList;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = true;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = null;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user