Commit 95be5746 authored by 谢希宇's avatar 谢希宇

Aidea product update by Strive Date 2020-10-29

parent 749b5b27
......@@ -111,7 +111,7 @@
<th>药师姓名</th>
<th>客服姓名</th>
<th>审核状态</th>
<th>备注(审核未通过原因)</th>
<th>拒绝原由</th>
<th>操作</th>
</tr>
......@@ -221,7 +221,7 @@
"mData": "sex"
},
{
"mData": "iphone"
"mData": "phone"
},
{
"mData": "pastRecords"
......
......@@ -8,9 +8,9 @@
<result column="user_name" property="userName"/>
<result column="number_id" property="numberId"/>
<result column="sex" property="sex"/>
<result column="iphone" property="iPhone"/>
<result column="phone" property="phone"/>
<result column="past_records" property="pastRecords"/>
<result column="prescription" property="Prescription"/>
<result column="prescription" property="prescription"/>
<result column="doctor_id" property="doctorId"/>
<result column="customer_id" property="customerId"/>
<result column="illness" property="illness"/>
......@@ -61,10 +61,10 @@
<sql id="sqlColumns">
a.id,
a.consult_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) user_name,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) number_id,
a.sex,
CONVERT(AES_DECRYPT(a.iphone,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.phone,'aideakey') USING UTF8) phone,
a.past_records,
a.prescription,
a.doctor_id,
......@@ -90,24 +90,47 @@
</sql>
<insert id="save" parameterType="com.cftech.consultsheet.model.ConsultSheet" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_consult_sheet
(
<include refid="sqlColumns"/>
id,
consult_id,
user_name ,
number_id,
sex,
phone,
past_records,
prescription,
doctor_id,
customer_id,
illness,
accounts_id,
del_flag,
STATUS,
create_time,
update_time,
description,
create_by,
update_by,
allergy,
symptom,
diagnosis,
open_id,
drugs_id,
member_id,
order_id
)
values
(
#{id, jdbcType=BIGINT}
#{id, jdbcType=BIGINT},
#{consultId, jdbcType=VARCHAR},
AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
now(),
#{sex, jdbcType=BIGINT},
AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
#{pastRecords, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
......@@ -120,11 +143,9 @@
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{allergy, jdbcType=VARCHAR},
#{updateBy, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT}
#{doctorName, jdbcType=VARCHAR},
#{customerName,jdbcType=BIGINT},
#{openId,jdbcType=VARCHAR},
#{symptom, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT},
#{openId, jdbcType=VARCHAR},
#{drugsId,jdbcType=BIGINT},
#{memberId,jdbcType=BIGINT},
#{orderId,jdbcType=BIGINT}
......@@ -156,7 +177,7 @@
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
<include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.customer_id =${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>
......@@ -167,13 +188,11 @@
<if test="id != null">
id = #{id, jdbcType=BIGINT},
</if>
<if test="consultId != null">
consult_id = #{consultId, jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = AES_ENCRYPT( #{userName, jdbcType=VARBINARY},'aideakey'),
user_name = AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
</if>
<if test="numberId != null">
number_id = AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
......@@ -182,14 +201,14 @@
<if test="sex != null">
sex = #{sex, jdbcType=BIGINT},
</if>
<if test="iPhone != null">
iphone = AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
<if test="phone != null">
phone = AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
</if>
<if test="pastRecords != null">
past_records = #{pastRecords, jdbcType=VARCHAR},
</if>
<if test="Prescription != null">
prescription = #{Prescription, jdbcType=VARCHAR},
<if test="prescription != null">
prescription = #{prescription, jdbcType=VARCHAR},
</if>
<if test="doctorId != null">
doctor_id = #{doctorId, jdbcType=BIGINT},
......@@ -249,7 +268,8 @@
<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 id="updateDate">
update t_aidea_consult_sheet
<set>
<if test="status !=null">
......@@ -261,6 +281,7 @@
</set>
where consult_id = #{consultId}
</update>
<update id="updateStatus">
update t_aidea_consult_sheet
<set>
......
......@@ -30,31 +30,28 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String userName;
/* 身份证号 */
private String numberId;
// /* 出生年月 */
// @JSONField(format = "yyyy-MM-dd")
// private Date benebitId;
/* 性别 */
@ExportConfig(value = "性别", width = 100, showLevel = 1)
private Long sex;
/* 手机号 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private Long iPhone;
private String phone;
/* 疾病史 */
@ExportConfig(value = "疾病史", width = 100, showLevel = 1)
private String pastRecords;
/* 过敏史 */
@ExportConfig(value = "过敏史", width = 100, showLevel = 1)
private String allergy;
/* 病情描述 */
@ExportConfig(value = "病情描述", width = 100, showLevel = 1)
private String illness;
/* 处方单 */
@ExportConfig(value = "处方单", width = 100, showLevel = 1)
private String Prescription;
private String prescription;
/* 药师id */
private Long doctorId;
/* 客服id */
private Long customerId;
/* 病情描述 */
@ExportConfig(value = "病情描述", width = 100, showLevel = 1)
private String illness;
/* 过敏史 */
@ExportConfig(value = "过敏史", width = 100, showLevel = 1)
private String allergy;
/* 本次确认症状 */
private String symptom;
/*是否已在医院确诊*/
......@@ -70,16 +67,19 @@ public class ConsultSheet extends UserSheet implements Serializable {
private Date createTime;
/* 更新时间 */
private Date updateTime;
/* 备注 */
/* 是否勾选处方单真实性声明 0:未勾选 1:勾选 */
private String description;
/* 创建人 */
private Long createBy;
/* 更新人 */
private Long updateBy;
/* 粉丝id */
private String openId;
/* 药品id */
private Long drugsId;
/* 会员id */
private Long memberId;
/* 订单id */
private Long orderId;
public ConsultSheet() {
......
......@@ -27,7 +27,7 @@ public class ConsultSheetVO {
/* 手机号 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private Long phone;
private String phone;
/* 疾病史 */
@ExportConfig(value = "疾病史", width = 100, showLevel = 1)
......
......@@ -26,4 +26,5 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
* @param consultSheet
*/
JSONObject pollingConsultSheet(ConsultSheet consultSheet);
}
......@@ -2,6 +2,7 @@ package com.cftech.consultsheet.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.base.org.model.Qyuser;
import com.cftech.base.org.service.QyuserService;
import com.cftech.consultsheet.dao.ConsultSheetMapper;
......@@ -17,11 +18,9 @@ import com.cftech.core.util.StringUtils;
import com.cftech.member.model.Member;
import com.cftech.member.service.MemberService;
import com.cftech.order.service.OrderService;
import com.cftech.sys.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
......@@ -49,6 +48,9 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Autowired
private QyuserService qyuserService;
@Autowired
private CodingruleUtils codingruleUtils;
@Override
public GenericDao<ConsultSheet> getGenericMapper() {
return consultSheetMapper;
......@@ -78,19 +80,23 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
return consultSheetMapper.fetchSearchByPage(params);
}
@Transactional
@Override
public JSONObject pollingConsultSheet(ConsultSheet consultSheet) {
JSONObject retObj = new JSONObject();
try {
//consultSheet.setNumberId(codingruleUtils.getNumber(consultSheet.getAccountsId(), ConsultSheet.class.getName()));
consultSheet.setConsultId(codingruleUtils.getNumber(consultSheet.getAccountsId(), ConsultSheet.class.getName()));
if (consultSheetMapper.save(consultSheet) > 0) {
memberProcess(consultSheet.getOpenId(), consultSheet);
}
retObj.put("errerNo", 0);
retObj.put("data", 0);
retObj.put("errerMsg", "咨询单提交成功,请等待药师审核");
//memberProcess(consultSheet.getOpenId(), consultSheet);
} else {
retObj.put("errrNo", 1);
retObj.put("errorMsg", "咨询单保存失败");
}
} catch (Exception e) {
e.printStackTrace();
retObj.put("errrNo", 1);
retObj.put("errorMsg", "提交咨询单" + e.getMessage());
}
......
......@@ -109,18 +109,16 @@ public class ConsultSheetController {
@ResponseBody
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)) {
Integer integer = consultSheetService.updateDate(consultId, status, description);
if (integer>0){
rtnJson.put("errorNo", 1);
rtnJson.put("errorNo", 0);
}
}
} catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo", 0);
rtnJson.put("errorNo", 1);
}
return rtnJson;
}
......@@ -130,18 +128,16 @@ public class ConsultSheetController {
@ResponseBody
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) ) {
Integer integer = consultSheetService.updateStatus(consultId, status);
if (integer>0){
rtnJson.put("errorNo", 1);
rtnJson.put("errorNo", 0);
}
}
} catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo", 0);
rtnJson.put("errorNo", 1);
}
return rtnJson;
}
......@@ -207,7 +203,7 @@ public class ConsultSheetController {
consultSheetVO.setConsultId(consultSheet.getConsultId());
consultSheetVO.setUserName(consultSheet.getUserName());
consultSheetVO.setSex(consultSheet.getSex() == 1 ? "男" : "女");
consultSheetVO.setPhone(consultSheet.getIPhone());
consultSheetVO.setPhone(consultSheet.getPhone());
consultSheetVO.setPastRecords(consultSheet.getPastRecords());
consultSheetVO.setIllness(consultSheet.getIllness());
consultSheetVO.setAllergy(consultSheet.getAllergy());
......
......@@ -8,9 +8,9 @@
<result column="user_name" property="userName"/>
<result column="number_id" property="numberId"/>
<result column="sex" property="sex"/>
<result column="iphone" property="iPhone"/>
<result column="phone" property="phone"/>
<result column="past_records" property="pastRecords"/>
<result column="prescription" property="Prescription"/>
<result column="prescription" property="prescription"/>
<result column="doctor_id" property="doctorId"/>
<result column="customer_id" property="customerId"/>
<result column="illness" property="illness"/>
......@@ -61,10 +61,10 @@
<sql id="sqlColumns">
a.id,
a.consult_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) user_name,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) number_id,
a.sex,
CONVERT(AES_DECRYPT(a.iphone,'aideakey') USING UTF8) ,
CONVERT(AES_DECRYPT(a.phone,'aideakey') USING UTF8) phone,
a.past_records,
a.prescription,
a.doctor_id,
......@@ -90,24 +90,47 @@
</sql>
<insert id="save" parameterType="com.cftech.consultsheet.model.ConsultSheet" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_consult_sheet
(
<include refid="sqlColumns"/>
id,
consult_id,
user_name ,
number_id,
sex,
phone,
past_records,
prescription,
doctor_id,
customer_id,
illness,
accounts_id,
del_flag,
STATUS,
create_time,
update_time,
description,
create_by,
update_by,
allergy,
symptom,
diagnosis,
open_id,
drugs_id,
member_id,
order_id
)
values
(
#{id, jdbcType=BIGINT}
#{id, jdbcType=BIGINT},
#{consultId, jdbcType=VARCHAR},
AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
now(),
#{sex, jdbcType=BIGINT},
AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
#{pastRecords, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
......@@ -120,11 +143,9 @@
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{allergy, jdbcType=VARCHAR},
#{updateBy, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT}
#{doctorName, jdbcType=VARCHAR},
#{customerName,jdbcType=BIGINT},
#{openId,jdbcType=VARCHAR},
#{symptom, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT},
#{openId, jdbcType=VARCHAR},
#{drugsId,jdbcType=BIGINT},
#{memberId,jdbcType=BIGINT},
#{orderId,jdbcType=BIGINT}
......@@ -156,7 +177,7 @@
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
<include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.customer_id =${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>
......@@ -167,13 +188,11 @@
<if test="id != null">
id = #{id, jdbcType=BIGINT},
</if>
<if test="consultId != null">
consult_id = #{consultId, jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = AES_ENCRYPT( #{userName, jdbcType=VARBINARY},'aideakey'),
user_name = AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
</if>
<if test="numberId != null">
number_id = AES_ENCRYPT(#{numberId, jdbcType=VARBINARY},'aideakey'),
......@@ -182,14 +201,14 @@
<if test="sex != null">
sex = #{sex, jdbcType=BIGINT},
</if>
<if test="iPhone != null">
iphone = AES_ENCRYPT(#{iPhone, jdbcType=VARBINARY},'aideakey'),
<if test="phone != null">
phone = AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
</if>
<if test="pastRecords != null">
past_records = #{pastRecords, jdbcType=VARCHAR},
</if>
<if test="Prescription != null">
prescription = #{Prescription, jdbcType=VARCHAR},
<if test="prescription != null">
prescription = #{prescription, jdbcType=VARCHAR},
</if>
<if test="doctorId != null">
doctor_id = #{doctorId, jdbcType=BIGINT},
......@@ -249,7 +268,8 @@
<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 id="updateDate">
update t_aidea_consult_sheet
<set>
<if test="status !=null">
......@@ -261,6 +281,7 @@
</set>
where consult_id = #{consultId}
</update>
<update id="updateStatus">
update t_aidea_consult_sheet
<set>
......
......@@ -24,9 +24,7 @@ AIDEA_QY_ACCOUNTS=349
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_PAPERCATEGORY_NAME=\u95EE\u5377\u7C7B\u578B
ROOT_QUESTIONSCATEGORY_NAME=\u95EE\u9898\u7C7B\u522B
ROOT_MATERIALCATEGORY_NAME=\u7D20\u6750\u7C7B\u522B
ROOT_MATERIALCATEGORY_NAME=\u7D20\u6750\u7C7B\u578B
ARTICLEDETAILURL=http://www.changfu-tech.com/schaeffler/static/mp/dc/buy-car/dc-news-detail.html?appid={APPID}&articleId={ID}
ARTICLEDETAILPICURL=http://localhost:8080/schaeffler/static/article/picDetail.html?accountsid={ACCOUNTSID}&id={ID}
LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
......
......@@ -106,21 +106,24 @@ var UserAdd = function () {
$("#table tbody tr").each(function(i,val){
// var dealerNo=$(this).find("td:eq(1) select option[data-attr='sys:dealer']").val()//获取为经销商编码的ID
formdata["account"+i]=$(this).find("td:first select").val();
formdata["roles"+i]=$(this).find("td:eq(1) select").val();
if(accountId.indexOf(","+$(this).find("td:first select").val()+",")>=0){
Cfapp.alert({
message: "存在重复公众号,请重新选择",
btntext: "确认",
success: function () {
}
});
issubmit=false;
return false;
}else{
accountId+=","+$(this).find("td:first select").val()+",";
}
// formdata["account"+i]=$(this).find("td:first select").val();
// formdata["roles"+i]=$(this).find("td:eq(1) select").val();
formdata["account"+i]="348";
formdata["roles"+i]=$(this).find("td:first select").val();
// if(accountId.indexOf(","+$(this).find("td:first select").val()+",")>=0){
// Cfapp.alert({
// message: "存在重复公众号,请重新选择",
// btntext: "确认",
// success: function () {
// }
// });
// issubmit=false;
// return false;
// }else{
// accountId+=","+$(this).find("td:first select").val()+",";
// }
});
accountId="";
......@@ -153,6 +156,7 @@ var UserAdd = function () {
}
});
defaultAccountId = "348";
if (!defaultAccountId || defaultAccountId == '') {
Cfapp.alert({
message: "请选择默认的账号",
......
......@@ -228,23 +228,23 @@
>
</div>
<div class="form-group form-md-line-input">
<label>素材存储位置</label>
<select name="cosconfigId" class="form-control">
<!--<option value="0">本地</option>-->
#foreach($cosconfig in $cosconfigList)
#if($cosconfig.cosType == "qcloud")
<option value="$cosconfig.id">腾讯</option>
#end
#if($cosconfig.cosType == "ali")
<option value="$cosconfig.id">阿里</option>
#end
#if($cosconfig.cosType == "qiniu")
<option value="$cosconfig.id">七牛</option>
#end
#end
</select>
</div>
<!--<div class="form-group form-md-line-input">-->
<!--<label>素材存储位置</label>-->
<!--<select name="cosconfigId" class="form-control">-->
<!--&lt;!&ndash;<option value="0">本地</option>&ndash;&gt;-->
<!--#foreach($cosconfig in $cosconfigList)-->
<!--#if($cosconfig.cosType == "qcloud")-->
<!--<option value="$cosconfig.id">腾讯</option>-->
<!--#end-->
<!--#if($cosconfig.cosType == "ali")-->
<!--<option value="$cosconfig.id">阿里</option>-->
<!--#end-->
<!--#if($cosconfig.cosType == "qiniu")-->
<!--<option value="$cosconfig.id">七牛</option>-->
<!--#end-->
<!--#end-->
<!--</select>-->
<!--</div>-->
<div id="fine-uploader-manual-trigger"></div>
<!--<div class="box-footer">
#if($shiro.hasPermission("material:edit"))
......
......@@ -65,17 +65,19 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
}
@Override
public List<MemberDto> selectmemberDto(Conds conds, Sort sort, int page, int pageSize){
public List<MemberDto> selectmemberDto(Conds conds, Sort sort, int page, int pageSize) {
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);
return memberMapper.selectmemberDto(params);
};
}
;
@Override
public int selectmemberDtoCount (Conds conds){
public int selectmemberDtoCount(Conds conds) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds);
return memberMapper.selectmemberDtoCount(params);
......@@ -85,19 +87,19 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
public JSONObject memberFormation(Long id) {
JSONObject rtnJson = new JSONObject();
try {
if (org.springframework.util.StringUtils.isEmpty(id)){
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","id不能为空");
if (org.springframework.util.StringUtils.isEmpty(id)) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "id不能为空");
}
List<MemberVO> memberVOS = memberMapper.memberFormation(id);
Log.info("返回值"+memberVOS);
rtnJson.put("errorNo","0");
rtnJson.put("data",memberVOS);
Log.info("返回值" + memberVOS);
rtnJson.put("errorNo", "0");
rtnJson.put("data", memberVOS);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo","1");
rtnJson.put("errorNo", "1");
}
return rtnJson;
}
......@@ -106,67 +108,67 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
public JSONObject updateMember(MemberVO memberVO) {
JSONObject rtnJson = new JSONObject();
try {
SimpleDateFormat sdf1= new SimpleDateFormat( "yy-MM-dd" , Locale. CHINA );
SimpleDateFormat sdf1 = new SimpleDateFormat("yy-MM-dd", Locale.CHINA);
String format = sdf1.format(memberVO.getBirthday());
Date date = sdf1.parse(format);
memberVO.setBirthday(date);
if (StringUtils.isEmpty(memberVO.getMemberName())){
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","姓名不能为空");
if (StringUtils.isEmpty(memberVO.getMemberName())) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "姓名不能为空");
return rtnJson;
}
if (StringUtils.isEmpty(memberVO.getMailbox())){
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","邮箱不能为空");
if (StringUtils.isEmpty(memberVO.getMailbox())) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "邮箱不能为空");
return rtnJson;
}
if (StringUtils.isEmpty(memberVO.getPhone())){
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","联系方式不能为空");
if (StringUtils.isEmpty(memberVO.getPhone())) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "联系方式不能为空");
return rtnJson;
}
int i = memberMapper.updateMember(memberVO);
if (i>0){
rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","修改成功");
}else{
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","修改失败");
if (i > 0) {
rtnJson.put("errorNo", "0");
rtnJson.put("errorMsg", "修改成功");
} else {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "修改失败");
return rtnJson;
}
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","系统异常");
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "系统异常");
}
return rtnJson;
}
@Override
public void updateworkshop(Member member,String invitcode) {
if(member!=null){
public void updateworkshop(Member member, String invitcode) {
if (member != null) {
Conds conds1 = new Conds();
conds1.equal("invitcode",invitcode);
conds1.equal("invitcode", invitcode);
Sort sort1 = new Sort("create_time", OrderType.DESC);
List<Workshop> list1 = workshopService.selectworkshop(conds1,sort1,0,0);
if(list1!=null&&list1.size()>0){
List<Workshop> list1 = workshopService.selectworkshop(conds1, sort1, 0, 0);
if (list1 != null && list1.size() > 0) {
Workshop workshop = list1.get(0);
if(member.getSurname().equals(workshop.getSurname())&&member.getName().equals(workshop.getFirst_name())&&member.getPhone().equals("")){
if (member.getSurname().equals(workshop.getSurname()) && member.getName().equals(workshop.getFirst_name()) && member.getPhone().equals("")) {
member.setPhone(workshop.getPhone());
memberMapper.save(member); //注册成功会员表里面添加一条数据
}else{
} else {
memberMapper.save(member); //注册成功会员表里面添加一条数据
}
}
//把memberuid 插入到预导入名单表里面
if(StringUtils.isNoneBlank(invitcode)){
if (StringUtils.isNoneBlank(invitcode)) {
Conds conds = new Conds();
conds.equal("invitcode",invitcode);
conds.equal("invitcode", invitcode);
Sort sort = new Sort("create_time", OrderType.DESC);
List<Workshop> list = workshopService.selectworkshop(conds,sort,0,0);
if(list!=null&&list.size()>0){
for(Workshop workshop : list){
List<Workshop> list = workshopService.selectworkshop(conds, sort, 0, 0);
if (list != null && list.size() > 0) {
for (Workshop workshop : list) {
//workshop.setMember_uid(member.getMember_uid());
workshopService.update(workshop);
}
......
......@@ -291,7 +291,6 @@
onText: '默认',
offText: '否',
state: false
});
};
......@@ -299,10 +298,9 @@
var qyUserRoles = eval(${qyUserRoles});
var defaultAccid = "${user.defaultAccId}";
//var defaultAccid = "${user.defaultAccId}";
for (var i = 0; i < userRoles.length; i++) {
var accounthtml = $(".account").html();
if (userRoles.length ==0) {
var rolehtml = $(".role").html();
var html = "";
html += "<tr class='trEle'>";
......@@ -314,59 +312,84 @@
html += rolehtml;
html += '</select></td>' +
'<td>' +
'<div class="switch">' +
'<input type="radio" id="' + userRoles[i]['accountsId'] + '-sel" name="isdefault"/>' +
'</div>' +
'<button type="button" class="btn btn-danger delAccounts">删除</button>' +
// '<div class="switch">' +
// '<input type="radio" name="isdefault"/>' +
// '</div>' +
// '<button type="button" class="btn btn-danger delAccounts">删除</button>' +
'</td></tr>';
$("#table tbody").append(html);
$("#table tbody tr:last select:first option").each(function (k, val) {
if ($(this).val() == userRoles[i]['accountsId']) {
$(this).attr("selected", true);
}
})
$("#table tbody tr:last select:last option").each(function (k, val) {
if (userRoles[i]['roles'].indexOf("," + $(this).val() + ",") >= 0) {
$(this).attr("selected", true);
}
})
bindSwitch();
$(".select2").select2();
}
for (var i = 0; i < qyUserRoles.length; i++) {
var accounthtml = $(".qyaccount").html();
var rolehtml = $(".qyrole").html();
} else {
for (var i = 0; i < userRoles.length; i++) {
var accounthtml = $(".account").html();
var rolehtml = $(".role").html();
var html = "";
html += "<tr class='trEle'>";
// html += "<td>";
// html += "<select class='form-control select2 qyaccount' data-placeholder='请选择公众号'>" + accounthtml;
// html += "<select class='form-control select2 account' data-placeholder='请选择公众号'>" + accounthtml;
// html += "</select></td>";
html += "<td>";
html += "<select class='form-control select2 qyrole' style='width:100%;' multiple='multiple' data-placeholder='请选择角色'>";
html += "<select class='form-control select2 role' style='width:100%;' multiple='multiple' data-placeholder='请选择角色'>";
html += rolehtml;
html += '</select></td>' +
'<td>' +
'<div class="switch">' +
'<input type="radio" id="' + qyUserRoles[i]['accountsId'] + '-sel" name="isdefault"/>' +
'</div>' +
'<button type="button" class="btn btn-danger delAccounts">删除</button>' +
// '<div class="switch">' +
// '<input type="radio" id="' + userRoles[i]['accountsId'] + '-sel" name="isdefault"/>' +
// '</div>' +
// '<button type="button" class="btn btn-danger delAccounts">删除</button>' +
'</td></tr>';
$("#qytable tbody").append(html);
$("#qytable tbody tr:last select:first option").each(function (k, val) {
if ($(this).val() == qyUserRoles[i]['accountsId']) {
$("#table tbody").append(html);
$("#table tbody tr:last select:first option").each(function (k, val) {
if ($(this).val() == userRoles[i]['accountsId']) {
$(this).attr("selected", true);
}
})
$("#qytable tbody tr:last select:last option").each(function (k, val) {
if (qyUserRoles[i]['roles'].indexOf("," + $(this).val() + ",") >= 0) {
$("#table tbody tr:last select:last option").each(function (k, val) {
if (userRoles[i]['roles'].indexOf("," + $(this).val() + ",") >= 0) {
$(this).attr("selected", true);
}
})
$(".select2").select2();
}
}
// for (var i = 0; i < qyUserRoles.length; i++) {
// var accounthtml = $(".qyaccount").html();
// var rolehtml = $(".qyrole").html();
// var html = "";
// html += "<tr class='trEle'>";
// html += "<td>";
// html += "<select class='form-control select2 qyaccount' data-placeholder='请选择公众号'>" + accounthtml;
// html += "</select></td>";
// html += "<td>";
// html += "<select class='form-control select2 qyrole' style='width:100%;' multiple='multiple' data-placeholder='请选择角色'>";
// html += rolehtml;
// html += '</select></td>' +
// '<td>' +
// '<div class="switch">' +
// '<input type="radio" id="' + qyUserRoles[i]['accountsId'] + '-sel" name="isdefault"/>' +
// '</div>' +
// '<button type="button" class="btn btn-danger delAccounts">删除</button>' +
// '</td></tr>';
// $("#qytable tbody").append(html);
// $("#qytable tbody tr:last select:first option").each(function (k, val) {
// if ($(this).val() == qyUserRoles[i]['accountsId']) {
// $(this).attr("selected", true);
// }
// })
// $("#qytable tbody tr:last select:last option").each(function (k, val) {
// if (qyUserRoles[i]['roles'].indexOf("," + $(this).val() + ",") >= 0) {
// $(this).attr("selected", true);
// }
// })
// $(".select2").select2();
// }
bindSwitch();
$('#' + defaultAccid + '-sel').bootstrapSwitch('toggleState');
//$('#' + defaultAccid + '-sel').bootstrapSwitch('toggleState');
jQuery(document).ready(function () {
......@@ -400,38 +423,38 @@
html += rolehtml;
html += '</select></td>' +
'<td>' +
'<div class="switch">' +
'<input type="radio" name="isdefault"/>' +
'</div>' +
'<button type="button" class="btn btn-danger delAccounts">删除</button>' +
// '<div class="switch">' +
// '<input type="radio" name="isdefault"/>' +
// '</div>' +
// '<button type="button" class="btn btn-danger delAccounts">删除</button>' +
'</td></tr>';
$("#table tbody").append(html);
bindSwitch();
$(".select2").select2();
});
$("#addQyAccounts").click(function () {
var accounthtml = $(".qyaccount").html();
var rolehtml = $(".qyrole").html();
var html = "";
html += "<tr class='trEle'>";
// $("#addQyAccounts").click(function () {
// var accounthtml = $(".qyaccount").html();
// var rolehtml = $(".qyrole").html();
// var html = "";
// html += "<tr class='trEle'>";
// html += "<td>";
// html += "<select class='form-control select2 qyaccount' data-placeholder='请选择企业号'>" + accounthtml;
// html += "</select></td>";
// html += "<td>";
html += "<select class='form-control select2 qyrole' style='width:100%;' multiple='multiple' data-placeholder='请选择角色'>";
html += rolehtml;
html += '</select></td>' +
'<td>' +
'<div class="switch">' +
'<input type="radio" name="isdefault"/>' +
'</div>' +
'<button type="button" class="btn btn-danger delAccounts">删除</button>' +
'</td></tr>';
$("#qytable tbody").append(html);
bindSwitch();
$(".select2").select2();
})
// html += "<select class='form-control select2 qyrole' style='width:100%;' multiple='multiple' data-placeholder='请选择角色'>";
// html += rolehtml;
// html += '</select></td>' +
// '<td>' +
// '<div class="switch">' +
// '<input type="radio" name="isdefault"/>' +
// '</div>' +
// '<button type="button" class="btn btn-danger delAccounts">删除</button>' +
// '</td></tr>';
// $("#qytable tbody").append(html);
// bindSwitch();
// $(".select2").select2();
// })
var sQyUserSource = "#springUrl('/a/qyuser/listData')";
$('#orgtypeSelect').on('click',
......
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