Commit f2f457b7 authored by 廖旭伟's avatar 廖旭伟

测试bug修改

parent 9e94ac1c
......@@ -340,7 +340,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
userEntity = new UserEntity();
userEntity.setStatus(1);
userEntity.setOpenId(openId);
userEntity.setUserType(1);
userEntity.setUserType(3);
userEntity.setRealName("微信用户");
userEntity.setCreateTime(new Date());
userEntity.setCreateUserId(1L);
......
......@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.applets.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
......@@ -94,6 +95,7 @@ public class CompanyApiController extends AbstractBaseController<CompanyReq>{
* 公司知识产权数量列表及推荐产品列表
*/
@PostMapping(value = "companyInfo")
@UnAuth
public Rest<Object> companyInfo(@RequestBody CompanyReq companyReq){
String busiDesc = "公司详情";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(companyReq));
......
......@@ -21,4 +21,6 @@ public class BussinesscardVo extends BaseEntityLong {
/**收藏状态**/
private Integer favoriteStatus;
private Integer staffStatus;
}
\ No newline at end of file
......@@ -10,6 +10,8 @@ import com.mortals.xhx.module.favorites.model.FavoritesBusinesscardQuery;
import com.mortals.xhx.module.favorites.service.FavoritesBusinesscardService;
import com.mortals.xhx.module.position.model.PositionEntity;
import com.mortals.xhx.module.position.service.PositionService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -36,6 +38,8 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
private PositionService positionService;
@Autowired
private FavoritesBusinesscardService favoritesBusinesscardService;
@Autowired
private StaffService staffService;
@Override
protected void saveBefore(BussinesscardEntity entity, Context context) throws AppException {
......@@ -75,12 +79,23 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
entity.setPositionName(positionEntity.getPositionName());
}
}
StaffEntity staffEntity = staffService.getCache(String.valueOf(entity.getStaffId()));
if(staffEntity!=null){
entity.setStaffName(staffEntity.getName());
entity.setStaffStatus(staffEntity.getStaffStatus());
}
}
@Override
public BussinesscardEntity get(Long key, Context context) throws AppException {
BussinesscardEntity entity = this.dao.get(key);
if(entity!=null){
StaffEntity staffEntity = staffService.getCache(String.valueOf(entity.getStaffId()));
if(staffEntity!=null){
entity.setStaffName(staffEntity.getName());
entity.setStaffStatus(staffEntity.getStaffStatus());
}
if(context!=null && context.getUser()!=null) {
FavoritesBusinesscardEntity favoritesBusinesscardEntity = favoritesBusinesscardService.selectOne(new FavoritesBusinesscardQuery().bussinesscardId(entity.getId()).userId(context.getUser().getId()));
if(favoritesBusinesscardEntity!=null){
......
......@@ -45,7 +45,6 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
if(userEntity!=null){
entity.setFeedbackName(userEntity.getRealName());
entity.setPhotoPath(userEntity.getPhotoPath());
entity.setFeedbackName(userEntity.getRealName());
entity.setCompanyName(userEntity.getCompanyAdress());
if(StringUtils.isEmpty(entity.getContactInfo())){
entity.setContactInfo(userEntity.getPhone());
......
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