Commit 45e02fac authored by 卜远杰's avatar 卜远杰

Merge branch 'master' of http://106.14.62.141:8081/sa_aidea/aidea

parents a44aad97 697d6f35
......@@ -4,6 +4,10 @@ package com.cftech.consultsheet.dao;
import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.core.generic.GenericDao;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import java.util.List;
/**
* 咨询单Mapper
......@@ -15,4 +19,5 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
JSONObject updateDate(int consultId, String status, String description);
JSONObject updateStatus(ConsultSheet consultSheet);
List<ConsultSheet> fetchSearchByPage(Conds conds, Sort sort, int page, int pageSize, Long id);
}
\ No newline at end of file
......@@ -147,17 +147,20 @@
SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
LEFT JOIN `user` u ON u.userid = b.id
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
LEFT JOIN `user` u ON u.userid = b.id
<include refid="sqlWhere"/>
<if test="id!=null"> ${id} = b.id </if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
......
......@@ -5,6 +5,9 @@ import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.core.generic.GenericService;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import java.util.List;
/**
* 咨询单Service
......@@ -14,7 +17,7 @@ import com.cftech.core.sql.Conds;
*/
public interface ConsultSheetService extends GenericService<ConsultSheet> {
List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize ,Long id);
}
......@@ -7,10 +7,16 @@ import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.consultsheet.service.ConsultSheetService;
import com.cftech.core.generic.GenericDao;
import com.cftech.core.generic.GenericServiceImpl;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 咨询单ServiceImpl
*
......@@ -30,5 +36,14 @@ return consultSheetMapper;
}
@Override
public List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long id) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds);
params.put("offset", page > 0 ? page : 0);
params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort);
params.put("id",id);
return consultSheetMapper.fetchSearchByPage(params);
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants;
import com.cftech.sys.model.User;
import com.cftech.sys.security.UserUtils;
import org.springframework.util.StringUtils;
import lombok.extern.slf4j.Slf4j;
......@@ -152,8 +153,11 @@ public class ConsultSheetController {
@RequestMapping(value = "/listData")
@ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, ConsultSheet consultSheet, HttpServletRequest request) {
Long id = UserUtils.getUser().getUserid();
Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
if (!StringUtils.isEmpty(consultSheet.getUserName())){
conds.like("a.user_name",consultSheet.getUserName());
}
......@@ -165,7 +169,7 @@ public class ConsultSheetController {
conds.equal("a.accounts_id", accountsId);
Sort sort = new Sort("a.create_time", OrderType.DESC);
List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
List<ConsultSheet> list = consultSheetService.fetchSearchBy(conds, sort, iDisplayStart, iDisplayLength,id);
Integer counts = consultSheetService.count(conds);
JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts);
......
......@@ -22,6 +22,9 @@
<module>product-into-wareroom-module-web</module>
<module>product-module</module>
<module>product-module-web</module>
<module>order-module</module>
<module>order-module-web</module>
<module>order-module</module>
</modules>
<dependencies>
......
......@@ -143,16 +143,16 @@
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input col-md-12">
<label>二维码展示</label>
<div class="row">
<div class="col-md-12">
<img id="qrcordDisplay" style='width: 160px;height: 160px;'>
</div>
</div>
</div>
</div>
<!-- <div class="col-md-4">-->
<!-- <div class="form-group form-md-line-input col-md-12">-->
<!-- <label>二维码展示</label>-->
<!-- <div class="row">-->
<!-- <div class="col-md-12">-->
<!-- <img id="qrcordDisplay" style='width: 160px;height: 160px;'>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<input type="text" style="display: none" name="_csrf" value="${_csrf.token}"/>
<input type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/>
......
......@@ -77,7 +77,7 @@ public abstract class GenericServiceImpl<T> implements GenericService<T> {
/**
* 生成page对象,并且初始化页数
*
* @param page 当前页数
* @param pageNo 当前页数
* @param pageSize 每页显示条数
* @param totalSize 总记录数
* @return page
......
......@@ -9,12 +9,18 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.cftech</groupId>
<artifactId>shipping-address-module</artifactId>
<artifactId>shipping-address-web</artifactId>
<packaging>war</packaging>
<name>shipping-address-web Maven Webapp</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>shipping-address-module</artifactId>
......
......@@ -268,6 +268,18 @@
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>-->
<dependency>
<groupId>com.cftech</groupId>
<artifactId>shipping-address-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>order-module-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<finalName>portal-web</finalName>
......
......@@ -220,7 +220,8 @@
</tr>
</tbody>
</table>
</div>
</div> <button type="button" class="btn btn-info" id="addQyAccounts" style="display:none">添加企业号</button>
<button type="button" class="btn btn-info" id="addAccounts">添加公众号</button>
</div>
<div class="box-footer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment