Commit 686e1e33 by 陶光胜

门店授权

parent 8efbffa6
......@@ -406,6 +406,7 @@ public class StoreServiceImpl implements StoreService {
store.setOwnType(storeDTO.getOwnType());
store.setStatus(com.gic.enterprise.constants.Constants.NORMAL_STATUS);
store.setUpdateTime(new Date());
store.setFromEnterpriseId(storeDTO.getFromEnterpriseId());
if(store.getStoreId() != null){
result = this.tabStoreMapper.updateByPrimaryKeySelective(store);
}else {
......
......@@ -95,9 +95,11 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
String groupId = storeStrategyService.isHitStrategy(storeDTO, StoreGroupConstant.STORE_GROUP_STRATEGY_TYPE);
if (StringUtils.isBlank(groupId)) {
TabStoreGroup group = storeGroupService.selectUnGroupedStore(storeDTO.getEnterpriseId());
groupId = group.getStoreGroupId()+"";
if(group != null){
groupId = group.getStoreGroupId()+"";
storeDTO.setStoreGroupId(Integer.valueOf(groupId));
}
}
storeDTO.setStoreGroupId(Integer.valueOf(groupId));
storeDTO.setIsEditStoreGroup(0);
storeDTO.setOwnType(StoreOwnTypeEnum.OTHER.getCode());
int i = this.storeService.authAddStore(storeDTO);
......
......@@ -14,6 +14,7 @@ import com.gic.store.constant.CreateTypeEnum;
import com.gic.store.constant.StoreESFieldsEnum;
import com.gic.store.dto.*;
import com.gic.store.service.StoreApiService;
import com.gic.store.service.StoreAuthorizationApiService;
import com.gic.store.service.StoreDictApiService;
import com.gic.store.utils.StoreRedisKeyUtils;
import com.gic.store.web.qo.PageQO;
......@@ -28,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
......@@ -262,5 +264,14 @@ public class StoreController {
}
return isEditGroup;
}
@Autowired
private StoreAuthorizationApiService storeAuthorizationApiService;
@RequestMapping("test-a")
@ResponseBody
public Object test(String params){
ServiceResponse<Void> voidServiceResponse = this.storeAuthorizationApiService.authorizationSingleStore(params);
return voidServiceResponse;
}
}
\ No newline at end of file
......@@ -41,5 +41,6 @@
<dubbo:reference interface="com.gic.store.service.ClerkImportApiService" id="clerkImportApiService" timeout="60000" />
<!-- 平台品牌 -->
<dubbo:reference interface="com.gic.enterprise.service.PlatformBrandApiService" id="platformBrandApiService" timeout="60000" />
<dubbo:reference interface="com.gic.store.service.StoreAuthorizationApiService" id="storeAuthorizationApiService" timeout="60000" />
</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