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

Aidea product update by Strive Date 2020-11-03

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