Commit 9f796bc1 authored by jay's avatar jay

bug修复

parent aa96f0ca
......@@ -1008,12 +1008,13 @@ public class UserController extends BaseController {
return result;
}
@RequestMapping(value = "/judgeAdmin/{id}")
@RequestMapping(value = "/judgeAdmin")
@ResponseBody
public HResult judgeAdmin(@PathVariable int id) {
public HResult judgeAdmin(HttpServletRequest httpRequest) {
UserEntity userEntity = (UserEntity) httpRequest.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
HResult result = new HResult();
UserEntity userEntity = user.getById(id);
if(userEntity.getDeptId() != 1){
UserEntity entity = user.getById(userEntity.getId());
if (entity.getDeptId() != 1) {
result.setStatus(200);
}
return result;
......
......@@ -59,9 +59,12 @@
<li>
<a tabindex="-1" href="${ctx}/statistic/salesConversionReport/">销售转化报表分析</a>
</li>
<shiro:hasPermission name="CJTJ">
<li>
<a tabindex="-1" href="${ctx}/statistic/transactionStatusReport/">成交状态抽查报表</a>
<a tabindex="-1"
href="${ctx}/statistic/transactionStatusReport/">成交状态抽查报表</a>
</li>
</shiro:hasPermission>
<li>
<a tabindex="-1" href="${ctx}/statistic/cloudCusReport/">云迹数据统计表</a>
</li>
......
......@@ -332,7 +332,7 @@
function identityIM(uid, mobile) {
$.ajax({
url: '${ctx}/user/judgeAdmin/' + uid,
url: '${ctx}/user/judgeAdmin',
type: 'GET',
contentType: 'application/json',
dataType: 'json',
......
......@@ -114,7 +114,7 @@ public class CloudCustomerImpl implements ICloudCustomerInterface {
}
}
}
count = subList.size();
count = total;
response.setObjectList(subList);
} else {
int start = 50 * (request.getPaging().getCurrentPage() - 1);
......
......@@ -137,8 +137,6 @@ public class CustomerImpl implements ICustomer {
@Autowired
private MergeCustomerUtil mergeCustomerUtil;
@Autowired
private CustomerMergeMapper mergeMapper;
@Autowired
private CloudActivityMapper activityMapper;
@Autowired
private CloudCustomerMapper cloudCustomerMapper;
......@@ -262,7 +260,7 @@ public class CustomerImpl implements ICustomer {
map.put("phone", customerPhone);
map.put("createIdList", createList);
queryManagerMap.put("customerSourceType", 8);
List<CustomerEntity> mergeList = mergeMapper.queryByConditions(map);
List<CustomerEntity> mergeList = customerMapper.queryByConditions(map);
if (CollectionUtils.isNotEmpty(mergeList)) {
result.put("result", "0");
result.put("msg", "该号码已由其他人上报,请勿重复操作");
......@@ -2080,7 +2078,7 @@ public class CustomerImpl implements ICustomer {
mergeEntity.setBindTime(date);
mergeEntity.setUpdater(String.valueOf(user.getId()));
mergeEntity.setIsHandover(mergeEntity.getIsHandover());
mergeMapper.updateCustomerMerge(mergeEntity);
customermergemapper.updateCustomerMerge(mergeEntity);
} else {
customer.setId(id);
customermergemapper.saveCustomerMerge(customer);
......
......@@ -1054,19 +1054,21 @@ public class StaffDuty implements IStaffDuty {
@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
public void addMarketActivity() {
int sendUserId = 1;
try {
String city = "nj";
Map<String, Object> queryMap = new HashMap<>(5);
queryMap.put("onduty", 1);
queryMap.put("onduty", 0);
queryMap.put("order", 1);
List<DutyStaffEntity> list = staffMapper.queryByConditions(queryMap);
if (CollectionUtils.isNotEmpty(list)) {
DutyStaffEntity dutyStaffEntity = list.get(0);
sendUserId = Integer.parseInt(dutyStaffEntity.getUserId());
int userId = Integer.parseInt(dutyStaffEntity.getUserId());
String userName = dutyStaffEntity.getName();
MarketingActivityEntity entity = new MarketingActivityEntity();
setMarketActivity(entity, userId, userName);
int id = marketingActivityService.save(entity);
System.out.println(id);
addMarketCustomer(id, city, entity);
//通知CRM所使用的数据
MarketCustomerEntity mce = new MarketCustomerEntity();
......@@ -1098,14 +1100,17 @@ public class StaffDuty implements IStaffDuty {
e.printStackTrace();
logger.error("创建营销活动失败", e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
sendErrorMsg();
sendErrorMsg(sendUserId);
}
}
private void sendErrorMsg() {
private void sendErrorMsg(int userId) {
try {
String city = "nj";
//todo 发送短信修改
String mobile = "18862152977";
UserEntity userEntity = usermapper.getById(userId);
// String mobile = userEntity.getMobile();
String msg = "定时营销活动拉取失败";
msg = URLEncoder.encode(msg, "GBK");
String smUrl = "http://mysms.house365.com:81/index.php/Interface/apiSendMobil/jid/104/depart/1/city/";
......
......@@ -366,6 +366,15 @@
<if test="createTime != null and createTime != '' ">
AND create_time >= #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="isAdd != null and isAdd >=0">
UNION
SELECT * FROM customer
......
......@@ -20,6 +20,9 @@
<if test="onduty != null and onduty >= 0 ">
AND onduty = #{onduty}
</if>
<if test="order != null and order >= 0 ">
ORDER by updateTime DESC
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -366,6 +366,15 @@
<if test="createTime != null and createTime != '' ">
AND create_time >= #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="isAdd != null and isAdd >=0">
UNION
SELECT * FROM customer
......
......@@ -20,6 +20,9 @@
<if test="onduty != null and onduty >= 0 ">
AND onduty = #{onduty}
</if>
<if test="order != null and order >= 0 ">
ORDER by updateTime DESC
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -366,6 +366,15 @@
<if test="createTime != null and createTime != '' ">
AND create_time >= #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="isAdd != null and isAdd >=0">
UNION
SELECT * FROM customer
......
......@@ -20,6 +20,9 @@
<if test="onduty != null and onduty >= 0 ">
AND onduty = #{onduty}
</if>
<if test="order != null and order >= 0 ">
ORDER by updateTime DESC
</if>
</select>
</mapper>
\ No newline at end of file
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