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

字段加密

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