Эх сурвалжийг харах

Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder

qzy 6 сар өмнө
parent
commit
34a10318de

+ 10 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderMapper.xml

@@ -115,6 +115,16 @@
 			<if test=' this.has("importOrderId") '> and import_order_id = #{importOrderId} </if>
 			<if test=' this.has("declareType") '> and declare_type = #{declareType} </if>
 			<if test=' this.has("upStatus") '> and up_status = #{upStatus} </if>
+
+			<if test='confirmType == "people_confirm_time" and this.has("dateBegin")'> and people_confirm_time &gt;= #{dateBegin} </if>
+			<if test='confirmType == "people_confirm_time" and this.has("dateEnd")'> and people_confirm_time &lt;= #{dateEnd} </if>
+
+			<if test='confirmType == "cooper_entrust_time" and this.has("dateBegin")'> and cooper_entrust_time &gt;= #{dateBegin} </if>
+			<if test='confirmType == "cooper_entrust_time" and this.has("dateEnd")'> and cooper_entrust_time &lt;= #{dateEnd} </if>
+
+			<if test='confirmType == "apply_confirm_time" and this.has("dateBegin")'> and apply_confirm_time &gt;= #{dateBegin} </if>
+			<if test='confirmType == "apply_confirm_time" and this.has("dateEnd")'> and apply_confirm_time &lt;= #{dateEnd} </if>
+
 		</where>
 		order by
 		<choose>

+ 19 - 5
sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaser.java

@@ -53,9 +53,9 @@ public class TbPurchaser extends Model<TbPurchaser> implements Serializable {
 	private Long id;
 
 	/**
-	 * 名
+	 * 
 	 */
-	@Excel(name = "名")
+	@Excel(name = "名")
 	private String name;
 
 	/**
@@ -101,9 +101,9 @@ public class TbPurchaser extends Model<TbPurchaser> implements Serializable {
 	private String bankAccount;
 
 	/**
-	 * 税号
+	 * 统一社会信用代码
 	 */
-	@Excel(name = "税号")
+	@Excel(name = "统一社会信用代码")
 	private String dutyParagraph;
 
 	/**
@@ -187,7 +187,7 @@ public class TbPurchaser extends Model<TbPurchaser> implements Serializable {
 	/**
 	 * 更新人编号
 	 */
-	@Excel(name = "更人编号")
+	@Excel(name = "更人编号")
 	private String updateBy;
 
 	/**
@@ -208,5 +208,19 @@ public class TbPurchaser extends Model<TbPurchaser> implements Serializable {
 	 */
 	private Integer isLock;
 
+	/**
+	 * 收购商类型:默认1【1企业收购商 2个人收购商】
+	 */
+	private Integer type;
+
+	/**
+	 * 企业名称
+	 */
+	private String businessName;
+
+	/**
+	 * 邮箱
+	 */
+	private String email;
 
 }

+ 19 - 16
sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserMapper.xml

@@ -7,24 +7,24 @@
 
 	<!-- ================================== 查询相关 ================================== -->
 	<!-- select id, name, legal_person, id_card, contact, business_license, bank_no, bank_name, bank_account, duty_paragraph, address_ids, address, judge_status, judge_content, judge_time, register_time, person_id, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_purchaser  -->
-	
+
 	<!-- 通用映射:自动模式 -->
 	<resultMap id="model" autoMapping="true" type="com.pj.tb_purchaser.TbPurchaser"></resultMap>
-	
+
 	<!-- 公共查询sql片段 -->
 	<sql id="select_sql">
-		select * 
-		from tb_purchaser 
+		select *
+		from tb_purchaser
 	</sql>
 
-	
+
 	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
 	<select id="getList" resultMap="model">
 		<include refid="select_sql"></include>
 		<where>
 			<if test=' this.has("id") '> and id = #{id} </if>
-			<if test=' this.has("name") '> and name = #{name} </if>
-			<if test=' this.has("legalPerson") '> and legal_person = #{legalPerson} </if>
+			<if test=' this.has("name") '> and name like concat('%', #{name}, '%') </if>
+			<if test=' this.has("legalPerson") '> and legal_person like concat('%', #{legalPerson}, '%') </if>
 			<if test=' this.has("idCard") '> and id_card = #{idCard} </if>
 			<if test=' this.has("contact") '> and contact = #{contact} </if>
 			<if test=' this.has("bankNo") '> and bank_no = #{bankNo} </if>
@@ -43,6 +43,9 @@
 			<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
 			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
 			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
+			<if test=' this.has("type") '> and type = #{type} </if>
+			<if test=' this.has("businessName") '> and business_name like concat('%', #{businessName}, '%') </if>
+			<if test=' this.has("email") '> and email = #{email} </if>
 		</where>
 		order by
 		<choose>
@@ -72,14 +75,14 @@
 			<otherwise> id desc </otherwise>
 		</choose>
 	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
+
+
+
+
+
+
+
+
+
 
 </mapper>

+ 0 - 1
sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserService.java

@@ -155,7 +155,6 @@ public class TbPurchaserService extends ServiceImpl<TbPurchaserMapper, TbPurchas
             EnterpriseAuditDto auditDto = new EnterpriseAuditDto();
             auditDto.setAuth("1");
             auditDto.setFkId(purchaserId);
-            auditDto.setId(Long.parseLong(tbPurchaser.getCreateBy()));
             if (adminInterface.audit(auditDto)) {
                 //发送通知给收购商
                 MessageDto dto = new MessageDto();

+ 6 - 4
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java

@@ -1,9 +1,11 @@
 package com.pj.project.app_user;
 
+import java.util.Date;
 import java.util.List;
 
 import cn.hutool.json.JSONUtil;
 import cn.hutool.log.StaticLog;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.pj.api.dto.*;
 
 import com.pj.api.dto.BindShopDTO;
@@ -124,10 +126,10 @@ public class AppUserController {
 	/** 商户认证 */
 	@PostMapping("rpc/audit")
 	public boolean audit(@RequestBody EnterpriseAuditDto dto){
-		AppUser user=new AppUser();
-		BeanUtils.copyProperties(dto, user);
-		System.out.println("EnterpriseAuditDto:"+dto.getFkId());
-		return appUserService.updateById(user);
+		LambdaUpdateWrapper<AppUser> updateWrapper = new LambdaUpdateWrapper<>();
+		updateWrapper.set(AppUser::getAuth, dto.getAuth()).set(AppUser::getAuthTime, new Date()).eq(AppUser::getFkId, dto.getFkId());
+		boolean update = appUserService.update(updateWrapper);
+		return update;
 	}
 
 	/**