Browse Source

业务项目管理

anderx 8 years ago
parent
commit
9cb3086e61

+ 3 - 3
src/main/java/com/goafanti/admin/controller/BusinessProjectController.java

@@ -121,12 +121,12 @@ public class BusinessProjectController extends CertifyApiController{
 		return res;
 	}
 	/**
-	 * 获取业务品类全路径
+	 * 获取业务品类全路径()
 	 */
 	@RequestMapping(value = "/getAllCname", method = RequestMethod.GET)
-	public Result getAllCname(){
+	public Result getAllCname(Integer flag){
 		Result res=new Result();
-		res.setData(businessprojectService.getAllCname());
+		res.setData(businessprojectService.getAllCnames(flag));
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/admin/service/BusinessProjectService.java

@@ -25,7 +25,7 @@ public interface BusinessProjectService {
 	
 	BusinessProjectBo orgProject(String id);
 	
-	List<Map<String, String>> getAllCname();
+	List<Map<String, String>> getAllCnames(Integer flag);
 	
 	
 	int updateProject(BusinessProject s);

+ 1 - 1
src/main/java/com/goafanti/admin/service/impl/AdminVarietiesServiceImpl.java

@@ -66,7 +66,7 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 		System.out.println("cid:"+buv.getCid());
 		buv.setLayer(buv.getCid().length()/2-1);
 		
-		buv.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");//测试
+		//buv.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");
 		if (StringUtils.isNotBlank(TokenManager.getAdminId())) {
 			buv.setCreateId(TokenManager.getAdminId());
 		}

+ 16 - 2
src/main/java/com/goafanti/admin/service/impl/BusinessProjectServiceImpl.java

@@ -144,17 +144,28 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		return bpo;
 	}
 	@Override
-	public List<Map<String, String>> getAllCname() {
+	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<>(); 
 			String cname=getAllCname(s);
 			map.put("id", s);
 			map.put("cname", cname);
-			if (StringUtils.isNotBlank(cname)) {
+			if (flag==1) {
+				if (StringUtils.isBlank(cname)) {
+					map.put("cname", "平台超级业务品类");
+				}
 				list.add(map);
+			}else {
+				if (StringUtils.isNotBlank(cname)) {
+					list.add(map);
+				}
 			}
+			
+			
+			
 		}
 		return list;
 	}
@@ -197,9 +208,12 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		}
 		if (StringUtils.isNotBlank(s.getProvince())) {
 			bp.setProvince(s.getProvince());
+			bp.setCity(s.getCity());
+			bp.setDistrict(s.getDistrict());
 		}
 		if (StringUtils.isNotBlank(s.getCity())) {
 			bp.setCity(s.getCity());
+			bp.setDistrict(s.getDistrict());
 		}
 		if (StringUtils.isNotBlank(s.getDistrict())) {
 			bp.setDistrict(s.getDistrict());

+ 1 - 1
src/main/java/com/goafanti/common/enums/AttachmentType.java

@@ -50,7 +50,7 @@ public enum AttachmentType {
 	ACTIVITY_CONTENT_PICTURE("activity_content_picture", "活动内容图片"),
 	CUSTOMER_SYS_FILE("customer_sys_file","客户系统文件"),
 	BUSINESS_PROJECT_MIN_PICTURE("business_project_min_picture","业务项目小图"),
-	BUSINESS_PROJECT_MAX_PICTURE("business_project_min_picture","业务项目大图");
+	BUSINESS_PROJECT_MAX_PICTURE("business_project_max_picture","业务项目大图");
 	
 	private AttachmentType(String code, String desc) {
 		this.code = code;

+ 2 - 2
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -540,10 +540,10 @@
   </update>
   
   	<select id="findProjectListByPage" resultType="com.goafanti.admin.bo.BusinessProjectBo">
- 		select b.id, b.create_id, b.create_time, b.update_time,  b.delete_sign, b.bname,
+ 		select b.id, b.create_id as createId, b.create_time as createTime, b.update_time as updateTime,  b.delete_sign deleteSign, b.bname,
  		  b.cid,  b.price,  b.offset,  b.activity_price as activityPrice,  b.activity_flag as activityFlag,  b.member_price as memberPrice, 
  		  b.introduce,  b.status,  b.country,  b.province,  b.city,  b.district, 
-          b.principal_id,  b.Value_effect,  b.client_size,b2.cname 
+          b.principal_id as principalId,  b.Value_effect as ValueEffect,  b.client_size as  clientSize,b2.cname 
   		from business_project b
   		left join business_varieties b2 on b.cid = b2.id
   		where b.delete_sign=0