Browse Source

Merge remote-tracking branch 'origin/master'

xiao547607 4 years ago
parent
commit
95a50dc2c6
17 changed files with 1133 additions and 1 deletions
  1. 24 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/CooperationInfoDAO.java
  2. 18 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/WhisperingWallDAO.java
  3. 25 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CooperationInfoDTO.java
  4. 21 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CooperationInfoListDTO.java
  5. 67 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/CooperationInfo.java
  6. 53 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/WhisperingWall.java
  7. 23 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/CooperationInfoService.java
  8. 17 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/WhisperingWallService.java
  9. 75 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/CooperationInfoServiceImpl.java
  10. 70 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/WhisperingWallServiceImpl.java
  11. 118 0
      common/src/main/resources/mapper/base/CooperationInfo.xml
  12. 117 0
      common/src/main/resources/mapper/base/WhisperingWall.xml
  13. 2 0
      web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java
  14. 233 0
      web/src/main/java/com/jpsoft/enterprise/modules/base/controller/WhisperingWallController.java
  15. 156 0
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/CooperationInfoApiController.java
  16. 5 1
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/PersonInfoApiController.java
  17. 109 0
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/WhisperingWallApiController.java

+ 24 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/CooperationInfoDAO.java

@@ -0,0 +1,24 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.CooperationInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 14:40
+ */
+@Repository
+public interface CooperationInfoDAO {
+
+    int insert(CooperationInfo entity);
+    int update(CooperationInfo entity);
+    int exist(String id);
+    CooperationInfo get(String id);
+    int delete(String id);
+    List<CooperationInfo> list();
+    List<CooperationInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+}

+ 18 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/WhisperingWallDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import java.util.Map;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+@Repository
+public interface WhisperingWallDAO {
+	int insert(WhisperingWall entity);
+	int update(WhisperingWall entity);
+	int exist(String id);
+	WhisperingWall get(String id);
+	int delete(String id);
+	List<WhisperingWall> list();
+	List<WhisperingWall> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 25 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CooperationInfoDTO.java

@@ -0,0 +1,25 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import lombok.Data;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 15:48
+ */
+@Data
+public class CooperationInfoDTO {
+
+    private String id;
+
+    private String companyName;
+
+    private String createTime;
+
+    private String companyLogo;
+
+    private String personName;
+
+    private String typeName;
+
+    private String content;
+}

+ 21 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CooperationInfoListDTO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import lombok.Data;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 14:50
+ */
+@Data
+public class CooperationInfoListDTO {
+
+    private String id;
+
+    private String createTime;
+
+    private String companyName;
+
+    private String title;
+
+    private String content;
+}

+ 67 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/CooperationInfo.java

@@ -0,0 +1,67 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 10:46
+ */
+@Data
+public class CooperationInfo {
+
+
+    private String id;
+
+    @ApiModelProperty(value = "公司id")
+    private String companyId;
+
+    @ApiModelProperty(value = "类型")
+    private String type;
+
+    @ApiModelProperty(value = "图片地址")
+    private String picUrl;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    @ApiModelProperty(value = "是否上架")
+    private Boolean status = false;
+
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag = false;
+}

+ 53 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/WhisperingWall.java

@@ -0,0 +1,53 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:base_whispering_wall的实体类
+ */
+@Data
+@ApiModel(value = "base_whispering_wall的实体类")
+public class WhisperingWall {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "提问")
+    private String question;
+        @ApiModelProperty(value = "提问人")
+    private String questionBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "提问时间")
+    private Date questionTime;
+        @ApiModelProperty(value = "回答")
+    private String answer;
+        @ApiModelProperty(value = "回答人")
+    private String answerBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "回答时间")
+    private Date answerTime;
+        @ApiModelProperty(value = "类型")
+    private Integer type;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 23 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/CooperationInfoService.java

@@ -0,0 +1,23 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.CooperationInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 14:36
+ */
+public interface CooperationInfoService {
+
+    CooperationInfo get(String id);
+    boolean exist(String id);
+    int insert(CooperationInfo model);
+    int update(CooperationInfo model);
+    int delete(String id);
+    List<CooperationInfo> list();
+    Page<CooperationInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 17 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/WhisperingWallService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+public interface WhisperingWallService {
+	WhisperingWall get(String id);
+	boolean exist(String id);
+	int insert(WhisperingWall model);
+	int update(WhisperingWall model);
+	int delete(String id);
+	List<WhisperingWall> list();
+	Page<WhisperingWall> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+}

+ 75 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/CooperationInfoServiceImpl.java

@@ -0,0 +1,75 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.CooperationInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.CooperationInfo;
+import com.jpsoft.enterprise.modules.base.service.CooperationInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 14:37
+ */
+@Transactional
+@Component(value="cooperationInfoService")
+public class CooperationInfoServiceImpl implements CooperationInfoService {
+
+    @Resource(name="cooperationInfoDAO")
+    private CooperationInfoDAO cooperationInfoDAO;
+
+    @Override
+    public CooperationInfo get(String id) {
+        // TODO Auto-generated method stub
+        return cooperationInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(CooperationInfo model) {
+        // TODO Auto-generated method stub
+        //model.setId(UUID.randomUUID().toString());
+
+        return cooperationInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(CooperationInfo model) {
+        // TODO Auto-generated method stub
+        return cooperationInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return cooperationInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = cooperationInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<CooperationInfo> list() {
+        // TODO Auto-generated method stub
+        return cooperationInfoDAO.list();
+    }
+
+    @Override
+    public Page<CooperationInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<CooperationInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            cooperationInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 70 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/WhisperingWallServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.enterprise.modules.base.dao.WhisperingWallDAO;
+import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import com.jpsoft.enterprise.modules.base.service.WhisperingWallService;
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="whisperingWallService")
+public class WhisperingWallServiceImpl implements WhisperingWallService {
+	@Resource(name="whisperingWallDAO")
+	private WhisperingWallDAO whisperingWallDAO;
+
+	@Override
+	public WhisperingWall get(String id) {
+		// TODO Auto-generated method stub
+		return whisperingWallDAO.get(id);
+	}
+
+	@Override
+	public int insert(WhisperingWall model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return whisperingWallDAO.insert(model);
+	}
+
+	@Override
+	public int update(WhisperingWall model) {
+		// TODO Auto-generated method stub
+		return whisperingWallDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return whisperingWallDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = whisperingWallDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<WhisperingWall> list() {
+		// TODO Auto-generated method stub
+		return whisperingWallDAO.list();
+	}
+		
+	@Override
+	public Page<WhisperingWall> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<WhisperingWall> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            whisperingWallDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 118 - 0
common/src/main/resources/mapper/base/CooperationInfo.xml

@@ -0,0 +1,118 @@
+<?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.enterprise.modules.base.dao.CooperationInfoDAO">
+    <resultMap id="CooperationInfoMap" type="com.jpsoft.enterprise.modules.base.entity.CooperationInfo">
+        <id property="id" column="id_" />
+        <result property="companyId" column="company_id"/>
+        <result property="type" column="type_"/>
+        <result property="picUrl" column="pic_url"/>
+        <result property="title" column="title_" />
+        <result property="content" column="content_"/>
+        <result property="status" column="status_"/>
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.CooperationInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_cooperation_info
+	    (id_,company_id,type_,pic_url,title_,content_,status_,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{companyId,jdbcType=VARCHAR}
+,#{type,jdbcType=VARCHAR}
+,#{picUrl,jdbcType=VARCHAR}
+,#{title,jdbcType=VARCHAR}
+,#{content,jdbcType= NUMERIC }
+,#{status,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_cooperation_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.CooperationInfo">
+        update base_cooperation_info
+        <set>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="type!=null">
+                type_=#{type,jdbcType=VARCHAR},
+            </if>
+
+            <if test="title!=null">
+                title_=#{title,jdbcType=VARCHAR},
+            </if>
+            <if test="picUrl!=null">
+                pic_url=#{picUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="content!=null">
+                content_=#{content,jdbcType= NUMERIC },
+            </if>
+            <if test="status!=null">
+                status_=#{status,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="CooperationInfoMap">
+        select * from base_cooperation_info where id_=#{0} and del_flag = 0
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_cooperation_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="CooperationInfoMap">
+		select * from base_cooperation_info
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="CooperationInfoMap">
+        <![CDATA[
+			select * from base_cooperation_info
+		]]>
+        <where>
+            del_flag = 0
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+            <if test="searchParams.type != null">
+                and type_ = #{searchParams.type}
+            </if>
+            <if test="searchParams.status != null">
+                and status_ = #{searchParams.status}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 117 - 0
common/src/main/resources/mapper/base/WhisperingWall.xml

@@ -0,0 +1,117 @@
+<?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.enterprise.modules.base.dao.WhisperingWallDAO">
+	<resultMap id="WhisperingWallMap" type="com.jpsoft.enterprise.modules.base.entity.WhisperingWall">
+		<id property="id" column="id_" />
+			<result property="question" column="question_" />
+			<result property="questionBy" column="question_by" />
+			<result property="questionTime" column="question_time" />
+			<result property="answer" column="answer_" />
+			<result property="answerBy" column="answer_by" />
+			<result property="answerTime" column="answer_time" />
+			<result property="type" column="type_" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.WhisperingWall">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_whispering_wall
+	    (id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_flag,create_by,create_time,update_by,update_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{question,jdbcType=VARCHAR}
+,#{questionBy,jdbcType=VARCHAR}
+,#{questionTime,jdbcType= TIMESTAMP }
+,#{answer,jdbcType=VARCHAR}
+,#{answerBy,jdbcType=VARCHAR}
+,#{answerTime,jdbcType= TIMESTAMP }
+,#{type,jdbcType= NUMERIC }
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_whispering_wall where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.WhisperingWall">
+		update base_whispering_wall
+		<set>
+				<if test="question!=null">
+		question_=#{question,jdbcType=VARCHAR},
+		</if>
+				<if test="questionBy!=null">
+		question_by=#{questionBy,jdbcType=VARCHAR},
+		</if>
+				<if test="questionTime!=null">
+		question_time=#{questionTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="answer!=null">
+		answer_=#{answer,jdbcType=VARCHAR},
+		</if>
+				<if test="answerBy!=null">
+		answer_by=#{answerBy,jdbcType=VARCHAR},
+		</if>
+				<if test="answerTime!=null">
+		answer_time=#{answerTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="type!=null">
+		type_=#{type,jdbcType= NUMERIC },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="WhisperingWallMap">
+		select 
+id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_flag,create_by,create_time,update_by,update_time		from base_whispering_wall where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_whispering_wall where id_=#{0}
+	</select>
+	<select id="list" resultMap="WhisperingWallMap">
+		select * from base_whispering_wall
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="WhisperingWallMap">
+		<![CDATA[
+			select * from base_whispering_wall
+		]]>
+		<where>
+			del_flag=0
+			<if test="searchParams.question != null">
+				and question_ like #{searchParams.question}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+</mapper>

+ 2 - 0
web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java

@@ -72,6 +72,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/enterpriseInfoApi/enterpriseInfo")
 				.excludePathPatterns("/mobile/activityInfoApi/activityList")
                 .excludePathPatterns("/mobile/activityInfoApi/activityDetail")
+				.excludePathPatterns("/mobile/cooperationInfoApi/cooperationInfoList")
+				.excludePathPatterns("/mobile/cooperationInfoApi/cooperationInfoDetail")
 				.excludePathPatterns("/wechat/**")
 
         ;

+ 233 - 0
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/WhisperingWallController.java

@@ -0,0 +1,233 @@
+package com.jpsoft.enterprise.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import com.jpsoft.enterprise.modules.base.service.WhisperingWallService;
+import com.jpsoft.enterprise.modules.sys.entity.User;
+import com.jpsoft.enterprise.modules.sys.service.UserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/base/whisperingWall")
+@Api(description = "whisperingWall")
+public class WhisperingWallController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private WhisperingWallService whisperingWallService;
+    @Autowired
+    private UserService userService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<WhisperingWall> create(){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        WhisperingWall whisperingWall = new WhisperingWall();
+
+        msgResult.setData(whisperingWall);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<WhisperingWall> add(@RequestBody WhisperingWall whisperingWall,@RequestAttribute String subject){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        try {
+            whisperingWall.setId(UUID.randomUUID().toString());
+            whisperingWall.setDelFlag(false);
+            whisperingWall.setCreateBy(subject);
+            whisperingWall.setCreateTime(new Date());
+            
+            int affectCount = whisperingWallService.insert(whisperingWall);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(whisperingWall);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<WhisperingWall> edit(@PathVariable("id") String id){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        try {
+            WhisperingWall whisperingWall = whisperingWallService.get(id);
+
+            if (whisperingWall != null) {
+                msgResult.setResult(true);
+                msgResult.setData(whisperingWall);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<WhisperingWall> update(@RequestBody WhisperingWall whisperingWall,@RequestAttribute String subject){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(subject);
+
+            whisperingWall.setAnswerBy(user.getCompanyId());
+            whisperingWall.setAnswerTime(new Date());
+            whisperingWall.setUpdateBy(subject);
+            whisperingWall.setUpdateTime(new Date());
+            
+            int affectCount = whisperingWallService.update(whisperingWall);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(whisperingWall);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            WhisperingWall whisperingWall = whisperingWallService.get(id);
+            whisperingWall.setDelFlag(true);
+            whisperingWall.setUpdateBy(subject);
+            whisperingWall.setUpdateTime(new Date());
+
+            int affectCount = whisperingWallService.update(whisperingWall);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                WhisperingWall whisperingWall = whisperingWallService.get(id);
+                whisperingWall.setDelFlag(true);
+                whisperingWall.setUpdateBy(subject);
+                whisperingWall.setUpdateTime(new Date());
+
+                affectCount += whisperingWallService.update(whisperingWall);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String question,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(question)) {
+            searchParams.put("question","%" + question + "%");
+        }
+
+        Page<WhisperingWall> page = whisperingWallService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 156 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/CooperationInfoApiController.java

@@ -0,0 +1,156 @@
+package com.jpsoft.enterprise.modules.mobile.controller;
+
+import cn.hutool.core.date.DateUtil;
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.dto.ActivityInfoListDTO;
+import com.jpsoft.enterprise.modules.base.dto.CooperationInfoDTO;
+import com.jpsoft.enterprise.modules.base.dto.CooperationInfoListDTO;
+import com.jpsoft.enterprise.modules.base.entity.ActivityInfo;
+import com.jpsoft.enterprise.modules.base.entity.CompanyInfo;
+import com.jpsoft.enterprise.modules.base.entity.CooperationInfo;
+import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
+import com.jpsoft.enterprise.modules.base.service.CompanyInfoService;
+import com.jpsoft.enterprise.modules.base.service.CooperationInfoService;
+import com.jpsoft.enterprise.modules.base.service.PersonInfoService;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.sys.entity.DataDictionary;
+import com.jpsoft.enterprise.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-13 14:52
+ */
+@RestController
+@RequestMapping("/mobile/cooperationInfoApi")
+@Slf4j
+public class CooperationInfoApiController {
+
+
+    @Autowired
+    private CooperationInfoService cooperationInfoService;
+
+    @Autowired
+    private CompanyInfoService companyInfoService;
+
+    @Autowired
+    private PersonInfoService personInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @PostMapping("cooperationInfoList")
+    @ApiOperation(value = "互助信息列表(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "type", required = true, paramType = "form")
+    })
+    public MessageResult<Map> cooperationInfoList(String type,@RequestParam(value="pageIndex",defaultValue="1") int pageIndex, @RequestParam(value="pageSize",defaultValue="10") int pageSize) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            List<CooperationInfoListDTO> list = new ArrayList<>();
+
+
+
+            Map<String,Object> searchParams = new HashMap<>();
+            searchParams.put("type",type);
+            searchParams.put("status",1);
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("create_time","desc"));
+
+            Page<CooperationInfo> page = cooperationInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+            List<CooperationInfo> cooperationInfoList = page.getResult();
+            if (cooperationInfoList.size()>0){
+                for (CooperationInfo cooperationInfo : cooperationInfoList){
+                    CooperationInfoListDTO cooperationInfoListDTO = new CooperationInfoListDTO();
+                    BeanUtils.copyProperties(cooperationInfo,cooperationInfoListDTO);
+                    CompanyInfo companyInfo = companyInfoService.get(cooperationInfo.getCompanyId());
+                    if (companyInfo != null){
+                        cooperationInfoListDTO.setCompanyName(companyInfo.getCompanyName());
+                        cooperationInfoListDTO.setCreateTime(DateUtil.format(cooperationInfo.getCreateTime(),"yyyy-MM-dd HH:mm"));
+                        list.add(cooperationInfoListDTO);
+                    }
+                }
+            }
+
+            Map<String,Object> pageMap = new HashMap<>();
+
+            pageMap.put("recordsTotal",page.getTotal());
+            pageMap.put("recordsFiltered",page.getTotal());
+            pageMap.put("totalPage",page.getPages());
+            pageMap.put("pageNumber",page.getPageNum());
+            pageMap.put("pageSize",page.getPageSize());
+            pageMap.put("data", list);
+
+            messageResult.setData(pageMap);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(),ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("cooperationInfoDetail")
+    @ApiOperation(value = "互助信息详情(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "form")
+    })
+    public MessageResult<CooperationInfoDTO> cooperationInfoDetail(String id) {
+        MessageResult<CooperationInfoDTO> messageResult = new MessageResult<>();
+
+        try {
+
+            CooperationInfo cooperationInfo = cooperationInfoService.get(id);
+            CooperationInfoDTO cooperationInfoDTO = new CooperationInfoDTO();
+            if (cooperationInfo != null){
+                BeanUtils.copyProperties(cooperationInfo,cooperationInfoDTO);
+                CompanyInfo companyInfo = companyInfoService.get(cooperationInfo.getCompanyId());
+                if (companyInfo != null){
+                    cooperationInfoDTO.setCompanyName(companyInfo.getCompanyName());
+                    cooperationInfoDTO.setCompanyLogo(companyInfo.getLogoUrl());
+                }
+                PersonInfo personInfo = personInfoService.get(cooperationInfo.getCreateBy());
+                if (personInfo != null){
+                    cooperationInfoDTO.setPersonName(personInfo.getPersonName());
+                }
+
+                cooperationInfoDTO.setCreateTime(DateUtil.format(cooperationInfo.getCreateTime(),"yyyy-MM-dd"));
+                String typeName = dataDictionaryService.findNameByCatalogNameAndValue("互助类型",cooperationInfo.getType());
+                cooperationInfoDTO.setTypeName(typeName);
+            }
+
+
+            messageResult.setData(cooperationInfoDTO);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(),ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+}

+ 5 - 1
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/PersonInfoApiController.java

@@ -514,6 +514,7 @@ public class PersonInfoApiController {
             @ApiImplicitParam(name = "phone", value = "手机号码", required = true, paramType = "form"),
             @ApiImplicitParam(name = "idCardUrl", value = "身份证人脸面", required = false, paramType = "form"),
             @ApiImplicitParam(name = "businessLicenseUrl", value = "营业执照照片", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "logoUrl",value = "企业logo",required = false,paramType = "form"),
             @ApiImplicitParam(name = "type", value = "企业类型", required = false, paramType = "form"),
             @ApiImplicitParam(name = "scale", value = "企业规模", required = false, paramType = "form"),
             @ApiImplicitParam(name = "industry", value = "所属行业", required = false, paramType = "form"),
@@ -521,7 +522,7 @@ public class PersonInfoApiController {
             @ApiImplicitParam(name = "companyIntroduction", value = "公司介绍", required = false, paramType = "form"),
             @ApiImplicitParam(name = "enterpriserIntroduction", value = "企业家介绍", required = false, paramType = "form"),
     })
-    public MessageResult<Map> updateBasicInformation(String token, @RequestAttribute String subject, String creditCode, String companyName, String registerType, String region, String idCard, String personName, String phone, String idCardUrl, String businessLicenseUrl, String type, String scale, String industry, String address, String companyIntroduction, String enterpriserIntroduction) {
+    public MessageResult<Map> updateBasicInformation(String token, @RequestAttribute String subject, String creditCode, String companyName, String registerType, String region, String idCard, String personName, String phone, String idCardUrl, String businessLicenseUrl, String type, String scale, String industry, String address, String companyIntroduction, String enterpriserIntroduction,String logoUrl) {
 
         MessageResult<Map> messageResult = new MessageResult<>();
 
@@ -552,6 +553,9 @@ public class PersonInfoApiController {
             if (StringUtils.isNotBlank(businessLicenseUrl)) {
                 companyInfo.setBusinessLicenseUrl(businessLicenseUrl);
             }
+            if (StringUtils.isNotBlank(logoUrl)){
+                companyInfo.setLogoUrl(logoUrl);
+            }
             companyInfo.setType(type);
             companyInfo.setScale(scale);
             companyInfo.setIndustry(industry);

+ 109 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/WhisperingWallApiController.java

@@ -0,0 +1,109 @@
+package com.jpsoft.enterprise.modules.mobile.controller;
+
+import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
+import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import com.jpsoft.enterprise.modules.base.service.PersonInfoService;
+import com.jpsoft.enterprise.modules.base.service.WhisperingWallService;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.sys.service.UserService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/mobile/whisperingWallApi")
+@Slf4j
+public class WhisperingWallApiController {
+    @Autowired
+    private WhisperingWallService whisperingWallService;
+    @Autowired
+    private PersonInfoService personInfoService;
+
+    @ApiOperation(value="提问")
+    @PostMapping("questions")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "question", value = "问题", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "type", value = "类型", required = true, paramType = "form")
+    })
+    public MessageResult<WhisperingWall> questions(String question, int type, @RequestAttribute String subject){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        try {
+            PersonInfo personInfo = personInfoService.get(subject);
+
+            WhisperingWall whisperingWall = new WhisperingWall();
+            whisperingWall.setId(UUID.randomUUID().toString());
+            whisperingWall.setQuestion(question);
+            whisperingWall.setQuestionBy(personInfo.getCompanyId());
+            whisperingWall.setQuestionTime(new Date());
+            whisperingWall.setType(type);
+            whisperingWall.setDelFlag(false);
+            whisperingWall.setCreateBy(subject);
+            whisperingWall.setCreateTime(new Date());
+
+            int affectCount = whisperingWallService.insert(whisperingWall);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(whisperingWall);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            log.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="回答")
+    @PostMapping("answers")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "编号", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "answer", value = "回答", required = true, paramType = "form")
+    })
+    public MessageResult<WhisperingWall> answers(String id,String answer,@RequestAttribute String subject){
+        MessageResult<WhisperingWall> msgResult = new MessageResult<>();
+
+        try {
+            PersonInfo personInfo = personInfoService.get(subject);
+
+            WhisperingWall whisperingWall = whisperingWallService.get(id);
+            whisperingWall.setAnswer(answer);
+            whisperingWall.setAnswerBy(personInfo.getCompanyId());
+            whisperingWall.setAnswerTime(new Date());
+            whisperingWall.setUpdateBy(subject);
+            whisperingWall.setUpdateTime(new Date());
+
+            int affectCount = whisperingWallService.update(whisperingWall);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(whisperingWall);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            log.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+}