|
|
@@ -39,7 +39,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
BusinessProjectModelMapper projectSizeMapper;
|
|
|
@Autowired
|
|
|
ProjectInterestMapper projectInterestMapper;
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public int insert(String bname, String cid, String country, String province, String city, String district,String boutique) {
|
|
|
BusinessProject bp=new BusinessProject();
|
|
|
@@ -62,7 +62,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
bp.setStatus("0");
|
|
|
bp.setBoutique(Integer.valueOf(boutique));
|
|
|
bp.setFirstPayment(new BigDecimal("0"));
|
|
|
- return businessProjectMapper.insert(bp);
|
|
|
+ return businessProjectMapper.insertSelective(bp);
|
|
|
}
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -109,7 +109,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}
|
|
|
@Override
|
|
|
public int getBnamecount(String bname) {
|
|
|
-
|
|
|
+
|
|
|
return businessProjectMapper.getBnamecount(bname);
|
|
|
}
|
|
|
@Override
|
|
|
@@ -120,7 +120,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}else {
|
|
|
bp.setDeleteSign(0);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return businessProjectMapper.updateByPrimaryKey(bp);
|
|
|
}
|
|
|
@Override
|
|
|
@@ -131,7 +131,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}else {
|
|
|
bp.setStatus("0");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return businessProjectMapper.updateByPrimaryKey(bp);
|
|
|
}
|
|
|
@Override
|
|
|
@@ -149,7 +149,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
public ProjectDetailBo orgProject(String id) {
|
|
|
ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
|
|
|
int i=projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId());
|
|
|
-
|
|
|
+
|
|
|
if (TokenManager.isLogin()&&i>0) {
|
|
|
pd.setInterest("1");
|
|
|
}else {
|
|
|
@@ -158,13 +158,13 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
pd.setProjectSize(projectSizeMapper.selectPidList(id));
|
|
|
return pd;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public List<Map<String, String>> getAllCnames(Integer flag) {
|
|
|
List<Map<String, String>> list=new ArrayList<Map<String, String>>();
|
|
|
List<String> listcid=businessVarietiesMapper.getListId();
|
|
|
for (String s : listcid) {
|
|
|
- Map<String, String> map=new HashMap<>();
|
|
|
+ Map<String, String> map=new HashMap<>();
|
|
|
String cname=getAllCname(s);
|
|
|
map.put("id", s);
|
|
|
map.put("cname", cname);
|
|
|
@@ -202,11 +202,11 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}else{
|
|
|
return cid.length()>3?cname:"";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public int updateProject(BusinessProject s) {
|
|
|
BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
|
|
|
@@ -214,7 +214,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
return businessProjectMapper.updateByPrimaryKey(bp);
|
|
|
}
|
|
|
private void TheGinseng(BusinessProject s, BusinessProject bp) {
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(s.getBname())) {
|
|
|
bp.setBname(s.getBname());
|
|
|
}
|
|
|
@@ -310,11 +310,11 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
|
|
|
if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
pSize = 10;
|
|
|
- }
|
|
|
+ }
|
|
|
Map<String, Object>map=new HashMap<>();
|
|
|
map.put("pid", pid);
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
Pagination<ProjectSizeBo> pt=(Pagination<ProjectSizeBo>)findPage("findProjectSizeListByPage", "findProjectSizeListCount",
|
|
|
map,pNo,pSize);
|
|
|
return pt;
|
|
|
@@ -325,7 +325,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}
|
|
|
@Override
|
|
|
public int deleteProjectSize(String id) {
|
|
|
-
|
|
|
+
|
|
|
return projectSizeMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
@Override
|
|
|
@@ -342,7 +342,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
@Override
|
|
|
public boolean WhetherRepeat(BusinessProjectModel ps) {
|
|
|
List<ProjectSizeBo> list=projectSizeMapper.getgetPnamecount(ps.getPname());
|
|
|
-
|
|
|
+
|
|
|
for (ProjectSizeBo p : list) {
|
|
|
if (p.getPid().equals(ps.getPid())) {
|
|
|
return true;
|
|
|
@@ -358,7 +358,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
@Override
|
|
|
public boolean judgeBeing(BusinessProject s) {
|
|
|
@@ -369,7 +369,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}else {
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -385,11 +385,11 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
if (StringUtils.isNotBlank(id)) {
|
|
|
params.put("id", id);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
Pagination<ProjectBo> data = (Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
|
|
|
params,pNo,pSize);
|
|
|
return data;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -428,9 +428,9 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
Pagination<ProjectBo> data = (Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
|
|
|
params,pNo,pSize);
|
|
|
return data;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public ProjectDetailBo ProjectDetail(String id) {
|
|
|
ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
|
|
|
@@ -441,21 +441,21 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}
|
|
|
pd.setProjectSize(projectSizeMapper.selectPidList(id));
|
|
|
return pd;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public List<BusinessProject> selectBusinessProjectByName(String businessName,String cid) {
|
|
|
return businessProjectMapper.selectBusinessProjectByName(businessName,cid);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public List<BusinessCategory> selectBusinessProjectCatalog() {
|
|
|
-
|
|
|
+
|
|
|
return businessProjectMapper.selectBusinessProjectCatalog();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|