Commit 5bbbf3bd by 陶光胜

门店标签回写

parent 73d4c5b9
package com.gic.plug.web.strategy.impl; package com.gic.plug.web.strategy.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.plug.web.strategy.ScreenBackStrategy; import com.gic.plug.web.strategy.ScreenBackStrategy;
import com.gic.plug.web.utils.ComputeBackUtil;
import com.gic.store.constant.StoreESFieldsEnum;
import com.gic.store.dto.StoreGroupDTO;
import com.gic.store.dto.StoreTagDTO;
import com.gic.store.service.StoreTagApiService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component @Component
public class StoreTagBackImpl implements ScreenBackStrategy { public class StoreTagBackImpl implements ScreenBackStrategy {
@Autowired
private StoreTagApiService storeTagApiService;
@Override @Override
public String screenBack(String compute, String value, String key, Integer enterpriseId) { public String screenBack(String compute, String value, String key, Integer enterpriseId) {
if(StringUtils.isNotBlank(value)){
StringBuilder stringBuilder = new StringBuilder(StoreESFieldsEnum.STORETAG.getDesc()).append(" ");
stringBuilder.append(ComputeBackUtil.getComputeBack(compute)).append(" ");
String[] valueArr = value.split(" ");
for(String s : valueArr){
ServiceResponse<StoreTagDTO> response = this.storeTagApiService.getByStoreTagId(Integer.valueOf(s));
if(response.isSuccess() && response.getResult()!= null){
stringBuilder.append("【").append(response.getResult().getStoreTagName()).append("】").append(" ");
}
}
return stringBuilder.toString();
}
return null; return null;
} }
} }
...@@ -59,5 +59,5 @@ ...@@ -59,5 +59,5 @@
<dubbo:reference interface="com.gic.member.config.api.service.AppletsConfigApiService" id="appletsConfigApiService" timeout="10000" retries="0" /> <dubbo:reference interface="com.gic.member.config.api.service.AppletsConfigApiService" id="appletsConfigApiService" timeout="10000" retries="0" />
<dubbo:reference interface="com.gic.auth.service.UserResourceApiService" id="userResourceApiService" timeout="10000" retries="0" /> <dubbo:reference interface="com.gic.auth.service.UserResourceApiService" id="userResourceApiService" timeout="10000" retries="0" />
<dubbo:reference interface="com.gic.auth.service.ResourceApiService" id="resourceApiService" timeout="10000" retries="0" /> <dubbo:reference interface="com.gic.auth.service.ResourceApiService" id="resourceApiService" timeout="10000" retries="0" />
<dubbo:reference interface="com.gic.store.service.StoreTagApiService" id="storeTagApiService" timeout="10000" retries="0" />
</beans> </beans>
\ No newline at end of file
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