fllmoyu 4 سال پیش
والد
کامیت
73b108fb57

+ 5 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallDTO.java

@@ -1,5 +1,6 @@
 package com.jpsoft.enterprise.modules.base.dto;
 
+import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
 import lombok.Data;
 
 /**
@@ -21,6 +22,10 @@ public class WhisperingWallDTO {
 
     private String questionTime;
 
+    private PersonInfo answerPersonInfo;
+
+    private CompanyInfoDetailDTO answerCompanyInfoDetailDTO;
+
     private CompanyInfoDetailDTO companyInfoDetailDTO;
 
     private String answerTime;

+ 3 - 0
common/src/main/resources/mapper/base/ActivityInfo.xml

@@ -112,6 +112,9 @@
 			<if test="searchParams.title != null">
 				and a.title_ like #{searchParams.title}
 			</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}

+ 8 - 2
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/CompanyInfoApiController.java

@@ -174,9 +174,10 @@ public class CompanyInfoApiController {
             @ApiImplicitParam(name = "region", value = "区域", 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")
+            @ApiImplicitParam(name = "industry", value = "所属行业", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "key", value = "key", required = false, paramType = "form")
     })
-    public MessageResult<Map> companyList(String region, String type, String scale, String industry, @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
+    public MessageResult<Map> companyList(String region, String type, String scale, String industry,String key, @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
@@ -194,6 +195,9 @@ public class CompanyInfoApiController {
             if (StringUtils.isNotBlank(industry)) {
                 searchParams.put("industry", industry);
             }
+            if (StringUtils.isNotBlank(key)){
+                searchParams.put("companyName","%"+key+"%");
+            }
             searchParams.put("inside", 0);
 
             List<Sort> sortList = new ArrayList<>();
@@ -356,4 +360,6 @@ public class CompanyInfoApiController {
         return messageResult;
     }
 
+
+
 }

+ 11 - 2
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/NewsInfoApiController.java

@@ -13,6 +13,7 @@ import com.jpsoft.enterprise.modules.common.dto.MessageResult;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -122,9 +123,10 @@ public class NewsInfoApiController {
             @ApiImplicitParam(name = "id", value = "目录id", required = false, paramType = "form"),
             @ApiImplicitParam(name = "companyId", value = "公司id", required = false, paramType = "form"),
             @ApiImplicitParam(name = "topFlag", value = "是否主页轮播图", required = false, paramType = "form"),
-            @ApiImplicitParam(name = "code",value = "代码",required = false,paramType = "form")
+            @ApiImplicitParam(name = "code",value = "代码",required = false,paramType = "form"),
+            @ApiImplicitParam(name = "key",value = "key",required = false,paramType = "form")
     })
-    public MessageResult<Map> newsList(String id,String companyId,String topFlag,String code,@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,@RequestParam(value="pageSize",defaultValue="10") int pageSize) {
+    public MessageResult<Map> newsList(String id,String companyId,String topFlag,String code,String key,@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,@RequestParam(value="pageSize",defaultValue="10") int pageSize) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
@@ -150,6 +152,10 @@ public class NewsInfoApiController {
             if (StringUtils.isNotBlank(code)){
                 searchParams.put("code",code);
             }
+
+            if (StringUtils.isNotBlank(key)){
+                searchParams.put("title","%"+key+"%");
+            }
          //   searchParams.put("showFlag",1);
 
 
@@ -173,6 +179,9 @@ public class NewsInfoApiController {
                 if (StringUtils.isNotBlank(code)){
                     searchParams2.put("code",code);
                 }
+                if (StringUtils.isNotBlank(key)){
+                    searchParams2.put("title","%"+key+"%");
+                }
               //  searchParams2.put("showFlag",1);
                 List<Sort> sortList2 = new ArrayList<>();
                 sortList.add(new Sort("a.create_time","desc"));

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

@@ -212,6 +212,10 @@ public class WhisperingWallApiController {
             PersonInfo personInfo = personInfoService.get(whisperingWall.getQuestionBy());
             //提问人的公司
             CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            CompanyInfoDetailDTO answerCompanyInfo = new CompanyInfoDetailDTO();
+            BeanUtils.copyProperties(companyInfo,answerCompanyInfo);
+            whisperingWallDTO.setAnswerPersonInfo(personInfo);
+            whisperingWallDTO.setAnswerCompanyInfoDetailDTO(answerCompanyInfo);
             whisperingWallDTO.setQuestionCompanyName(companyInfo.getCompanyName());
             whisperingWallDTO.setTypeName(whisperingWall.getTypeName());
             whisperingWallDTO.setQuestionTime(DateUtil.format(whisperingWall.getQuestionTime(),"yyyy-MM-dd"));