anderx пре 7 година
родитељ
комит
b5342234ce

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/target/
+/bin/
+/.classpath

+ 35 - 0
.project

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jitao-server</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+</projectDescription>

+ 2 - 0
.settings/org.eclipse.wst.validation.prefs

@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

+ 1 - 1
GeneratorConfig.xml

@@ -10,6 +10,6 @@
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
-   <table schema="aft" tableName="jt_business_project"/>
+   <table schema="aft" tableName="jt_consult_order"/>
   </context>
 </generatorConfiguration>

+ 120 - 0
src/main/java/com/goafanti/app/bo/ExpertsListBo.java

@@ -0,0 +1,120 @@
+package com.goafanti.app.bo;
+
+import com.goafanti.comment.bo.CommentDetailResult;
+
+public class ExpertsListBo {
+	private String uid;
+	private String username;
+	private String personPortraitUrl;
+	private String introduction ;
+	private Integer industry;
+	private String workUnit;
+	private String professionalTitle;
+	private Integer countInterest;
+	private Integer interested;
+	private Integer expert;
+	private Integer favorable;
+	private Integer general;
+	private Integer inferior;
+	private Integer commentCount;
+	private String favorableRate;
+	private  CommentDetailResult	commentDetailResult;
+	public String getUid() {
+		return uid;
+	}
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+	public String getUsername() {
+		return username;
+	}
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	public String getPersonPortraitUrl() {
+		return personPortraitUrl;
+	}
+	public void setPersonPortraitUrl(String personPortraitUrl) {
+		this.personPortraitUrl = personPortraitUrl;
+	}
+	public String getIntroduction() {
+		return introduction;
+	}
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+	public Integer getIndustry() {
+		return industry;
+	}
+	public void setIndustry(Integer industry) {
+		this.industry = industry;
+	}
+	public String getWorkUnit() {
+		return workUnit;
+	}
+	public void setWorkUnit(String workUnit) {
+		this.workUnit = workUnit;
+	}
+	public String getProfessionalTitle() {
+		return professionalTitle;
+	}
+	public void setProfessionalTitle(String professionalTitle) {
+		this.professionalTitle = professionalTitle;
+	}
+	public Integer getCountInterest() {
+		return countInterest;
+	}
+	public void setCountInterest(Integer countInterest) {
+		this.countInterest = countInterest;
+	}
+	public Integer getInterested() {
+		return interested;
+	}
+	public void setInterested(Integer interested) {
+		this.interested = interested;
+	}
+	public Integer getExpert() {
+		return expert;
+	}
+	public void setExpert(Integer expert) {
+		this.expert = expert;
+	}
+	public Integer getFavorable() {
+		return favorable;
+	}
+	public void setFavorable(Integer favorable) {
+		this.favorable = favorable;
+	}
+	public Integer getGeneral() {
+		return general;
+	}
+	public void setGeneral(Integer general) {
+		this.general = general;
+	}
+	public Integer getInferior() {
+		return inferior;
+	}
+	public void setInferior(Integer inferior) {
+		this.inferior = inferior;
+	}
+	public Integer getCommentCount() {
+		return commentCount;
+	}
+	public void setCommentCount(Integer commentCount) {
+		this.commentCount = commentCount;
+	}
+	public String getFavorableRate() {
+		return favorableRate+"%";
+	}
+	public void setFavorableRate(String favorableRate) {
+		this.favorableRate = favorableRate;
+	}
+	public CommentDetailResult getCommentDetailResult() {
+		return commentDetailResult;
+	}
+	public void setCommentDetailResult(CommentDetailResult commentDetailResult) {
+		this.commentDetailResult = commentDetailResult;
+	}
+	
+
+}

+ 26 - 4
src/main/java/com/goafanti/app/controller/AppOrderController.java

@@ -4,30 +4,29 @@ import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
-
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
-
 import com.goafanti.comment.bo.CommentInput;
 import com.goafanti.comment.controller.UserCommentController;
 import com.goafanti.comment.service.CommentService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.JtConsultOrder;
 import com.goafanti.order.bo.JtOrderInput.JtSingleOrder;
 import com.goafanti.order.enums.CommodityType;
+import com.goafanti.order.service.JtConsultOrderService;
 import com.goafanti.order.service.JtOrderService;
 import com.goafanti.order.service.OrderService;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 
 @RestController
-@RequestMapping(value = "/app/order")
+@RequestMapping(value = "/open/order")
 public class AppOrderController extends CertifyApiController{
 	
 	@Resource
@@ -36,6 +35,8 @@ public class AppOrderController extends CertifyApiController{
 	private CommentService	commentService;
 	@Resource
 	private JtOrderService	jtOrderService;
+	@Resource 
+	private JtConsultOrderService jtConsultOrderService;
 	/**
 	 * 进入添加意向订单
 	 * @param commodityId 商品编号
@@ -334,4 +335,25 @@ public class AppOrderController extends CertifyApiController{
 		result.setData(orders);
 		return result;
 	} 
+	/**
+	 * 提交订单
+	 * @param orderList
+	 * @return
+	 */
+	@RequestMapping(value="/submitConsultOrder",method = RequestMethod.POST)
+	public Result submitConsultOrder(String orderList) {
+		Result result=new Result();
+		Gson gson=new Gson();
+		List<JtConsultOrder>orders=gson.fromJson(orderList,new TypeToken<ArrayList<JtConsultOrder>>() {}.getType());
+		if(orders==null || orders.size()<=0) {result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","列表不符合规范,")); return result;}
+		int addRes=jtConsultOrderService.addConsultOrder(orders);
+		if(addRes==-2) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品类别,")); return result;
+		}
+		else if(addRes==-3) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","提交渠道,")); return result;
+		}
+		result.setData(orders);
+		return result;
+	}  
 }

+ 2 - 2
src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java

@@ -104,9 +104,9 @@ public class OpenAppDiscoveryController extends BaseApiController {
 	 * 专家列表
 	 */
 	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
-	public Result expertsList(String name,String industry, Integer pageNo, Integer pageSize) {
+	public Result expertsList(String name,String industry, Integer sortType,Integer pageNo, Integer pageSize) {
 		Result res = new Result();
-		res.setData(userIdentityService.appExpertsList(name,industry,pageNo,pageSize));
+		res.setData(userIdentityService.appExpertsList(name,industry,sortType,pageNo,pageSize));
 		return res;
 	}
 	

+ 3 - 3
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -76,8 +76,8 @@ public class OpenAppHomeController extends BaseApiController{
 	 * @param id
 	 * @return
 	 */
-	@RequestMapping(value="/projectdDtail",method=RequestMethod.GET)
-	public Result projectdDtail(String id){
+	@RequestMapping(value="/projectDetail",method=RequestMethod.GET)
+	public Result projectDetail(String id){
 		Result result =new Result();
 		if (StringUtils.isBlank(id)) {
 			 result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品ID","商品ID"));
@@ -91,7 +91,7 @@ public class OpenAppHomeController extends BaseApiController{
 	 * @param id
 	 * @return
 	 */
-	@RequestMapping(value = "/projectdComment", method = RequestMethod.GET)
+	@RequestMapping(value = "/projectComment", method = RequestMethod.GET)
 	public Result listComment(String id,Integer pageNo,Integer pageSize) {
 		Result result=new Result();
 		if(StringUtils.isBlank(id)) {

+ 96 - 0
src/main/java/com/goafanti/common/dao/JtConsultOrderMapper.java

@@ -0,0 +1,96 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.JtConsultOrder;
+import com.goafanti.common.model.JtConsultOrderExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface JtConsultOrderMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    long countByExample(JtConsultOrderExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int deleteByExample(JtConsultOrderExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int deleteByPrimaryKey(String orderNo);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int insert(JtConsultOrder record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int insertSelective(JtConsultOrder record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    List<JtConsultOrder> selectByExample(JtConsultOrderExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    JtConsultOrder selectByPrimaryKey(String orderNo);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int updateByExampleSelective(@Param("record") JtConsultOrder record, @Param("example") JtConsultOrderExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int updateByExample(@Param("record") JtConsultOrder record, @Param("example") JtConsultOrderExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int updateByPrimaryKeySelective(JtConsultOrder record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_consult_order
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    int updateByPrimaryKey(JtConsultOrder record);
+}

+ 1 - 0
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -789,6 +789,7 @@
   <select id="recommendedApplicationCount" resultType="java.lang.Integer">
   select count(*)
   	from jt_business_project a
+  	left join jt_business_category b on  a.category_id=b.id
   	where b.module != 1 and a.is_hot=1
   </select>
 </mapper>

+ 493 - 0
src/main/java/com/goafanti/common/mapper/JtConsultOrderMapper.xml

@@ -0,0 +1,493 @@
+<?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">
+<mapper namespace="com.goafanti.common.dao.JtConsultOrderMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.JtConsultOrder">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    <id column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="order_time" jdbcType="TIMESTAMP" property="orderTime" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
+    <result column="seller_id" jdbcType="VARCHAR" property="sellerId" />
+    <result column="consult_type" jdbcType="INTEGER" property="consultType" />
+    <result column="consult_price" jdbcType="DECIMAL" property="consultPrice" />
+    <result column="discount_price" jdbcType="DECIMAL" property="discountPrice" />
+    <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
+    <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
+    <result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
+    <result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
+    <result column="pay_type" jdbcType="INTEGER" property="payType" />
+    <result column="order_status" jdbcType="INTEGER" property="orderStatus" />
+    <result column="order_channel" jdbcType="INTEGER" property="orderChannel" />
+    <result column="order_remarks" jdbcType="VARCHAR" property="orderRemarks" />
+    <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    order_no, order_time, aid, update_time, buyer_id, seller_id, consult_type, consult_price, 
+    discount_price, member_price, order_amount, pay_amount, refund_amount, pay_type, 
+    order_status, order_channel, order_remarks, delete_sign
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.JtConsultOrderExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from jt_consult_order
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from jt_consult_order
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    delete from jt_consult_order
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.JtConsultOrderExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    delete from jt_consult_order
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.JtConsultOrder">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    insert into jt_consult_order (order_no, order_time, aid, 
+      update_time, buyer_id, seller_id, 
+      consult_type, consult_price, discount_price, 
+      member_price, order_amount, pay_amount, 
+      refund_amount, pay_type, order_status, 
+      order_channel, order_remarks, delete_sign
+      )
+    values (#{orderNo,jdbcType=VARCHAR}, #{orderTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, 
+      #{consultType,jdbcType=INTEGER}, #{consultPrice,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, 
+      #{memberPrice,jdbcType=DECIMAL}, #{orderAmount,jdbcType=DECIMAL}, #{payAmount,jdbcType=DECIMAL}, 
+      #{refundAmount,jdbcType=DECIMAL}, #{payType,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, 
+      #{orderChannel,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.JtConsultOrder">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    insert into jt_consult_order
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="orderTime != null">
+        order_time,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="buyerId != null">
+        buyer_id,
+      </if>
+      <if test="sellerId != null">
+        seller_id,
+      </if>
+      <if test="consultType != null">
+        consult_type,
+      </if>
+      <if test="consultPrice != null">
+        consult_price,
+      </if>
+      <if test="discountPrice != null">
+        discount_price,
+      </if>
+      <if test="memberPrice != null">
+        member_price,
+      </if>
+      <if test="orderAmount != null">
+        order_amount,
+      </if>
+      <if test="payAmount != null">
+        pay_amount,
+      </if>
+      <if test="refundAmount != null">
+        refund_amount,
+      </if>
+      <if test="payType != null">
+        pay_type,
+      </if>
+      <if test="orderStatus != null">
+        order_status,
+      </if>
+      <if test="orderChannel != null">
+        order_channel,
+      </if>
+      <if test="orderRemarks != null">
+        order_remarks,
+      </if>
+      <if test="deleteSign != null">
+        delete_sign,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderTime != null">
+        #{orderTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="buyerId != null">
+        #{buyerId,jdbcType=VARCHAR},
+      </if>
+      <if test="sellerId != null">
+        #{sellerId,jdbcType=VARCHAR},
+      </if>
+      <if test="consultType != null">
+        #{consultType,jdbcType=INTEGER},
+      </if>
+      <if test="consultPrice != null">
+        #{consultPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="discountPrice != null">
+        #{discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="memberPrice != null">
+        #{memberPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="orderAmount != null">
+        #{orderAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="payAmount != null">
+        #{payAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="refundAmount != null">
+        #{refundAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="payType != null">
+        #{payType,jdbcType=INTEGER},
+      </if>
+      <if test="orderStatus != null">
+        #{orderStatus,jdbcType=INTEGER},
+      </if>
+      <if test="orderChannel != null">
+        #{orderChannel,jdbcType=INTEGER},
+      </if>
+      <if test="orderRemarks != null">
+        #{orderRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteSign != null">
+        #{deleteSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.JtConsultOrderExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    select count(*) from jt_consult_order
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    update jt_consult_order
+    <set>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.orderTime != null">
+        order_time = #{record.orderTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.buyerId != null">
+        buyer_id = #{record.buyerId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sellerId != null">
+        seller_id = #{record.sellerId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.consultType != null">
+        consult_type = #{record.consultType,jdbcType=INTEGER},
+      </if>
+      <if test="record.consultPrice != null">
+        consult_price = #{record.consultPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.discountPrice != null">
+        discount_price = #{record.discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.memberPrice != null">
+        member_price = #{record.memberPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.orderAmount != null">
+        order_amount = #{record.orderAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.payAmount != null">
+        pay_amount = #{record.payAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.refundAmount != null">
+        refund_amount = #{record.refundAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.payType != null">
+        pay_type = #{record.payType,jdbcType=INTEGER},
+      </if>
+      <if test="record.orderStatus != null">
+        order_status = #{record.orderStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.orderChannel != null">
+        order_channel = #{record.orderChannel,jdbcType=INTEGER},
+      </if>
+      <if test="record.orderRemarks != null">
+        order_remarks = #{record.orderRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.deleteSign != null">
+        delete_sign = #{record.deleteSign,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    update jt_consult_order
+    set order_no = #{record.orderNo,jdbcType=VARCHAR},
+      order_time = #{record.orderTime,jdbcType=TIMESTAMP},
+      aid = #{record.aid,jdbcType=VARCHAR},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      buyer_id = #{record.buyerId,jdbcType=VARCHAR},
+      seller_id = #{record.sellerId,jdbcType=VARCHAR},
+      consult_type = #{record.consultType,jdbcType=INTEGER},
+      consult_price = #{record.consultPrice,jdbcType=DECIMAL},
+      discount_price = #{record.discountPrice,jdbcType=DECIMAL},
+      member_price = #{record.memberPrice,jdbcType=DECIMAL},
+      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
+      pay_amount = #{record.payAmount,jdbcType=DECIMAL},
+      refund_amount = #{record.refundAmount,jdbcType=DECIMAL},
+      pay_type = #{record.payType,jdbcType=INTEGER},
+      order_status = #{record.orderStatus,jdbcType=INTEGER},
+      order_channel = #{record.orderChannel,jdbcType=INTEGER},
+      order_remarks = #{record.orderRemarks,jdbcType=VARCHAR},
+      delete_sign = #{record.deleteSign,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.JtConsultOrder">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    update jt_consult_order
+    <set>
+      <if test="orderTime != null">
+        order_time = #{orderTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="buyerId != null">
+        buyer_id = #{buyerId,jdbcType=VARCHAR},
+      </if>
+      <if test="sellerId != null">
+        seller_id = #{sellerId,jdbcType=VARCHAR},
+      </if>
+      <if test="consultType != null">
+        consult_type = #{consultType,jdbcType=INTEGER},
+      </if>
+      <if test="consultPrice != null">
+        consult_price = #{consultPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="discountPrice != null">
+        discount_price = #{discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="memberPrice != null">
+        member_price = #{memberPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="orderAmount != null">
+        order_amount = #{orderAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="payAmount != null">
+        pay_amount = #{payAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="refundAmount != null">
+        refund_amount = #{refundAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="payType != null">
+        pay_type = #{payType,jdbcType=INTEGER},
+      </if>
+      <if test="orderStatus != null">
+        order_status = #{orderStatus,jdbcType=INTEGER},
+      </if>
+      <if test="orderChannel != null">
+        order_channel = #{orderChannel,jdbcType=INTEGER},
+      </if>
+      <if test="orderRemarks != null">
+        order_remarks = #{orderRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteSign != null">
+        delete_sign = #{deleteSign,jdbcType=INTEGER},
+      </if>
+    </set>
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.JtConsultOrder">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 16 09:19:56 CST 2018.
+    -->
+    update jt_consult_order
+    set order_time = #{orderTime,jdbcType=TIMESTAMP},
+      aid = #{aid,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      buyer_id = #{buyerId,jdbcType=VARCHAR},
+      seller_id = #{sellerId,jdbcType=VARCHAR},
+      consult_type = #{consultType,jdbcType=INTEGER},
+      consult_price = #{consultPrice,jdbcType=DECIMAL},
+      discount_price = #{discountPrice,jdbcType=DECIMAL},
+      member_price = #{memberPrice,jdbcType=DECIMAL},
+      order_amount = #{orderAmount,jdbcType=DECIMAL},
+      pay_amount = #{payAmount,jdbcType=DECIMAL},
+      refund_amount = #{refundAmount,jdbcType=DECIMAL},
+      pay_type = #{payType,jdbcType=INTEGER},
+      order_status = #{orderStatus,jdbcType=INTEGER},
+      order_channel = #{orderChannel,jdbcType=INTEGER},
+      order_remarks = #{orderRemarks,jdbcType=VARCHAR},
+      delete_sign = #{deleteSign,jdbcType=INTEGER}
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 41 - 8
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1207,18 +1207,51 @@ order by
 		left join user_interest ui on ui.to_uid=u.id
 		where t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
 </select>
-<select id="selectCustomerAuditList" resultType="com.goafanti.user.bo.CustomerAuditListBo">
-	  select a.id,a.uid,a.username,c.name  as industryName 
-  ,a.expert,a.expert_audit as expertAudit from user_identity a
-  left join industry_category c on a.industry=c.id
-  where expert !=0	and expert_audit =1
+<select id="selectCustomerAuditList" resultType="com.goafanti.app.bo.ExpertsListBo">
+	select u.id as uid, u.nickname as username, u.head_portrait_url as personPortraitUrl,
+	u.introduction, ui.industry, ui.work_unit as workUnit, ui.professional_title as professionalTitle,
+	ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
+	ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
+	ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
+from
+	`user` u left join user_identity ui on ui.uid = u.id 
+	left join( select
+		b.seller_id as uid, sum( case when a.star &gt; 3 then 1 else 0 end ) as a,
+		sum( case when a.star = 3 then 1 else 0 end ) as b,
+		sum( case when a.star &lt; 3 then 1 else 0 end ) as c, count(*) as d
+		from jt_commodity_comment a left join jt_order b on
+		a.order_no = b.order_no group by b.seller_id
+		) x on u.id = x.uid 
+	left join( select count(*) as count, to_uid from user_interest group by to_uid) a 
+	on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} ) b
+	on u.id = b.to_uid 
+	where u.status = 0 and u.source = 1 
+	and ui.expert = 1
+	<if test="industry != null">
+	 and ui.industry= #{industry,jdbcType=VARCHAR}
+	</if>
+	<if test="name != null">
+	and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
+	</if>
+	<if test="sortType == 0">
+	order by u.create_time desc
+	</if> 
+	<if test="sortType == 1">
+	order by favorableRate desc
+	</if>
 	<if test="page_sql!=null">
         ${page_sql}
     </if>
 </select>
   <select id="selectCustomerAuditCount" resultType="java.lang.Integer">
-	 	select count(0) from user_identity a
-  left join industry_category c on a.industry=c.id
-  where expert !=0	and expert_audit =1
+	 	select count(0)from
+	`user` u left join user_identity ui on ui.uid = u.id 
+	  where u.status = 0 and u.source = 1 and ui.expert = 1
+	  <if test="industry != null">
+		and ui.industry= #{industry,jdbcType=VARCHAR}
+	</if>
+	<if test="name != null">
+	and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
+	</if>
 </select>
 </mapper>

+ 600 - 0
src/main/java/com/goafanti/common/model/JtConsultOrder.java

@@ -0,0 +1,600 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class JtConsultOrder {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_no
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private String orderNo;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Date orderTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.aid
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private String aid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.update_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Date updateTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.buyer_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private String buyerId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.seller_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private String sellerId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.consult_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Integer consultType;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.consult_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal consultPrice;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.discount_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal discountPrice;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.member_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal memberPrice;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal orderAmount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.pay_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal payAmount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.refund_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private BigDecimal refundAmount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.pay_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Integer payType;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_status
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Integer orderStatus;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_channel
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Integer orderChannel;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.order_remarks
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private String orderRemarks;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_consult_order.delete_sign
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    private Integer deleteSign;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_no
+     *
+     * @return the value of jt_consult_order.order_no
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_no
+     *
+     * @param orderNo the value for jt_consult_order.order_no
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_time
+     *
+     * @return the value of jt_consult_order.order_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Date getOrderTime() {
+        return orderTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_time
+     *
+     * @param orderTime the value for jt_consult_order.order_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderTime(Date orderTime) {
+        this.orderTime = orderTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.aid
+     *
+     * @return the value of jt_consult_order.aid
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public String getAid() {
+        return aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.aid
+     *
+     * @param aid the value for jt_consult_order.aid
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.update_time
+     *
+     * @return the value of jt_consult_order.update_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.update_time
+     *
+     * @param updateTime the value for jt_consult_order.update_time
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.buyer_id
+     *
+     * @return the value of jt_consult_order.buyer_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public String getBuyerId() {
+        return buyerId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.buyer_id
+     *
+     * @param buyerId the value for jt_consult_order.buyer_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setBuyerId(String buyerId) {
+        this.buyerId = buyerId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.seller_id
+     *
+     * @return the value of jt_consult_order.seller_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public String getSellerId() {
+        return sellerId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.seller_id
+     *
+     * @param sellerId the value for jt_consult_order.seller_id
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setSellerId(String sellerId) {
+        this.sellerId = sellerId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.consult_type
+     *
+     * @return the value of jt_consult_order.consult_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Integer getConsultType() {
+        return consultType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.consult_type
+     *
+     * @param consultType the value for jt_consult_order.consult_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setConsultType(Integer consultType) {
+        this.consultType = consultType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.consult_price
+     *
+     * @return the value of jt_consult_order.consult_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getConsultPrice() {
+        return consultPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.consult_price
+     *
+     * @param consultPrice the value for jt_consult_order.consult_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setConsultPrice(BigDecimal consultPrice) {
+        this.consultPrice = consultPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.discount_price
+     *
+     * @return the value of jt_consult_order.discount_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getDiscountPrice() {
+        return discountPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.discount_price
+     *
+     * @param discountPrice the value for jt_consult_order.discount_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setDiscountPrice(BigDecimal discountPrice) {
+        this.discountPrice = discountPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.member_price
+     *
+     * @return the value of jt_consult_order.member_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getMemberPrice() {
+        return memberPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.member_price
+     *
+     * @param memberPrice the value for jt_consult_order.member_price
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setMemberPrice(BigDecimal memberPrice) {
+        this.memberPrice = memberPrice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_amount
+     *
+     * @return the value of jt_consult_order.order_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_amount
+     *
+     * @param orderAmount the value for jt_consult_order.order_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.pay_amount
+     *
+     * @return the value of jt_consult_order.pay_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getPayAmount() {
+        return payAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.pay_amount
+     *
+     * @param payAmount the value for jt_consult_order.pay_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setPayAmount(BigDecimal payAmount) {
+        this.payAmount = payAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.refund_amount
+     *
+     * @return the value of jt_consult_order.refund_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public BigDecimal getRefundAmount() {
+        return refundAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.refund_amount
+     *
+     * @param refundAmount the value for jt_consult_order.refund_amount
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setRefundAmount(BigDecimal refundAmount) {
+        this.refundAmount = refundAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.pay_type
+     *
+     * @return the value of jt_consult_order.pay_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Integer getPayType() {
+        return payType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.pay_type
+     *
+     * @param payType the value for jt_consult_order.pay_type
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setPayType(Integer payType) {
+        this.payType = payType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_status
+     *
+     * @return the value of jt_consult_order.order_status
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Integer getOrderStatus() {
+        return orderStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_status
+     *
+     * @param orderStatus the value for jt_consult_order.order_status
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderStatus(Integer orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_channel
+     *
+     * @return the value of jt_consult_order.order_channel
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Integer getOrderChannel() {
+        return orderChannel;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_channel
+     *
+     * @param orderChannel the value for jt_consult_order.order_channel
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderChannel(Integer orderChannel) {
+        this.orderChannel = orderChannel;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.order_remarks
+     *
+     * @return the value of jt_consult_order.order_remarks
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.order_remarks
+     *
+     * @param orderRemarks the value for jt_consult_order.order_remarks
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_consult_order.delete_sign
+     *
+     * @return the value of jt_consult_order.delete_sign
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public Integer getDeleteSign() {
+        return deleteSign;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_consult_order.delete_sign
+     *
+     * @param deleteSign the value for jt_consult_order.delete_sign
+     *
+     * @mbg.generated Thu Aug 16 09:19:56 CST 2018
+     */
+    public void setDeleteSign(Integer deleteSign) {
+        this.deleteSign = deleteSign;
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 1434 - 0
src/main/java/com/goafanti/common/model/JtConsultOrderExample.java


+ 13 - 0
src/main/java/com/goafanti/order/service/JtConsultOrderService.java

@@ -0,0 +1,13 @@
+package com.goafanti.order.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.model.JtConsultOrder;
+
+public interface JtConsultOrderService {
+
+	int addConsultOrder(List<JtConsultOrder> orderList);
+	
+}

+ 61 - 0
src/main/java/com/goafanti/order/service/impl/JtConsultOrderServiceImpl.java

@@ -0,0 +1,61 @@
+package com.goafanti.order.service.impl;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.JtConsultOrderMapper;
+import com.goafanti.common.model.JtConsultOrder;
+import com.goafanti.core.mybatis.JDBCIdGenerator;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.service.JtConsultOrderService;
+@Service
+public class JtConsultOrderServiceImpl implements JtConsultOrderService {
+	
+	@Autowired
+	private JtConsultOrderMapper	jtConsultOrderMapper;
+	@Override
+	public int addConsultOrder(List<JtConsultOrder> orderList) {
+		List<JtConsultOrder> l= new ArrayList<>();
+		for(JtConsultOrder order:orderList)
+		{
+			JtConsultOrder consultOrder=new JtConsultOrder(); 
+			if(order.getOrderChannel()==null)return -3;
+			if(order.getPayType()==null)order.setPayType(0);
+			JDBCIdGenerator jdbcIdGenerator=new JDBCIdGenerator();
+			order.setPayType(1);
+			order.setOrderStatus(0);
+			order.setOrderChannel(0);
+			order.setDeleteSign(0);
+			order.setBuyerId(TokenManager.getUserId());
+			order.setBuyerId("0549c290-5178-4886-8294-5037f1743b0c");
+			order.setOrderNo(jdbcIdGenerator.generateId()+"");
+			order.setOrderTime(new Date());
+				consultOrder.setSellerId(order.getSellerId());
+				consultOrder.setOrderNo(order.getOrderNo());
+				consultOrder.setBuyerId(order.getBuyerId());
+				consultOrder.setOrderTime(order.getOrderTime());
+				consultOrder.setConsultType(order.getConsultType());
+				consultOrder.setConsultPrice(order.getConsultPrice());
+				consultOrder.setDiscountPrice(order.getDiscountPrice());
+				consultOrder.setMemberPrice(order.getMemberPrice());
+				consultOrder.setOrderAmount(order.getOrderAmount());
+				consultOrder.setPayAmount(order.getConsultPrice());
+				consultOrder.setRefundAmount(order.getRefundAmount());
+				consultOrder.setPayType(order.getPayType());
+				consultOrder.setOrderStatus(order.getOrderStatus());
+				consultOrder.setOrderChannel(order.getOrderChannel());
+				consultOrder.setDeleteSign(order.getDeleteSign());
+				consultOrder.setOrderRemarks(order.getOrderRemarks());
+				jtConsultOrderMapper.insert(consultOrder);
+		}
+		
+		return 0;
+	}
+
+}

+ 1 - 1
src/main/java/com/goafanti/user/service/UserIdentityService.java

@@ -73,6 +73,6 @@ public interface UserIdentityService {
 
 	Pagination<CustomerAuditListBo> selectCustomerAuditList(String name, String type, String identity, Integer pageNo, Integer pageSize);
 
-	Pagination<UserIdentityBo> appExpertsList(String name, String industry, Integer pageNo, Integer pageSize);
+	Pagination<UserIdentityBo> appExpertsList(String name, String industry, Integer sortType,Integer pageNo, Integer pageSize);
 
 }

+ 3 - 1
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -510,12 +510,14 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<UserIdentityBo> appExpertsList(String name, String industry, Integer pageNo, Integer pageSize) {
+	public Pagination<UserIdentityBo> appExpertsList(String name, String industry,Integer sortType, Integer pageNo, Integer pageSize) {
 		if(pageNo==null || pageNo<1)pageNo=1;
 		if(pageSize==null ||pageSize<1)pageSize=10; 
 		 Map<String, Object> params=new HashMap<String,Object>();
 		 if(StringUtils.isNotBlank(name))params.put("name", name);
 		 if(StringUtils.isNotBlank(industry))params.put("industry", name);
+		 if(null!=sortType)params.put("sortType", sortType);
+		 if(StringUtils.isNotBlank(TokenManager.getUserId()))params.put("uid", TokenManager.getUserId());
 		 return (Pagination<UserIdentityBo>) findPage("selectCustomerAuditList", "selectCustomerAuditCount", params, pageNo, pageSize);
 	}