Commit fcfcc044 by zhengxj

finish 商户新增/编辑--创建订单类型 on 20191128 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25195 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 8e83e9f2
......@@ -91,6 +91,8 @@ public interface Constants {
public static final byte ORDER_TYPE_INSTALL = 1;
public static final byte ORDER_TYPE_BIDDING = 4;
public static final byte CREATE_ORDER_OFF = 0;
}
......@@ -40,18 +40,7 @@ public class SysManager extends SysUser {
*/
private String occupation;
/**
* 岗位
*/
private byte createOrderType;
public byte getCreateOrderType() {
return createOrderType;
}
public void setCreateOrderType(byte createOrderType) {
this.createOrderType = createOrderType;
}
public String getOccupation() {
return occupation;
......
......@@ -167,6 +167,19 @@ public class SysUser extends BaseModel implements Serializable {
*/
private String latitude;
/**
* 用户可以创建的订单类型
*/
private byte createOrderType;
public byte getCreateOrderType() {
return createOrderType;
}
public void setCreateOrderType(byte createOrderType) {
this.createOrderType = createOrderType;
}
public Integer getUserId() {
return userId;
}
......
......@@ -44,6 +44,7 @@ import com.glsx.usercenter.mapper.SysOrganizationMapper;
import com.glsx.usercenter.mapper.SysResourceMatchingMapper;
import com.glsx.usercenter.mapper.SysUserImageMapper;
import com.glsx.usercenter.mapper.SysUserMapper;
import com.glsx.usercenter.mapper.SysUserOrderTypeMapper;
import com.glsx.usercenter.mapper.SysUserOrgMapper;
import com.glsx.usercenter.mapper.SysUserRoleMapper;
import com.glsx.usercenter.mapper.SysUserServiceItemsMapper;
......@@ -58,6 +59,7 @@ import com.glsx.usercenter.pojo.user.SysUser;
import com.glsx.usercenter.pojo.user.SysUserExample;
import com.glsx.usercenter.pojo.user.SysUserImage;
import com.glsx.usercenter.pojo.user.SysUserImageExample;
import com.glsx.usercenter.pojo.user.SysUserOrderType;
import com.glsx.usercenter.pojo.user.SysUserOrg;
import com.glsx.usercenter.pojo.user.SysUserRole;
import com.glsx.usercenter.pojo.user.SysUserServiceItems;
......@@ -107,7 +109,8 @@ public class SysUserServiceImpl implements SysUserService {
private AsyncWebScocketMsgSend asyncWebScocketMsgSend;
@Autowired
private ISysOrganizationService iSysOrganizationService;
@Autowired
private SysUserOrderTypeMapper userOrderTypeMapper;
@Override
public List<SysManager> getAllUserList(UserQueryVo userQueryVo, Page page) {
......@@ -443,10 +446,24 @@ public class SysUserServiceImpl implements SysUserService {
// 更新角色
SysUser sysUser = new SysUser();
BeanUtils.copyProperties(sysMerchant, sysUser);
// 更新务项
// 更新务项 v1.5.1
if (null != sysUser.getServiceKeyList() && sysUser.getServiceKeyList().size() > 0) {
updateUserServiceItems(sysUser);
}
// 商户可以创建的订单类型 v1.5.1
if (com.glsx.usercenter.constants.Constants.ORDER_TYPE_INSTALL == sysMerchant.getCreateOrderType()
|| com.glsx.usercenter.constants.Constants.ORDER_TYPE_BIDDING == sysMerchant.getCreateOrderType()) {
List<SysUserOrderType> list = userOrderTypeMapper.selectByUserId(sysMerchant.getId(),
sysMerchant.getCreateOrderType());
if (list.isEmpty()) {
SysUserOrderType record = new SysUserOrderType();
record.setUserId(sysMerchant.getId());
record.setCreateOrderType((int) com.glsx.usercenter.constants.Constants.ORDER_TYPE_INSTALL);
userOrderTypeMapper.insertSelective(record);
}
} else if (com.glsx.usercenter.constants.Constants.CREATE_ORDER_OFF == sysMerchant.getCreateOrderType()) {
userOrderTypeMapper.deleteByUserId(sysMerchant.getId());
}
//如果是未知订单进来的
if (sysMerchant.getOrderId() != null && !Constants.SYS_USER_STATUS_NONUSE.equals(sysMerchant.getUserStatus())) {
JSONObject jsonObject = orderClient.updateOrdersBindShop(sysMerchant.getOrderId(), userId, sysMerchant.getServiceType());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!