Commit b2cd70ac authored by 黎聪聪's avatar 黎聪聪

字段加密

parent c442e028
...@@ -120,18 +120,12 @@ ...@@ -120,18 +120,12 @@
<!-- maxlength="50" placeholder="身份证号"--> <!-- maxlength="50" placeholder="身份证号"-->
<!-- value="$!{data.numberId}"--> <!-- value="$!{data.numberId}"-->
<!-- >--> <!-- >-->
<label>出生年月<font style="color: red"></font></label>
<input type="text"
class="form-control" name="benebitId"
id="benebitId" readonly="readonly"
maxlength="50" placeholder="出生年月"
value="$!{data.benebitId}"
>
<label>性别<font style="color: red"></font></label> <label>性别<font style="color: red"></font></label>
<input type="text" <input type="text"
class="form-control" name="sex" class="form-control" name="sex"
id="sex" readonly="readonly" id="sex" readonly="readonly"
maxlength="50" placeholder="出生年月" maxlength="50" placeholder=""
value="$!{data.sex}" value="$!{data.sex}"
> >
<label>联系方式<font style="color: red"></font></label> <label>联系方式<font style="color: red"></font></label>
...@@ -206,8 +200,9 @@ ...@@ -206,8 +200,9 @@
<div class="box-footer"> <div class="box-footer">
#if($shiro.hasPermission("qy:consultSheet:edit")) #if($shiro.hasPermission("qy:consultSheet:edit"))
<input class="btn btn-info" id="save" value="通过" type="submit"> <input class="btn btn-info" id="save" value="通过" type="submit">
<a id="reject" class="btn btn-danger" onclick="beizhu()">拒绝</a>
#end #end
<a id="reject" class="btn btn-danger" onclick="beizhu()">拒绝</a>
<a href="#springUrl('/a/consultSheet/list')" class="btn btn-default">返回</a> <a href="#springUrl('/a/consultSheet/list')" class="btn btn-default">返回</a>
</div> </div>
</div> </div>
...@@ -254,6 +249,7 @@ ...@@ -254,6 +249,7 @@
<script src="common/js/cfapp.js"></script> <script src="common/js/cfapp.js"></script>
<!-- END PAGE LEVEL PLUGINS --> <!-- END PAGE LEVEL PLUGINS -->
<script> <script>
var consultid var consultid
function beizhu() { function beizhu() {
...@@ -269,11 +265,11 @@ ...@@ -269,11 +265,11 @@
consultid = $("#consultId").val(); consultid = $("#consultId").val();
var value = $("#sex").val(); var value = $("#sex").val();
// if (value == 0) { if (value == 0) {
// $("#sex").val("女"); $("#sex").val("女");
// } else { } else {
// $("#sex").val("男"); $("#sex").val("男");
// } }
var status = $("#status").val(); var status = $("#status").val();
console.log("status:", status) console.log("status:", status)
if (status == 0) { if (status == 0) {
...@@ -314,14 +310,13 @@ ...@@ -314,14 +310,13 @@
var aadata ={ var aadata ={
consultId : consultid, consultId : consultid,
status : "2", status : "2",
description:descriptionAdd description : descriptionAdd
}; };
$.ajax({ $.ajax({
url:url, url:url,
data:aadata, data:aadata,
type:"GET", type:"GET",
dataType:"JSON",
success:function(data){ success:function(data){
if(data.errorNo==1){ if(data.errorNo==1){
alert("拒绝成功"); alert("拒绝成功");
......
...@@ -6,6 +6,7 @@ import com.cftech.consultsheet.model.ConsultSheet; ...@@ -6,6 +6,7 @@ import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.core.generic.GenericDao; import com.cftech.core.generic.GenericDao;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -16,8 +17,8 @@ import java.util.List; ...@@ -16,8 +17,8 @@ import java.util.List;
* @date: 2020-09-22 12:06 * @date: 2020-09-22 12:06
*/ */
public interface ConsultSheetMapper extends GenericDao<ConsultSheet> { public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
JSONObject updateDate(int consultId, String status, String description); Integer updateDate(@Param("consultId") String consultId, @Param("status") String status, @Param("description") String description);
JSONObject updateStatus(ConsultSheet consultSheet); Integer updateStatus(@Param("consultId") String consultId, @Param("status") String status);
List<ConsultSheet> fetchSearchByPage(Conds conds, Sort sort, int page, int pageSize, Long id); List<ConsultSheet> fetchSearchByPage(Conds conds, Sort sort, int page, int pageSize, Long id);
} }
\ No newline at end of file
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<result column="consult_id" property="consultId"/> <result column="consult_id" property="consultId"/>
<result column="user_name" property="userName"/> <result column="user_name" property="userName"/>
<result column="number_id" property="numberId"/> <result column="number_id" property="numberId"/>
<result column="benebit_id" property="benebitId"/>
<result column="sex" property="sex"/> <result column="sex" property="sex"/>
<result column="iphone" property="iPhone"/> <result column="iphone" property="iPhone"/>
<result column="past_records" property="pastRecords"/> <result column="past_records" property="pastRecords"/>
...@@ -62,11 +61,10 @@ ...@@ -62,11 +61,10 @@
<sql id="sqlColumns"> <sql id="sqlColumns">
a.id, a.id,
a.consult_id, a.consult_id,
a.user_name, CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8),
a.number_id, CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8),
a.benebit_id,
a.sex, a.sex,
a.iphone, CONVERT(AES_DECRYPT(a.iphone,'aideakey') USING UTF8),
a.past_records, a.past_records,
a.prescription, a.prescription,
a.doctor_id, a.doctor_id,
...@@ -101,14 +99,13 @@ ...@@ -101,14 +99,13 @@
) )
values values
( (
#{id, jdbcType=BIGINT}, #{id, jdbcType=BIGINT}
#{consultId, jdbcType=VARCHAR}, #{consultId, jdbcType=VARCHAR},
#{userName, jdbcType=VARCHAR}, AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
#{numberId, jdbcType=VARCHAR}, AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
now(), now(),
#{sex, jdbcType=BIGINT}, #{sex, jdbcType=BIGINT},
#{iPhone, jdbcType=VARCHAR}, AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
#{pastRecords, jdbcType=VARCHAR}, #{pastRecords, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR}, #{Prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT}, #{doctorId, jdbcType=BIGINT},
...@@ -158,9 +155,8 @@ ...@@ -158,9 +155,8 @@
FROM t_aidea_consult_sheet a FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id LEFT JOIN t_qyuser c ON c.id = a.customer_id
LEFT JOIN `user` u ON u.userid = b.id
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null"> ${id} = b.id </if> <if test="id!=null">and (a.doctor_id = ${id} or a.customer_id =${id} ) </if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
</select> </select>
...@@ -176,19 +172,18 @@ ...@@ -176,19 +172,18 @@
consult_id = #{consultId, jdbcType=VARCHAR}, consult_id = #{consultId, jdbcType=VARCHAR},
</if> </if>
<if test="userName != null"> <if test="userName != null">
user_name = #{userName, jdbcType=VARCHAR},
user_name = AES_ENCRYPT( #{userName, jdbcType=VARBINARY},'aideakey'),
</if> </if>
<if test="numberId != null"> <if test="numberId != null">
number_id = #{numberId, jdbcType=VARCHAR}, number_id = AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
</if>
<if test="benebitId != null">
benebit_id = #{benebitId, jdbcType=TIMESTAMP},
</if> </if>
<if test="sex != null"> <if test="sex != null">
sex = #{sex, jdbcType=BIGINT}, sex = #{sex, jdbcType=BIGINT},
</if> </if>
<if test="iPhone != null"> <if test="iPhone != null">
iphone = #{iPhone, jdbcType=VARCHAR}, iphone = AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
</if> </if>
<if test="pastRecords != null"> <if test="pastRecords != null">
past_records = #{pastRecords, jdbcType=VARCHAR}, past_records = #{pastRecords, jdbcType=VARCHAR},
...@@ -254,6 +249,28 @@ ...@@ -254,6 +249,28 @@
<update id="delete" parameterType="java.lang.Long"> <update id="delete" parameterType="java.lang.Long">
update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT} update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update> </update>
<update id="updateDate" >
update t_aidea_consult_sheet
<set>
<if test="status !=null">
status = #{status},
</if>
<if test="description !=null">
description = #{description}
</if>
</set>
where consult_id = #{consultId}
</update>
<update id="updateStatus">
update t_aidea_consult_sheet
<set>
<if test="status !=null">
status = #{status}
</if>
</set>
where consult_id = #{consultId}
</update>
</mapper> </mapper>
...@@ -30,9 +30,9 @@ public class ConsultSheet extends UserSheet implements Serializable { ...@@ -30,9 +30,9 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String userName; private String userName;
/* 身份证号 */ /* 身份证号 */
private String numberId; private String numberId;
/* 出生年月 */ // /* 出生年月 */
@JSONField(format = "yyyy-MM-dd") // @JSONField(format = "yyyy-MM-dd")
private Date benebitId; // private Date benebitId;
/* 性别 */ /* 性别 */
@ExportConfig(value = "性别", width = 100, showLevel = 1) @ExportConfig(value = "性别", width = 100, showLevel = 1)
private Long sex; private Long sex;
......
...@@ -17,7 +17,9 @@ import java.util.List; ...@@ -17,7 +17,9 @@ import java.util.List;
*/ */
public interface ConsultSheetService extends GenericService<ConsultSheet> { public interface ConsultSheetService extends GenericService<ConsultSheet> {
List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize ,Long id); Integer updateDate(String consultId, String status, String description);
Integer updateStatus(String consultId, String status);
List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize ,String id);
/** /**
* 提交咨询单且轮询对应客服、医生进行处理 * 提交咨询单且轮询对应客服、医生进行处理
......
...@@ -56,13 +56,25 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im ...@@ -56,13 +56,25 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Override @Override
public List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long id) { public Integer updateDate(String consultId, String status, String description) {
return consultSheetMapper.updateDate(consultId,status,description);
}
@Override
public Integer updateStatus(String consultId, String status) {
return consultSheetMapper.updateStatus(consultId,status);
}
@Override
public List<ConsultSheet> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, String id) {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds); params.put("conds", conds);
params.put("offset", page > 0 ? page : 0); params.put("offset", page > 0 ? page : 0);
params.put("limit", pageSize > 0 ? pageSize : 0); params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort); params.put("sort", sort);
params.put("id", id); if (!StringUtils.equals(id,"1")) {
params.put("id", id);
}
return consultSheetMapper.fetchSearchByPage(params); return consultSheetMapper.fetchSearchByPage(params);
} }
......
...@@ -22,6 +22,7 @@ import org.springframework.stereotype.Controller; ...@@ -22,6 +22,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -104,23 +105,21 @@ public class ConsultSheetController { ...@@ -104,23 +105,21 @@ public class ConsultSheetController {
} }
//审核拒绝功能 //审核拒绝功能
@RequestMapping(value = "/updateData")
@RequestMapping("/updateData")
@ResponseBody @ResponseBody
public JSONObject updateData( int consultId, String status,String description ,HttpServletRequest request) { public JSONObject updateData( String consultId, String status,String description ,HttpServletRequest request) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
Conds conds = new Conds(); Conds conds = new Conds();
try { try {
if (!StringUtils.isEmpty(consultId) && !StringUtils.isEmpty(status) && !StringUtils.isEmpty(description)) { if (!StringUtils.isEmpty(consultId) && !StringUtils.isEmpty(status) && !StringUtils.isEmpty(description)) {
conds.equal("consult_id",consultId); Integer integer = consultSheetService.updateDate(consultId, status, description);
// consultSheetService.update() if (integer>0){
ConsultSheet consultSheet = consultSheetService.fetchSearchByConds(conds); rtnJson.put("errorNo", 1);
consultSheet.setStatus(status); }
consultSheet.setDescription(description);
consultSheetService.update(consultSheet);
rtnJson.put("errorNo", 1);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo", 0); rtnJson.put("errorNo", 0);
} }
return rtnJson; return rtnJson;
...@@ -129,20 +128,19 @@ public class ConsultSheetController { ...@@ -129,20 +128,19 @@ public class ConsultSheetController {
@RequiresPermissions(value = CONSULTSHEET_EDIT) @RequiresPermissions(value = CONSULTSHEET_EDIT)
@RequestMapping("/updateStatus") @RequestMapping("/updateStatus")
@ResponseBody @ResponseBody
public JSONObject updateStatus(int consultId, String status, HttpServletRequest request) { public JSONObject updateStatus(String consultId, String status, HttpServletRequest request) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
Conds conds = new Conds(); Conds conds = new Conds();
try { try {
if (!StringUtils.isEmpty(consultId) && !StringUtils.isEmpty(status)) { if (!StringUtils.isEmpty(consultId) && !StringUtils.isEmpty(status) ) {
conds.equal("consult_id",consultId); Integer integer = consultSheetService.updateStatus(consultId, status);
// consultSheetService.update() if (integer>0){
ConsultSheet consultSheet = consultSheetService.fetchSearchByConds(conds); rtnJson.put("errorNo", 1);
consultSheet.setStatus(status); }
consultSheetService.update(consultSheet);
rtnJson.put("errorNo", 1);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo", 0); rtnJson.put("errorNo", 0);
} }
return rtnJson; return rtnJson;
...@@ -153,7 +151,7 @@ public class ConsultSheetController { ...@@ -153,7 +151,7 @@ public class ConsultSheetController {
@RequestMapping(value = "/listData") @RequestMapping(value = "/listData")
@ResponseBody @ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, ConsultSheet consultSheet, HttpServletRequest request) { public JSONObject listData(int iDisplayStart, int iDisplayLength, ConsultSheet consultSheet, HttpServletRequest request) {
Long id = UserUtils.getUser().getUserid(); String id = String.valueOf(UserUtils.getUser().getId());
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
......
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
订单管理管理 需求清单明细管理
<small>订单管理</small> <small>需求清单明细管理</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li> <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">订单管理</a></li> <li><a class="active">需求清单明细管理</a></li>
</ol> </ol>
</section> </section>
......
...@@ -60,12 +60,12 @@ ...@@ -60,12 +60,12 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
订单管理管理 需求清单明细管理
<small>订单管理</small> <small>需求清单明细管理</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>首页</a></li> <li><a><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">订单管理管理列表</a></li> <li><a class="active">需求清单明细管理</a></li>
</ol> </ol>
</section> </section>
...@@ -86,7 +86,9 @@ ...@@ -86,7 +86,9 @@
<input type="text" class="form-control " <input type="text" class="form-control "
id="drugsCode" name="drugsCode" placeholder="商品编码"> id="drugsCode" name="drugsCode" placeholder="商品编码">
</div> </div>
#if($shiro.hasPermission("qy:orderDetails:view"))-->
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
#end-->
<!-- #if($shiro.hasPermission("qy:orderDetails:edit"))--> <!-- #if($shiro.hasPermission("qy:orderDetails:edit"))-->
<!-- <a href="#springUrl('/a/orderDetails/form')" class="btn btn-primary">新增</a>--> <!-- <a href="#springUrl('/a/orderDetails/form')" class="btn btn-primary">新增</a>-->
<!-- <a href="#springUrl('/a/orderDetails/exportExcel')" class="btn btn-primary">导出</a>--> <!-- <a href="#springUrl('/a/orderDetails/exportExcel')" class="btn btn-primary">导出</a>-->
...@@ -326,7 +328,6 @@ ...@@ -326,7 +328,6 @@
'</button>\n' + '</button>\n' +
'<ul class="dropdown-menu" role="menu">\n'; '<ul class="dropdown-menu" role="menu">\n';
html += '<li><a href="#springUrl("/a/orderDetails/form?id=' + a + '")">查看</a></li>'; html += '<li><a href="#springUrl("/a/orderDetails/form?id=' + a + '")">查看</a></li>';
html += '<li><a href="javascript:removeData(' + a + ')">删除</a></li>';
html += '</ul>'; html += '</ul>';
html += '#end'; html += '#end';
return html; return html;
......
...@@ -4,11 +4,11 @@ import com.cftech.orderdetail.model.OrderDetails; ...@@ -4,11 +4,11 @@ import com.cftech.orderdetail.model.OrderDetails;
import com.cftech.core.generic.GenericDao; import com.cftech.core.generic.GenericDao;
/** /**
* 订单管理Mapper * 订单管理Mapper
* *
* @author Licc * @author Licc
* @date: 2020-10-16 11:26 * @date: 2020-10-16 11:26
*/ */
public interface OrderDetailsMapper extends GenericDao<OrderDetails> { public interface OrderDetailsMapper extends GenericDao<OrderDetails> {
} }
\ No newline at end of file
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
订单管理管理 需求清单管理
<small>单管理</small> <small>需求清单管理</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li> <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">单管理</a></li> <li><a class="active">需求清单管理</a></li>
</ol> </ol>
</section> </section>
......
...@@ -60,12 +60,12 @@ ...@@ -60,12 +60,12 @@
<section class="content-header"> <section class="content-header">
<h1> <h1>
订单管理管理 需求清单管理
<small>单管理</small> <small>需求清单管理</small>
</h1> </h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>首页</a></li> <li><a><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">订单管理管理列表</a></li> <li><a class="active">需求清单管理列表</a></li>
</ol> </ol>
</section> </section>
...@@ -359,7 +359,6 @@ ...@@ -359,7 +359,6 @@
'</button>\n' + '</button>\n' +
'<ul class="dropdown-menu" role="menu">\n'; '<ul class="dropdown-menu" role="menu">\n';
html += '<li><a href="#springUrl("/a/order/form?id=' + a + '")">查看</a></li>'; html += '<li><a href="#springUrl("/a/order/form?id=' + a + '")">查看</a></li>';
html += '<li><a href="javascript:removeData(' + a + ')">删除</a></li>';
html += '</ul>'; html += '</ul>';
html += '#end'; html += '#end';
return html; return html;
......
...@@ -256,9 +256,8 @@ ...@@ -256,9 +256,8 @@
LEFT JOIN area b ON s.city_id = b.areaid LEFT JOIN area b ON s.city_id = b.areaid
LEFT JOIN area c ON s.area_id = c.areaid LEFT JOIN area c ON s.area_id = c.areaid
LEFT JOIN t_qyuser q ON o.service_id = q.id AND o.doctor_id = q.id LEFT JOIN t_qyuser q ON o.service_id = q.id AND o.doctor_id = q.id
LEFT JOIN `user` u ON u.userid = q.id
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null">${id} = b.id</if> <if test="id!=null">and(o.service_id = ${id} or o.doctor_id =${id} or o.clerk_id = ${id}) </if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
</select> </select>
......
...@@ -26,9 +26,7 @@ public class OrderDetail implements Serializable { ...@@ -26,9 +26,7 @@ public class OrderDetail implements Serializable {
/* 商品id */ /* 商品id */
@ExportConfig(value = "商品id", width = 100, showLevel = 1) @ExportConfig(value = "商品id", width = 100, showLevel = 1)
private Long drugsId; private Long drugsId;
/* 商品数量 */
@ExportConfig(value = "商品名称", width = 100, showLevel = 1)
private String drugsName;
/* 商品数量 */ /* 商品数量 */
@ExportConfig(value = "商品数量", width = 100, showLevel = 1) @ExportConfig(value = "商品数量", width = 100, showLevel = 1)
private Long drugsNum; private Long drugsNum;
......
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
public interface OrderService extends GenericService<Order> { public interface OrderService extends GenericService<Order> {
List<Order> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize , Long id); List<Order> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize , String id);
List<ProductOrder> listProduct(); List<ProductOrder> listProduct();
OrderFromVO fetchId(Serializable id); OrderFromVO fetchId(Serializable id);
......
package com.cftech.order.service.impl; package com.cftech.order.service.impl;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import com.cftech.core.util.StringUtils;
import com.cftech.order.model.*; import com.cftech.order.model.*;
import com.cftech.order.dao.OrderMapper; import com.cftech.order.dao.OrderMapper;
import com.cftech.order.service.OrderService; import com.cftech.order.service.OrderService;
...@@ -39,13 +40,16 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -39,13 +40,16 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
} }
@Override @Override
public List<Order> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, Long id) { public List<Order> fetchSearchBy(Conds conds, Sort sort, int page, int pageSize, String id) {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds); params.put("conds", conds);
params.put("offset", page > 0 ? page : 0); params.put("offset", page > 0 ? page : 0);
params.put("limit", pageSize > 0 ? pageSize : 0); params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort); params.put("sort", sort);
params.put("id", id); if (!StringUtils.equals(id,"1")){
params.put("id", id);
}
return orderMapper.fetchSearchByPage(params); return orderMapper.fetchSearchByPage(params);
} }
...@@ -96,7 +100,6 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -96,7 +100,6 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
orderDetail.setOrderId(id); orderDetail.setOrderId(id);
orderDetail.setOrderCode(orders.getOrderCode()); orderDetail.setOrderCode(orders.getOrderCode());
orderDetail.setDrugsId(productDtos.getId()); orderDetail.setDrugsId(productDtos.getId());
orderDetail.setDrugsNum(drugsNum);
orderDetail.setOpenid(orders.getOpenid()); orderDetail.setOpenid(orders.getOpenid());
orderDetail.setPrice(productDtos.getPrice()); orderDetail.setPrice(productDtos.getPrice());
orderDetail.setAmount(amount); orderDetail.setAmount(amount);
......
...@@ -114,7 +114,7 @@ public class OrderController { ...@@ -114,7 +114,7 @@ public class OrderController {
@RequestMapping(value = "/listData") @RequestMapping(value = "/listData")
@ResponseBody @ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, Order order, HttpServletRequest request) { public JSONObject listData(int iDisplayStart, int iDisplayLength, Order order, HttpServletRequest request) {
Long id = UserUtils.getUser().getUserid(); String id = String.valueOf(UserUtils.getUser().getId());
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("o.del_flag", Constants.DEL_FLAG_0); conds.equal("o.del_flag", Constants.DEL_FLAG_0);
......
...@@ -204,8 +204,10 @@ ...@@ -204,8 +204,10 @@
function seachTable() { function seachTable() {
var sSource = "#springUrl('/a/member/listData')"; var sSource = "#springUrl('/a/member/listData')";
var aoData = { var aoData = {
iDisplayStart: 1, iDisplayStart: 0,
iDosplayLength: 10 iDosplayLength: 10,
csrf_header:csrfheader,
csrf_token:csrftoken
} }
...@@ -214,7 +216,7 @@ ...@@ -214,7 +216,7 @@
"searching": false, "searching": false,
"ordering": false, "ordering": false,
"bFiltered": false, "bFiltered": false,
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie. "bStateSave": false, // save datatable state(pagination, sort, etc) in cookie.
"bProcessing": true, "bProcessing": true,
"bServerSide": true, "bServerSide": true,
"sAjaxSource": sSource, "sAjaxSource": sSource,
...@@ -231,7 +233,7 @@ ...@@ -231,7 +233,7 @@
"mData": "sex" "mData": "sex"
}, },
{ {
"mData": "open_id" "mData": "openId"
}, },
{ {
"mData":"phone" "mData":"phone"
...@@ -289,7 +291,7 @@ ...@@ -289,7 +291,7 @@
// }, // },
{ {
"aTargets": [3], "aTargets": [3],
"mData": "open_id", "mData": "openId",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; return a;
} }
......
...@@ -17,7 +17,7 @@ public class MemberDto { ...@@ -17,7 +17,7 @@ public class MemberDto {
@ExportConfig(value = "会员性别",width = 100) @ExportConfig(value = "会员性别",width = 100)
private String sex; private String sex;
@ExportConfig(value = "微信OPENID",width = 100) @ExportConfig(value = "微信OPENID",width = 100)
private String open_id; private String openId;
@ExportConfig(value = "会员名",width = 100) @ExportConfig(value = "会员名",width = 100)
private String name; private String name;
@ExportConfig(value = "会员手机",width = 100) @ExportConfig(value = "会员手机",width = 100)
......
...@@ -48,11 +48,13 @@ ...@@ -48,11 +48,13 @@
<sql id="Base_Column_List_Store"> <sql id="Base_Column_List_Store">
t.id, t.openid,t.canceltime, t.nickname, t.sex, t.city,t.province,t.country,t.headimgurl,t.createtime,t.subscribetime,t.delflag,t.status,t.source t.id, t.openid,t.canceltime,
CONVERT(AES_DECRYPT(t.nickname,'aideakey') USING UTF8),t.sex, CONVERT(AES_DECRYPT(t.city,'aideakey') USING UTF8),CONVERT(AES_DECRYPT(t.province,'aideakey') USING UTF8),t.country,t.headimgurl,t.createtime,t.subscribetime,
t.delflag,t.status,t.source
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, openid,canceltime, nickname, sex, city,province,country,country,headimgurl,createtime,subscribetime,delflag,status,source,recommender,store,taglist id, openid,canceltime,CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8), sex,CONVERT(AES_DECRYPT(city,'aideakey') USING UTF8) ,CONVERT(AES_DECRYPT(province,'aideakey') USING UTF8),country,country,headimgurl,createtime,subscribetime,delflag,status,source,recommender,store,taglist
</sql> </sql>
...@@ -92,9 +94,12 @@ ...@@ -92,9 +94,12 @@
insert into wx_mp_fanss ( openid, nickname, insert into wx_mp_fanss ( openid, nickname,
sex,city,province,country,delflag,headimgurl, sex,city,province,country,delflag,headimgurl,
subscribetime,createtime,timestamp,updatetime,mpaccountid,userid,taglist,status,recommender,store,source,description,unionid) subscribetime,createtime,timestamp,updatetime,mpaccountid,userid,taglist,status,recommender,store,source,description,unionid)
values (#{openid,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, values (#{openid,jdbcType=VARCHAR},
#{sex,jdbcType=VARCHAR},#{city,jdbcType=VARCHAR}, AES_ENCRYPT( #{nickname,jdbcType=VARBINARY},'aideakey'),
#{province,jdbcType=VARCHAR},#{country,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR},
AES_ENCRYPT(#{city,jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT( #{province,jdbcType=VARBINARY},'aideakey'),
#{country,jdbcType=VARCHAR},
#{delflag,jdbcType=INTEGER}, #{delflag,jdbcType=INTEGER},
#{headimgurl,jdbcType=VARCHAR}, #{headimgurl,jdbcType=VARCHAR},
#{subscribetime,jdbcType=TIMESTAMP}, #{subscribetime,jdbcType=TIMESTAMP},
...@@ -233,16 +238,16 @@ ...@@ -233,16 +238,16 @@
id = #{id}, id = #{id},
</if> </if>
<if test="nickname != null"> <if test="nickname != null">
nickname = #{nickname}, nickname = AES_ENCRYPT(#{nickname},'aideakey'),
</if> </if>
<if test="sex != null"> <if test="sex != null">
sex = #{sex}, sex = #{sex},
</if> </if>
<if test="city != null"> <if test="city != null">
city = #{city}, city = AES_ENCRYPT(#{city},'aideakey'),
</if> </if>
<if test="province != null"> <if test="province != null">
province = #{province}, province = AES_ENCRYPT(#{province},'aideakey'),
</if> </if>
<if test="userid != null"> <if test="userid != null">
userid = #{userid}, userid = #{userid},
......
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