Commit e036339e authored by 谢希宇's avatar 谢希宇

Aidea product update by Strive Date 2020-10-30

parent da00827e
......@@ -61,8 +61,8 @@
<sql id="sqlColumns">
a.id,
a.consult_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) user_name,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) number_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) userName,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) numberId,
a.sex,
CONVERT(AES_DECRYPT(a.phone,'aideakey') USING UTF8) phone,
a.past_records,
......@@ -193,7 +193,7 @@
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
<include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.a.service_id =${id} )</if>
<if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
......
......@@ -61,8 +61,8 @@
<sql id="sqlColumns">
a.id,
a.consult_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) user_name,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) number_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) userName,
CONVERT(AES_DECRYPT(a.number_id,'aideakey') USING UTF8) numberId,
a.sex,
CONVERT(AES_DECRYPT(a.phone,'aideakey') USING UTF8) phone,
a.past_records,
......@@ -88,7 +88,23 @@
b.`name` pharmaName,
c.`name` customerName
</sql>
<sql id="sqlCol">
id,
CONVERT(AES_DECRYPT(user_name,'aideakey') USING UTF8) userName,
sex,
CONVERT(AES_DECRYPT(phone,'aideakey') USING UTF8) phone,
past_records,
prescription,
illness,
accounts_id,
STATUS,
create_time,
description,
allergy,
symptom,
open_id
</sql>
<insert id="save" parameterType="com.cftech.consultsheet.model.ConsultSheet" useGeneratedKeys="true"
keyProperty="id">
......@@ -181,6 +197,18 @@
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
<select id="consultSheetList" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT
<include refid="sqlCol"/>
from t_aidea_consult_sheet
where del_flag = 0
<if test="name!=null">
and user_name like concat('%',#{name},'%')
</if>
<if test="id!=null">
and id = #{id}
</if>
</select>
<update id="update" parameterType="com.cftech.consultsheet.model.ConsultSheet">
update t_aidea_consult_sheet
......@@ -279,7 +307,7 @@
description = #{description}
</if>
</set>
where id = #{consultId}
where consult_id = #{consultId}
</update>
<update id="updateStatus">
......@@ -290,7 +318,7 @@
</if>
</set>
where id = #{consultId}
where consult_id = #{consultId}
</update>
......
......@@ -85,18 +85,18 @@
class="form-control"
data-placeholder="请选择二维码类型">
<option value="">全部</option>
<option value="0">客服二维码</option>
<option value="1">药师二维码</option>
<option value="2">医生二维码</option>
<option value="3">组织二维码</option>
<option value="2">客服二维码</option>
<option value="3">医生二维码</option>
<option value="4">组织二维码</option>
</select>
</div>
<div class="col-xs-5">
<a class="btn btn-primary search">搜索</a>
<a class="btn btn-primary search">搜索</a>
#if($shiro.hasPermission("qy:qrcodeRecord:edit"))
<!-- <a href="#springUrl('/a/qrcodeRecord/form')" class="btn btn-primary">新增</a>
<a href="#springUrl('/a/qrcodeRecord/exportExcel')" class="btn btn-primary">导出</a>
<a onclick="importExcel();" class="btn btn-primary">导入</a>-->
<!-- <a href="#springUrl('/a/qrcodeRecord/form')" class="btn btn-primary">新增</a>
<a href="#springUrl('/a/qrcodeRecord/exportExcel')" class="btn btn-primary">导出</a>
<a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
</div>
</form>
......@@ -105,8 +105,10 @@
<table id="table" class="table table-bordered table-striped">
<thead>
<tr>
<td hidden="true">Id</td
><th>粉丝openid</th>
<td hidden="true">Id
</td
>
<th>粉丝openid</th>
<th>二维码类型</th>
<th>二维码</th>
<th>扫码时间</th>
......@@ -154,8 +156,8 @@
<script src="common/js/cfapp.js"></script>
<script>
var csrfheader = {name:'_csrf_header',value:'${_csrf.headerName}'};
var csrftoken = {name:'_csrf',value:'${_csrf.token}'};
var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
var csrftoken = {name: '_csrf', value: '${_csrf.token}'};
</script>
<script>
function formatDates(now) {
......@@ -231,7 +233,7 @@
"aTargets": [1],
"mData": "openid",
"mRender": function (a, b, c, d) {
return a;
return a;
}
},
......@@ -239,15 +241,15 @@
"aTargets": [2],
"mData": "type",
"mRender": function (a, b, c, d) {
if (a=='0'){
return "客服二维码";
}else if (a=='1'){
if (a == '1') {
return "药师二维码";
}else if (a=='2'){
} else if (a == '2') {
return "客服二维码";
} else if (a == '3') {
return "医生二维码";
}else if (a=='3'){
} else if (a == '4') {
return "组织二维码";
}else{
} else {
return "";
}
......@@ -257,7 +259,7 @@
"aTargets": [3],
"mData": "openid",
"mRender": function (a, b, c, d) {
return "<img src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+a+"' style='width: 80px;height: 80px;'>";
return "<img src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" + a + "' style='width: 80px;height: 80px;'>";
}
},
{
......@@ -267,17 +269,17 @@
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
}
}/*,
{
"aTargets": [8],
"mData": "id",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
var html = '#if($shiro.hasPermission("qy:qrcodeRecord:edit"))';//
html += '<a href="#springUrl("/a/qrcodeRecord/form?id=' + a + '")" data-id="' + a + '" data-action="view" class="btn green">修改</a>';
html += '<a href="javascript:void(0);" data-id="' + a + '" data-action="remove" onclick="removeData(' + a + ')" class="btn red">删除</a>';
html += '#end';
return html;
}
}*/
{
"aTargets": [8],
"mData": "id",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
var html = '#if($shiro.hasPermission("qy:qrcodeRecord:edit"))';//
html += '<a href="#springUrl("/a/qrcodeRecord/form?id=' + a + '")" data-id="' + a + '" data-action="view" class="btn green">修改</a>';
html += '<a href="javascript:void(0);" data-id="' + a + '" data-action="remove" onclick="removeData(' + a + ')" class="btn red">删除</a>';
html += '#end';
return html;
}
}*/
]
});
......@@ -309,7 +311,7 @@
$.ajax({
type: "POST",
url: "#springUrl('/a/qrcodeRecord/delete')",
data: {id: data,_csrf_header:csrfheader.value,_csrf:csrftoken.value},
data: {id: data, _csrf_header: csrfheader.value, _csrf: csrftoken.value},
dataType: "json",
success: function (data) {
if (data.errorNo == 0) {
......
......@@ -99,10 +99,10 @@
<label>二维码类别</label>
<select class="form-control select2" name="typeselect"
id="typeselect" style="width: 100%;">
<option value="0">客服二维码</option>
<option value="1">药师二维码</option>
<option value="2">医生二维码</option>
<option value="3">组织二维码</option>
<option value="2">客服二维码</option>
<option value="3">医生二维码</option>
<option value="4">组织二维码</option>
</select>
</div>
......
......@@ -110,10 +110,10 @@
<label>二维码类别</label>
<select class="form-control select2" name="typeselect"
id="typeselect" style="width: 100%;">
<option value="0">客服二维码</option>
<option value="1">药师二维码</option>
<option value="2">医生二维码</option>
<option value="3">组织二维码</option>
<option value="2">客服二维码</option>
<option value="3">医生二维码</option>
<option value="4">组织二维码</option>
</select>
</div>
......
......@@ -310,21 +310,19 @@
"aTargets": [4],
"mData": "type",
"mRender": function (a, b, c, d) {
if (a == '0') {
return '客服二维码';
} else if (a == '1') {
return '药师二位码';
}else if(a == '2'){
if (a == '1') {
return '药师二维码';
} else if (a == '2') {
return '客服二位码';
}else if(a == '3'){
return '医生二维码';
}else if(a=="3"){
}else if(a == "4"){
return '组织二维码';
}else{
return "";
}
}
},
{
"aTargets": [5],
"mData": "createTime",
......
......@@ -13,7 +13,7 @@ import java.util.Date;
* @date: 2017-12-04 17:56
*/
@Data
public class WxQrcode implements Serializable {
public class WxQrcode implements Serializable {
/* 主键id */
private Long id;
......@@ -24,7 +24,7 @@ public class WxQrcode implements Serializable {
private String number;
/* 场景值 */
private String sceneId;
/* 二维码类别 */
/* 二维码类别 1:药师;2:客服;3:医生;4:组织*/
private String type;
/* 二维码的Ticket */
private String ticket;
......@@ -46,8 +46,9 @@ public class WxQrcode implements Serializable {
private Long createBy;
/* 更新人 */
private Long updateBy;
/* 绑定对象 */
private String qrcodeNames;
/* 绑定对象 */
private String qrcodeNames;
public WxQrcode() {
this.delFlag = false;
this.status = "0";
......
......@@ -13,6 +13,7 @@ import java.util.Date;
*/
@Data
public class MemberVO {
private Long id;
/*姓名*/
private String memberName;
......@@ -32,5 +33,5 @@ public class MemberVO {
/*accountsID*/
private Long accountsID;
private String birthdayStr;
}
......@@ -8,6 +8,7 @@ import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Cond;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.core.util.DateFormatUtils;
import com.cftech.core.util.StringUtils;
import com.cftech.member.dao.MemberMapper;
import com.cftech.member.model.Member;
......@@ -90,7 +91,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
if (org.springframework.util.StringUtils.isEmpty(id)) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "id不能为空");
return rtnJson;
}
List<MemberVO> memberVOS = memberMapper.memberFormation(id);
Log.info("返回值" + memberVOS);
......@@ -108,10 +109,8 @@ 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);
String format = sdf1.format(memberVO.getBirthday());
Date date = sdf1.parse(format);
memberVO.setBirthday(date);
Date birthday = DateFormatUtils.formatDate(memberVO.getBirthdayStr(), "yyyy-MM-dd");
memberVO.setBirthday(birthday);
if (StringUtils.isEmpty(memberVO.getMemberName())) {
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg", "姓名不能为空");
......
......@@ -19,29 +19,31 @@ import org.springframework.web.bind.annotation.*;
@CrossOrigin
@RequestMapping("mobile/auth/member")
public class MobileMemberController {
@Autowired
private MemberService memberService;
/**
* @Author Licc
* @Description 个人信息数据回填
* @Date 14:27 2020/10/19
* @Param
* @return
**/
@RequestMapping(value = "/memberFormation",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject memberFormation(Long id){
return memberService.memberFormation(id);
}
/**
* @return
* @Author Licc
* @Description 个人信息修改
* @Description 个人信息数据回填
* @Date 14:27 2020/10/19
* @Param
**/
@RequestMapping(value = "/memberFormation", method = {RequestMethod.GET, RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject memberFormation(Long id) {
return memberService.memberFormation(id);
}
/**
* @return
* @Author Licc
* @Description 个人信息修改
* @Date 14:27 2020/10/19
* @Param
**/
@RequestMapping(value = "/updateMember",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject updateMember(@RequestBody MemberVO memberVO){
@RequestMapping(value = "/updateMember", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject updateMember(MemberVO memberVO) {
return memberService.updateMember(memberVO);
}
}
......@@ -176,8 +176,8 @@ select
LEFT JOIN area a ON t.province_id = a.areaid
LEFT JOIN area b ON t.city_id = b.areaid
LEFT JOIN area c ON t.area_id = c.areaid
and t.del_flag=0
WHERE t.open_id = #{openId}
and t.del_flag=0
</select>
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
......
......@@ -107,7 +107,7 @@
<label class="control-label">选择文件1</label>
<input id="fileExcel" name="fileExcel" type="file" class="file">
<input type="text" style="display: none" name="_csrf" value="${_csrf.token}"/>
<input type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/>
<input type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/>
<button style="width: 100px;margin: 10px;" type="button" class="btn btn-primary"
id="import">导入
</button>
......@@ -159,7 +159,7 @@
name="source" style="width: 100%;" tabindex="-1"
aria-hidden="true">
<option selected="selected" value="">粉丝来源</option>
<option value="1">导购二维码</option>
<option value="1">药师二维码</option>
<option value="2">门店二维码</option>
<option value="3">普通关注</option>
<option value="4">普通二维码</option>
......@@ -195,10 +195,10 @@
href="javascript:void(0)" onclick="syn(this)"
class="btn bg-olive">同步粉丝</a>
#end
<!-- #if($shiro.hasPermission("mp:fanss:edit")) <a id="batchFanssTag"-->
<!-- href="javascript:void(0)"-->
<!-- class="btn bg-olive">批量打标签</a>-->
<!-- #end-->
<!-- #if($shiro.hasPermission("mp:fanss:edit")) <a id="batchFanssTag"-->
<!-- href="javascript:void(0)"-->
<!-- class="btn bg-olive">批量打标签</a>-->
<!-- #end-->
<button style="width: 100px;" type="submit"
class="btn btn-primary" id="export">导出
</button>
......@@ -217,10 +217,10 @@
<th>省份</th>
<th>城市</th>
<th>昵称</th>
<!-- <th>标签</th>-->
<!-- <th>标签</th>-->
<th>粉丝来源</th>
<th>关注日期</th>
<!-- <th>操作</th>-->
<!-- <th>操作</th>-->
</tr>
</thead>
<tbody>
......@@ -480,7 +480,7 @@
{"mData": "nickname"},
{"mData": "source"},
{"mData": "subscribetime"}
],
],
"aoColumnDefs": [
{ // set default column settings
......@@ -523,7 +523,7 @@
"targets": [3],
"mData": "openid",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
return a;
return a;
}
},
{
......@@ -546,21 +546,21 @@
return a;
}
}
, {
, {
"aTargets": [7],
"mData": "source",
"mRender": function (a, b, c, d) {//a表示createtime对应的值,c表示当前记录行对象
if (a==1){
if (a == 0) {
return "普通关注";
}else if (a==2){
return "师二维码";
}else if (a==3){
} else if (a == 1) {
return "药师师二维码";
} else if (a == 2) {
return "客服二维码";
}else if(a==4){
} else if (a == 3) {
return "医生二维码";
}else if(a==5){
} else if (a == 4) {
return "组织二维码";
}else{
} else {
return "";
}
......
......@@ -7,174 +7,215 @@ import lombok.Data;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import java.util.Date;
/**
* 服务号粉丝账户信息
* @author lisw
*
* @author lisw
*/
@JsonSerialize
@Data
@JsonNaming(PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.class)
public class MpFanssEntity extends BasicEntity{
private static final long serialVersionUID = -2537256381609738771L;
private String openid; //公众号OPENID
private String nickname; //粉丝姓名
private String sex; //粉丝性别
private String city; //粉丝来源城市
private String province; //粉丝来源省会
private String country; //粉丝国家
private String headimgurl;//粉丝头像
private Date subscribetime; //关注事件
private String unionid;//UNIONID
private Long mpaccountid;// 来源服务号ID
private String taglist; //标签列表
private String source;//来源 1.导购二维码 2.门店二维码 3.普通关注
private String recommender;//推荐人
private Long store;//门店
private String status;
private String canceltime; //粉丝取消关注时间
/**
* 粉丝标签,中文名
* @return
*/
private String tags;
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getCanceltime() {
return canceltime;
}
public void setCanceltime(String canceltime) {
this.canceltime = canceltime;
}
/**
*
* @return
*/
private String storeName;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getRecommender() {
return recommender;
}
public void setRecommender(String recommender) {
this.recommender = recommender;
}
public Long getStore() {
return store;
}
public void setStore(Long store) {
this.store = store;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getTaglist() {
return taglist;
}
public void setTaglist(String taglist) {
this.taglist = taglist;
}
public Long getMpaccountid() {
return mpaccountid;
}
public void setMpaccountid(Long mpaccountid) {
this.mpaccountid = mpaccountid;
}
public Date getSubscribetime() {
return subscribetime;
}
public void setSubscribetime(Date subscribetime) {
this.subscribetime = subscribetime;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getHeadimgurl() {
return headimgurl;
}
public void setHeadimgurl(String headimgurl) {
this.headimgurl = headimgurl;
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid;
}
@Override
public String toString() {
return "MpFanssEntity [openid=" + openid + ", nickname=" + nickname
+ ", sex=" + sex + ", city=" + city + ", province=" + province
+ ", country=" + country + ", headimgurl=" + headimgurl
+ ", subscribetime=" + subscribetime + ", unionid=" + unionid
+ ", mpaccountid=" + mpaccountid + "]";
}
public class MpFanssEntity extends BasicEntity {
private static final long serialVersionUID = -2537256381609738771L;
private String openid; //公众号OPENID
private String nickname; //粉丝姓名
private String sex; //粉丝性别
private String city; //粉丝来源城市
private String province; //粉丝来源省会
private String country; //粉丝国家
private String headimgurl;//粉丝头像
private Date subscribetime; //关注事件
private String unionid;//UNIONID
private Long mpaccountid;// 来源服务号ID
private String taglist; //标签列表
private String source;//来源 0.普通关注; 1:药师;2:客服;3:医生;4:组织
private String recommender;//推荐人
private Long store;//门店
private String status;
private String canceltime; //粉丝取消关注时间
/**
* 粉丝标签,中文名
*
* @return
*/
private String tags;
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getCanceltime() {
return canceltime;
}
public void setCanceltime(String canceltime) {
this.canceltime = canceltime;
}
/**
* @return
*/
private String storeName;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getRecommender() {
return recommender;
}
public void setRecommender(String recommender) {
this.recommender = recommender;
}
public Long getStore() {
return store;
}
public void setStore(Long store) {
this.store = store;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getTaglist() {
return taglist;
}
public void setTaglist(String taglist) {
this.taglist = taglist;
}
public Long getMpaccountid() {
return mpaccountid;
}
public void setMpaccountid(Long mpaccountid) {
this.mpaccountid = mpaccountid;
}
public Date getSubscribetime() {
return subscribetime;
}
public void setSubscribetime(Date subscribetime) {
this.subscribetime = subscribetime;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getHeadimgurl() {
return headimgurl;
}
public void setHeadimgurl(String headimgurl) {
this.headimgurl = headimgurl;
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid;
}
@Override
public String toString() {
return "MpFanssEntity [openid=" + openid + ", nickname=" + nickname
+ ", sex=" + sex + ", city=" + city + ", province=" + province
+ ", country=" + country + ", headimgurl=" + headimgurl
+ ", subscribetime=" + subscribetime + ", unionid=" + unionid
+ ", mpaccountid=" + mpaccountid + "]";
}
}
......@@ -156,8 +156,9 @@ public class CoreService {
//@李士伟 客服消息转发前还是要有自动回复,而且希望根据时间回复不同内容。8:30-16:30回复“您好,
// 很高兴为您服务!”,其他时间段回复“非常抱歉哦~我们客服服务时间段是08:30-16:30哦~有需要请08:30之后在线咨询哦~或者是拨打全国服务热线4008288988/95105910咨询哦
if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_TEXT)) {//文字消息进行关键字回复
String content = requestMap.get("Content");
return replyMessage(fromUserName, toUserName, content, "keyword");
// String content = requestMap.get("Content");
// return replyMessage(fromUserName, toUserName, content, "keyword");
return "";
}
// 图片消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_IMAGE)) {
......@@ -195,15 +196,15 @@ public class CoreService {
mpFanssService.deleteByOpenId(fromUserName);
return "";
} else if (eventType.equals(MessageUtil.EVENT_TYPE_CLICK)) {// 自定义菜单点击事件
Menu menu = menuServices.fetchById(eventKey);
if (StringUtils.equals(menu.getMsgType(), "1")) {
String content = MessageUtil.textMessageToXml(text(fromUserName, toUserName, menu.getSourceContent()));
return content;
} else if (StringUtils.equals(menu.getMsgType(), "2")) {
return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, menu.getSourceContent()));
} else if (StringUtils.equals(menu.getMsgType(), "3")) {
return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, menu.getSourceContent()));
}
// Menu menu = menuServices.fetchById(eventKey);
// if (StringUtils.equals(menu.getMsgType(), "1")) {
// String content = MessageUtil.textMessageToXml(text(fromUserName, toUserName, menu.getSourceContent()));
// return content;
// } else if (StringUtils.equals(menu.getMsgType(), "2")) {
// return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, menu.getSourceContent()));
// } else if (StringUtils.equals(menu.getMsgType(), "3")) {
// return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, menu.getSourceContent()));
// }
} else if (eventType.equals(MessageUtil.EVENT_TYPE_USER_GET_CARD)) {//用户领取卡券
} else if (eventType.equals(MessageUtil.EVENT_TYPE_USER_GIFTING_CARD)) {//用户转赠卡券
} else if (eventType.equals(MessageUtil.EVENT_TYPE_USER_CONSUME_CARD)) {//核销卡券
......@@ -234,30 +235,30 @@ public class CoreService {
conds.equal("delflag", 0);
conds.equal("accountsid", mpAccountEntity.getId());
conds.equal("send_type", "subscribe");
Reply reply = replyService.fetchSearchByConds(conds);
if (reply != null) {
if (reply.getReplyType().equals("text")) {//回复文本
return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource()));
} else if (reply.getReplyType().equals("news")) {//回复微信图文
return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource()));
} else if (reply.getReplyType().equals("article")) {//回复文章
return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource()));
}
}
// Reply reply = replyService.fetchSearchByConds(conds);
// if (reply != null) {
// if (reply.getReplyType().equals("text")) {//回复文本
// return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("news")) {//回复微信图文
// return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("article")) {//回复文章
// return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource()));
// }
// }
} else if (replyType.equals("keyword")) {
List<Reply> replyList = replyService.fetchkeywordByPage(content, mpAccountEntity.getId(), "keyword");
if (replyList != null && replyList.size() > 0) {
Reply reply = replyList.get(0);
if (reply.getReplyType().equals("text")) {//回复文本
return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource()));
} else if (reply.getReplyType().equals("news")) {//回复微信图文
return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource()));
} else if (reply.getReplyType().equals("article")) {//回复文章
return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource()));
}
} else {//没有匹配到关键字,接入到客服
return MessageUtil.customerServiceMessageToXml(resBaseMessage(fromUserName, toUserName));
}
// List<Reply> replyList = replyService.fetchkeywordByPage(content, mpAccountEntity.getId(), "keyword");
// if (replyList != null && replyList.size() > 0) {
// Reply reply = replyList.get(0);
// if (reply.getReplyType().equals("text")) {//回复文本
// return MessageUtil.textMessageToXml(text(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("news")) {//回复微信图文
// return MessageUtil.newsMessageToXml(news(fromUserName, toUserName, reply.getContentSource()));
// } else if (reply.getReplyType().equals("article")) {//回复文章
// return MessageUtil.newsMessageToXml(localNews(fromUserName, toUserName, reply.getContentSource()));
// }
// } else {//没有匹配到关键字,接入到客服
// return MessageUtil.customerServiceMessageToXml(resBaseMessage(fromUserName, toUserName));
// }
} else {
}
......@@ -412,18 +413,14 @@ public class CoreService {
*/
public void updateFanssSource(String openid,String bindId,String ticket,String wxQrcodeType){
MpFanssEntity fans = mpFanssService.getWxUser(openid);
if(StringUtils.equals(wxQrcodeType,"meeting")){
if(StringUtils.equals(wxQrcodeType,"1")){//药师二维码
wxQrcodeType = "1";
}else if(StringUtils.equals(wxQrcodeType,"exhibi")){
} else if(StringUtils.equals(wxQrcodeType,"2")){//客服二维码
wxQrcodeType = "2";
}else if(StringUtils.equals(wxQrcodeType,"exhibiApp")){
} else if(StringUtils.equals(wxQrcodeType,"3")){//医生二维码
wxQrcodeType = "3";
}else if(StringUtils.equals(wxQrcodeType,"typeform")){
} else if(StringUtils.equals(wxQrcodeType,"4")){//组织二维码
wxQrcodeType = "4";
}else if(StringUtils.equals(wxQrcodeType,"brandApply")){
wxQrcodeType = "6";
}else if(StringUtils.equals(wxQrcodeType,"supplierlist")){
wxQrcodeType = "7";
}
if (fans != null) {
MpFanssEntity realFans = new MpFanssEntity();
......@@ -459,12 +456,12 @@ public class CoreService {
Long bindId = wxQrcode.getBindId();
String wxQrcodeType = wxQrcode.getType();
qrcodeRecord.setType(wxQrcodeType);
if(bindId!=null){
if (bindId!=null){
qrcodeRecord.setKeywords(String.valueOf(bindId));
}
qrcodeRecordService.save(qrcodeRecord);
if (event.equals(MessageUtil.EVENT_TYPE_SUBSCRIBE)) {
updateFanssSource(fromUserName,String.valueOf(bindId),ticket,wxQrcodeType);
updateFanssSource(fromUserName, String.valueOf(bindId), ticket, wxQrcodeType);
return rtnMessage(wxQrcodeType, fromUserName, toUserName, bindId);
} else {
return rtnMessage(wxQrcodeType, fromUserName, toUserName, bindId);
......@@ -563,8 +560,7 @@ public class CoreService {
fannsEntity.setSource(type);
fannsEntity.setRecommender(store);
fannsEntity.setStatus(ticket);
fannsEntity.setSubscribetime(new Date(Long.parseLong(user
.getSubscribe_time()) * 1000));
fannsEntity.setSubscribetime(new Date(Long.parseLong(user.getSubscribe_time()) * 1000));
fannsEntity.setUnionid(user.getUnionid());
String tags = "";
if (user.getTagid_list() != null && user.getTagid_list().size() > 0) {
......
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