Commit 7edc35dc by jinxin

校验wxAppid是否唯一

parent 211032c8
......@@ -521,6 +521,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
if (null == enterpriseDTO){
return ServiceResponse.failure("-9999","参数不能为空!");
}
//wxAppid是唯一的,不能重复
List<String> wxAppidList = new ArrayList<>();
wxAppidList.add(enterpriseDTO.getWxaAppid());
List<String> list = wxEnterpriseService.getWxAppidListByList(wxAppidList);
if (CollUtil.isNotEmpty(list)){
return ServiceResponse.failure("-9999","自建小程序的appid存在重复!");
}
if (StrUtil.isBlank(enterpriseDTO.getWxEnterpriseId())){
wxEnterpriseService.add(enterpriseDTO);
}else {
......
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