Browse Source

项目修改接口新增等级分类

anderx 1 year ago
parent
commit
9933354821

+ 10 - 10
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -57,7 +57,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		bp.setStatus("0");
 		bp.setBoutique(Integer.valueOf(boutique));
 		bp.setFirstPayment(new BigDecimal("0"));
-		return businessProjectMapper.insertSelective(bp);
+		return businessProjectMapper.insert(bp);
 	}
 	@SuppressWarnings("unchecked")
 	@Override
@@ -112,29 +112,29 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public int deleteProject(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		if (bp.getDeleteSign()==0) {
 			bp.setDeleteSign(1);
 		}else {
 			bp.setDeleteSign(0);
 		}
 
-		return businessProjectMapper.updateByPrimaryKey(bp);
+		return businessProjectMapper.update(bp);
 	}
 	@Override
 	public int updateStopProject(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		if (Integer.valueOf(bp.getStatus())==0) {
 			bp.setStatus("1");
 		}else {
 			bp.setStatus("0");
 		}
 
-		return businessProjectMapper.updateByPrimaryKey(bp);
+		return businessProjectMapper.update(bp);
 	}
 	@Override
 	public BusinessProjectBo orgProjects(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		BusinessProjectBo bpo=new BusinessProjectBo();
 		BeanUtils.copyProperties(bp,bpo);
 		String cname=getAllCname(bpo.getCid());
@@ -209,9 +209,9 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 
 	@Override
 	public int updateProject(BusinessProject s) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
+		BusinessProject bp=businessProjectMapper.queryById(s.getId());
 		TheGinseng(s, bp);
-		return businessProjectMapper.updateByPrimaryKeySelective(bp);
+		return businessProjectMapper.update(bp);
 	}
 	private void TheGinseng(BusinessProject s, BusinessProject bp) {
 
@@ -353,7 +353,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public boolean judgeStatus(BusinessProjectModel ps) {
-		 BusinessProject bp=businessProjectMapper.selectByPrimaryKey(ps.getPid());
+		 BusinessProject bp=businessProjectMapper.queryById(ps.getPid());
 		if (Integer.valueOf(bp.getStatus())==1) {
 			return true;
 		}else {
@@ -363,7 +363,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public boolean judgeBeing(BusinessProject s) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
+		BusinessProject bp=businessProjectMapper.queryById(s.getId());
 		BusinessProject bp1=businessProjectMapper.selectByPrimaryBname(s.getBname());
 		if (null==bp||null==bp1||bp.getId().equals(bp1.getId())) {
 			return false;

+ 85 - 23
src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java

@@ -6,52 +6,114 @@ import com.goafanti.business.bo.BusinessProjectBo;
 import com.goafanti.common.model.BusinessCategory;
 import com.goafanti.common.model.BusinessProject;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.util.List;
 import java.util.Map;
 
 /**
-* @author Administrator
-* @description 针对表【business_project】的数据库操作Mapper
-* @createDate 2024-05-13 13:56:51
-* @Entity com.goafanti.common.model.BusinessProject
-*/
+ * (BusinessProject)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-09-19 14:54:12
+ */
 public interface BusinessProjectMapper {
 
-    int deleteByPrimaryKey(String id);
-
-    int insert(BusinessProject record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    BusinessProject queryById(String id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param businessProject 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<BusinessProject> findBusinessProjectList(BusinessProject businessProject, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param businessProject 查询条件
+     * @return 总行数
+     */
+    int findBusinessProjectCount(BusinessProject businessProject);
+
+    /**
+     * 新增数据
+     *
+     * @param businessProject 实例对象
+     * @return 影响行数
+     */
+    int insert(BusinessProject businessProject);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<BusinessProject> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<BusinessProject> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<BusinessProject> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<BusinessProject> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param businessProject 实例对象
+     * @return 影响行数
+     */
+    int update(BusinessProject businessProject);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(String id);
 
     int insertSelective(BusinessProject record);
 
-    BusinessProject selectByPrimaryKey(String id);
 
     int updateByPrimaryKeySelective(BusinessProject record);
 
-    int updateByPrimaryKey(BusinessProject record);
-
-	int getBnamecount(String bname);
+    int getBnamecount(String bname);
 
-	String getCreateName(String id);
+    String getCreateName(String id);
 
-	BusinessProject selectByPrimaryBname(String bname);
+    BusinessProject selectByPrimaryBname(String bname);
 
-	List<ProjectBo> getBusinessProject(String id);
+    List<ProjectBo> getBusinessProject(String id);
 
-	ProjectDetailBo selectAppProjectDetail(String id);
+    ProjectDetailBo selectAppProjectDetail(String id);
 
-	int checkProject(String id);
+    int checkProject(String id);
 
-	List<BusinessProjectBo > selectBusinessProjectByName(@Param("businessName")String businessName, @Param("cname")String cname);
+    List<BusinessProjectBo> selectBusinessProjectByName(@Param("businessName")String businessName, @Param("cname")String cname);
 
 
-	 List<BusinessCategory> selectBusinessProjectCatalog();
+    List<BusinessCategory> selectBusinessProjectCatalog();
 
 
-	/**
-	 * @return
-	 */
+    /**
+     * @return
+     */
     List<Map> selectProjectAndTypeAll();
 
-
 }
+

File diff suppressed because it is too large
+ 465 - 259
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml


+ 1 - 5
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -736,9 +736,7 @@
     left join t_order_task c on a.order_no =c.order_no and c.main =1
     left join user_mid b2 on a.buyer_id=b2.uid
     left join t_order_task e on a.order_no =e.order_no and e.split_status in (0,2)
-    <if test="projectType !=null or businessCategory !=null">
     left join business_project bp on e.commodity_id =bp.id
-    </if>
     <if test="liabilitiesDepId !=null">
       left join admin e2 on e.task_receiver=e2.id
     </if>
@@ -901,9 +899,7 @@
     left join t_order_task c on a.order_no =c.order_no and c.main =1
     left join user_mid b2 on a.buyer_id=b2.uid
     left join t_order_task e on a.order_no =e.order_no and e.split_status in (0,2)
-    <if test="projectType !=null or businessCategory !=null">
-      left join business_project bp on e.commodity_id =bp.id
-    </if>
+    left join business_project bp on e.commodity_id =bp.id
     <if test="liabilitiesDepId !=null">
       left join admin e2 on e.task_receiver=e2.id
     </if>

+ 50 - 235
src/main/java/com/goafanti/common/model/BusinessProject.java

@@ -4,561 +4,376 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
+
 /**
- * 
- * @TableName business_project
+ * (BusinessProject)实体类
+ *
+ * @author makejava
+ * @since 2024-09-19 14:54:12
  */
 public class BusinessProject implements Serializable {
-    /**
+    private static final long serialVersionUID = -25621623846487956L;
+/**
      * 业务项目ID
      */
     private String id;
-
-    /**
+/**
      * 创建人
      */
     private String createId;
-
-    /**
+/**
      * 创建时间
      */
     private Date createTime;
-
-    /**
+/**
      * 更新时间
      */
     private Date updateTime;
-
-    /**
+/**
      * 删除标识
      */
     private Integer deleteSign;
-
-    /**
+/**
      * 业务名称
      */
     private String bname;
-
-    /**
+/**
      * 业务分类
      */
     private String cid;
-
-    /**
+/**
      * 市场价
      */
     private BigDecimal price;
-
-    /**
+/**
      * 最低折扣
      */
     private BigDecimal offset;
-
-    /**
+/**
      * 活动价
      */
     private BigDecimal activityPrice;
-
-    /**
+/**
      * 活动价生效标识
      */
     private String activityFlag;
-
-    /**
+/**
      * 会员价
      */
     private BigDecimal memberPrice;
-
-    /**
+/**
      * 业务项目介绍
      */
     private String introduce;
-
-    /**
+/**
      * 业务项目状态
      */
     private String status;
-
-    /**
+/**
      * 是否全国
      */
     private String country;
-
-    /**
+/**
      * 业务地区-省
      */
     private String province;
-
-    /**
+/**
      * 业务地区-市
      */
     private String city;
-
-    /**
+/**
      * 业务地区-区
      */
     private String district;
-
-    /**
+/**
      * 业务负责人ID
      */
     private String principalId;
-
-    /**
+/**
      * 价值及作用
      */
     private String valueEffect;
-
-    /**
+/**
      * 客户基本条件
      */
     private String clientSize;
-
-    /**
+/**
      * 业务项目图标35*35
      */
     private String minLogo;
-
-    /**
+/**
      * 业务项目图标200*200
      */
     private String maxLogo;
-
-    /**
+/**
      * 项目地址
      */
     private String projectUrl;
-
-    /**
+/**
      * 是否精品  0-否,1-是
      */
     private Integer boutique;
-
-    /**
+/**
      * 首付金额
      */
     private BigDecimal firstPayment;
-
-    /**
+/**
      * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
      */
     private Integer type;
-
-    /**
+/**
      * 专利转让 0否1是
      */
     private Integer patentTransfer;
-
-    /**
+/**
      * 限定 0否  1是
      */
     private Integer restrictStatus;
+/**
+     * 完成状态 0否 1国家级,2=省级,3=市级
+     */
+    private Integer lvlType;
 
-    private static final long serialVersionUID = 1L;
 
-    /**
-     * 业务项目ID
-     */
     public String getId() {
         return id;
     }
 
-    /**
-     * 业务项目ID
-     */
     public void setId(String id) {
         this.id = id;
     }
 
-    /**
-     * 创建人
-     */
     public String getCreateId() {
         return createId;
     }
 
-    /**
-     * 创建人
-     */
     public void setCreateId(String createId) {
         this.createId = createId;
     }
 
-    /**
-     * 创建时间
-     */
     public Date getCreateTime() {
         return createTime;
     }
 
-    /**
-     * 创建时间
-     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
-    /**
-     * 更新时间
-     */
     public Date getUpdateTime() {
         return updateTime;
     }
 
-    /**
-     * 更新时间
-     */
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
 
-    /**
-     * 删除标识
-     */
     public Integer getDeleteSign() {
         return deleteSign;
     }
 
-    /**
-     * 删除标识
-     */
     public void setDeleteSign(Integer deleteSign) {
         this.deleteSign = deleteSign;
     }
 
-    /**
-     * 业务名称
-     */
     public String getBname() {
         return bname;
     }
 
-    /**
-     * 业务名称
-     */
     public void setBname(String bname) {
         this.bname = bname;
     }
 
-    /**
-     * 业务分类
-     */
     public String getCid() {
         return cid;
     }
 
-    /**
-     * 业务分类
-     */
     public void setCid(String cid) {
         this.cid = cid;
     }
 
-    /**
-     * 市场价
-     */
     public BigDecimal getPrice() {
         return price;
     }
 
-    /**
-     * 市场价
-     */
     public void setPrice(BigDecimal price) {
         this.price = price;
     }
 
-    /**
-     * 最低折扣
-     */
     public BigDecimal getOffset() {
         return offset;
     }
 
-    /**
-     * 最低折扣
-     */
     public void setOffset(BigDecimal offset) {
         this.offset = offset;
     }
 
-    /**
-     * 活动价
-     */
     public BigDecimal getActivityPrice() {
         return activityPrice;
     }
 
-    /**
-     * 活动价
-     */
     public void setActivityPrice(BigDecimal activityPrice) {
         this.activityPrice = activityPrice;
     }
 
-    /**
-     * 活动价生效标识
-     */
     public String getActivityFlag() {
         return activityFlag;
     }
 
-    /**
-     * 活动价生效标识
-     */
     public void setActivityFlag(String activityFlag) {
         this.activityFlag = activityFlag;
     }
 
-    /**
-     * 会员价
-     */
     public BigDecimal getMemberPrice() {
         return memberPrice;
     }
 
-    /**
-     * 会员价
-     */
     public void setMemberPrice(BigDecimal memberPrice) {
         this.memberPrice = memberPrice;
     }
 
-    /**
-     * 业务项目介绍
-     */
     public String getIntroduce() {
         return introduce;
     }
 
-    /**
-     * 业务项目介绍
-     */
     public void setIntroduce(String introduce) {
         this.introduce = introduce;
     }
 
-    /**
-     * 业务项目状态
-     */
     public String getStatus() {
         return status;
     }
 
-    /**
-     * 业务项目状态
-     */
     public void setStatus(String status) {
         this.status = status;
     }
 
-    /**
-     * 是否全国
-     */
     public String getCountry() {
         return country;
     }
 
-    /**
-     * 是否全国
-     */
     public void setCountry(String country) {
         this.country = country;
     }
 
-    /**
-     * 业务地区-省
-     */
     public String getProvince() {
         return province;
     }
 
-    /**
-     * 业务地区-省
-     */
     public void setProvince(String province) {
         this.province = province;
     }
 
-    /**
-     * 业务地区-市
-     */
     public String getCity() {
         return city;
     }
 
-    /**
-     * 业务地区-市
-     */
     public void setCity(String city) {
         this.city = city;
     }
 
-    /**
-     * 业务地区-区
-     */
     public String getDistrict() {
         return district;
     }
 
-    /**
-     * 业务地区-区
-     */
     public void setDistrict(String district) {
         this.district = district;
     }
 
-    /**
-     * 业务负责人ID
-     */
     public String getPrincipalId() {
         return principalId;
     }
 
-    /**
-     * 业务负责人ID
-     */
     public void setPrincipalId(String principalId) {
         this.principalId = principalId;
     }
 
-    /**
-     * 价值及作用
-     */
     public String getValueEffect() {
         return valueEffect;
     }
 
-    /**
-     * 价值及作用
-     */
     public void setValueEffect(String valueEffect) {
         this.valueEffect = valueEffect;
     }
 
-    /**
-     * 客户基本条件
-     */
     public String getClientSize() {
         return clientSize;
     }
 
-    /**
-     * 客户基本条件
-     */
     public void setClientSize(String clientSize) {
         this.clientSize = clientSize;
     }
 
-    /**
-     * 业务项目图标35*35
-     */
     public String getMinLogo() {
         return minLogo;
     }
 
-    /**
-     * 业务项目图标35*35
-     */
     public void setMinLogo(String minLogo) {
         this.minLogo = minLogo;
     }
 
-    /**
-     * 业务项目图标200*200
-     */
     public String getMaxLogo() {
         return maxLogo;
     }
 
-    /**
-     * 业务项目图标200*200
-     */
     public void setMaxLogo(String maxLogo) {
         this.maxLogo = maxLogo;
     }
 
-    /**
-     * 项目地址
-     */
     public String getProjectUrl() {
         return projectUrl;
     }
 
-    /**
-     * 项目地址
-     */
     public void setProjectUrl(String projectUrl) {
         this.projectUrl = projectUrl;
     }
 
-    /**
-     * 是否精品  0-否,1-是
-     */
     public Integer getBoutique() {
         return boutique;
     }
 
-    /**
-     * 是否精品  0-否,1-是
-     */
     public void setBoutique(Integer boutique) {
         this.boutique = boutique;
     }
 
-    /**
-     * 首付金额
-     */
     public BigDecimal getFirstPayment() {
         return firstPayment;
     }
 
-    /**
-     * 首付金额
-     */
     public void setFirstPayment(BigDecimal firstPayment) {
         this.firstPayment = firstPayment;
     }
 
-    /**
-     * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
-     */
     public Integer getType() {
         return type;
     }
 
-    /**
-     * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
-     */
     public void setType(Integer type) {
         this.type = type;
     }
 
-    /**
-     * 专利转让 0否1是
-     */
     public Integer getPatentTransfer() {
         return patentTransfer;
     }
 
-    /**
-     * 专利转让 0否1是
-     */
     public void setPatentTransfer(Integer patentTransfer) {
         this.patentTransfer = patentTransfer;
     }
 
-    /**
-     * 限定 0否  1是
-     */
     public Integer getRestrictStatus() {
         return restrictStatus;
     }
 
-    /**
-     * 限定 0否  1是
-     */
     public void setRestrictStatus(Integer restrictStatus) {
         this.restrictStatus = restrictStatus;
     }
-}
+
+    public Integer getLvlType() {
+        return lvlType;
+    }
+
+    public void setLvlType(Integer lvlType) {
+        this.lvlType = lvlType;
+    }
+
+}
+