|
@@ -337,6 +337,8 @@ public class AuthServiceImpl implements AuthService {
|
|
|
if (insertFlag) {
|
|
|
authMapper.insertAuth(auth);
|
|
|
} else {
|
|
|
+ //机构互关
|
|
|
+ relaMech(auth);
|
|
|
authMapper.updateAuthByAuthId(auth);
|
|
|
// 删除原有的轮播图
|
|
|
authMapper.deleteBanner(auth.getId());
|
|
@@ -363,6 +365,19 @@ public class AuthServiceImpl implements AuthService {
|
|
|
return ResponseJson.success("保存品牌授权成功", auth);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 机构互关
|
|
|
+ * @param auth
|
|
|
+ */
|
|
|
+ public void relaMech(CmBrandAuthPo auth){
|
|
|
+ String relaId=auth.getId().toString();
|
|
|
+ String relaName=auth.getAuthParty();
|
|
|
+ String[] relaIdArr = auth.getRelationId().split(",");
|
|
|
+ for(int i=0;i<relaIdArr.length;i++){
|
|
|
+ Integer id = Integer.valueOf(relaIdArr[i]);
|
|
|
+ authMapper.updateRelaByAuthId(id,relaId,relaName);
|
|
|
+ }
|
|
|
+ }
|
|
|
@Override
|
|
|
public String addWaterMark(String image, Integer type) {
|
|
|
try {
|