OMS-GW推送-商业合作伙伴-user_center
This commit is contained in:
+20
-1
@@ -33,6 +33,7 @@ import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserRoleEntity;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserShipperEntity;
|
||||
import com.mhd.user.domain.userAggregate.event.ShipperEventPublisher;
|
||||
import com.mhd.user.domain.userAggregate.repository.mapper.UserShipperMapper;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.*;
|
||||
import com.mhd.user.domain.userAggregate.service.*;
|
||||
@@ -112,6 +113,9 @@ public class UserShipperApplicationService {
|
||||
@Resource
|
||||
private WlhyServiceFeign wlhyServiceFeign;
|
||||
|
||||
@Resource
|
||||
private UserShipperMapper userShipperMapper;
|
||||
|
||||
/**
|
||||
* @Description 查询托运人列表
|
||||
* @Author Alex
|
||||
@@ -1209,5 +1213,20 @@ public class UserShipperApplicationService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送状态更新
|
||||
* @param shipperId
|
||||
* @param pushStatus
|
||||
* @param pushTime
|
||||
* @param pushBy
|
||||
* @return
|
||||
*/
|
||||
public int updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) {
|
||||
UserShipperEntity userShipper = new UserShipperEntity();
|
||||
userShipper.setShipperId(shipperId);
|
||||
userShipper.setPushStatus(pushStatus);
|
||||
userShipper.setPushTime(pushTime);
|
||||
userShipper.setPushBy(pushBy);
|
||||
return userShipperMapper.updatePushStatus(userShipper);
|
||||
}
|
||||
}
|
||||
+11
@@ -263,4 +263,15 @@ public class UserShipperEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(name = "推送状态 1-未推送 2-推送中 3-推送成功 4-推送失败")
|
||||
private Integer pushStatus;
|
||||
@ApiModelProperty(name = "推送时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTime;
|
||||
@ApiModelProperty(name = "推送人")
|
||||
private Long pushBy;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -7,6 +7,7 @@ import com.mhd.user.domain.userAggregate.repository.todo.UserShipperDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
|
||||
@@ -28,4 +29,11 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
|
||||
List<UserShipperEntity> selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity);
|
||||
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userShipper
|
||||
* @return
|
||||
*/
|
||||
int updatePushStatus(UserShipperEntity userShipper);
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "用户中台管理-托运人管理")
|
||||
@@ -235,4 +236,20 @@ public class UserShipperAPI extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("商业合作伙伴-更新推送状态")
|
||||
@PostMapping("/updatePushStatus")
|
||||
public AjaxResult updatePushStatus(@RequestParam("shipperId") Long shipperId,
|
||||
@RequestParam("pushStatus") Integer pushStatus,
|
||||
@RequestParam("pushTime") Date pushTime,
|
||||
@RequestParam("pushBy") Long pushBy){
|
||||
|
||||
try{
|
||||
int result = userShipperApplicationService.updatePushStatus(shipperId,pushStatus,pushTime,pushBy);
|
||||
return result > 0 ? AjaxResult.success() : AjaxResult.error("更新失败");
|
||||
}catch (Exception e){
|
||||
log.error("更新推送状态异常: shipperId = {} , error = ", e.getMessage());
|
||||
return AjaxResult.error("更新推送状态异常:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -401,4 +401,16 @@
|
||||
and esign_enterprise_status = #{userShipperEntity.esignEnterpriseStatus}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updatePushStatus">
|
||||
UPDATE user_shipper
|
||||
<set>
|
||||
<if test="pushStatus != null">push_status = #{pushStatus},</if>
|
||||
<if test="pushTime != null">push_time = #{pushTime},</if>
|
||||
<if test="pushBy != null">push_by = #{pushBy},</if>
|
||||
</set>
|
||||
WHERE shipper_id = #{shipperId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user