|
@@ -129,16 +129,18 @@ public class AuthServiceImpl implements AuthService {
|
|
|
PageInfo<AuthVo> pageData = new PageInfo<>(authList);
|
|
|
return ResponseJson.success(pageData);
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public ResponseJson<PageInfo<AuthVo>> getAuthListAll(Integer listType, Integer authUserId, String authParty,
|
|
|
- String mobile, Integer status, Integer starFlag, Integer auditStatus,
|
|
|
- Integer lowerAuditStatus, Integer shopAuditStatus, Integer sendStatus, String name,String snCode,Integer pageNum, Integer pageSize) {
|
|
|
+ String mobile, Integer status, Integer starFlag, Integer auditStatus,
|
|
|
+ Integer lowerAuditStatus, Integer shopAuditStatus, Integer sendStatus, String name, String snCode, Integer pageNum, Integer pageSize) {
|
|
|
listType = null == listType ? 1 : listType;
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
- List<AuthVo> authList = authMapper.getAuthListAll(listType, authUserId, authParty, mobile, status, starFlag, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus,name,snCode);
|
|
|
+ List<AuthVo> authList = authMapper.getAuthListAll(listType, authUserId, authParty, mobile, status, starFlag, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus, name, snCode);
|
|
|
PageInfo<AuthVo> pageData = new PageInfo<>(authList);
|
|
|
return ResponseJson.success(pageData);
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public ResponseJson updateAuthStatus(Integer authId, Integer status) {
|
|
|
if (null == authId) {
|
|
@@ -166,7 +168,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
authMapper.deleteBanner(authId);
|
|
|
// 删除商品及商品参数
|
|
|
List<Integer> productIdList = authProductService.getProductIdsByAuthId(authId);
|
|
|
- productIdList.forEach(productId->{
|
|
|
+ productIdList.forEach(productId -> {
|
|
|
if (null != productId) {
|
|
|
authProductService.deleteProduct(productId);
|
|
|
}
|
|
@@ -181,7 +183,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
AuthFormVo authFormVo = authMapper.getAuthFormById(authId);
|
|
|
//该机构关联机构用集合形式返回便于前端赋值
|
|
|
- if(null!=authFormVo.getRelationId()&&!"".equals(authFormVo.getRelationId())){
|
|
|
+ if (null != authFormVo.getRelationId() && !"".equals(authFormVo.getRelationId())) {
|
|
|
String[] relationIdList = authFormVo.getRelationId().split(",");
|
|
|
List<AuthFormVo> authIdList = authMapper.getAuthIdList(relationIdList);
|
|
|
authFormVo.setReleationClubList(authIdList);
|
|
@@ -204,12 +206,12 @@ public class AuthServiceImpl implements AuthService {
|
|
|
@Override
|
|
|
public ResponseJson importLdmImage(Integer authUserId) {
|
|
|
List<LdmDataPo> ldmClubData = ldmMapper.getLdmClubData(null, 0);
|
|
|
- ldmClubData.forEach(ldmClub->{
|
|
|
+ ldmClubData.forEach(ldmClub -> {
|
|
|
String pic2 = ldmClub.getPic2();
|
|
|
String pic3 = ldmClub.getPic3();
|
|
|
String pic4 = ldmClub.getPic4();
|
|
|
List<AuthVo> authList = authMapper.getAuthByNameAndAddress(ldmClub.getAuthParty(), ldmClub.getAddress());
|
|
|
- if (null != authList && authList.size() > 0 ) {
|
|
|
+ if (null != authList && authList.size() > 0) {
|
|
|
if (authList.size() > 1) {
|
|
|
log.info(">>>>>>>>>>>>>>>>>>>>>导入ldm门店图错误:对应门店过多,门店名称:" + ldmClub.getAuthParty());
|
|
|
} else {
|
|
@@ -239,8 +241,8 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResponseJson starAuth(Integer authId, Integer starFlag,String starNum) {
|
|
|
- authMapper.starAuth(authId, starFlag,starNum);
|
|
|
+ public ResponseJson starAuth(Integer authId, Integer starFlag, String starNum) {
|
|
|
+ authMapper.starAuth(authId, starFlag, starNum);
|
|
|
return ResponseJson.success();
|
|
|
}
|
|
|
|
|
@@ -291,7 +293,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
if (2 == auth.getAuthImageType() && StringUtils.isEmpty(auth.getAuthImage())) {
|
|
|
return ResponseJson.error("授权牌不能为空");
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
// 机构添加默认模板库生成
|
|
|
auth.setAuthImageType(1);
|
|
|
}
|
|
@@ -358,7 +360,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public String addWaterMark(String image,Integer type){
|
|
|
+ public String addWaterMark(String image, Integer type) {
|
|
|
try {
|
|
|
//type:1pc,2applets
|
|
|
ClassPathResource classPathResource = new ClassPathResource("/images/newPcWaterMark.png");
|
|
@@ -413,7 +415,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- private Map<String,Object> getTemplateInfo(TemplateVo template, CmBrandAuthPo auth) {
|
|
|
+ private Map<String, Object> getTemplateInfo(TemplateVo template, CmBrandAuthPo auth) {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
Integer templateId = template.getTemplateId();
|
|
|
if (1 == templateId) {
|
|
@@ -460,7 +462,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
// 添加二维码信息
|
|
|
if (StringUtils.isNotEmpty(template.getQrPosition())) {
|
|
|
- String qrCodeLink = zpServer + "/" + auth.getAuthUserId() + "/app/approve/club/detail?id=" + auth.getId();
|
|
|
+ String qrCodeLink = zpServer + "/" + auth.getAuthUserId() + "/" + authMapper.getPrefix(auth.getAuthUserId()) + "/approve/club/detail?id=" + auth.getId();
|
|
|
map.put("addQr1_link", qrCodeLink);
|
|
|
map.put("addQr1_size", template.getQrSize());
|
|
|
String[] split = template.getQrPosition().split(",");
|
|
@@ -507,7 +509,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor=Exception.class)
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public ResponseJson importDataByExcel(MultipartFile file, Integer authUserId, Integer createBy) {
|
|
|
String originalFilename = file.getOriginalFilename();
|
|
|
String randomStr = UUID.randomUUID().toString();
|
|
@@ -738,39 +740,40 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
return ResponseJson.success("导入成功");
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 获取机构关联的机构信息
|
|
|
* 1.7.4版本:
|
|
|
- *
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseJson<List<AuthFormVo>> getRelationgInfo(String snCode,Integer authUserId){
|
|
|
+ public ResponseJson<List<AuthFormVo>> getRelationgInfo(String snCode, Integer authUserId) {
|
|
|
//根据sn码获取关联这个产品的机构列表
|
|
|
List<ProductFormVo> relationgList = authMapper.getRelationgList(snCode);
|
|
|
- String relationgInfo=null;
|
|
|
- List<AuthFormVo> authIdList=null;
|
|
|
- if(relationgList.size()>0){
|
|
|
- for(int i=0;i<relationgList.size();i++){
|
|
|
- if(null!=relationgInfo){
|
|
|
- relationgInfo+=",";
|
|
|
+ String relationgInfo = null;
|
|
|
+ List<AuthFormVo> authIdList = null;
|
|
|
+ if (relationgList.size() > 0) {
|
|
|
+ for (int i = 0; i < relationgList.size(); i++) {
|
|
|
+ if (null != relationgInfo) {
|
|
|
+ relationgInfo += ",";
|
|
|
}
|
|
|
- relationgInfo+=relationgList.get(i).getRelationId();
|
|
|
+ relationgInfo += relationgList.get(i).getRelationId();
|
|
|
}
|
|
|
- if(null!=relationgInfo){
|
|
|
+ if (null != relationgInfo) {
|
|
|
String[] relationIdList = relationgInfo.split(",");
|
|
|
authIdList = authMapper.getAuthIdList(relationIdList);
|
|
|
}
|
|
|
}
|
|
|
return ResponseJson.success(authIdList);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * 1.7.4版本
|
|
|
+ * 1.7.4版本
|
|
|
* 获取可绑定机构机构信息
|
|
|
- * **/
|
|
|
+ **/
|
|
|
@Override
|
|
|
- public ResponseJson<List<AuthFormVo>> getClubBindAuth(Integer authUserId){
|
|
|
+ public ResponseJson<List<AuthFormVo>> getClubBindAuth(Integer authUserId) {
|
|
|
List<AuthFormVo> clubBindAuth = authMapper.getClubBindAuth(authUserId);
|
|
|
- return ResponseJson.success(clubBindAuth);
|
|
|
+ return ResponseJson.success(clubBindAuth);
|
|
|
}
|
|
|
//------------------------------------------v1.7.5上传视频至抖音---------------------------------------------------------------------------------------
|
|
|
///用户授权(用于获取数据)
|