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

Aidea product update by Strive Date 2020-11-03

parent 5d514ac6
......@@ -8,25 +8,24 @@
<result column="secret" property="secret" jdbcType="CHAR" />
<result column="token" property="token" jdbcType="VARCHAR" />
<result column="jsapi_ticket" property="jsapi_ticket" jdbcType="VARCHAR" />
<result column="encodingaeskey" property="encodingaeskey"
jdbcType="VARCHAR" />
<result column="wctype" property="wctype"
jdbcType="VARCHAR" />
<result column="encodingaeskey" property="encodingaeskey" jdbcType="VARCHAR" />
<result column="wctype" property="wctype" jdbcType="VARCHAR" />
<result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
<result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
<result column="upload_type" property="uploadType" jdbcType="VARCHAR"/>
<result column="agentid" property="agentId" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id, description, appid, secret,
token,encodingaeskey,createtime,updatetime,delflag,accesstoken,jsapi_ticket,wctype,upload_type
token,encodingaeskey,createtime,updatetime,delflag,accesstoken,jsapi_ticket,wctype,upload_type, agentid
</sql>
<!-- 插入用户服务号 -->
<insert id="insert" parameterType="com.cftech.accounts.model.MpAccountsEntity">
insert into wx_mp_accounts ( appid, secret,
encodingaeskey,token,accesstoken,delflag,
createtime,timestamp,updatetime,description, wctype)
createtime,timestamp,updatetime,description, wctype, agentid)
values (#{appid,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR},
#{encodingaeskey,jdbcType=VARCHAR},#{token,jdbcType=VARCHAR},
#{accesstoken,jdbcType=VARCHAR},
......@@ -35,7 +34,7 @@
#{timestamp,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP},
#{description,jdbcType=VARCHAR},
#{wctype,jdbcType=VARCHAR}),
#{wctype,jdbcType=VARCHAR},#{agentId,jdbcType=VARCHAR}),
</insert>
<!-- 关联表插入 -->
......@@ -47,7 +46,7 @@
parameterType="java.lang.Long">
select
accounts.id, accounts.description, accounts.appid, accounts.secret,
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype, agentid
from wx_mp_accounts accounts
left join user_role user on user.accounts_id=accounts.id
where user.user_id = #{userid,jdbcType=BIGINT} and accounts.delflag=0 and accounts.wctype='0'
......@@ -60,7 +59,7 @@
parameterType="java.lang.Long">
select
accounts.id, accounts.description, accounts.appid, accounts.secret,
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype, agentid
from wx_mp_accounts accounts
left join user_role user on user.accounts_id=accounts.id
where user.user_id = #{userid,jdbcType=BIGINT} and accounts.delflag=0 and accounts.wctype='1'
......@@ -73,7 +72,7 @@
parameterType="java.lang.Long">
select
accounts.id, accounts.description, accounts.appid, accounts.secret,
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype
accounts.token,accounts.encodingaeskey,accounts.createtime,accounts.delflag,accounts.accesstoken,wctype, agentid
from wx_mp_accounts accounts
left join user_role user on user.accounts_id=accounts.id
where user.user_id = #{userid,jdbcType=BIGINT} and accounts.delflag=0
......@@ -122,7 +121,6 @@
<update id="updateByPrimaryKey" parameterType="com.cftech.accounts.model.MpAccountsEntity">
update wx_mp_accounts
<set>
<if test="encodingaeskey != null">
encodingaeskey = #{encodingaeskey,jdbcType=VARCHAR},
</if>
......@@ -147,6 +145,9 @@
<if test="wctype !=null">
wctype = #{wctype,jdbcType=VARCHAR},
</if>
<if test="agentId !=null">
agentid = #{agentId,jdbcType=VARCHAR},
</if>
updatetime =now()
</set>
where appid = #{appid,jdbcType=BIGINT}
......
......@@ -25,6 +25,8 @@ public class MpAccountsEntity extends BasicEntity {
private String uploadType;
private String agentId;
public String getUploadType() {
return uploadType;
}
......@@ -84,4 +86,12 @@ public class MpAccountsEntity extends BasicEntity {
public void setAccesstoken(String accesstoken) {
this.accesstoken = accesstoken;
}
public String getAgentId() {
return agentId;
}
public void setAgentId(String agentId) {
this.agentId = agentId;
}
}
......@@ -17,7 +17,9 @@ import java.util.List;
* @date: 2020-09-22 12:06
*/
public interface ConsultSheetMapper extends GenericDao<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);
......
......@@ -18,7 +18,9 @@ import java.util.List;
public interface ConsultSheetService extends GenericService<ConsultSheet> {
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);
/**
......@@ -34,4 +36,6 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
* @return
**/
JSONObject consultSheetList(String name,Long id,String appId);
void sendQyWechatMassage(ConsultSheet consultSheet);
}
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.cftech.accounts.model.MpAccountsEntity;
import com.cftech.accounts.service.MpAccountsService;
import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.base.org.api.QyMsgUtil;
import com.cftech.base.org.model.Qyuser;
import com.cftech.base.org.service.QyuserService;
import com.cftech.consultsheet.dao.ConsultSheetMapper;
......@@ -17,13 +18,16 @@ import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants;
import com.cftech.core.util.StringUtils;
import com.cftech.core.util.SystemConfig;
import com.cftech.member.model.Member;
import com.cftech.member.service.MemberService;
import com.cftech.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -40,8 +44,10 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Autowired
@Qualifier("consultSheetMapper")
private ConsultSheetMapper consultSheetMapper;
@Autowired
private MpAccountsService mpAccountsService;
@Autowired
private OrderService orderService;
......@@ -54,6 +60,9 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Autowired
private CodingruleUtils codingruleUtils;
@Autowired
private QyMsgUtil qyMsgUtil;
static final String[] arr = new String[]{"0", "1"};
@Override
......@@ -154,11 +163,11 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
Qyuser user = qyuserService.fetchSearchByConds(userConds);
if (user.getPeakVal() > 0) {//客服峰值大于0
consultSheet.setServiceId(user.getId());
//推送消息
} else {//普通轮询
firstCustomerProcess(consultSheet);
}
String doctorId = member.getDoctorId();
userConds.equal("t.id", doctorId);
user = qyuserService.fetchSearchByConds(userConds);
......@@ -171,7 +180,12 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
firstCustomerProcess(consultSheet);
}
return consultSheetMapper.update(consultSheet) > 0;
if (consultSheetMapper.update(consultSheet) > 0) {
//推送客服,药师
sendQyWechatMassage(consultSheet);
return true;
}
return false;
}
/**
......@@ -251,4 +265,34 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
}
return true;
}
/**
* 推送企业微信消息
*/
public void sendQyWechatMassage(ConsultSheet consultSheet) {
Long accounts = Long.parseLong(SystemConfig.p.getProperty("QY_SEND_APPID"));
MpAccountsEntity accountsEntity = mpAccountsService.getDetail(accounts);
Long agenId = Long.parseLong(accountsEntity.getAgentId());
//推送客服消息
String msg = null;
Qyuser service = qyuserService.fetchById(consultSheet.getServiceId());
msg = SystemConfig.p.getProperty("QY_SEND_CUSTOMERSERVICE_MSG") + consultSheet.getConsultId();
List<Qyuser> serviceUsers = new ArrayList();
serviceUsers.add(service);
qyMsgUtil.sendText(accounts, false, serviceUsers, null, null,
agenId, msg, false);
Qyuser doctor = qyuserService.fetchById(consultSheet.getDoctorId());
msg = SystemConfig.p.getProperty("QY_SEND_DOCTOR_MSG") + consultSheet.getConsultId();
List<Qyuser> doctorUsers = new ArrayList();
doctorUsers.add(doctor);
qyMsgUtil.sendText(accounts, false, doctorUsers, null, null,
agenId, msg, false);
}
@Scheduled(cron="*/5 * * * * ?")
public void dingshi() {
System.out.println("启动定时任务5秒一次");
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ public class MobileConsultSheetController {
@RequestMapping(value = "/submitConsultSheet",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject submitConsultSheet(@RequestBody ConsultSheet consultSheet) {
public JSONObject submitConsultSheet(ConsultSheet consultSheet) {
return consultSheetService.pollingConsultSheet(consultSheet);
}
/**
......@@ -39,6 +39,15 @@ public class MobileConsultSheetController {
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject consultSheetList(String name, Long id,String appId) {
return consultSheetService.consultSheetList(name,id,appId);
return consultSheetService.consultSheetList(name, id, appId);
}
@RequestMapping(value = "/test",
method = {RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void test(Long id) {
ConsultSheet consultSheet = consultSheetService.fetchById(id);
consultSheetService.sendQyWechatMassage(consultSheet);
}
}
......@@ -4,11 +4,7 @@ WX_MP_SERVER_APPID=wxc587e8869baec269
#\u670D\u52A1\u53F7\u4E8C\u7EF4\u7801\u524D\u7F00
WX_MP_QRCODE_URI=https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=
#\u4F01\u4E1A\u53F7\u53D1\u9001\u6D88\u606F\uFF0C\u57DF\u540D\u914D\u7F6E
QY_DOMAIN_NAME = https://pd.shxrtech.com/adiea
QY_DOMAIN = https://pd.shxrtech.com
#\u6A21\u677F\u6D88\u606FID LSIT
#\u670D\u52A1\u53F7\u6A21\u677F\u6D88\u606F ID LIST
#\u54A8\u8BE2\u5355\u5BA1\u6838\u901A\u8FC7\u6A21\u677F\u6D88\u606F
CONSULT_SHEET_AUDIT_SUCCESS_TEMPLATE_MSG=AoZzYGqvG5h5wDDDOE_fUrdMOam-QTqTc7wkBO7-VmU
#\u54A8\u8BE2\u5355\u5BA1\u6838\u62D2\u7EDD\u6A21\u677F\u6D88\u606F
......@@ -16,15 +12,24 @@ CONSULT_SHEET_AUDIT_REFUSE_TEMPLATE_MSG=VSTKsUB_vK8UaiaZplmgk4IvrqIAfIiRD54mUlGR
#\u54A8\u8BE2\u4F46\u5BA1\u6838\u5931\u8D25\u6A21\u677F\u6D88\u606F
CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5UkHwk
#\u4F01\u4E1A\u53F7\u914D\u7F6E\u4FE1\u606F
ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A
AIDEA_QY_ACCOUNTS=349
#\u4F01\u4E1A\u53F7\u53D1\u9001\u6D88\u606F\uFF0C\u57DF\u540D\u914D\u7F6E
QY_DOMAIN_NAME=https://pd.shxrtech.com/adiea
QY_DOMAIN=https://pd.shxrtech.com
#\u4F01\u4E1A\u53F7\u63A8\u9001\u9ED8\u8BA4\u5E94\u7528id
QY_SEND_APPID=350
#\u63A8\u9001\u5BA2\u670D\u6D88\u606F\u6DFB\u52A0\u7528\u6237
QY_SEND_CUSTOMERSERVICE_MSG=\u60A8\u6536\u5230\u4E00\u5F20\u54A8\u8BE2\u5355\uFF0C\u54A8\u8BE2\u5355\u7F16\u7801\uFF1A
#\u63A8\u9001\u836F\u5E08\u6D88\u606F\u5BA1\u6279\u54A8\u8BE2\u5355
QY_SEND_DOCTOR_MSG=\u60A8\u6536\u5230\u4E00\u5F20\u54A8\u8BE2\u5355\uFF0C\u8BF7\u5BA1\u6279\uFF0C\u54A8\u8BE2\u5355\u7F16\u7801\uFF1A
#\u56FE\u7247\u4E0A\u4F20\u5730\u5740
#userfiles.imgdir=/Users/liuling/tools/apache-tomcat-8.0.15/data/img
#userfiles.imgdir=/mydata/fileResource
userfiles.imgdir=/mydata/fileResource
#\u4F01\u4E1A\u53F7\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F
ROOT_ORG_NAME=\u6C5F\u82CF\u827E\u8FEA\u836F\u4E1A
AIDEA_QY_ACCOUNTS=349
userfiles.imgdir=E://fileResource
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
......@@ -36,7 +41,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY=DONGCHANGINT9527;
list.refreshtoken=true
jwt.domain=pd.shxrtech.com
jwt.domain=127.0.0.1
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration=86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
......
......@@ -83,6 +83,7 @@ public class Cfarticle implements Serializable {
private Long size;
public Cfarticle() {
this.delFlag = false;
......
......@@ -49,7 +49,7 @@ public class ColumnController {
//列表页面
@RequiresPermissions(value = COLUMN_VIEW)
@RequestMapping(value = "/list",method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
public String list(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request);
model.addAttribute("accountId", accountId);
......@@ -58,7 +58,7 @@ public class ColumnController {
//编辑页面(新增、修改)
@RequiresPermissions(value = COLUMN_VIEW)
@RequestMapping(value = "/form",method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/form", method = {RequestMethod.GET, RequestMethod.POST})
public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) {
Column column = columnService.fetchById(id);
......@@ -69,7 +69,7 @@ public class ColumnController {
//提交数据(新增、修改)
@RequiresPermissions(value = COLUMN_EDIT)
@RequestMapping(value = "/formData",method = {RequestMethod.POST})
@RequestMapping(value = "/formData", method = {RequestMethod.POST})
@ResponseBody
public JSONObject formData(Column column, Model model, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
......@@ -96,9 +96,9 @@ public class ColumnController {
}
@RequestMapping(value = "getfetchDataChild",method = {RequestMethod.POST})
@RequestMapping(value = "getfetchDataChild", method = {RequestMethod.POST})
@ResponseBody
public com.alibaba.fastjson.JSONObject getfetchDataChild(HttpServletRequest request){
public com.alibaba.fastjson.JSONObject getfetchDataChild(HttpServletRequest request) {
com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONArray array = new com.alibaba.fastjson.JSONArray();
Long accountsid = UserUtils.getmpaccounts(request);
......@@ -113,13 +113,13 @@ public class ColumnController {
t.put("id", 0);
t.put("pId", -1);
t.put("name", "栏目");
t.put("open",true);
t.put("open", true);
array.add(t);
for(Column column : list){
for (Column column : list) {
com.alibaba.fastjson.JSONObject tmp = new com.alibaba.fastjson.JSONObject();
tmp.put("id",column.getId());
tmp.put("pId",0);
tmp.put("name",column.getName());
tmp.put("id", column.getId());
tmp.put("pId", 0);
tmp.put("name", column.getName());
array.add(tmp);
}
rtnJson.put("aaData", array);
......@@ -128,7 +128,7 @@ public class ColumnController {
//获取列表数据
@RequiresPermissions(value = COLUMN_VIEW)
@RequestMapping(value = "/listData",method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/listData", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, Column column, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
......@@ -160,7 +160,7 @@ public class ColumnController {
//删除数据
@RequiresPermissions(value = COLUMN_EDIT)
@RequestMapping(value = "/delete",method = {RequestMethod.POST})
@RequestMapping(value = "/delete", method = {RequestMethod.POST})
@ResponseBody
public JSONObject delete(String id) {
JSONObject rtnJosn = new JSONObject();
......
......@@ -45,13 +45,12 @@ public class QyMessageController {
private CfarticleService cfArticleService;
/**
*
* @param request
* @param massSendRecord 消息记录实体
* @param orgId 部门ID列表
* @param taglist 标签ID列表
* @param userid 人员ID列表
* @param articlesId 文章ID列表
* @param massSendRecord 消息记录实体
* @param orgId 部门ID列表
* @param taglist 标签ID列表
* @param userid 人员ID列表
* @param articlesId 文章ID列表
* @return
*/
@RequestMapping(value = "sendMessage", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......@@ -66,66 +65,66 @@ public class QyMessageController {
String domain) {
Long accountsid = UserUtils.getmpaccounts(request);
boolean isAll = false;
if(StringUtils.equals(massSendRecord.getSendType(),"0")){
isAll=true;
if (StringUtils.equals(massSendRecord.getSendType(), "0")) {
isAll = true;
}
JSONObject whereJson = new JSONObject();
List<Qyuser> qyusers = null;
if(StringUtils.isNotBlank(userid)){
if (StringUtils.isNotBlank(userid)) {
Conds qyUserConds = new Conds();
qyUserConds.equal("t.accounts_id",accountsid);
qyUserConds.equal("t.del_flag",0);
qyUserConds.in("t.id",userid.split(","));
qyusers = qyuserService.fetchSearchByPage(qyUserConds,null,0,0);
whereJson.put("userid",userid);
qyUserConds.equal("t.accounts_id", accountsid);
qyUserConds.equal("t.del_flag", 0);
qyUserConds.in("t.id", userid.split(","));
qyusers = qyuserService.fetchSearchByPage(qyUserConds, null, 0, 0);
whereJson.put("userid", userid);
}
String orgUnits[] = new String[0];
String tags[] = new String[0];
if(StringUtils.isNotBlank(orgId)){
orgUnits= orgId.split(",");
whereJson.put("orgId",orgId);
if (StringUtils.isNotBlank(orgId)) {
orgUnits = orgId.split(",");
whereJson.put("orgId", orgId);
}
if(StringUtils.isNotBlank(taglist)){
if (StringUtils.isNotBlank(taglist)) {
tags = taglist.split(",");
whereJson.put("tagList",taglist);
whereJson.put("tagList", taglist);
}
Conds cfArticleConds = new Conds();
cfArticleConds.equal("del_flag",0);
List<Cfarticle> cfarticleList = cfArticleService.fetchSearchByPageInOrder(cfArticleConds,articlesId);
cfArticleConds.equal("del_flag", 0);
List<Cfarticle> cfarticleList = cfArticleService.fetchSearchByPageInOrder(cfArticleConds, articlesId);
int i = 0;
List<QyArticle> qyArticles = new ArrayList<>();
for(Cfarticle cfArticle : cfarticleList){
for (Cfarticle cfArticle : cfarticleList) {
QyArticle qyArticle = new QyArticle();
qyArticle.setTitle(cfArticle.getTitle());
qyArticle.setDescription(cfArticle.getDesc());
String picUrl ="";
if(!cfArticle.getBigimg().startsWith("http://")){
cfArticle.setBigimg(domain+cfArticle.getBigimg());
String picUrl = "";
if (!cfArticle.getBigimg().startsWith("http://")) {
cfArticle.setBigimg(domain + cfArticle.getBigimg());
}
if(!cfArticle.getSmallimg().startsWith("http://")){
cfArticle.setSmallimg(domain+cfArticle.getSmallimg());
if (!cfArticle.getSmallimg().startsWith("http://")) {
cfArticle.setSmallimg(domain + cfArticle.getSmallimg());
}
if(i==0){
picUrl=cfArticle.getBigimg();
}else{
picUrl=cfArticle.getSmallimg();
if (i == 0) {
picUrl = cfArticle.getBigimg();
} else {
picUrl = cfArticle.getSmallimg();
}
qyArticle.setPicurl(picUrl);
if(cfArticle.getIsUrl()=='0'){
if (cfArticle.getIsUrl() == '0') {
qyArticle.setUrl(cfArticle.getContentSourceUrl());
}else{
String articleDetailUrl="";
if(cfArticle.getType().equals("0")){//普通文章详情
} else {
String articleDetailUrl = "";
if (cfArticle.getType().equals("0")) {//普通文章详情
articleDetailUrl = SystemConfig.p.get("ARTICLEDETAILURL").toString();
}else{//图集文章详情
} else {//图集文章详情
articleDetailUrl = SystemConfig.p.get("ARTICLEDETAILPICURL").toString();
}
String url = articleDetailUrl.replace("{ACCOUNTSID}",cfArticle.getAccountsId().toString()).replace("{ID}",cfArticle.getId().toString());
String url = articleDetailUrl.replace("{ACCOUNTSID}", cfArticle.getAccountsId().toString()).replace("{ID}", cfArticle.getId().toString());
qyArticle.setUrl(url);
}
qyArticles.add(qyArticle);
}
JSONObject msgJson = qyMsgUtil.sendNews(accountsid,isAll,qyusers,orgUnits,tags,agentId,qyArticles);
JSONObject msgJson = qyMsgUtil.sendNews(accountsid, isAll, qyusers, orgUnits, tags, agentId, qyArticles);
JSONObject rtnJson = new JSONObject();
massSendRecord.setAccountsid(accountsid);
massSendRecord.setArea(whereJson.toJSONString());
......
......@@ -18,25 +18,21 @@ public class Qyuser implements Serializable {
* 人员id
*/
private Long id;
/**
* 职位Id
*/
//@ExportConfig(value = "所属职位", width = 100)
private Long positionId;
/**
* role:'0', 未分配, '1': 店长, '2': 导购
*/
private String role;
/**
* 所属门店Id
*/
private Long storeId;
private String loginName;
/**
* 所属门店名称
*/
private String storeName;
/**
......@@ -65,7 +61,6 @@ public class Qyuser implements Serializable {
/**
* 微信号
*/
// @ExportConfig(value = "微信号", width = 100)
private String wxno;
/**
......@@ -85,9 +80,8 @@ public class Qyuser implements Serializable {
private Long accountsId;
/**
* 微信的人员Id
* 微信的人员Id (企业号唯一主键)
*/
//@ExportConfig(value = "账号(userid)", width = 100)
private String wxuserId;
......@@ -151,6 +145,9 @@ public class Qyuser implements Serializable {
*/
private Long assigned;
/**
* 药师医生已分配咨询单数量(峰值未满)
*/
private Long unAssigned;
......
......@@ -58,9 +58,9 @@ public class QyTokenUtil {
return null;
}
// accesstoken的key
String key = "CORPID_" + accountsEntity.getAppid();
String key = "CORPID_" + accountsEntity.getAgentId() + "_" + accountsEntity.getAppid();
// jstoken的key
String jskey = "CORPIDJS_" + accountsEntity.getAppid();
String jskey = "CORPIDJS_" + accountsEntity.getAgentId() + "_" +accountsEntity.getAppid();
if (getConfig().hasKey(key)) {
return getConfig().opsForValue().get(key);
}
......@@ -98,9 +98,9 @@ public class QyTokenUtil {
return null;
}
// accesstoken的key
String key = "CORPID_" + accountsEntity.getAppid();
String key = "CORPID_" + accountsEntity.getAgentId() + "_" + accountsEntity.getAppid();
// jstoken的key
String jskey = "CORPIDJS_" + accountsEntity.getAppid();
String jskey = "CORPIDJS_" + accountsEntity.getAgentId() + "_" + accountsEntity.getAppid();
if (getConfig().hasKey(key)) {
return getConfig().opsForValue().get(key);
}
......@@ -134,13 +134,13 @@ public class QyTokenUtil {
public String getJSTicket(Long accountId) {
MpAccountsEntity accountsEntity = searchAccountsById(accountId);
// jstoken的key
String jskey = "CORPIDJS_" + accountsEntity.getAppid();
String jskey = "CORPIDJS_" + accountsEntity.getAgentId() + "_" + accountsEntity.getAppid();
return getConfig().opsForValue().get(jskey);
}
public String getJSTicket(MpAccountsEntity accountsEntity) {
// jstoken的key
String jskey = "CORPIDJS_" + accountsEntity.getAppid();
String jskey = "CORPIDJS_" + accountsEntity.getAgentId() + "_" + accountsEntity.getAppid();
return getConfig().opsForValue().get(jskey);
}
......
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