Commit 9f796bc1 authored by jay's avatar jay

bug修复

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