89 lines
3.1 KiB
Java
89 lines
3.1 KiB
Java
package seed.user.bbs.service;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
|
|
|
import seed.dao.BbsAuthDAO;
|
|
import seed.map.T_BBS_AUTH;
|
|
import seed.utils.SeedUtils;
|
|
|
|
@Service
|
|
public class UserBbsAuthServiceImpl extends AbstractServiceImpl implements UserBbsAuthService{
|
|
|
|
@Autowired
|
|
private BbsAuthDAO bbsAuthDAO;
|
|
|
|
//UserBbsController
|
|
public T_BBS_AUTH getBbsAuthForm(Integer bbsSetIdx, Integer memberIdx, String bbsSetCertify, String memberCertify){
|
|
|
|
T_BBS_AUTH tBbsAuth = new T_BBS_AUTH();
|
|
|
|
tBbsAuth.setBbsAuthList("N");
|
|
tBbsAuth.setBbsAuthContent("N");
|
|
tBbsAuth.setBbsAuthWrite("N");
|
|
tBbsAuth.setBbsAuthReply("N");
|
|
|
|
List<Map<Object, Object>> tBbsAuthList = bbsAuthDAO.getBbsAuthMapList(bbsSetIdx, memberIdx,
|
|
new String[] {"tGroup.groupLevel", "bbsAuthCertify", "bbsAuthList", "bbsAuthContent", "bbsAuthWrite", "bbsAuthReply"});
|
|
|
|
for(int a=0; a<tBbsAuthList.size(); a++){
|
|
Map<Object, Object> tBbsAuthDB = tBbsAuthList.get(a);
|
|
|
|
if(tBbsAuthDB.get("_bbsAuthList").equals("Y")){
|
|
if(SeedUtils.setReplaceNull(bbsSetCertify).equals("Y") && SeedUtils.setReplaceNull(tBbsAuthDB.get("_groupLevel")).equals("999")){
|
|
if(SeedUtils.setReplaceNull(tBbsAuthDB.get("_bbsAuthCertify")).equals("Y")){
|
|
if(memberCertify.indexOf("seedCertify") > -1 && !memberCertify.equals("")){
|
|
tBbsAuth.setBbsAuthList("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthList("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthList("Y");
|
|
}
|
|
}
|
|
|
|
if(tBbsAuthDB.get("_bbsAuthContent").equals("Y")){
|
|
if(SeedUtils.setReplaceNull(bbsSetCertify).equals("Y") && SeedUtils.setReplaceNull(tBbsAuthDB.get("_groupLevel")).equals("999")){
|
|
if(SeedUtils.setReplaceNull(tBbsAuthDB.get("_bbsAuthCertify")).equals("Y")){
|
|
if(memberCertify.indexOf("seedCertify") > -1 && !memberCertify.equals("")){
|
|
tBbsAuth.setBbsAuthContent("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthContent("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthContent("Y");
|
|
}
|
|
}
|
|
|
|
if(tBbsAuthDB.get("_bbsAuthWrite").equals("Y")){
|
|
if(SeedUtils.setReplaceNull(bbsSetCertify).equals("Y") && SeedUtils.setReplaceNull(tBbsAuthDB.get("_groupLevel")).equals("999")){
|
|
if(memberCertify.indexOf("seedCertify") > -1 && !memberCertify.equals("")){
|
|
tBbsAuth.setBbsAuthWrite("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthWrite("Y");
|
|
}
|
|
}
|
|
|
|
if(tBbsAuthDB.get("_bbsAuthReply").equals("Y")){
|
|
if(SeedUtils.setReplaceNull(bbsSetCertify).equals("Y") && SeedUtils.setReplaceNull(tBbsAuthDB.get("_groupLevel")).equals("999")){
|
|
if(memberCertify.indexOf("seedCertify") > -1 && !memberCertify.equals("")){
|
|
tBbsAuth.setBbsAuthReply("Y");
|
|
}
|
|
}else{
|
|
tBbsAuth.setBbsAuthReply("Y");
|
|
}
|
|
}
|
|
}
|
|
|
|
return tBbsAuth;
|
|
}
|
|
}
|