浏览代码

后台功能接口提交

yanliming 2 周之前
父节点
当前提交
58f2b9ffe1

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/AboutUsDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.AboutUs;
 import java.util.Map;
@@ -14,5 +16,6 @@ public interface AboutUsDAO {
 	AboutUs get(String id);
 	int delete(String id);
 	List<AboutUs> list();
+	List<AboutUs> findBySearchParams(@Param("searchParams") Map<String, Object> searchParams);
 	List<AboutUs> search(Map<String, Object> searchParams, List<Sort> sortList);
 }

+ 12 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/AboutUs.java

@@ -62,4 +62,16 @@ public class AboutUs {
 
 	@ApiModelProperty(value = "客服电话")
 	private String phone;
+
+	@ApiModelProperty(value = "数据代码")
+	private String code;
+
+	@ApiModelProperty(value = "内容")
+	private String content;
+
+	@ApiModelProperty(value = "类型")
+	private String type;
+
+	@ApiModelProperty(value = "标题说明")
+	private String title;
 		}

+ 7 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/CustomerInfo.java

@@ -4,6 +4,9 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+import java.util.List;
+
+import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -80,5 +83,9 @@ public class CustomerInfo {
 	@ApiModelProperty(value = "统一社会信用代码")
 	private String businessCode;
 
+	@Transient
+	@ApiModelProperty(value = "营业执照")
+	private List<String> businessLicenseList;
+
 	
 		}

+ 7 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/ReceiveRequire.java

@@ -4,6 +4,8 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+
+import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -58,5 +60,10 @@ public class ReceiveRequire {
 
 	@ApiModelProperty(value = "会员等级")
 	private Integer level;
+
+
+	@Transient
+	@ApiModelProperty(value = "订单发布模式(1:客户自选师傅,2:由师傅抢单)")
+	private String orderModelN;
 	
 		}

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/AboutUsService.java

@@ -13,5 +13,6 @@ public interface AboutUsService {
 	int update(AboutUs model);
 	int delete(String id);
 	List<AboutUs> list();
+	List<AboutUs> findBySearchParams(Map<String, Object> searchParams);
 	Page<AboutUs> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/AboutUsServiceImpl.java

@@ -58,6 +58,11 @@ public class AboutUsServiceImpl implements AboutUsService {
 		// TODO Auto-generated method stub
 		return aboutUsDAO.list();
 	}
+
+	@Override
+	public List<AboutUs> findBySearchParams(Map<String, Object> searchParams){
+		return aboutUsDAO.findBySearchParams(searchParams);
+	}
 		
 	@Override
 	public Page<AboutUs> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {

+ 37 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/WorkOrderServiceImpl.java

@@ -402,11 +402,41 @@ public class WorkOrderServiceImpl implements WorkOrderService {
                     installationRequirement.setMaterialN(materialN);
                 }
             }
+
+
+            if (StringUtils.isNotEmpty(installationRequirement.getDifficulty())) {
+                String difficultyName = dataDictionaryDAO.findNameByCatalogNameAndValue("施工难度", installationRequirement.getDifficulty());
+                if (StringUtils.isNotEmpty(difficultyName)) {
+                    installationRequirement.setDifficultyName(difficultyName);
+                }
+            }
+
+            if (StringUtils.isNotEmpty(installationRequirement.getEnvironment())) {
+                String getEnvironmentN = dataDictionaryDAO.findNameByCatalogNameAndValue("施工环境", installationRequirement.getEnvironment());
+                if (StringUtils.isNotEmpty(getEnvironmentN)) {
+                    installationRequirement.setEnvironmentName(getEnvironmentN);
+                }
+            }
+
+            if (StringUtils.isNotEmpty(installationRequirement.getConstructionLocation())) {
+                String constructionLocationName = dataDictionaryDAO.findNameByCatalogNameAndValue("施工位置", installationRequirement.getConstructionLocation());
+                if (StringUtils.isNotEmpty(constructionLocationName)) {
+                    installationRequirement.setConstructionLocationName(constructionLocationName);
+                }
+            }
         }
 
         dto.setInstallationRequirement(installationRequirement);
 
         ReceiveRequire receiveRequire = receiveRequireDAO.findByWorkOrderId(id);
+        if(receiveRequire!=null){
+            String orderModelN = dataDictionaryDAO.findNameByCatalogNameAndValue("订单发布模式", receiveRequire.getOrderModel());
+            if (StringUtils.isNotEmpty(orderModelN)) {
+                receiveRequire.setOrderModelN(orderModelN);
+            }
+        }
+
+
         dto.setReceiveRequire(receiveRequire);
 
         String customerName = "";
@@ -446,6 +476,13 @@ public class WorkOrderServiceImpl implements WorkOrderService {
             }
         }
 
+        if (StringUtils.isNotEmpty(workOrder.getPayStatus())) {
+            String payStatusN = dataDictionaryDAO.findNameByCatalogNameAndValue("支付状态", workOrder.getPayStatus());
+            if (StringUtils.isNotEmpty(payStatusN)) {
+                workOrder.setPayStatusN(payStatusN);
+            }
+        }
+
         dto.setWorkOrder(workOrder);
 
         TechnicianInfo technicianInfo = technicianInfoDAO.get(workOrder.getTechnicianId());

+ 33 - 2
common/src/main/resources/mapper/base/AboutUs.xml

@@ -18,7 +18,10 @@
 			<result property="accountNumber" column="account_number" />
 			<result property="paymentCode" column="payment_code" />
 			<result property="phone" column="phone_" />
-
+			<result property="code" column="code_" />
+			<result property="content" column="content_" />
+			<result property="type" column="type_" />
+			<result property="title" column="title_" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.AboutUs">
 	<!--
@@ -29,7 +32,7 @@
 	<![CDATA[
 		insert into base_about_us
 	    (id_,user_agreement,privacy_policy,disclaimer,create_time,update_time,del_flag,create_by,update_by
-	    ,receiving_account,bank_,account_number,payment_code,phone_)
+	    ,receiving_account,bank_,account_number,payment_code,phone_,code_,content_,type_,title_)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -46,6 +49,10 @@
 ,#{accountNumber,jdbcType=VARCHAR}
 ,#{paymentCode,jdbcType=VARCHAR}
 ,#{phone,jdbcType=VARCHAR}
+,#{code,jdbcType=VARCHAR}
+,#{content,jdbcType=VARCHAR}
+,#{type,jdbcType=VARCHAR}
+,#{title,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -94,6 +101,18 @@
 		<if test="phone!=null">
 			phone_=#{phone,jdbcType=VARCHAR},
 		</if>
+			<if test="code!=null">
+				code_=#{code,jdbcType=VARCHAR},
+			</if>
+			<if test="content!=null">
+				content_=#{content,jdbcType=VARCHAR},
+			</if>
+			<if test="type!=null">
+				type_=#{type,jdbcType=VARCHAR},
+			</if>
+			<if test="title!=null">
+				title_=#{title,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
@@ -106,6 +125,18 @@
 	<select id="list" resultMap="AboutUsMap">
 		select * from base_about_us where del_flag=false limit 1
 	</select>
+	<select id="findBySearchParams" resultMap="AboutUsMap">
+		select * from base_about_us
+		<where>
+			del_flag=false
+			<if test="searchParams.code != null">
+				and code_ = #{searchParams.code}
+			</if>
+			<if test="searchParams.type != null">
+				and type_ = #{searchParams.type}
+			</if>
+		</where>
+	</select>
 	<select id="search" parameterType="hashmap" resultMap="AboutUsMap">
 		<![CDATA[
 			select * from base_about_us

+ 0 - 122
common/target/classes/mapper/base/AboutUs.xml

@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.modules.base.dao.AboutUsDAO">
-	<resultMap id="AboutUsMap" type="com.jpsoft.employment.modules.base.entity.AboutUs">
-		<id property="id" column="id_" />
-			<result property="userAgreement" column="user_agreement" />
-			<result property="privacyPolicy" column="privacy_policy" />
-			<result property="disclaimer" column="disclaimer" />
-			<result property="createTime" column="create_time" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			<result property="createBy" column="create_by" />
-			<result property="updateBy" column="update_by" />
-			<result property="receivingAccount" column="receiving_account" />
-			<result property="bank" column="bank_" />
-			<result property="accountNumber" column="account_number" />
-			<result property="paymentCode" column="payment_code" />
-			<result property="phone" column="phone_" />
-
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.AboutUs">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
-		insert into base_about_us
-	    (id_,user_agreement,privacy_policy,disclaimer,create_time,update_time,del_flag,create_by,update_by
-	    ,receiving_account,bank_,account_number,payment_code,phone_)
-		values
-		(
-#{id,jdbcType=VARCHAR}
-,#{userAgreement,jdbcType=VARCHAR}
-,#{privacyPolicy,jdbcType=VARCHAR}
-,#{disclaimer,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
-,#{createBy,jdbcType=VARCHAR}
-,#{updateBy,jdbcType=VARCHAR}
-,#{receivingAccount,jdbcType=VARCHAR}
-,#{bank,jdbcType=VARCHAR}
-,#{accountNumber,jdbcType=VARCHAR}
-,#{paymentCode,jdbcType=VARCHAR}
-,#{phone,jdbcType=VARCHAR}
-		)
-	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from base_about_us where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.AboutUs">
-		update base_about_us
-		<set>
-				<if test="userAgreement!=null">
-		user_agreement=#{userAgreement,jdbcType=VARCHAR},
-		</if>
-				<if test="privacyPolicy!=null">
-		privacy_policy=#{privacyPolicy,jdbcType=VARCHAR},
-		</if>
-				<if test="disclaimer!=null">
-		disclaimer=#{disclaimer,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-		<if test="receivingAccount!=null">
-			receiving_account=#{receivingAccount,jdbcType=VARCHAR},
-		</if>
-		<if test="bank!=null">
-			bank_=#{bank,jdbcType=VARCHAR},
-		</if>
-		<if test="accountNumber!=null">
-			account_number=#{accountNumber,jdbcType=VARCHAR},
-		</if>
-		<if test="paymentCode!=null">
-			payment_code=#{paymentCode,jdbcType=VARCHAR},
-		</if>
-		<if test="phone!=null">
-			phone_=#{phone,jdbcType=VARCHAR},
-		</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="AboutUsMap">
-		select * from base_about_us where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_about_us where id_=#{0}
-	</select>
-	<select id="list" resultMap="AboutUsMap">
-		select * from base_about_us where del_flag=false limit 1
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="AboutUsMap">
-		<![CDATA[
-			select * from base_about_us
-		]]>
-		<where>
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
-	</select>
-</mapper>

+ 0 - 101
common/target/classes/mapper/base/RevenueInfo.xml

@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.modules.base.dao.RevenueInfoDAO">
-	<resultMap id="RevenueInfoMap" type="com.jpsoft.employment.modules.base.entity.RevenueInfo">
-		<id property="id" column="id_" />
-			<result property="amount" column="amount_" />
-			<result property="workOrderId" column="work_order_id" />
-			<result property="dateTime" column="date_time" />
-			<result property="status" column="status_" />
-			<result property="createTime" column="create_time" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			<result property="createBy" column="create_by" />
-			<result property="updateBy" column="update_by" />
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.RevenueInfo">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
-		insert into base_revenue_info
-	    (id_,amount_,work_order_id,date_time,status_,create_time,update_time,del_flag,create_by,update_by)
-		values
-		(
-#{id,jdbcType=VARCHAR}
-,#{amount,jdbcType= NUMERIC }
-,#{workOrderId,jdbcType=VARCHAR}
-,#{dateTime,jdbcType= TIMESTAMP }
-,#{status,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
-,#{createBy,jdbcType=VARCHAR}
-,#{updateBy,jdbcType=VARCHAR}
-		)
-	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from base_revenue_info where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.RevenueInfo">
-		update base_revenue_info
-		<set>
-				<if test="amount!=null">
-		amount_=#{amount,jdbcType= NUMERIC },
-		</if>
-				<if test="workOrderId!=null">
-		work_order_id=#{workOrderId,jdbcType=VARCHAR},
-		</if>
-				<if test="dateTime!=null">
-		date_time=#{dateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="status!=null">
-		status_=#{status,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="RevenueInfoMap">
-		select 
-id_,amount_,work_order_id,date_time,status_,create_time,update_time,del_flag,create_by,update_by		from base_revenue_info where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_revenue_info where id_=#{0}
-	</select>
-	<select id="list" resultMap="RevenueInfoMap">
-		select * from base_revenue_info
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="RevenueInfoMap">
-		<![CDATA[
-			select * from base_revenue_info
-		]]>
-		<where>
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
-	</select>
-</mapper>

+ 0 - 194
common/target/classes/mapper/base/TechnicianInfo.xml

@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.modules.base.dao.TechnicianInfoDAO">
-	<resultMap id="TechnicianInfoMap" type="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
-		<id property="id" column="id_" />
-			<result property="userName" column="user_name" />
-			<result property="password" column="password_" />
-			<result property="openId" column="open_id" />
-			<result property="phone" column="phone_" />
-			<result property="idCard" column="id_card" />
-			<result property="realName" column="real_name" />
-			<result property="region" column="region_" />
-			<result property="image" column="image_" />
-			<result property="gender" column="gender_" />
-			<result property="introduction" column="introduction_" />
-			<result property="serviceInfo" column="service_info" />
-			<result property="businessScope" column="business_scope" />
-			<result property="idCardImage" column="id_card_image" />
-			<result property="isVerified" column="is_verified" />
-			<result property="promoCode" column="promo_code" />
-			<result property="createTime" column="create_time" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			<result property="createBy" column="create_by" />
-			<result property="updateBy" column="update_by" />
-			<result property="status" column="status_" />
-			<result property="level" column="level_" />
-
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
-		insert into base_technician_info
-	    (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_)
-		values
-		(
-#{id,jdbcType=VARCHAR}
-,#{userName,jdbcType=VARCHAR}
-,#{password,jdbcType=VARCHAR}
-,#{openId,jdbcType=VARCHAR}
-,#{phone,jdbcType=VARCHAR}
-,#{idCard,jdbcType=VARCHAR}
-,#{realName,jdbcType=VARCHAR}
-,#{region,jdbcType=VARCHAR}
-,#{image,jdbcType=VARCHAR}
-,#{gender,jdbcType=VARCHAR}
-,#{introduction,jdbcType=VARCHAR}
-,#{serviceInfo,jdbcType=VARCHAR}
-,#{businessScope,jdbcType=VARCHAR}
-,#{idCardImage,jdbcType=VARCHAR}
-,#{isVerified,jdbcType= NUMERIC }
-,#{promoCode,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
-,#{createBy,jdbcType=VARCHAR}
-,#{updateBy,jdbcType=VARCHAR}
-,#{status,jdbcType=VARCHAR}
-,#{level,jdbcType= NUMERIC }
-
-
-		)
-	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from base_technician_info where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
-		update base_technician_info
-		<set>
-				<if test="userName!=null">
-		user_name=#{userName,jdbcType=VARCHAR},
-		</if>
-				<if test="password!=null">
-		password_=#{password,jdbcType=VARCHAR},
-		</if>
-				<if test="openId!=null">
-		open_id=#{openId,jdbcType=VARCHAR},
-		</if>
-				<if test="phone!=null">
-		phone_=#{phone,jdbcType=VARCHAR},
-		</if>
-				<if test="idCard!=null">
-		id_card=#{idCard,jdbcType=VARCHAR},
-		</if>
-				<if test="realName!=null">
-		real_name=#{realName,jdbcType=VARCHAR},
-		</if>
-				<if test="region!=null">
-		region_=#{region,jdbcType=VARCHAR},
-		</if>
-				<if test="image!=null">
-		image_=#{image,jdbcType=VARCHAR},
-		</if>
-				<if test="gender!=null">
-		gender_=#{gender,jdbcType=VARCHAR},
-		</if>
-				<if test="introduction!=null">
-		introduction_=#{introduction,jdbcType=VARCHAR},
-		</if>
-				<if test="serviceInfo!=null">
-		service_info=#{serviceInfo,jdbcType=VARCHAR},
-		</if>
-				<if test="businessScope!=null">
-		business_scope=#{businessScope,jdbcType=VARCHAR},
-		</if>
-				<if test="idCardImage!=null">
-		id_card_image=#{idCardImage,jdbcType=VARCHAR},
-		</if>
-				<if test="isVerified!=null">
-		is_verified=#{isVerified,jdbcType= NUMERIC },
-		</if>
-				<if test="promoCode!=null">
-		promo_code=#{promoCode,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-				<if test="status!=null">
-		status_=#{status,jdbcType=VARCHAR},
-		</if>
-			<if test="level!=null">
-				level_=#{level,jdbcType= NUMERIC },
-			</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="TechnicianInfoMap">
-		select * from base_technician_info where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_technician_info where id_=#{0}
-	</select>
-	<select id="list" resultMap="TechnicianInfoMap">
-		select * from base_technician_info
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="TechnicianInfoMap">
-		<![CDATA[
-			select * from base_technician_info
-		]]>
-		<where>
-			<if test="searchParams.status != null">
-				and status_ = #{searchParams.status}
-			</if>
-			<if test="searchParams.id != null">
-				and real_name like #{searchParams.id}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
-	</select>
-	<select id="searchMobile" parameterType="hashmap" resultMap="TechnicianInfoMap">
-		<![CDATA[
-			select * from base_technician_info
-		]]>
-		<where>
-			del_flag = false
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
-			</if>
-			<if test="searchParams.name != null">
-				and ID_ like #{searchParams.name}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-			${sort.name} ${sort.order}
-		</foreach>
-	</select>
-	<select id="findByPhone" parameterType="string" resultMap="TechnicianInfoMap">
-		select * from base_technician_info
-		where del_flag = 0
-		and phone_ = #{0}
-		limit 1
-	</select>
-</mapper>

+ 0 - 285
common/target/classes/mapper/base/WorkOrder.xml

@@ -1,285 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.modules.base.dao.WorkOrderDAO">
-	<resultMap id="WorkOrderMap" type="com.jpsoft.employment.modules.base.entity.WorkOrder">
-		<id property="id" column="id_" />
-		<result property="number" column="number_" />
-		<result property="title" column="title_" />
-		<result property="address" column="address_" />
-		<result property="date" column="date_" />
-		<result property="tag" column="tag_" />
-		<result property="image" column="image_" />
-		<result property="status" column="status_" />
-		<result property="price" column="price_" />
-		<result property="location" column="location_" />
-		<result property="companyId" column="company_id" />
-		<result property="map" column="map_" />
-		<result property="constructionLocation" column="construction_location" />
-		<result property="environment" column="environment" />
-		<result property="volume" column="volume_" />
-		<result property="technicianId" column="technician_id" />
-		<result property="payStatus" column="pay_status" />
-		<result property="createTime" column="create_time" />
-		<result property="updateTime" column="update_time" />
-		<result property="delFlag" column="del_flag" />
-		<result property="createBy" column="create_by" />
-		<result property="updateBy" column="update_by" />
-		<result property="customerName" column="customer_name" />
-		<result property="customerPhone" column="customer_phone" />
-		<result property="viewNum" column="view_num" />
-		<result property="certificate" column="certificate_" />
-		<result property="cancelCauses" column="cancel_causes" />
-		<result property="cancelReasons" column="cancel_reasons" />
-		<result property="cancelImages" column="cancel_images" />
-		<result property="peopleSeenNum" column="people_seen_num" />
-		<result property="bak" column="bak_" />
-		<result property="payCertificate" column="pay_certificate" />
-
-	</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.WorkOrder">
-		<!--
-        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-            select sys_guid() from dual
-        </selectKey>
-        -->
-		<![CDATA[
-		insert into base_work_order
-	    (id_,number_,title_,address_,date_,tag_,image_,status_,price_,location_,company_id,map_,construction_location,environment,volume_,technician_id,pay_status,create_time,update_time,del_flag,create_by,update_by,
-	    customer_name,customer_phone,view_num,certificate_,cancel_causes,cancel_reasons,cancel_images,people_seen_num,bak_,pay_certificate)
-		values
-		(
-#{id,jdbcType=VARCHAR}
-,#{number,jdbcType=VARCHAR}
-,#{title,jdbcType=VARCHAR}
-,#{address,jdbcType=VARCHAR}
-,#{date,jdbcType= TIMESTAMP }
-,#{tag,jdbcType=VARCHAR}
-,#{image,jdbcType=VARCHAR}
-,#{status,jdbcType=VARCHAR}
-,#{price,jdbcType= NUMERIC }
-,#{location,jdbcType=VARCHAR}
-,#{companyId,jdbcType=VARCHAR}
-,#{map,jdbcType=VARCHAR}
-,#{constructionLocation,jdbcType=VARCHAR}
-,#{environment,jdbcType=VARCHAR}
-,#{volume,jdbcType= NUMERIC }
-,#{technicianId,jdbcType=VARCHAR}
-,#{payStatus,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
-,#{createBy,jdbcType=VARCHAR}
-,#{updateBy,jdbcType=VARCHAR}
-,#{customerName,jdbcType=VARCHAR}
-,#{customerPhone,jdbcType=VARCHAR}
-,#{viewNum,jdbcType= NUMERIC }
-,#{certificate,jdbcType=VARCHAR}
-,#{cancelCauses,jdbcType=VARCHAR}
-,#{cancelReasons,jdbcType=VARCHAR}
-,#{cancelImages,jdbcType=VARCHAR}
-,#{peopleSeenNum,jdbcType= NUMERIC }
-,#{bak,jdbcType=VARCHAR}
-,#{payCertificate,jdbcType=VARCHAR}
-		)
-	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from base_work_order where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.WorkOrder">
-		update base_work_order
-		<set>
-			<if test="number!=null">
-				number_=#{number,jdbcType=VARCHAR},
-			</if>
-			<if test="title!=null">
-				title_=#{title,jdbcType=VARCHAR},
-			</if>
-			<if test="address!=null">
-				address_=#{address,jdbcType=VARCHAR},
-			</if>
-			<if test="date!=null">
-				date_=#{date,jdbcType= TIMESTAMP },
-			</if>
-			<if test="tag!=null">
-				tag_=#{tag,jdbcType=VARCHAR},
-			</if>
-			<if test="image!=null">
-				image_=#{image,jdbcType=VARCHAR},
-			</if>
-			<if test="status!=null">
-				status_=#{status,jdbcType=VARCHAR},
-			</if>
-			<if test="price!=null">
-				price_=#{price,jdbcType= NUMERIC },
-			</if>
-			<if test="location!=null">
-				location_=#{location,jdbcType=VARCHAR},
-			</if>
-			<if test="companyId!=null">
-				company_id=#{companyId,jdbcType=VARCHAR},
-			</if>
-			<if test="map!=null">
-				map_=#{map,jdbcType=VARCHAR},
-			</if>
-			<if test="constructionLocation!=null">
-				construction_location=#{constructionLocation,jdbcType=VARCHAR},
-			</if>
-			<if test="environment!=null">
-				environment=#{environment,jdbcType=VARCHAR},
-			</if>
-			<if test="volume!=null">
-				volume_=#{volume,jdbcType= NUMERIC },
-			</if>
-			<if test="technicianId!=null">
-				technician_id=#{technicianId,jdbcType=VARCHAR},
-			</if>
-			<if test="payStatus!=null">
-				pay_status=#{payStatus,jdbcType=VARCHAR},
-			</if>
-			<if test="createTime!=null">
-				create_time=#{createTime,jdbcType= TIMESTAMP },
-			</if>
-			<if test="updateTime!=null">
-				update_time=#{updateTime,jdbcType= TIMESTAMP },
-			</if>
-			<if test="delFlag!=null">
-				del_flag=#{delFlag,jdbcType= NUMERIC },
-			</if>
-			<if test="createBy!=null">
-				create_by=#{createBy,jdbcType=VARCHAR},
-			</if>
-			<if test="updateBy!=null">
-				update_by=#{updateBy,jdbcType=VARCHAR},
-			</if>
-			<if test="customerName!=null">
-				customer_name=#{customerName,jdbcType=VARCHAR},
-			</if>
-			<if test="customerPhone!=null">
-				customer_phone=#{customerPhone,jdbcType=VARCHAR},
-			</if>
-			<if test="viewNum!=null">
-				view_num=#{viewNum,jdbcType=NUMERIC},
-			</if>
-			<if test="certificate!=null">
-				certificate_=#{certificate,jdbcType=VARCHAR},
-			</if>
-			<if test="cancelCauses!=null">
-				cancel_causes=#{cancelCauses,jdbcType=VARCHAR},
-			</if>
-			<if test="cancelReasons!=null">
-				cancel_reasons=#{cancelReasons,jdbcType=VARCHAR},
-			</if>
-			<if test="cancelImages!=null">
-				cancel_images=#{cancelImages,jdbcType=VARCHAR},
-			</if>
-			<if test="peopleSeenNum!=null">
-				people_seen_num=#{peopleSeenNum,jdbcType= NUMERIC },
-			</if>
-			<if test="bak!=null">
-				bak_=#{bak,jdbcType=VARCHAR},
-			</if>
-			<if test="payCertificate!=null">
-				pay_certificate=#{payCertificate,jdbcType=VARCHAR},
-			</if>
-		</set>
-		where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="WorkOrderMap">
-		select * from base_work_order where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_work_order where id_=#{0}
-	</select>
-	<select id="list" resultMap="WorkOrderMap">
-		select * from base_work_order
-	</select>
-	<select id="findLastByCompanyId" resultMap="WorkOrderMap">
-		select * from base_work_order where del_flag=false and company_id=#{0}
-		order by create_time desc limit 1
-	</select>
-	<select id="countByCustomerId" resultType="java.util.Map">
-		select count(id_) as 'count_',sum(price_) as 'price_' from base_work_order
-		<where>
-			del_flag = false
-			<if test="searchParams.companyId != null">
-				and company_id = #{searchParams.companyId}
-			</if>
-			<if test="searchParams.status != null">
-				and status_ = #{searchParams.status}
-			</if>
-		</where>
-	</select>
-	<select id="countByTechnicianId" resultType="java.lang.Integer">
-		select count(id_) from base_work_order
-		<where>
-			del_flag = false
-			<if test="searchParams.technicianId != null">
-				and technician_id = #{searchParams.technicianId}
-			</if>
-			<if test="searchParams.status != null">
-				and status_ = #{searchParams.status}
-			</if>
-		</where>
-	</select>
-	<select id="findTopByCustomerId" resultType="java.lang.String">
-		select technician_id from base_work_order where del_flag = false and company_id = #{0}
-		order by create_time desc limit 3
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="WorkOrderMap">
-		<![CDATA[
-			select * from base_work_order
-		]]>
-		<where>
-			del_flag = false
-			<if test="searchParams.status != null">
-				and status_ = #{searchParams.status}
-			</if>
-			<if test="searchParams.key != null">
-				and (title_ like #{searchParams.key} or address_ like #{searchParams.key})
-			</if>
-			<if test="searchParams.technicianId != null">
-				and technician_id = #{searchParams.technicianId}
-			</if>
-			<if test="searchParams.date != null">
-				and create_time like #{searchParams.date}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-			${sort.name} ${sort.order}
-		</foreach>
-	</select>
-
-	<select id="searchMobile" parameterType="hashmap" resultMap="WorkOrderMap">
-		<![CDATA[
-			select * from base_work_order
-		]]>
-		<where>
-			del_flag = false
-			<if test="searchParams.title != null">
-				and title_ like #{searchParams.title}
-			</if>
-			<if test="searchParams.companyId != null">
-				and company_id = #{searchParams.companyId}
-			</if>
-			<if test="searchParams.status != null">
-				and status_ = #{searchParams.status}
-			</if>
-			<if test="searchParams.startDate != null">
-				<![CDATA[
-					and date_ >= #{searchParams.startDate}
-				]]>
-			</if>
-			<if test="searchParams.endDate != null">
-				<![CDATA[
-					and date_ < #{searchParams.endDate}
-				]]>
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-			${sort.name} ${sort.order}
-		</foreach>
-	</select>
-</mapper>

+ 12 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/CustomerInfoController.java

@@ -79,6 +79,18 @@ public class CustomerInfoController {
             CustomerInfo customerInfo = customerInfoService.get(id);
 
             if (customerInfo != null) {
+
+                List<String> businessLicenseList = new ArrayList<>();
+                if(StringUtils.isNotEmpty(customerInfo.getBusinessLicense())){
+                    String[] businessLicenseArr = customerInfo.getBusinessLicense().split(",");
+
+                    for (String item:businessLicenseArr) {
+                        businessLicenseList.add(item);
+                    }
+                }
+
+                customerInfo.setBusinessLicenseList(businessLicenseList);
+
                 msgResult.setResult(true);
                 msgResult.setData(customerInfo);
             } else {

+ 25 - 20
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/CustomerInfoApiController.java

@@ -938,38 +938,43 @@ public class CustomerInfoApiController {
     @ApiOperation(value = "关于我们")
     @RequestMapping(value = "aboutUs", method = RequestMethod.POST)
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "type", value = "类型(1:用户协议,2:隐私协议,3:免责条款,4:客服电话)", paramType = "form"),
+            @ApiImplicitParam(name = "code",
+                    value = "数据代码(YHXY:用户协议,YSNR:隐私政策,MZTK:免责条款,SKR:收款人,YH:银行,SKZH:收款账户,SKM:收款码,KFDH:客户电话)", paramType = "form"),
+            @ApiImplicitParam(name = "type",
+                    value = "account:账号相关", paramType = "form"),
     })
-    public MessageResult<Map> aboutUs(String token, String type, @RequestAttribute String subject) {
+    public MessageResult<List<Map>> aboutUs(String token, String code, String type,@RequestAttribute String subject) {
 
         //当前用户ID
         System.out.println(subject);
 
-        MessageResult<Map> msgResult = new MessageResult<>();
-
-        List<AboutUs> aboutUsList = aboutUsService.list();
+        MessageResult<List<Map>> msgResult = new MessageResult<>();
 
-        Map map = new HashMap();
+        Map<String, Object> searchParams = new HashMap<>();
 
-        String content = "";
+        if(StringUtils.isNotEmpty(code)){
+            searchParams.put("code",code);
+        }
 
-        if (aboutUsList != null) {
-            AboutUs aboutUs = aboutUsList.get(0);
-            if ("1".equals(type)) {
-                content = aboutUs.getUserAgreement();
-            } else if ("2".equals(type)) {
-                content = aboutUs.getPrivacyPolicy();
-            } else if ("3".equals(type)) {
-                content = aboutUs.getDisclaimer();
-            } else if ("4".equals(type)) {
-                content = aboutUs.getPhone();
-            }
+        if(StringUtils.isNotEmpty(type)){
+            searchParams.put("type",type);
         }
 
-        map.put("content", content);
+        List<AboutUs> aboutUsList = aboutUsService.findBySearchParams(searchParams);
+
+        List<Map> mapList = new ArrayList<>();
+
+        for (AboutUs aboutUs:aboutUsList) {
+            Map map = new HashMap();
+            map.put("code",aboutUs.getCode());
+            map.put("content",aboutUs.getContent());
+            map.put("title",aboutUs.getTitle());
+
+            mapList.add(map);
+        }
 
         msgResult.setResult(true);
-        msgResult.setData(map);
+        msgResult.setData(mapList);
 
         return msgResult;
     }